.page-register {
    font-family: Arial, sans-serif;
    color: #333333; /* Default text color for light background */
    line-height: 1.6;
}

/* Hero Section */
.page-register__hero-section {
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    text-align: center;
    padding: 10px 20px 40px; /* Small top padding as shared.css handles body padding-top */
    background-color: #FFFFFF;
    gap: 20px;
}

.page-register__hero-image-wrapper {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 20px;
}

.page-register__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover; /* Default to cover for desktop */
}

.page-register__hero-content {
    max-width: 800px;
}

.page-register__hero-title {
    font-size: clamp(2em, 3.5vw, 3.2em); /* Using clamp as required */
    color: #017439;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-register__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #555555;
}

/* Buttons */
.page-register__btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    box-sizing: border-box; /* Crucial for responsive buttons */
    max-width: 100%; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-register__btn-primary {
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    border: 2px solid #C30808;
}

.page-register__btn-primary:hover {
    background-color: #a30606;
    transform: translateY(-2px);
}

.page-register__btn-secondary {
    background-color: #017439;
    color: #FFFFFF;
    border: 2px solid #017439;
}

.page-register__btn-secondary:hover {
    background-color: #005a2d;
    transform: translateY(-2px);
}

/* Section Titles */
.page-register__section-title {
    font-size: clamp(1.8em, 3vw, 2.5em);
    color: #017439;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    line-height: 1.3;
}

.page-register__section-title--light {
    color: #FFFFFF;
}

/* Benefits Section */
.page-register__benefits-section {
    padding: 60px 20px;
    background-color: #f8f9fa; /* Light background */
}

.page-register__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-register__benefit-item {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

.page-register__benefit-item:hover {
    transform: translateY(-5px);
}

.page-register__benefit-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px; /* Minimum size */
    min-height: 200px; /* Minimum size */
}

.page-register__benefit-title {
    font-size: 1.4em;
    color: #017439;
    margin-bottom: 10px;
}

.page-register__benefit-text {
    font-size: 1em;
    color: #555555;
}

/* Steps Section */
.page-register__steps-section {
    padding: 60px 20px;
    background-color: #017439; /* Dark background */
    color: #FFFFFF;
    text-align: center;
}

.page-register__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto 40px;
}

.page-register__step-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
}

.page-register__step-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #FFFF00; /* Highlight step numbers */
    margin-bottom: 15px;
}

.page-register__step-title {
    font-size: 1.3em;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.page-register__step-text {
    font-size: 1em;
    color: #f0f0f0;
}

.page-register__steps-illustration {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px;
    min-height: 200px;
}

/* Form Section */
.page-register__form-section {
    padding: 60px 20px;
    background-color: #FFFFFF;
}

.page-register__registration-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.page-register__form-group {
    margin-bottom: 20px;
}

.page-register__form-label {
    display: block;
    font-size: 1.1em;
    color: #333333;
    margin-bottom: 8px;
    font-weight: 600;
}

.page-register__form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 1em;
    color: #333333;
    box-sizing: border-box;
}

.page-register__form-input::placeholder {
    color: #999999;
}

.page-register__form-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.page-register__form-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.page-register__terms-link {
    color: #017439;
    text-decoration: underline;
}

.page-register__btn-submit {
    width: 100%;
    background-color: #C30808; /* Custom color for register/login */
    color: #FFFF00; /* Custom font color for register/login */
    border: none;
    padding: 15px 20px;
    font-size: 1.2em;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.page-register__btn-submit:hover {
    background-color: #a30606;
}

/* New Member Promo Section */
.page-register__new-member-promo {
    padding: 60px 20px;
    background-color: #017439;
    color: #FFFFFF;
    text-align: center;
}

.page-register__promo-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    gap: 40px;
}

.page-register__promo-image {
    flex: 1;
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    min-width: 200px;
    min-height: 200px;
}

.page-register__promo-text-block {
    flex: 1;
    text-align: left;
}

.page-register__promo-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

/* FAQ Section */
.page-register__faq-section {
    padding: 60px 20px;
    background-color: #f8f9fa;
}

.page-register__faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.page-register__faq-item {
    background-color: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-register__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.1em;
    font-weight: 600;
    color: #017439;
    cursor: pointer;
    list-style: none; /* Hide default marker */
    position: relative;
    outline: none;
}

.page-register__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit */
}

.page-register__faq-item summary:hover {
    background-color: #f0f0f0;
}

