/* =========================================================
   GROUP REGISTRATION
========================================================= */

.groups-page {
    background: #f1ede5;
    color: #18252b;

    overflow-x: hidden;
}


/* =========================================================
   HEADER
========================================================= */

.groups-page .site-header {
    position: relative;

    background: #f1ede5;

    border-bottom: 1px solid rgba(24, 37, 43, 0.08);
}

.groups-page .nav-container {
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.groups-page .brand {
    color: #18252b;

    text-decoration: none;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
}

.nav-back {
    color: #68655f;

    text-decoration: none;

    font-size: 0.75rem;

    transition: color 0.2s ease;
}

.nav-back:hover {
    color: #927044;
}


/* =========================================================
   HERO
========================================================= */

.groups-hero {
    padding: 90px 0 80px;
}

.back-link {
    display: inline-flex;

    margin-bottom: 60px;

    color: #716c63;

    text-decoration: none;

    font-size: 0.77rem;
}

.groups-hero-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        330px;

    gap: 70px;

    align-items: end;
}

.hero-kicker {
    color: #927044;

    font-size: 0.68rem;
    font-weight: 700;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.groups-hero h1 {
    max-width: 850px;

    margin: 18px 0 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4rem, 7vw, 7rem);
    font-weight: 400;

    line-height: 0.88;

    letter-spacing: -0.055em;
}

.groups-hero h1 span {
    display: block;

    color: #927044;
}

.groups-hero-grid > p {
    margin: 0 0 7px;

    color: #6c6962;

    font-size: 0.94rem;
    line-height: 1.85;
}


/* =========================================================
   FORM
========================================================= */

.groups-form-section {
    padding-bottom: 120px;
}

.groups-form {
    width: min(1180px, calc(100% - 40px));

    margin: 0 auto;

    padding: 10px;

    border-radius: 28px;

    background: #ddd7cc;

    box-shadow:
        0 30px 80px rgba(35, 31, 24, 0.08);
}


/* =========================================================
   SECTION
========================================================= */

.group-section {
    display: grid;

    grid-template-columns:
        65px
        minmax(0, 1fr);

    gap: 35px;

    padding: 65px;

    margin-bottom: 10px;

    border-radius: 19px;
}

.group-section:last-child {
    margin-bottom: 0;
}

.section-light {
    background: #ffffff;
}

.section-soft {
    background: #e9f0f1;
}

.section-dark {
    background: #142b39;

    color: #ffffff;
}

.declaration-section {
    background: #f0e6d3;
}

.section-number {
    padding-top: 8px;

    color: #927044;

    font-size: 0.7rem;
    font-weight: 700;

    letter-spacing: 0.14em;
}

.group-section-main {
    min-width: 0;
}


/* =========================================================
   HEADINGS
========================================================= */

.section-heading {
    margin-bottom: 40px;
}

.section-heading > span {
    display: block;

    margin-bottom: 10px;

    color: #927044;

    font-size: 0.67rem;
    font-weight: 700;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2 {
    max-width: 700px;

    margin: 0;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    font-weight: 400;

    line-height: 0.98;

    letter-spacing: -0.045em;
}

.section-heading p {
    max-width: 600px;

    margin: 17px 0 0;

    color: #77736c;

    font-size: 0.88rem;
    line-height: 1.7;
}

.section-dark .section-heading p {
    color: rgba(255,255,255,0.65);
}

.section-dark .section-heading h2 {
    color: #ffffff;
}


/* =========================================================
   QUESTION CARD
========================================================= */

.question-card {
    width: 100%;

    padding: 30px;

    box-sizing: border-box;

    border: 1px solid #e2ddd4;

    border-radius: 17px;

    background: #faf9f6;
}

.dark-card {
    border-color: rgba(255,255,255,0.12);

    background: rgba(255,255,255,0.06);
}


/* =========================================================
   GRID
========================================================= */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 22px;
}

.field {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 9px;

    margin-bottom: 22px;
}

.field:last-child {
    margin-bottom: 0;
}

.field-full {
    grid-column: 1 / -1;
}

