@charset 'utf-8';

.card {position: relative; padding: 1.5em; background: none;}

/* organization */
#organization {
    position: relative;
    margin-bottom: 2em;
}
#organization .card {
    width: 200px;
    margin: 0 auto;
    text-align: center;
    border-radius: 1.5em;
    background-color: var(--color-bak);
    padding: 1em;
}
#organization .card-stem {width: 200px; position: relative; margin: 0 auto;}
#organization .card-stem .card {margin-bottom: 2em;}

#organization .card-stem .card::before,
#organization .card-stem .card:nth-of-type(3)::after {
    content: '';
    position: absolute;
    bottom: -2em;
    left: 50%;
    height: calc(2em + 1px);
    width: 0;
    border-left: 1px solid var(--color-grey);
    z-index: -1;
    transform: translateY(1px);
}
#organization .card-stem .card:nth-of-type(2)::before {height: calc(6em + 1px); bottom: -6em;}
#organization .card-stem .card:nth-of-type(3)::before {
    height: 54px;
    top: -55px;
}
#organization .card-stem .card:nth-of-type(3)::after {
    height: 54px;
    bottom: -54px;
}

#organization .card span {position: relative; display: block;}
#organization .card-stem .card span:first-child {font-weight: 900;}

#organization .card-stem .card:nth-child(1) {background: var(--color-main);color: var(--color-bak);border: 0;font-size: 1.1em;padding: 1.1em;}
#organization .card-stem .card:nth-child(2) {background: #e0f3db; border: 0; margin-bottom: 6em;}
#organization .card-stem .card:nth-child(3) {
    position: absolute;
    z-index: 1;
    transform: translate(-200px, -108%);
    margin: 0;
}

#organization .card-stem .card:nth-child(2)::after,
#organization .card-stem .card:nth-child(4)::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 0;
    top: 50%;
    left: -100px;
    border-top: 1px solid var(--color-grey);
}

#organization .bottom {
    display: grid;
    grid-template-columns: 200px 200px 200px;
    justify-content: center;
    gap: 1em;
}
#organization .bottom .col {
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 0;
}
#organization .bottom .card {
    background: #f7f7f7;
    color: #666;
}

@media all and (max-width: 768px) {
    #organization {margin-bottom: 1em;padding: 1em;}
    #organization .card-stem {width: calc(100% / 3);}
    #organization .card-stem .card {margin-bottom: 1em !important;}
    #organization .card-stem .card:nth-child(3) {position: relative; transform: none; left: unset;}
    #organization .card-stem .card::before {display: none;}
    #organization .card-stem .card:nth-child(2)::after,
    #organization .card-stem .card:nth-child(4)::after,
    #organization .card-stem .card:nth-child(3)::after {display: none;}
    #organization .card {width: 100%;font-size: var(--small-font-size);}
    #organization .bottom {grid-template-columns: 1fr 1fr 1fr;}
}

/* duty */
.card-container {
    display: grid;
    grid-template-columns:  1fr 1fr 1fr;
    gap: 2em;
}

@media all and (max-width: 768px) {
    .card-container {grid-template-columns: 1fr; gap: 1em;}
}