/* style/affiliate-program.css */

/* Base styles for the affiliate program page */
.page-affiliate-program {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #ffffff); /* Ensure it respects shared background */
}

/* Fixed Header Spacing */
.page-affiliate-program__hero-section {
    padding-top: var(--header-offset, 120px); /* Apply header offset to the first section */
}

/* Sections */
.page-affiliate-program__section-title {
    font-size: 2.5em;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

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

/* Hero Section */
.page-affiliate-program__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    color: #ffffff;
}

.page-affiliate-program__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.page-affiliate-program__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: 2;
}

.page-affiliate-program__hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 20px;
}

.page-affiliate-program__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-affiliate-program__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
}

/* Buttons */
.page-affiliate-program__btn-primary {
    display: inline-block;
    background: #26A9E0;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 2px solid transparent;
}

.page-affiliate-program__btn-primary:hover {
    background-color: #1a7fb0;
    transform: translateY(-2px);
}

/* Card Styles */
.page-affiliate-program__card {
    background: #ffffff;
    color: #333333;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-affiliate-program__card-title {
    font-size: 1.6em;
    color: #26A9E0;
    margin-top: 15px;
    margin-bottom: 10px;
}

.page-affiliate-program__card-description {
    font-size: 1em;
    color: #555555;
}

/* Benefit Section */
.page-affiliate-program__benefits-section {
    padding: 80px 0;
    background-color: #f8f8f8; /* Light background for contrast */
    color: #333333;
}

.page-affiliate-program__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-affiliate-program__benefit-icon {
    width: 400px; /* Example display width for card images */
    height: 300px;
    object-fit: cover;
    margin-bottom: 20px;
    border-radius: 8px;
}

/* How It Works Section */
.page-affiliate-program__how-it-works-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Brand color as background */
    color: #ffffff;
}

.page-affiliate-program__how-it-works-section .page-affiliate-program__section-title {
    color: #ffffff;
}

.page-affiliate-program__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.page-affiliate-program__dark-card {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.page-affiliate-program__dark-card .page-affiliate-program__card-title {
    color: #ffffff;
}

.page-affiliate-program__dark-card .page-affiliate-program__card-description {
    color: #f0f0f0;
}

.page-affiliate-program__step-number {
    font-size: 3em;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.page-affiliate-program__steps-image {
    display: block;
    margin: 40px auto 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Tools & Support Section */
.page-affiliate-program__tools-support-section {
    padding: 80px 0;
    background-color: #ffffff;
    color: #333333;
}

.page-affiliate-program__tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.page-affiliate-program__tools-image {
    display: block;
    margin: 40px auto 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* FAQ Section */
.page-affiliate-program__faq-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Brand color for FAQ section */
    color: #ffffff;
}

.page-affiliate-program__faq-section .page-affiliate-program__section-title {
    color: #ffffff;
}

.page-affiliate-program__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-affiliate-program__faq-item {
    margin-bottom: 20px;
    overflow: hidden;
}

.page-affiliate-program__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff;
    transition: background-color 0.3s ease;
}

.page-affiliate-program__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.page-affiliate-program__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    margin-left: 20px;
    transition: transform 0.3s ease;
}

.page-affiliate-program__faq-item.active .page-affiliate-program__faq-toggle {
    transform: rotate(45deg);
}

.page-affiliate-program__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 30px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0 0 10px 10px;
    color: #f0f0f0;
}

.page-affiliate-program__faq-item.active .page-affiliate-program__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 20px 30px;
}

.page-affiliate-program__faq-answer p {
    margin: 0;
    font-size: 1em;
}

/* Call to Action Section */
.page-affiliate-program__cta-section {
    padding: 80px 0;
    background-color: #f8f8f8;
    color: #333333;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-affiliate-program__cta-content {
    position: relative;
    z-index: 2;
}

.page-affiliate-program__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-affiliate-program__cta-image {
    display: block;
    margin: 40px auto 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Global image rules for content area - ensure minimum size */
.page-affiliate-program img {
    min-width: 200px;
    min-height: 200px;
    object-fit: cover;
}

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

@media (max-width: 768px) {
    .page-affiliate-program__hero-section {
        height: 500px;
    }
    .page-affiliate-program__hero-title {
        font-size: 2.5em;
    }
    .page-affiliate-program__hero-description {
        font-size: 1.1em;
    }
    .page-affiliate-program__section-title {
        font-size: 1.8em;
    }
    .page-affiliate-program__container {
        padding: 15px;
    }
    .page-affiliate-program__card {
        padding: 25px;
    }
    .page-affiliate-program__faq-question,
    .page-affiliate-program__faq-item.active .page-affiliate-program__faq-answer {
        padding: 15px 20px;
    }

    /* Mobile image rules */
    .page-affiliate-program img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: unset;
        min-height: unset;
    }

    .page-affiliate-program__section,
    .page-affiliate-program__card,
    .page-affiliate-program__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    /* Mobile button rules */
    .page-affiliate-program__btn-primary,
    .page-affiliate-program a[class*="button"],
    .page-affiliate-program 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;
    }

    .page-affiliate-program__cta-buttons,
    .page-affiliate-program__button-group,
    .page-affiliate-program__btn-container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      flex-wrap: wrap !important;
      gap: 10px;
      overflow-x: hidden; /* Prevent horizontal scroll */
    }

    .page-affiliate-program__cta-buttons {
        display: flex;
        flex-direction: column; 
    }

    .page-affiliate-program__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }
}

@media (max-width: 480px) {
    .page-affiliate-program__hero-title {
        font-size: 2em;
    }
    .page-affiliate-program__hero-description {
        font-size: 1em;
    }
    .page-affiliate-program__btn-primary {
        padding: 12px 20px;
        font-size: 1em;
    }
    .page-affiliate-program__section-title {
        font-size: 1.5em;
    }
}