.page-register__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #017439;
}

.page-register__faq-item[open] .page-register__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'x' effect */
}

.page-register__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #555555;
}

/* Final CTA Section */
.page-register__cta-final {
    padding: 60px 20px;
    background-color: #017439;
    color: #FFFFFF;
    text-align: center;
}

.page-register__cta-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-register__promo-content {
        flex-direction: column;
    }
    .page-register__promo-text-block {
        text-align: center;
    }
    .page-register__hero-title {
        font-size: clamp(2em, 4.5vw, 3em);
    }
    .page-register__section-title {
        font-size: clamp(1.8em, 3.5vw, 2.3em);
    }
}

@media (max-width: 768px) {
    /* General mobile padding and font size */
    .page-register {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-register__hero-section,
    .page-register__benefits-section,
    .page-register__steps-section,
    .page-register__form-section,
    .page-register__new-member-promo,
    .page-register__faq-section,
    .page-register__cta-final {
        padding-left: 15px;
        padding-right: 15px;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    /* Hero Section */
    .page-register__hero-section {
        padding-top: 10px !important; /* Small top padding as shared.css handles body padding-top */
        gap: 15px;
    }
    .page-register__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        object-fit: contain; /* Mobile hero image: contain, not cover */
        aspect-ratio: unset; /* Remove aspect ratio if set */
        max-height: none; /* Remove max-height */
    }
    .page-register__hero-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        margin-bottom: 15px;
    }
    .page-register__hero-title {
        font-size: clamp(1.8em, 7vw, 2.5em);
        margin-bottom: 10px;
    }
    .page-register__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    /* Buttons */
    .page-register__btn,
    .page-register__btn-primary,
    .page-register__btn-secondary,
    .page-register a[class*="button"],
    .page-register a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
        font-size: 1em;
    }
    .page-register__btn-submit {
        max-width: 100% !important;
        width: 100% !important;
        font-size: 1.1em;
    }

    /* Section Titles */
    .page-register__section-title {
        font-size: clamp(1.6em, 6vw, 2em);
        margin-bottom: 30px;
    }

    /* Benefits Section */
    .page-register__benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-register__benefit-item {
        padding: 20px;
    }
    .page-register__benefit-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Steps Section */
    .page-register__steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }
    .page-register__steps-illustration {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Form Section */
    .page-register__registration-form {
        padding: 25px;
    }
    .page-register__form-label {
        font-size: 1em;
    }
    .page-register__form-input {
        padding: 10px 12px;
        font-size: 0.95em;
    }
    .page-register__form-checkbox {
        flex-direction: row; /* Keep checkbox and label inline */
        align-items: flex-start;
        font-size: 0.9em;
    }
    .page-register__form-checkbox input[type="checkbox"] {
        margin-top: 3px; /* Align checkbox better */
    }

    /* New Member Promo Section */
    .page-register__promo-content {
        flex-direction: column;
        gap: 20px;
    }
    .page-register__promo-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-register__promo-text-block {
        text-align: center;
    }
    .page-register__promo-description {
        font-size: 1em;
        margin-bottom: 20px;
    }

    /* FAQ Section */
    .page-register__faq-item summary {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-register__faq-answer {
        padding: 0 20px 15px;
    }

    /* Final CTA Section */
    .page-register__cta-description {
        font-size: 1em;
        margin-bottom: 25px;
    }
}

/* Image responsive rules for all images in content */
.page-register img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* All image containers must ensure no overflow */
.page-register__hero-image-wrapper,
.page-register__benefits-grid,
.page-register__steps-grid,
.page-register__promo-content {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    /* Universal image responsive rule for mobile */
    .page-register img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    /* Universal container responsive rule for mobile */
    .page-register__hero-section,
    .page-register__benefits-section,
    .page-register__steps-section,
    .page-register__form-section,
    .page-register__new-member-promo,
    .page-register__faq-section,
    .page-register__cta-final,
    .page-register__hero-image-wrapper,
    .page-register__benefits-grid,
    .page-register__steps-grid,
    .page-register__promo-content,
    .page-register__registration-form,
    .page-register__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Colour contrast rules */
.page-register__light-bg {
    background: #FFFFFF;
    color: #333333;
}

.page-register__dark-bg {
    background: #017439;
    color: #FFFFFF;
}

.page-register__terms-link {
    color: #017439; /* Revert to brand primary for better contrast on light background */
}