* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo img {
    height: 100px;
    margin: 0 10px;
}

.benefits {
    text-align: center;
    margin-bottom: 40px;
}

.benefits-list {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.benefits-list p {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.benefit-item {
    text-align: center;
    background-color: #fff;
    padding: 20px;
    width: 250px;
    margin: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
}

.benefit-number {
    font-size: 24px;
    font-weight: bold;
    font-family: 'Poppins', sans-serif;
    color: #003058;
    margin-bottom: 10px;
} 

.form-section {
    background-color: #fff;
    padding: 35px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.signup-form {
    display: flex;
    flex-direction: column;
}

.signup-form label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    text-align: left;
    font-size: 14px;
}

.signup-form input[type="text"],
.signup-form input[type="email"],
.signup-form input[type="tel"],
.signup-form input[type="number"],
.signup-form select,
.signup-form textarea {
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fcfcfc;
    font-size: 15px;
    width: 100%;
    outline: none;
    transition: all 0.2s ease-in-out;
}

.signup-form input:focus,
.signup-form select:focus,
.signup-form textarea:focus {
    border-color: #003058;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 48, 88, 0.08);
}

.signup-form textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Stepper indicators */
.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    position: relative;
    padding: 0 10px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    flex: 1;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    color: #999;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 11px;
    font-weight: 600;
    color: #999;
    margin-top: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.step.active .step-num {
    background-color: #003058;
    border-color: #003058;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 48, 88, 0.15);
}

.step.active .step-label {
    color: #003058;
    font-weight: 700;
}

.step.completed .step-num {
    background-color: #ffc72c;
    border-color: #ffc72c;
    color: #003058;
}

.step.completed .step-label {
    color: #ffc72c;
}

.step-line {
    height: 2px;
    background-color: #e0e0e0;
    flex-grow: 1;
    margin: 0 -15px;
    position: relative;
    top: -10px;
    z-index: 1;
    transition: all 0.3s ease;
}

.step-line.active {
    background-color: #003058;
}

/* Multi-step form step blocks */
.form-step {
    display: none;
    opacity: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step.active {
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-in-out forwards;
}

/* Toggle Yes/No Segmented Buttons */
.toggle-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.toggle-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fcfcfc;
    color: #555;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}

.toggle-btn:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.toggle-btn.active {
    background-color: #003058;
    color: #fff;
    border-color: #003058;
}

/* Button arrangements */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.submit-button,
.secondary-button {
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
    border: none;
}

.submit-button {
    background-color: #003058;
    color: white;
}

.submit-button:hover {
    background-color: #ffc72c;
    color: #003058;
}

.secondary-button {
    background-color: transparent;
    border: 1.5px solid #003058;
    color: #003058;
}

.secondary-button:hover {
    background-color: rgba(0, 48, 88, 0.05);
}

.submit-button:disabled {
    background-color: #999;
    color: #ccc;
    cursor: not-allowed;
}

/* Conditional Field display container */
.conditional-field {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
}

.conditional-field.show {
    opacity: 1;
    max-height: 120px;
    margin-bottom: 0; /* Keeps layout spacing tidy */
}

/* Declaration container */
.declaration-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    margin: 10px 0 25px;
}

.declaration-container input[type="checkbox"] {
    margin-top: 4px;
    width: auto;
    cursor: pointer;
}

.declaration-container label {
    font-weight: normal;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.5;
}

/* Review & Confirm Styles */
.review-card {
    background-color: #fcfcfc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 25px;
    text-align: left;
}

.review-section {
    margin-bottom: 24px;
}

.review-section:last-child {
    margin-bottom: 0;
}

.review-section h3 {
    font-size: 15px;
    color: #003058;
    border-bottom: 1.5px solid #e2e8f0;
    padding-bottom: 6px;
    margin-bottom: 14px;
    font-weight: 700;
}

.review-row {
    display: flex;
    margin-bottom: 10px;
    font-size: 14px;
}

.review-label {
    font-weight: 600;
    color: #64748b;
    width: 150px;
    flex-shrink: 0;
}

.review-value {
    color: #1e293b;
    flex-grow: 1;
    word-break: break-word;
}

.review-block {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
    font-size: 14px;
}

.review-block .review-label {
    width: 100%;
    margin-bottom: 5px;
}

.review-block .review-value {
    background-color: #f1f5f9;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13.5px;
    line-height: 1.5;
    white-space: pre-wrap;
    border-left: 3px solid #003058;
}

h2 {
    color: #003058;
}

@media screen and (max-width: 480px) {
    .form-section {
        padding: 25px 20px;
    }
    .stepper {
        margin-bottom: 25px;
    }
    .step-label {
        display: none; /* Hide labels on very small screens for spacing */
    }
    .step-num {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    .review-row {
        flex-direction: column;
        margin-bottom: 12px;
    }
    .review-label {
        width: 100%;
        margin-bottom: 2px;
    }
}

/* Membership registration page */
body:has(.membership-page) {
    background: #f3f6f8;
    color: #263746;
}

.membership-page {
    --member-blue: #003058;
    --member-gold: #ffc72c;
    --member-text: #263746;
    --member-muted: #536474;
    --member-border: #cbd5de;
    --member-surface: #ffffff;
    --member-field: #fbfcfd;
    max-width: 1040px;
    padding: 118px 24px 64px;
    color: var(--member-text);
}

.membership-page .header {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.membership-intro {
    max-width: 720px;
    margin: 0 auto;
    color: var(--member-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.membership-page .logo {
    margin: 0 0 14px;
}

.membership-page .logo img {
    width: auto;
    height: 100px;
    object-fit: contain;
}

.membership-page .form-section {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    scroll-margin-top: 92px;
    padding: 36px clamp(20px, 5vw, 48px) 40px;
    border: 1px solid #e1e7ec;
    border-radius: 12px;
    background: var(--member-surface);
    box-shadow: 0 18px 48px rgba(0, 48, 88, 0.08);
    text-align: left;
}

.membership-page .form-section > h2 {
    margin: 0 0 24px;
    color: var(--member-blue);
    font-size: clamp(1.35rem, 3vw, 1.65rem);
    text-align: center;
    letter-spacing: -0.02em;
}

.membership-page .field-help {
    margin: 0 0 24px;
    color: var(--member-muted);
    font-size: 0.875rem;
    line-height: 1.55;
    text-align: left;
}

.membership-page .stepper {
    max-width: 520px;
    margin: 0 auto 32px;
    padding: 0;
}

.membership-page .step {
    min-width: 0;
}

.membership-page .step-num {
    width: 38px;
    height: 38px;
    border-color: #b9c5cf;
    color: #536474;
}

.membership-page .step.active .step-num {
    border-color: var(--member-blue);
    background: var(--member-blue);
    box-shadow: 0 0 0 4px rgba(0, 48, 88, 0.12);
}

.membership-page .step.completed .step-num {
    border-color: var(--member-gold);
    background: var(--member-gold);
    color: var(--member-blue);
}

.membership-page .step-label {
    max-width: 150px;
    color: var(--member-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.membership-page .step.active .step-label,
.membership-page .step.completed .step-label {
    color: var(--member-blue);
}

.membership-page .step-line {
    top: -12px;
    margin: 0 -12px;
    background: #dbe2e8;
}

.membership-page .step-line.active {
    background: var(--member-blue);
}

.membership-form {
    text-align: left;
}

.membership-form .form-step {
    gap: 0;
}

.membership-form .form-step > h3 {
    margin: 0 0 24px;
    color: var(--member-blue);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.membership-form label {
    margin: 0 0 7px;
    color: var(--member-text);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
}

.membership-form input[type="text"],
.membership-form input[type="email"],
.membership-form input[type="tel"],
.membership-form input[type="date"],
.membership-form input[type="file"],
.membership-form select {
    width: 100%;
    min-height: 48px;
    margin: 0 0 20px;
    padding: 11px 13px;
    border: 1px solid var(--member-border);
    border-radius: 7px;
    background: var(--member-field);
    color: var(--member-text);
    font: inherit;
    font-size: 0.95rem;
}

.membership-form input[type="file"] {
    min-height: unset;
    padding: 9px;
}

.photo-preview,
.review-photo-preview {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin: -4px 0 22px;
    padding: 12px;
    border: 1px solid #dce4ea;
    border-radius: 8px;
    background: #f8fafc;
}

.photo-preview[hidden],
.review-photo-preview[hidden] {
    display: none;
}

.photo-preview img,
.review-photo-preview img {
    display: block;
    width: 110px;
    height: 110px;
    border-radius: 6px;
    background: #e8eef3;
    object-fit: cover;
}

.photo-preview figcaption,
.review-photo-preview figcaption {
    min-width: 0;
    color: var(--member-muted);
    font-size: 0.84rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.membership-form input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 12px;
    border: 0;
    border-radius: 5px;
    background: #e8eef3;
    color: var(--member-blue);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.membership-form input:focus-visible,
.membership-form select:focus-visible,
.membership-form button:focus-visible,
.membership-form a:focus-visible {
    outline: 3px solid #6da4cc;
    outline-offset: 2px;
}

.membership-form .field-help {
    margin: -12px 0 20px;
    font-size: 0.82rem;
}

.membership-form .member-id-help {
    margin-top: -13px;
}

.membership-form .member-id-help a {
    color: var(--member-blue);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.membership-form .consent-fieldset {
    min-width: 0;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    text-align: left;
}

.membership-form .consent-fieldset legend {
    margin: 0 0 12px;
    color: var(--member-text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
}

.membership-form .consent-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
    color: var(--member-text);
    line-height: 1.5;
}

.membership-form .consent-option input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--member-blue);
}

.membership-form .consent-option label {
    margin: 0;
    font-weight: 400;
}

.membership-page .required-mark {
    color: #a32620;
}

.membership-page .file-error {
    margin: -12px 0 18px;
    color: #a32620;
    font-size: 0.82rem;
}

.membership-page .button-group {
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.membership-page .button-group button,
.membership-form > .form-step > .submit-button {
    min-height: 48px;
    min-width: 124px;
    padding: 12px 22px;
    border-radius: 7px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.membership-page .submit-button {
    border: 1px solid var(--member-blue);
    background: var(--member-blue);
    color: #ffffff;
}

.membership-page .submit-button:hover {
    border-color: #002644;
    background: #002644;
    color: #ffffff;
}

.membership-page .submit-button:active,
.membership-page .secondary-button:active {
    transform: translateY(1px);
}

.membership-page .submit-button:disabled {
    border-color: #687887;
    background: #687887;
    color: #ffffff;
    cursor: wait;
}

.membership-page .secondary-button {
    border: 1px solid var(--member-blue);
    background: transparent;
    color: var(--member-blue);
}

.membership-page .secondary-button:hover {
    background: #edf3f7;
}

.membership-page .review-card {
    margin: 0 0 22px;
    padding: 22px;
    border: 1px solid #dce4ea;
    border-radius: 8px;
    background: var(--member-field);
    text-align: left;
}

.membership-page .review-section {
    margin: 0 0 22px;
}

.membership-page .review-section:last-child {
    margin-bottom: 0;
}

.membership-page .review-section h4 {
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dce4ea;
    color: var(--member-blue);
    font-size: 0.98rem;
    font-weight: 700;
}

.membership-page .review-row {
    display: flex;
    gap: 12px;
    margin: 0 0 10px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.membership-page .review-label {
    width: 150px;
    flex: 0 0 150px;
    color: var(--member-muted);
    font-weight: 600;
}

.membership-page .review-value {
    min-width: 0;
    color: var(--member-text);
    overflow-wrap: anywhere;
}

.membership-page .submission-note {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-left: 3px solid var(--member-gold);
    background: #fff9e8;
    color: #443707;
    font-size: 0.84rem;
    line-height: 1.55;
}

.membership-page .submission-status {
    min-height: 1.5em;
    margin: 14px 0 0;
    color: #9b241e;
    font-size: 0.88rem;
    line-height: 1.5;
}

.membership-page footer {
    margin-top: 48px;
}

@media (max-width: 600px) {
    .membership-page {
        padding: 102px 14px 36px;
    }

    .membership-page .header {
        margin-bottom: 24px;
    }

    .membership-page .logo img {
        height: 84px;
    }

    .membership-page .form-section {
        padding: 28px 20px 30px;
    }

    .membership-page .stepper {
        margin-bottom: 26px;
    }

    .membership-page .step-label {
        max-width: 100px;
        font-size: 0.65rem;
    }

    .membership-page .step-line {
        margin-right: -9px;
        margin-left: -9px;
    }

    .membership-page .button-group button,
    .membership-form > .form-step > .submit-button {
        min-width: 0;
        padding-right: 16px;
        padding-left: 16px;
    }

    .photo-preview,
    .review-photo-preview {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 12px;
    }

    .photo-preview img,
    .review-photo-preview img {
        width: 84px;
        height: 84px;
    }
}

@media (max-width: 380px) {
    .membership-page .form-section {
        padding-right: 15px;
        padding-left: 15px;
    }

    .membership-page .step-label {
        max-width: 82px;
        font-size: 0.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .membership-page *,
    .membership-page *::before,
    .membership-page *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
