:root {
    --primary-color: #FF8C1A;
    --secondary-color: #FFA53A;
    --button-gradient: linear-gradient(180deg, #FFA53A 0%, #D96800 100%);
    --card-bg: #17191F;
    --background-color: #0D0E12;
    --text-main-color: #FFF3E6;
    --border-color: #A84F0C;
    --glow-color: #FFB04D;
    --deep-orange-color: #D96800;
}

.page-affiliate-program {
    background-color: var(--background-color);
    color: var(--text-main-color); /* Light text for dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-affiliate-program__hero-section {
    display: flex;
    flex-direction: column; /* Image above text for mobile/default */
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 15px 40px;
    box-sizing: border-box;
    text-align: center;
}

.page-affiliate-program__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 10px;
}

.page-affiliate-program__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 10px;
}

.page-affiliate-program__hero-content {
    max-width: 900px;
}

.page-affiliate-program__main-title {
    font-size: clamp(28px, 4vw, 48px); /* Using clamp for H1 */
    font-weight: 700;
    line-height: 1.2;
    color: var(--secondary-color);
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(255,165,58,0.5);
}

.page-affiliate-program__description {
    font-size: 18px;
    margin-bottom: 30px;
    color: var(--text-main-color);
}

.page-affiliate-program__section-title {
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin: 60px 0 30px;
    text-shadow: 0 0 5px rgba(255,140,26,0.4);
}

.page-affiliate-program__description-text {
    font-size: 16px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    color: var(--text-main-color);
}

.page-affiliate-program__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    width: 100%; /* For button responsiveness */
    max-width: 100%; /* For button responsiveness */
    box-sizing: border-box;
    padding: 0 15px; /* For button responsiveness */
}

.page-affiliate-program__btn-primary,
.page-affiliate-program__btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 180px;
    box-sizing: border-box; /* For button responsiveness */
    max-width: 100%; /* For button responsiveness */
    white-space: normal; /* For button responsiveness */
    word-wrap: break-word; /* For button responsiveness */
}

.page-affiliate-program__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(255,140,26,0.4);
}

.page-affiliate-program__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,140,26,0.6);
}

.page-affiliate-program__btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-affiliate-program__btn-secondary:hover {
    background: rgba(255,140,26,0.1);
    transform: translateY(-3px);
}

/* Why Join Section */
.page-affiliate-program__why-join-section {
    padding: 60px 15px;
    background-color: var(--card-bg); /* Darker background */
}

.page-affiliate-program__dark-section {
    background-color: var(--card-bg);
    color: var(--text-main-color);
}

.page-affiliate-program__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-affiliate-program__feature-card {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter card on dark section */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-main-color);
}

.page-affiliate-program__feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255,176,77,0.2);
}

.page-affiliate-program__feature-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.page-affiliate-program__feature-card p {
    font-size: 16px;
    color: var(--text-main-color);
}

/* Commission Section */
.page-affiliate-program__commission-section {
    padding: 60px 15px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.page-affiliate-program__commission-table-wrapper {
    overflow-x: auto;
    margin: 0 auto 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 100%;
}

.page-affiliate-program__commission-table {
    width: 100%;
    min-width: 600px; /* Ensure table is readable on smaller screens */
    border-collapse: collapse;
    margin: 0;
    font-size: 16px;
    color: var(--text-main-color);
}

.page-affiliate-program__commission-table th,
.page-affiliate-program__commission-table td {
    padding: 15px 20px;
    border: 1px solid rgba(168, 79, 12, 0.3);
    text-align: center;
}

.page-affiliate-program__commission-table thead th {
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
}

.page-affiliate-program__commission-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

.page-affiliate-program__commission-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.page-affiliate-program__note-text {
    font-size: 14px;
    color: rgba(255, 243, 230, 0.7);
    margin-top: 20px;
}

.page-affiliate-program__image-container {
    margin: 40px auto;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

/* How to Join Section */
.page-affiliate-program__how-to-join-section {
    padding: 60px 15px;
    text-align: center;
}

.page-affiliate-program__steps-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 0 auto 40px;
}

.page-affiliate-program__steps-list li {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 25px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-affiliate-program__step-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.page-affiliate-program__steps-list li p {
    font-size: 16px;
    color: var(--text-main-color);
}

/* Marketing Tools Section */
.page-affiliate-program__marketing-tools-section {
    padding: 60px 15px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

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

.page-affiliate-program__tool-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-main-color);
}

.page-affiliate-program__tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(255,176,77,0.2);
}

