/* ==========================================================================
   IM8 Affiliate Program FAQ - Stylesheet
   Matched to original design at im8faq-jih5xqby.manus.space
   ========================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #fdf5f6;
    color: #3d2022;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1.25;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(139, 21, 56, 0.88) 0%, rgba(139, 21, 56, 0.78) 50%, rgba(248, 200, 220, 0.85) 100%);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 500px at 65% 35%, rgba(180, 60, 90, 0.3), transparent),
        radial-gradient(ellipse 400px 300px at 80% 20%, rgba(230, 160, 180, 0.25), transparent);
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 200, 210, 0.12) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 768px;
    width: 100%;
    padding: 128px 32px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    padding: 8px 16px;
    border-radius: 9999px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 {
    color: #fff;
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin-bottom: 24px;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    line-height: 1.625;
    margin-bottom: 32px;
}

/* --- Search Box --- */
.search-box {
    position: relative;
    max-width: 576px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
    font-family: inherit;
    font-size: 0.875rem;
    color: #3d2022;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-box input::placeholder {
    color: #a0888a;
}

.search-box input:focus {
    border-color: #9b2848;
    box-shadow: 0 0 0 3px rgba(155, 40, 72, 0.15);
}

/* ==========================================================================
   FAQ Main Content
   ========================================================================== */
.faq-main {
    max-width: 896px;
    margin: 0 auto;
    padding: 64px 32px 48px;
}

/* --- Category --- */
.faq-category {
    margin-bottom: 48px;
}

.category-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 700;
    color: #2a1012;
    margin-bottom: 24px;
}

.category-line {
    display: inline-block;
    width: 32px;
    height: 3px;
    background: #8b1538;
    border-radius: 2px;
    flex-shrink: 0;
}

/* --- Accordion --- */
.accordion-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accordion-item {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8d0d4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.accordion-item:hover {
    box-shadow: 0 4px 12px rgba(60, 20, 30, 0.1);
}

.accordion-item.active {
    box-shadow: 0 4px 16px rgba(155, 40, 72, 0.12);
}

.accordion-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #3d2022;
    gap: 16px;
    transition: color 0.2s ease;
}

.accordion-btn:hover {
    color: #8b1538;
}

.accordion-question {
    flex: 1;
}

.accordion-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #b08088;
    transition: transform 0.3s ease, color 0.2s ease;
}

.accordion-item.active .accordion-chevron {
    transform: rotate(180deg);
    color: #8b1538;
}

.accordion-body {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    max-height: 0;
    opacity: 0;
}

.accordion-body[hidden] {
    display: block !important;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
}

.accordion-item.active .accordion-body {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
}

.accordion-body p {
    padding: 0 24px 24px;
    font-size: 0.95rem;
    color: #6b4a4e;
    line-height: 1.7;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-section {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 96px 32px;
}

.cta-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right bottom, rgba(200, 120, 140, 0.3) 0%, #fdf5f6 100%);
    z-index: 0;
}

.cta-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 500px 300px at 50% 50%, rgba(200, 120, 140, 0.08), transparent);
}

.cta-content {
    position: relative;
    z-index: 1;
    margin-bottom: 32px;
}

.cta-content h2 {
    color: #2a1012;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content p {
    color: #7a5558;
    font-size: 1.125rem;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

.cta-buttons {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #6b1528;
    color: #fdf0f2;
    box-shadow: 0 2px 8px rgba(107, 21, 40, 0.3);
}

.btn-primary:hover {
    background: #7b1e34;
    box-shadow: 0 4px 16px rgba(107, 21, 40, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #6b1528;
    border: 2px solid #6b1528;
}

.btn-secondary:hover {
    background: rgba(107, 21, 40, 0.06);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: #fff;
    border-top: 1px solid #e8d0d4;
    padding: 48px 32px;
}

.footer-inner {
    max-width: 896px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7b1e34, #9b2848);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    color: #fff;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.footer-company {
    font-weight: 600;
    font-size: 0.875rem;
    color: #2a1012;
}

.footer-program {
    font-size: 0.75rem;
    color: #a0888a;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #6b4a4e;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #8b1538;
    text-decoration: underline;
}

.footer-copy {
    text-align: center;
    font-size: 0.8rem;
    color: #b0999a;
    border-top: 1px solid #e8d0d4;
    padding-top: 24px;
}

/* ==========================================================================
   Search Highlight & No Results
   ========================================================================== */
.faq-category.hidden {
    display: none;
}

.accordion-item.hidden {
    display: none;
}

.no-results {
    text-align: center;
    padding: 48px 24px;
    color: #a0888a;
    font-size: 1rem;
    display: none;
}

.no-results.visible {
    display: block;
}

.no-results svg {
    display: block;
    margin: 0 auto 16px;
    color: #cbb0b4;
}

mark {
    background: rgba(155, 40, 72, 0.12);
    color: #7b1e34;
    border-radius: 2px;
    padding: 0 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
    .hero-content {
        padding: 80px 20px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .search-box {
        max-width: 100%;
    }

    .faq-main {
        padding: 40px 16px 32px;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .accordion-btn {
        padding: 18px 16px;
        font-size: 1rem;
    }

    .accordion-body p {
        padding: 0 16px 18px;
        font-size: 0.9rem;
    }

    .cta-section {
        padding: 64px 20px;
    }

    .cta-content h2 {
        font-size: 1.6rem;
    }

    .btn {
        font-size: 1rem;
        padding: 12px 20px;
    }

    .site-footer {
        padding: 32px 16px;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 1024px) {
    .hero-content {
        padding: 128px 32px;
    }

    .faq-main {
        padding: 80px 32px 60px;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */
.faq-category {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.faq-category:nth-child(1) { animation-delay: 0.1s; }
.faq-category:nth-child(2) { animation-delay: 0.2s; }
.faq-category:nth-child(3) { animation-delay: 0.3s; }
.faq-category:nth-child(4) { animation-delay: 0.4s; }
.faq-category:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
