/* style/affiliate-program.css */

/* Variables for brand colors */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #8B0000; /* Dark Red */
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark: #000; /* From shared.css body background */
    --card-bg-dark: rgba(255, 255, 255, 0.08); /* Slightly transparent white on dark background */
    --border-color-dark: rgba(255, 255, 255, 0.15);
}

.page-affiliate-program {
    color: var(--text-light); /* Default text color for dark body background */
    background-color: var(--bg-dark); /* Ensure main content has a background if body is transparent */
    padding-top: 120px; /* Adjust for fixed header on desktop */
}

/* General Container Styling */
.page-affiliate-program__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-affiliate-program__section-title {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
    padding-top: 40px;
}

/* CTA Buttons Styling */
.page-affiliate-program__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-affiliate-program__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    max-width: 100%; /* Ensure button doesn't exceed container */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.page-affiliate-program__cta-button--primary {
    background: var(--primary-color);
    color: var(--text-dark); /* Gold background needs dark text for contrast */
}

.page-affiliate-program__cta-button--primary:hover {
    background: #e6c100; /* A darker gold */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-affiliate-program__cta-button--secondary {
    background: var(--secondary-color);
    color: var(--text-light);
    border: 1px solid var(--primary-color);
}

.page-affiliate-program__cta-button--secondary:hover {
    background: #7a0000; /* A darker red */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

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

/* Hero Section (Module 1: H1 Title + CTA Buttons) */
.page-affiliate-program__hero-section {
    padding: 80px 0;
    text-align: center;
    background: url('[GALLERY:hero:1920x1080:thabet88,affiliate_program,partnership,gold_red_theme]') no-repeat center center/cover;
    position: relative;
    z-index: 1; /* Ensure text is above background */
}

.page-affiliate-program__hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: -1;
}


.page-affiliate-program__main-title {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-affiliate-program__description {
    font-size: 20px;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Key Benefits/Features Section */
.page-affiliate-program__benefits-section {
    padding: 80px 0;
    background-color: var(--bg-dark); /* Dark background */
}

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

.page-affiliate-program__benefit-card {
    background: var(--card-bg-dark); /* Semi-transparent background */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color-dark);
}

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

.page-affiliate-program__benefit-icon {
    width: 100px; /* Ensure images are large enough */
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 50%; /* Example style */
}

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

.page-affiliate-program__benefit-text {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
}

/* How It Works Section */
.page-affiliate-program__how-it-works-section {
    padding: 80px 0;
    background-color: #1a1a1a; /* Slightly lighter dark background */
}

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

.page-affiliate-program__step-card {
    background: var(--card-bg-dark);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-dark);
    position: relative;
}

.page-affiliate-program__step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-dark);
    border-radius: 50%;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-affiliate-program__step-title {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.page-affiliate-program__step-text {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Module 2: FAQ Common Questions Area */
.page-affiliate-program__faq-section {
    padding: 80px 0;
    background-color: var(--bg-dark);
}

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

.page-affiliate-program__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color-dark);
}

.page-affiliate-program__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--card-bg-dark);
    border-radius: 10px; /* Adjust for item border radius */
    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: rgba(255, 255, 255, 0.12); /* Slightly lighter on hover */
}

.page-affiliate-program__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-light);
    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(--primary-color);
    transform: rotate(45deg); /* Rotate for minus sign effect */
}

.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 20px;
    opacity: 0;
    background: rgba(255, 255, 255, 0.05); /* Lighter background for answer */
    color: var(--text-light);
    border-top: 1px solid var(--border-color-dark);
}

.page-affiliate-program__faq-item.active .page-affiliate-program__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to contain any content */
    padding: 20px !important;
    opacity: 1;
    border-radius: 0 0 10px 10px;
}

/* Module 3: Brand Introduction */
.page-affiliate-program__brand-section {
    padding: 80px 0;
    background-color: #1a1a1a; /* Slightly lighter dark background */
}

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

.page-affiliate-program__brand-item {
    background: var(--card-bg-dark);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color-dark);
}

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

.page-affiliate-program__brand-item-text {
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Module 4: Blog List Display */
.page-affiliate-program__blog-section {
    padding: 80px 0;
    background-color: var(--bg-dark);
}

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

.page-affiliate-program__blog-item {
    background: var(--card-bg-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color-dark);
}

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

.page-affiliate-program__blog-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-affiliate-program__blog-item-content {
    padding: 25px;
}

.page-affiliate-program__blog-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-affiliate-program__blog-item-title {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-affiliate-program__blog-item-title:hover {
    text-decoration: underline;
}

.page-affiliate-program__blog-item-excerpt {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-affiliate-program__blog-item-date {
    font-size: 14px;
    color: #aaa;
}

/* Responsive Design for Tablets and Mobiles */
@media (max-width: 992px) {
    .page-affiliate-program__main-title {
        font-size: 40px;
    }

    .page-affiliate-program__description {
        font-size: 18px;
    }

    .page-affiliate-program__section-title {
        font-size: 30px;
    }

    .page-affiliate-program__benefit-title,
    .page-affiliate-program__step-title,
    .page-affiliate-program__brand-item-title,
    .page-affiliate-program__blog-item-title {
        font-size: 20px;
    }

    .page-affiliate-program__cta-button {
        padding: 12px 30px;
        font-size: 16px;
    }

    .page-affiliate-program__hero-section {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .page-affiliate-program {
        padding-top: 100px !important; /* Adjust for fixed header on mobile */
        font-size: 16px;
        line-height: 1.6;
    }

    .page-affiliate-program__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .page-affiliate-program__hero-section {
        padding: 40px 0 !important;
    }

    .page-affiliate-program__main-title {
        font-size: 32px;
    }

    .page-affiliate-program__description {
        font-size: 16px;
    }

    .page-affiliate-program__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-affiliate-program__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-affiliate-program__section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .page-affiliate-program__benefits-section,
    .page-affiliate-program__how-it-works-section,
    .page-affiliate-program__faq-section,
    .page-affiliate-program__brand-section,
    .page-affiliate-program__blog-section {
        padding: 40px 0;
    }

    /* FAQ Mobile adjustments */
    .page-affiliate-program__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-affiliate-program__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-affiliate-program__faq-toggle {
        margin-left: 10px;
        width: 28px;
        height: 28px;
        font-size: 24px;
    }
    
    .page-affiliate-program__faq-answer {
        padding: 0 15px;
    }
    
    .page-affiliate-program__faq-item.active .page-affiliate-program__faq-answer {
        padding: 15px !important;
    }

    /* General image/video/container responsive rules */
    .page-affiliate-program img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-affiliate-program video,
    .page-affiliate-program__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-affiliate-program__section,
    .page-affiliate-program__card,
    .page-affiliate-program__container,
    .page-affiliate-program__cta-buttons,
    .page-affiliate-program__video-section,
    .page-affiliate-program__video-container,
    .page-affiliate-program__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-affiliate-program__blog-item-image {
        height: 180px;
    }
    .page-affiliate-program__blog-item-content {
        padding: 20px;
    }
    .page-affiliate-program__blog-item-excerpt {
        -webkit-line-clamp: unset; /* Allow full text on mobile if space permits */
    }
}