.page-affiliate-program__tool-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.page-affiliate-program__tool-card p {
    font-size: 16px;
    color: var(--text-main-color);
}

/* FAQ Section */
.page-affiliate-program__faq-section {
    padding: 60px 15px;
    text-align: center;
}

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

details.page-affiliate-program__faq-item {
  margin-bottom: 15px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.05); /* Card BG for FAQ */
  color: var(--text-main-color);
}
details.page-affiliate-program__faq-item summary.page-affiliate-program__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-affiliate-program__faq-item summary.page-affiliate-program__faq-question::-webkit-details-marker {
  display: none;
}
details.page-affiliate-program__faq-item summary.page-affiliate-program__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.1);
}
.page-affiliate-program__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--secondary-color);
}
.page-affiliate-program__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 32px;
  text-align: center;
}
details.page-affiliate-program__faq-item .page-affiliate-program__faq-answer {
  padding: 0 25px 20px;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 0 0 12px 12px;
  color: var(--text-main-color);
}
details.page-affiliate-program__faq-item .page-affiliate-program__faq-answer p {
    margin-bottom: 0;
    font-size: 16px;
}

/* Final CTA Section */
.page-affiliate-program__cta-final-section {
    padding: 60px 15px 80px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Global Image and Button Responsiveness */
.page-affiliate-program img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Media Queries for Responsiveness */
@media (min-width: 769px) {
    .page-affiliate-program__hero-section {
        flex-direction: row; /* Image left, content right for larger screens */
        text-align: left;
        gap: 40px;
        padding-top: 40px;
    }
    .page-affiliate-program__hero-image-wrapper {
        flex: 1;
        margin-bottom: 0;
    }
    .page-affiliate-program__hero-content {
        flex: 1;
        max-width: 50%;
    }
    .page-affiliate-program__cta-buttons {
        justify-content: flex-start;
        padding: 0;
    }
    .page-affiliate-program__main-title {
        text-align: left;
    }
    .page-affiliate-program__description {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .page-affiliate-program {
        font-size: 16px;
        line-height: 1.6;
    }

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

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

    .page-affiliate-program__section-title {
        font-size: 28px;
        margin: 40px 0 25px;
    }

    .page-affiliate-program__description-text {
        font-size: 15px;
        margin-bottom: 30px;
    }

    /* Images */
    .page-affiliate-program img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-affiliate-program__hero-image-wrapper,
    .page-affiliate-program__image-container,
    .page-affiliate-program__features-grid,
    .page-affiliate-program__tools-grid,
    .page-affiliate-program__faq-list,
    .page-affiliate-program__commission-table-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Buttons */
    .page-affiliate-program__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }
    .page-affiliate-program__btn-primary,
    .page-affiliate-program__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px;
        font-size: 16px;
    }

    /* Cards and Grids */
    .page-affiliate-program__features-grid,
    .page-affiliate-program__tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-affiliate-program__feature-card,
    .page-affiliate-program__tool-card {
        padding: 25px;
    }
    .page-affiliate-program__feature-title,
    .page-affiliate-program__tool-title {
        font-size: 20px;
    }

    /* FAQ */
    details.page-affiliate-program__faq-item summary.page-affiliate-program__faq-question { padding: 15px; }
    .page-affiliate-program__faq-qtext { font-size: 16px; }
    .page-affiliate-program__faq-toggle { font-size: 24px; width: 28px; }
    details.page-affiliate-program__faq-item .page-affiliate-program__faq-answer { padding: 0 15px 15px; }

    /* Commission Table */
    .page-affiliate-program__commission-table th,
    .page-affiliate-program__commission-table td {
        padding: 10px 12px;
        font-size: 14px;
    }
    .page-affiliate-program__commission-table-wrapper {
        padding: 0; /* Remove padding for scrollable table */
    }
}