.field label,
.field-label {
    color: #333633;

    font-size: 0.76rem;
    font-weight: 700;

    line-height: 1.45;
}

.dark-card .field label {
    color: #ffffff;
}


/* =========================================================
   INPUTS
========================================================= */

.field input,
.field select,
.field textarea,
.person-field input {
    width: 100%;
    max-width: 100%;

    min-width: 0;

    box-sizing: border-box;

    padding: 15px 16px;

    border: 1px solid #dcd7ce;

    border-radius: 11px;

    background: #ffffff;

    color: #1e282c;

    font: inherit;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.field textarea {
    min-height: 125px;

    resize: vertical;

    line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.person-field input:focus {
    border-color: #927044;

    box-shadow:
        0 0 0 4px rgba(146,112,68,0.08);
}


/* =========================================================
   CHOICE CARDS
========================================================= */

.choice-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;

    width: 100%;
}

.choice-grid.four {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}

.choice-grid.three {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.choice-card {
    position: relative;

    min-width: 0;

    display: flex;
    align-items: center;

    min-height: 58px;

    padding: 0 16px;

    box-sizing: border-box;

    border: 1px solid #ddd8cf;

    border-radius: 11px;

    background: #ffffff;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.choice-card:hover {
    border-color: #927044;

    transform: translateY(-1px);
}

.choice-card input {
    position: absolute;

    opacity: 0;
    pointer-events: none;
}

.choice-card span {
    width: 100%;

    color: #3b3c38;

    font-size: 0.77rem;
    line-height: 1.4;
}

.choice-card:has(input:checked) {
    border-color: #927044;

    background: #f2e8d7;
}

.choice-card:has(input:checked) span {
    color: #76582f;

    font-weight: 700;
}


/* =========================================================
   YES / NO
========================================================= */

.option-row {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}

.radio-option {
    position: relative;

    min-width: 105px;
    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 20px;

    border: 1px solid #ddd8cf;

    border-radius: 11px;

    background: #ffffff;

    cursor: pointer;
}

.radio-option input {
    position: absolute;

    opacity: 0;
}

.radio-option span {
    font-size: 0.78rem;
    font-weight: 600;
}

.radio-option:has(input:checked) {
    border-color: #927044;

    background: #927044;

    color: #ffffff;
}


/* =========================================================
   LEADERSHIP
========================================================= */

.leadership-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 14px;

    margin-bottom: 25px;
}

.person-field {
    display: flex;
    flex-direction: column;

    gap: 10px;

    padding: 20px;

    border: 1px solid #e0dbd2;

    border-radius: 13px;

    background: #ffffff;
}

.person-field .field-label {
    margin-bottom: 3px;
}

.person-field input {
    padding: 13px 14px;
}

.member-count {
    padding-top: 25px;

    border-top: 1px solid #e2ddd5;
}


/* =========================================================
   DARK SECTION
========================================================= */

.dark-card .choice-card {
    border-color: rgba(255,255,255,0.15);

    background: rgba(255,255,255,0.08);
}

.dark-card .choice-card span {
    color: rgba(255,255,255,0.82);
}

.dark-card .choice-card:hover {
    border-color: #c9a66b;
}

.dark-card .choice-card:has(input:checked) {
    border-color: #c9a66b;

    background: #927044;
}

.dark-card .radio-option {
    border-color: rgba(255,255,255,0.15);

    background: rgba(255,255,255,0.08);

    color: #ffffff;
}

.dark-card .radio-option:has(input:checked) {
    border-color: #c9a66b;

    background: #927044;
}


/* =========================================================
   DECLARATION
========================================================= */

.declaration-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 22px;

    border: 1px solid #ddd;
    border-radius: 18px;

    background: #fff;

    cursor: pointer;

    overflow: hidden;
}

.declaration-box input {
    flex: 0 0 22px;

    width: 22px;
    height: 22px;

    margin: 2px 0 0 0;

    accent-color: #9b7741;
}

.declaration-box span {
    flex: 1 1 auto;

    min-width: 0;
    width: 100%;
    max-width: 100%;

    line-height: 1.7;

    overflow-wrap: anywhere;
    word-break: normal;
}


