:root {
    --primary-color: #1A237E;
    --secondary-color: #FFD700;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f8f8f8;
    --bg-dark: #151c6e; /* Slightly lighter than primary for distinction */
    --border-color: #e0e0e0;
    --card-bg-dark: rgba(255, 255, 255, 0.1);
}

/* Base styles for the page content */
.page-affiliate-program {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light backgrounds */
    background-color: #ffffff; /* Explicitly set for default body */
}

/* Ensure padding-top for fixed header */
.page-affiliate-program__hero-section {
    padding-top: var(--header-offset, 120px); /* Desktop default */
}

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

.page-affiliate-program__section-title {
    font-size: 36px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-affiliate-program__section-intro {
    font-size: 18px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 60px auto;
    color: #555555;
}

.page-affiliate-program__sub-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Hero Section */
.page-affiliate-program__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0c125c 100%); /* Dark gradient */
    color: var(--text-light);
}

.page-affiliate-program__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.page-affiliate-program__hero-image {
    width: 100%;
    margin-bottom: 30px;
    overflow: hidden; /* Ensure image corners are handled */
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-affiliate-program__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.page-affiliate-program__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-affiliate-program__hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--secondary-color); /* Gold for title */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-affiliate-program__hero-description {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--text-light);
}

.page-affiliate-program__cta-button {
    display: inline-block;
    padding: 18px 45px;
    background: var(--secondary-color); /* Gold button */
    color: var(--primary-color); /* Dark indigo text */
    text-decoration: none;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    border: none;
}

.page-affiliate-program__cta-button:hover {
    background: #e6c200; /* Slightly darker gold on hover */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Section Styles */
.page-affiliate-program__why-partner-section,
.page-affiliate-program__commission-section,
.page-affiliate-program__benefits-section,
.page-affiliate-program__faq-section {
    padding: 80px 0;
    background-color: var(--bg-light); /* Light background for these sections */
}

.page-affiliate-program__dark-bg {
    background-color: var(--primary-color); /* Dark indigo background */
    color: var(--text-light); /* Light text for dark backgrounds */
    padding: 80px 0;
}

.page-affiliate-program__dark-text-color {
    color: var(--text-light); /* Ensure text is light on dark backgrounds */
}

.page-affiliate-program__dark-bg .page-affiliate-program__section-title {
    color: var(--secondary-color); /* Gold title on dark background */
}

.page-affiliate-program__dark-bg .page-affiliate-program__section-intro {
    color: rgba(255, 255, 255, 0.8);
}

/* Features Grid (Why Partner Section) */
.page-affiliate-program__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.page-affiliate-program__feature-item {
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-affiliate-program__feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-affiliate-program__feature-item img {
    width: 100%;
    max-width: 250px;
    height: auto;
    object-fit: cover;
    margin: 0 auto 20px auto;
    border-radius: 8px;
    display: block;
}

.page-affiliate-program__feature-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-affiliate-program__feature-description {
    font-size: 16px;
    color: #666666;
}

/* How It Works Section */
.page-affiliate-program__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.page-affiliate-program__step-item {
    text-align: center;
    color: var(--text-light);
}

.page-affiliate-program__step-number {
    width: 80px;
    height: 80px;
    line-height: 80px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 36px;
    font-weight: bold;
    margin: 0 auto 25px auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-affiliate-program__step-title {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-affiliate-program__step-description {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.9);
}

.page-affiliate-program__cta-center {
    text-align: center;
    margin-top: 60px;
}

.page-affiliate-program__btn-secondary {
    background: #ffffff;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.page-affiliate-program__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

/* Commission Section */
.page-affiliate-program__commission-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
}

.page-affiliate-program__commission-text {
    flex: 1;
}

.page-affiliate-program__commission-text p {
    margin-bottom: 15px;
    font-size: 17px;
    color: #444444;
}

.page-affiliate-program__commission-text code {
    display: block;
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: var(--primary-color);
}

.page-affiliate-program__list {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

.page-affiliate-program__list li {
    margin-bottom: 10px;
    font-size: 17px;
    color: #444444;
}

.page-affiliate-program__list li strong {
    color: var(--primary-color);
}

.page-affiliate-program__commission-image {
    flex: 1;
    text-align: center;
}

.page-affiliate-program__commission-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Marketing Section */
.page-affiliate-program__marketing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.page-affiliate-program__dark-bg-card {
    background-color: var(--bg-dark); /* Darker background for cards on dark section */
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-affiliate-program__dark-bg-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-affiliate-program__marketing-title {
    font-size: 22px;
    color: var(--secondary-color); /* Gold title on dark card */
    margin-bottom: 15px;
    font-weight: 600;
}

.page-affiliate-program__marketing-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.page-affiliate-program__marketing-image-container {
    text-align: center;
    margin-top: 60px;
}

.page-affiliate-program__marketing-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Benefits Section */
.page-affiliate-program__benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.page-affiliate-program__benefit-item {
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-affiliate-program__benefit-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-affiliate-program__benefit-title {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.page-affiliate-program__benefit-description {
    font-size: 16px;
    color: #666666;
}

/* FAQ Section */
.page-affiliate-program__faq-list {
    margin-top: 60px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-affiliate-program__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.page-affiliate-program__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-affiliate-program__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-affiliate-program__faq-question:active {
    background: #eeeeee;
}

.page-affiliate-program__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--primary-color);
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-affiliate-program__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.page-affiliate-program__faq-item.active .page-affiliate-program__faq-toggle {
    color: var(--secondary-color);
    transform: rotate(45deg); /* Plus to X for active state */
}

.page-affiliate-program__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    background-color: #fdfdfd;
}

.page-affiliate-program__faq-item.active .page-affiliate-program__faq-answer {
    max-height: 2000px !important; /* Ensure enough height for content */
    padding: 20px 25px !important;
    opacity: 1;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    color: #444444;
}

.page-affiliate-program__faq-answer p {
    margin: 0;
    font-size: 16px;
    line-height: 1.7;
    color: #555555;
}

/* Final CTA Section */
.page-affiliate-program__cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0c125c 100%);
    text-align: center;
    color: var(--text-light);
}

.page-affiliate-program__cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.page-affiliate-program__cta-image {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
}

.page-affiliate-program__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.page-affiliate-program__btn-primary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
}

.page-affiliate-program__btn-primary:hover {
    background: #e6c200;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-affiliate-program__hero-title {
        font-size: 40px;
    }
    .page-affiliate-program__section-title {
        font-size: 32px;
    }
}