/* =========================================================
   클럽 목록
========================================================= */

.club-list-section {
    padding: 84px 0 120px;
}


/* =========================================================
   검색 및 클럽 수
========================================================= */

.club-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 34px;
    padding: 22px 26px;

    border: 1px solid var(--line);
    border-radius: 20px;

    background: var(--white);
    box-shadow: 0 14px 34px rgba(4, 29, 56, 0.06);
}

.club-list-toolbar__summary {
    display: flex;
    align-items: center;
    gap: 12px;

    min-width: 0;
    flex-shrink: 0;
}

.club-list-toolbar__summary strong {
    color: var(--navy);

    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.club-list-toolbar__summary span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 74px;
    height: 38px;
    padding: 0 16px;

    border-radius: 999px;

    color: var(--white);
    background: var(--navy);

    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}


/* =========================================================
   검색창
========================================================= */

.club-list-search {
    display: flex;
    align-items: center;
    gap: 10px;

    width: min(100%, 430px);
}

.club-list-search__label {
    position: absolute;

    overflow: hidden;

    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;

    border: 0;

    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.club-list-search__field {
    position: relative;

    flex: 1;
    min-width: 0;
}

.club-list-search__input {
    display: block;

    width: 100%;
    height: 48px;
    padding: 0 46px 0 16px;

    border: 1px solid #d6dee7;
    border-radius: 14px;

    color: var(--text);
    background: #f8fafc;

    font-family: inherit;
    font-size: 15px;
    line-height: 1;

    outline: none;
    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.club-list-search__input::placeholder {
    color: #939eaa;
}

.club-list-search__input:focus {
    border-color: var(--blue);
    background: var(--white);

    box-shadow: 0 0 0 4px rgba(11, 76, 140, 0.08);
}

.club-list-search__clear {
    position: absolute;
    top: 50%;
    right: 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    border-radius: 50%;

    color: #74808d;
    background: #e9eef3;

    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;

    transform: translateY(-50%);

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.club-list-search__clear:hover {
    color: var(--white);
    background: var(--navy);
}

.club-list-search__button {
    flex-shrink: 0;

    height: 48px;
    padding: 0 20px;

    border: 0;
    border-radius: 14px;

    color: var(--white);
    background: var(--blue);

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.club-list-search__button:hover {
    background: var(--navy);

    box-shadow: 0 10px 20px rgba(4, 29, 56, 0.15);
    transform: translateY(-1px);
}


/* =========================================================
   카드 목록
========================================================= */

.club-list-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.club-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 100%;
    padding: 28px 24px 24px;

    border: 1px solid var(--line);
    border-radius: 24px;

    background: var(--white);
    box-shadow: 0 16px 40px rgba(4, 29, 56, 0.08);

    box-sizing: border-box;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.club-card:hover {
    border-color: rgba(11, 76, 140, 0.24);

    box-shadow: 0 22px 46px rgba(4, 29, 56, 0.12);
    transform: translateY(-4px);
}


/* 처음 9개 이후 숨김 */

.club-card--hidden {
    display: none;
}


/* 더보기로 나타날 때 */

.club-card--revealed {
    animation: clubCardReveal 0.45s ease both;
}


/* =========================================================
   카드 상단
========================================================= */

.club-card__head {
    display: flex;
    align-items: center;
    gap: 16px;

    min-width: 0;
    margin-bottom: 22px;
}

.club-card__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex-shrink: 0;

    width: 62px;
    height: 62px;
    padding: 4px;

    border: 1px solid #e5eaf0;
    border-radius: 50%;

    color: var(--navy);

    background:
        linear-gradient(
            180deg,
            #f9fbfd 0%,
            #eef3f8 100%
        );

    font-size: 17px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.06em;
    text-align: center;

    box-sizing: border-box;
}

.club-card__mark span {
    display: block;

    white-space: nowrap;
}

.club-card__mark--four {
    gap: 1px;

    font-size: 15px;
    line-height: 1.05;
}

.club-card__title-wrap {
    min-width: 0;
}

.club-card__title {
    margin: 0;

    color: var(--navy);

    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.03em;

    word-break: keep-all;
    overflow-wrap: anywhere;
}

.club-card__subtitle {
    margin: 6px 0 0;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.5;
}


/* =========================================================
   카드 정보
========================================================= */

.club-card__meta {
    display: grid;
    gap: 12px;

    margin: 0;
}

.club-card__meta-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
    gap: 12px;

    padding-top: 12px;

    border-top: 1px solid #edf1f5;
}

.club-card__meta-item dt {
    color: var(--blue);

    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;

    word-break: keep-all;
}

.club-card__meta-item dd {
    min-width: 0;
    margin: 0;

    color: var(--text);

    font-size: 14px;
    line-height: 1.7;

    word-break: keep-all;
    overflow-wrap: anywhere;
}


/* =========================================================
   집행부 보기 버튼
========================================================= */

.club-card__actions {
    margin-top: auto;
    padding-top: 24px;
}

.club-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 138px;
    height: 46px;
    padding: 0 18px;

    border: 1px solid var(--navy);
    border-radius: 999px;

    color: var(--navy);
    background: var(--white);

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;

    cursor: pointer;
    appearance: none;
    box-sizing: border-box;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.club-card__button:hover {
    color: var(--white);
    background: var(--navy);
    border-color: var(--navy);

    transform: translateY(-1px);
}


/* =========================================================
   더보기
========================================================= */

.club-list-more {
    display: flex;
    justify-content: center;

    margin-top: 42px;
}

.club-list-more--finished {
    display: none;
}

.club-list-more__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-width: 210px;
    height: 54px;
    padding: 0 18px 0 24px;

    border: 0;
    border-radius: 999px;

    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--navy) 0%,
            var(--blue) 100%
        );

    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;

    cursor: pointer;

    box-shadow: 0 14px 28px rgba(4, 29, 56, 0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.club-list-more__button:hover {
    box-shadow: 0 18px 34px rgba(4, 29, 56, 0.23);
    transform: translateY(-2px);
}

.club-list-more__text {
    white-space: nowrap;
}



/* =========================================================
   결과 없음
========================================================= */

.club-list-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    min-height: 340px;
    padding: 60px 24px;

    border: 1px solid var(--line);
    border-radius: 24px;

    background: var(--white);
    box-shadow: 0 16px 40px rgba(4, 29, 56, 0.06);

    text-align: center;
    box-sizing: border-box;
}