/* =========================================================
   SUBMIT
========================================================= */

.submit-area {
    display: flex;

    align-items: center;

    gap: 20px;

    margin-top: 30px;
}

.submit-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 30px;

    min-height: 58px;

    padding: 0 28px;

    border: 0;

    border-radius: 11px;

    background: #142b39;

    color: #ffffff;

    cursor: pointer;

    font: inherit;

    font-size: 0.78rem;
    font-weight: 600;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.submit-btn:hover {
    background: rgba(0, 8, 46, 0.76);

    transform: translateY(-2px);
}

.submit-btn span {
    font-size: 1.15rem;
}

.submit-area p {
    margin: 0;

    color: #827b70;

    font-size: 0.71rem;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 950px) {

    .groups-hero-grid {
        grid-template-columns:
            minmax(0, 1fr)
            270px;

        gap: 40px;
    }

    .group-section {
        grid-template-columns:
            45px
            minmax(0, 1fr);

        gap: 25px;

        padding: 50px 40px;
    }

    .choice-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .choice-grid.four {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .leadership-grid {
        grid-template-columns:
            1fr;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 720px) {

    .groups-hero {
        padding: 70px 0 55px;
    }

    .back-link {
        margin-bottom: 40px;
    }

    .groups-hero-grid {
        grid-template-columns: 1fr;

        gap: 28px;
    }

    .groups-hero h1 {
        font-size: clamp(3.4rem, 13vw, 5.1rem);
    }

    .groups-form-section {
        padding-bottom: 70px;
    }

    .groups-form {
        width: calc(100% - 20px);

        padding: 6px;

        border-radius: 21px;
    }

    .group-section {
        display: block;

        padding: 43px 20px;

        border-radius: 15px;
    }

    .section-number {
        margin-bottom: 18px;
    }

    .section-heading {
        margin-bottom: 30px;
    }

    .section-heading h2 {
        font-size: 2.35rem;
    }

    .question-card {
        padding: 20px;

        border-radius: 14px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-full {
        grid-column: auto;
    }

    .choice-grid,
    .choice-grid.four,
    .choice-grid.three {
        grid-template-columns: 1fr;
    }

    .leadership-grid {
        grid-template-columns: 1fr;
    }

    .submit-area {
        flex-direction: column;

        align-items: stretch;
    }

    .submit-btn {
        width: 100%;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .groups-hero {
        padding-top: 60px;
    }

    .groups-hero h1 {
        font-size: 3.15rem;
    }

    .groups-form {
        width: calc(100% - 12px);

        padding: 4px;
    }

    .group-section {
        padding: 36px 15px;
    }

    .section-heading h2 {
        font-size: 2.05rem;
    }

    .question-card {
        padding: 16px;
    }

    .declaration-box {
        padding: 17px;

        border-radius: 12px;
    }

}
/* =================================
   MOBILE FORM FIX — iPHONE / SAFARI
================================= */

@media (max-width: 600px) {

    .groups-form,
    .group-section,
    .group-section-main,
    .question-card,
    .form-grid,
    .field {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .group-section {
        overflow: hidden;
    }

    .question-card {
        overflow: hidden;
    }

    .form-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .field {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .field input,
    .field select,
    .field textarea {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .field input[type="date"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        appearance: none;
        -webkit-appearance: none;
    }
}
input,
select,
textarea,
button {
    box-sizing: border-box;
    max-width: 100%;
}
/* Fix mobile form input overflow */
.groups-form input,
.groups-form select,
.groups-form textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.groups-form .field {
    min-width: 0;
}

@media (max-width: 600px) {

    .groups-form input[type="date"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .question-card {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

}
@media (max-width: 600px) {

    .declaration-box {
        display: flex;
        width: 100%;
        padding: 20px 16px;
        gap: 12px;

        align-items: flex-start;
    }

    .declaration-box span {
        min-width: 0;
        max-width: calc(100% - 34px);

        overflow-wrap: break-word;
        word-wrap: break-word;
    }
}