.page-affiliate {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    padding-top: var(--header-offset, 120px); /* Account for fixed header */
    overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

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

.page-affiliate__container--dark {
    background-color: #8B0000; /* Auxiliary dark red background */
    color: #ffffff; /* Light text for dark background */
    padding: 60px 20px;
    border-radius: 8px;
    text-align: center;
}

.page-affiliate__hero-section {
    position: relative;
    overflow: hidden;
    padding: 0; /* No padding on hero section itself, content inside handles it */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px; /* Minimum height for hero */
}

.page-affiliate__hero-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.page-affiliate__hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the container */
    display: block;
    min-width: 200px; /* Enforce min size for content images */
    min-height: 200px;
}

.page-affiliate__hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #ffffff; /* Light text on hero image */
    padding: 80px 20px;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
    border-radius: 8px;
    margin: 20px;
}

.page-affiliate__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFD700; /* Gold title for impact */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-affiliate__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    line-height: 1.5;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.page-affiliate__cta-button {
    display: inline-block;
    background-color: #FFD700; /* Gold button */
    color: #8B0000; /* Dark red text on gold button */
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
}

.page-affiliate__cta-button:hover {
    background-color: #e6c200; /* Slightly darker gold on hover */
    color: #6a0000; /* Slightly darker red on hover */
}

.page-affiliate__cta-button--gold {
    background-color: #FFD700;
    color: #8B0000;
}

.page-affiliate__cta-button--gold:hover {
    background-color: #e6c200;
    color: #6a0000;
}

.page-affiliate__cta-button--large {
    padding: 18px 35px;
    font-size: 1.2em;
}

.page-affiliate__section-title {
    font-size: 2.5em;
    color: #8B0000; /* Dark red for section titles */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-affiliate__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #FFD700; /* Gold underline */
    border-radius: 2px;
}

.page-affiliate__section-title--light {
    color: #FFD700; /* Gold title on dark background */
}

.page-affiliate__section-title--light::after {
    background-color: #ffffff; /* White underline on dark background */
}


.page-affiliate__text-content {
    font-size: 1.1em;
    margin-bottom: 20px;
    text-align: justify;
}

.page-affiliate__text-content--light {
    color: #f0f0f0;
}

.page-affiliate__about-program,
.page-affiliate__how-it-works,
.page-affiliate__commission-structure,
.page-affiliate__marketing-resources,
.page-affiliate__faq,
.page-affiliate__cta-bottom {
    padding: 60px 0;
}

.page-affiliate__benefits-grid,
.page-affiliate__steps-grid,
.page-affiliate__commission-tiers,
.page-affiliate__resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.page-affiliate__benefit-card,
.page-affiliate__step-card,
.page-affiliate__tier-card,
.page-affiliate__resource-card {
    background-color: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-affiliate__benefit-card:hover,
.page-affiliate__step-card:hover,
.page-affiliate__resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.page-affiliate__benefit-card img,
.page-affiliate__resource-card img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce min size for content images */
    min-height: 200px;
    object-fit: cover;
}

.page-affiliate__step-card .page-affiliate__step-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #FFD700; /* Gold step numbers */
    background-color: #8B0000; /* Dark red background for numbers */
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-affiliate__card-title {
    font-size: 1.5em;
    color: #8B0000; /* Dark red for card titles */
    margin-bottom: 15px;
}

.page-affiliate__card-description {
    font-size: 1em;
    color: #555555;
    flex-grow: 1; /* Allow description to take available space */
}

.page-affiliate__center-cta {
    text-align: center;
    margin-top: 50px;
}

.page-affiliate__faq-items {
    margin-top: 30px;
}

.page-affiliate__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 20px 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.page-affiliate__faq-question {
    font-size: 1.3em;
    color: #8B0000; /* Dark red for FAQ questions */
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
}

.page-affiliate__faq-answer {
    font-size: 1em;
    color: #555555;
    display: none; /* Hidden by default, toggled by JS */
    padding-top: 10px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-affiliate__hero-title {
        font-size: 2.5em;
    }

    .page-affiliate__hero-description {
        font-size: 1.1em;
    }

    .page-affiliate__section-title {
        font-size: 2em;
    }

    .page-affiliate__benefits-grid,
    .page-affiliate__steps-grid,
    .page-affiliate__commission-tiers,
    .page-affiliate__resources-grid {
        grid-template-columns: 1fr;
    }

    .page-affiliate__benefit-card img,
    .page-affiliate__resource-card img {
        max-width: 100% !important; /* Ensure images don't overflow */
        height: auto !important;
        min-width: 200px; /* Maintain min size */
        min-height: 200px;
    }

    .page-affiliate__hero-section {
        min-height: 400px;
    }
}

/* Ensure no images smaller than 200px in content area */
.page-affiliate img {
    min-width: 200px;
    min-height: 200px;
    width: auto; /* Allow natural width or max-width */
    height: auto; /* Allow natural height or max-height */
}

/* Specific rule for mobile images to prevent overflow */
@media (max-width: 768px) {
    .page-affiliate img {
        max-width: 100% !important;
        height: auto !important;
    }
}