.club-list-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;
    margin-bottom: 20px;

    border-radius: 50%;

    color: var(--navy);
    background: #edf3f8;

    font-size: 24px;
    font-weight: 800;
}

.club-list-empty__title {
    color: var(--navy);

    font-size: 21px;
    font-weight: 800;
    line-height: 1.4;
}

.club-list-empty__desc {
    margin: 8px 0 0;

    color: var(--muted);

    font-size: 15px;
    line-height: 1.7;
}

.club-list-empty__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 150px;
    height: 46px;
    margin-top: 22px;
    padding: 0 20px;

    border-radius: 999px;

    color: var(--white);
    background: var(--navy);

    font-size: 14px;
    font-weight: 800;
    text-decoration: none;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.club-list-empty__button:hover {
    background: var(--blue);
    transform: translateY(-1px);
}


/* =========================================================
   집행부 팝업
========================================================= */

body.club-modal-open {
    overflow: hidden;
}

.club-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 30px;

    box-sizing: border-box;
}

.club-modal.is-open {
    display: flex;
}

.club-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(2, 16, 31, 0.7);

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    animation: clubModalFadeIn 0.25s ease;
}

.club-modal__dialog {
    position: relative;
    z-index: 1;

    width: min(100%, 480px);
    max-height: calc(100vh - 60px);
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 22px;

    background: var(--white);
    box-shadow: 0 30px 90px rgba(0, 15, 31, 0.34);

    animation: clubModalDialogIn 0.28s ease;
}

.club-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 18px 20px;

    border-bottom: 1px solid #e7edf2;

    background:
        linear-gradient(
            135deg,
            #f9fbfd 0%,
            #f1f5f9 100%
        );
}

.club-modal__heading {
    min-width: 0;
}

.club-modal__eyebrow {
    display: block;

    margin-bottom: 5px;

    color: var(--blue);

    font-size: 11px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.12em;
}

.club-modal__title {
    margin: 0;

    color: var(--navy);

    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: -0.03em;

    word-break: keep-all;
}

.club-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 36px;
    height: 36px;
    padding: 0;

    border: 1px solid #dfe6ed;
    border-radius: 50%;

    color: var(--navy);
    background: var(--white);

    font-family: inherit;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.club-modal__close:hover {
    color: var(--white);
    background: var(--navy);
    border-color: var(--navy);

    transform: rotate(5deg);
}

.club-modal__content {
    max-height: calc(100vh - 150px);
    overflow-x: hidden;
    overflow-y: auto;

    padding: 0;

    color: var(--text);

    font-size: 15px;
    line-height: 1.7;

    box-sizing: border-box;
}

