/* style/affiliate.css */

/* Base styles for the affiliate page content */
.page-affiliate {
    color: #333333; /* Dark text for light body background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-top: var(--header-offset, 120px); /* Space for fixed header on PC */
}

/* Ensure images within content areas are not too small and are responsive */
.page-affiliate img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/* Global section styling */
.page-affiliate__section {
    padding: 60px 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9; /* Light background for sections */
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.page-affiliate__section:nth-of-type(even) {
    background-color: #ffffff;
}

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

.page-affiliate__section-title,
.page-affiliate__hero-title,
.page-affiliate__cta-title {
    color: #4A148C; /* Primary brand color for headings */
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.8em;
    font-weight: bold;
    line-height: 1.2;
}

.page-affiliate__section-title {
    font-size: 2.2em;
    margin-top: 0;
}

.page-affiliate__paragraph {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.page-affiliate__list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.page-affiliate__list-item {
    background-color: #f0f0f0;
    margin-bottom: 10px;
    padding: 15px 20px;
    border-left: 5px solid #FFD700; /* Auxiliary color accent */
    border-radius: 5px;
    font-size: 1.05em;
}

.page-affiliate__list-item strong {
    color: #4A148C;
}

/* Buttons */
.page-affiliate__button {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap; /* Prevent text wrapping */
}

.page-affiliate__button--primary {
    background-color: #FFD700; /* Auxiliary color */
    color: #333333; /* Dark text for contrast */
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.4);
}

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

.page-affiliate__button--secondary {
    background-color: #4A148C; /* Primary color */
    color: #ffffff; /* Light text for contrast */
    box-shadow: 0 4px 8px rgba(74, 20, 140, 0.4);
}

.page-affiliate__button--secondary:hover {
    background-color: #3a1070;
    transform: translateY(-2px);
}

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

.page-affiliate__button--center {
    display: block;
    margin: 40px auto 0 auto;
    max-width: 300px;
}

/* Hero Section */
.page-affiliate__hero-section {
    position: relative;
    padding: 100px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    min-height: 500px;
    background: linear-gradient(135deg, #4A148C 0%, #7B1FA2 100%); /* Gradient background for hero */
    color: #ffffff; /* Light text for dark background */
    border-radius: 0; /* No border-radius for hero section */
    box-shadow: none;
}

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

.page-affiliate__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3; /* Make background image subtle */
    border-radius: 0;
}

.page-affiliate__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

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

.page-affiliate__hero-description {
    font-size: 1.3em;
    margin-bottom: 40px;
    color: #f0f0f0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.page-affiliate__hero-button {
    background-color: #FFD700;
    color: #333333;
    padding: 18px 40px;
    font-size: 1.3em;
    border-radius: 50px;
    box-shadow: 0 6px 12px rgba(255, 215, 0, 0.5);
}

.page-affiliate__hero-button:hover {
    background-color: #e6c200;
    transform: translateY(-3px);
}

/* Content Grid for sections with image and text */
.page-affiliate__content-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.page-affiliate__content-grid .page-affiliate__image-wrapper {
    flex: 1;
    min-width: 300px;
    max-width: 50%;
}

.page-affiliate__content-grid .page-affiliate__text-content {
    flex: 1;
    min-width: 300px;
    max-width: 50%;
}

.page-affiliate__content-grid--reverse .page-affiliate__image-wrapper {
    order: 2;
}

.page-affiliate__content-grid--reverse .page-affiliate__text-content {
    order: 1;
}

/* Commission Table */
.page-affiliate__commission-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 1.0em;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-affiliate__table-caption {
    caption-side: top;
    text-align: left;
    font-weight: bold;
    font-size: 1.2em;
    color: #4A148C;
    padding: 15px 0;
}

.page-affiliate__commission-table th,
.page-affiliate__commission-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.page-affiliate__commission-table th {
    background-color: #4A148C;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
}

.page-affiliate__commission-table tr:nth-child(even) {
    background-color: #f5f5f5;
}

.page-affiliate__commission-table tr:hover {
    background-color: #e0e0e0;
}

/* Getting Started Steps */
.page-affiliate__steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-affiliate__step-card {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.page-affiliate__step-card:hover {
    transform: translateY(-5px);
}

.page-affiliate__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #FFD700;
    color: #4A148C;
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.page-affiliate__step-title {
    color: #4A148C;
    font-size: 1.5em;
    margin-bottom: 15px;
}

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

/* FAQ Section */
.page-affiliate__faq-list {
    margin-top: 30px;
}

.page-affiliate__faq-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.page-affiliate__faq-question {
    padding: 20px;
    margin: 0;
    font-size: 1.2em;
    color: #4A148C;
    cursor: pointer;
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.page-affiliate__faq-question:hover {
    background-color: #eeeeee;
}

.page-affiliate__faq-question::after {
    content: '+';
    font-size: 1.5em;
    font-weight: bold;
    color: #FFD700;
    transition: transform 0.3s ease;
}

.page-affiliate__faq-question.active::after {
    content: '-';
    transform: rotate(180deg);
}

.page-affiliate__faq-answer {
    padding: 0 20px 20px 20px;
    margin: 0;
    font-size: 1.0em;
    color: #555555;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.page-affiliate__faq-answer.active {
    max-height: 200px; /* Adjust as needed for content */
    padding: 20px;
}

/* CTA Section */
.page-affiliate__cta-section {
    background-color: #4A148C; /* Primary color background */
    color: #ffffff; /* Light text */
    text-align: center;
    padding: 80px 20px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-affiliate__cta-title {
    color: #FFD700; /* Auxiliary color for CTA title */
    font-size: 2.8em;
    margin-bottom: 25px;
}

.page-affiliate__cta-description {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: #f0f0f0;
}


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

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

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

    .page-affiliate__content-grid .page-affiliate__image-wrapper,
    .page-affiliate__content-grid .page-affiliate__text-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    /* Prevent horizontal scroll on mobile for all images in content area */
    .page-affiliate img {
        max-width: 100%;
        height: auto;
    }
    
    .page-affiliate__hero-section {
        padding: 80px 20px;
        min-height: 400px;
    }

    .page-affiliate__hero-title {
        font-size: 2.5em;
    }

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

    .page-affiliate__hero-button {
        padding: 15px 30px;
        font-size: 1.1em;
    }

    .page-affiliate__section {
        padding: 40px 15px;
    }

    .page-affiliate__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-affiliate__paragraph,
    .page-affiliate__list-item,
    .page-affiliate__step-description,
    .page-affiliate__faq-answer {
        font-size: 0.95em;
    }

    .page-affiliate__commission-table th,
    .page-affiliate__commission-table td {
        padding: 10px 15px;
        font-size: 0.9em;
    }

    .page-affiliate__cta-title {
        font-size: 2.2em;
    }

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

    .page-affiliate__button--large {
        padding: 15px 30px;
        font-size: 1.1em;
    }

    .page-affiliate__content-grid {
        flex-direction: column;
        gap: 30px;
    }

    .page-affiliate__content-grid .page-affiliate__image-wrapper,
    .page-affiliate__content-grid .page-affiliate__text-content {
        max-width: 100%; /* Ensure full width on mobile */
    }

    .page-affiliate__content-grid--reverse .page-affiliate__image-wrapper {
        order: unset; /* Reset order for mobile */
    }
    .page-affiliate__content-grid--reverse .page-affiliate__text-content {
        order: unset; /* Reset order for mobile */
    }
}

@media (max-width: 480px) {
    .page-affiliate__hero-section {
        padding: 60px 15px;
    }
    .page-affiliate__hero-title {
        font-size: 2em;
    }
    .page-affiliate__hero-description {
        font-size: 1em;
    }
    .page-affiliate__hero-button {
        padding: 12px 25px;
        font-size: 1em;
    }
    .page-affiliate__section-title {
        font-size: 1.6em;
    }
    .page-affiliate__cta-title {
        font-size: 1.8em;
    }
}

/* Enforce minimum dimensions for content images on desktop */
.page-affiliate__content-grid img {
    min-width: 200px; 
    min-height: 200px; 
}

/* Allow content images to shrink below 200px on mobile if needed for responsiveness */
@media (max-width: 768px) {
    .page-affiliate__content-grid img {
        min-width: unset; 
        min-height: unset; 
    }
}