.club-modal__content table {
    width: 100%;

    border-collapse: collapse;
    border-spacing: 0;
}

.club-modal__content th,
.club-modal__content td {
    padding: 13px 12px;

    border: 1px solid #e1e8ee;

    font-size: 14px;
    line-height: 1.6;
    text-align: left;
    vertical-align: middle;

    word-break: keep-all;
}

.club-modal__content th {
    width: 120px;

    color: var(--navy);
    background: #f4f7fa;

    font-weight: 800;
}

.club-modal__content ul,
.club-modal__content ol {
    margin: 0;
    padding-left: 20px;
}

.club-modal__content p:first-child {
    margin-top: 0;
}

.club-modal__content p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   팝업 로딩
========================================================= */

.club-modal__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    min-height: 160px;

    color: var(--muted);

    text-align: center;
}

.club-modal__loading p {
    margin: 16px 0 0;

    font-size: 14px;
}

.club-modal__spinner {
    display: block;

    width: 42px;
    height: 42px;

    border: 4px solid #e4ebf1;
    border-top-color: var(--blue);
    border-radius: 50%;

    animation: clubModalSpin 0.8s linear infinite;
}

.club-modal__error {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    min-height: 220px;

    text-align: center;
}

.club-modal__error strong {
    color: var(--navy);

    font-size: 18px;
    font-weight: 800;
}

.club-modal__error p {
    margin: 8px 0 0;

    color: var(--muted);

    font-size: 14px;
}


/* =========================================================
   애니메이션
========================================================= */

@keyframes clubCardReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes clubModalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes clubModalDialogIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes clubModalSpin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   태블릿
========================================================= */

@media (max-width: 1024px) {
    .club-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   모바일
========================================================= */

@media (max-width: 768px) {
    .club-list-section {
        padding: 70px 0 84px;
    }

    .club-list-toolbar {
        flex-direction: column;
        align-items: stretch;

        padding: 20px;
    }

    .club-list-toolbar__summary {
        justify-content: space-between;
    }

    .club-list-search {
        width: 100%;
    }

    .club-list-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .club-card {
        padding: 24px 20px 22px;

        border-radius: 20px;
    }

    .club-card__head {
        gap: 14px;

        margin-bottom: 18px;
    }

    .club-card__mark {
        width: 56px;
        height: 56px;

        font-size: 16px;
    }

    .club-card__mark--four {
        font-size: 14px;
    }

    .club-card__title {
        font-size: 22px;
    }

    .club-card__meta-item {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .club-list-more {
        margin-top: 34px;
    }

    .club-list-more__button {
        width: 100%;
        max-width: 320px;
    }

    .club-modal {
        padding: 18px;
    }

    .club-modal__dialog {
        width: min(100%, 440px);
        max-height: calc(100vh - 36px);

        border-radius: 20px;
    }

    .club-modal__header {
        padding: 16px 18px;
    }

    .club-modal__title {
        font-size: 18px;
    }

    .club-modal__close {
        width: 34px;
        height: 34px;
    }

    .club-modal__content {
        max-height: calc(100vh - 140px);
        padding: 0;
    }

    .club-modal__content th,
    .club-modal__content td {
        padding: 11px 9px;

        font-size: 13px;
    }

    .club-modal__content th {
        width: 94px;
    }
}


/* =========================================================
   작은 모바일
========================================================= */

@media (max-width: 480px) {
    .club-list-search {
        flex-direction: column;
    }

    .club-list-search__field {
        width: 100%;
    }

    .club-list-search__button {
        width: 100%;
    }

    .club-card__meta-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .club-card__button {
        width: 100%;
    }

    .club-list-more__button {
        gap: 10px;
    }

    .club-modal {
        align-items: center;

        padding: 10px;
    }

    .club-modal__dialog {
        width: 100%;
        max-height: calc(100vh - 20px);

        border-radius: 18px;
    }

    .club-modal__header {
        padding: 14px 16px;
    }

    .club-modal__content {
        max-height: calc(100vh - 130px);
        padding: 0;
    }

    .club-modal__content table,
    .club-modal__content tbody,
    .club-modal__content tr,
    .club-modal__content th,
    .club-modal__content td {
        display: block;

        width: 100%;
        box-sizing: border-box;
    }

    .club-modal__content tr {
        overflow: hidden;

        margin-bottom: 12px;

        border: 1px solid #e1e8ee;
        border-radius: 12px;
    }

    .club-modal__content th,
    .club-modal__content td {
        border: 0;
    }

    .club-modal__content th {
        width: 100%;

        border-bottom: 1px solid #e1e8ee;
    }
}