/* ==========================================================================
   Window Film 101 - Modern Stylesheet
   Designed for MAXXMA brand consistency
   ========================================================================== */

/* ── CSS Variables ─────────────────────────────────────────────────────── */
:root {
    --orange: #d99435;
    --yellow: #e9c34c;
    --dark-yellow: #f4bb1e;
    --light-gray: #e3e3e3;
    --text-green: #89802f;
    --blue: #48819f;
    --gray: #7f8690;
    --dark: #1e293b;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* offset for sticky header */
}

body {
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Hero Section ──────────────────────────────────────────────────────── */
.hero-wf {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    overflow: hidden;
    padding: 80px 24px 64px;
}

.hero-wf::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(217, 148, 53, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(72, 129, 159, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(233, 195, 76, 0.10) 0%, transparent 50%);
    z-index: 0;
}

.hero-wf__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.hero-wf__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
}

.hero-wf__badge {
    display: inline-block;
    background: rgba(217, 148, 53, 0.2);
    border: 1px solid rgba(217, 148, 53, 0.35);
    color: var(--yellow);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 18px;
    border-radius: 9999px;
    margin-bottom: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-wf h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.hero-wf h1 .highlight {
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-wf__sub {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0 0 32px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-wf__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--orange), #c17f25);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: 9999px;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 20px rgba(217, 148, 53, 0.35);
}

.hero-wf__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(217, 148, 53, 0.45);
}

/* ── Section Headers ────────────────────────────────────────────────────── */
.section-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.3;
    margin: 0 0 12px;
}

.section-desc {
    font-size: 1.0625rem;
    color: #64748b;
    line-height: 1.7;
    max-width: 640px;
}

/* ── Why Film Section ───────────────────────────────────────────────────── */
.why-film-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.why-film-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.why-film-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.why-film-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.why-film-card__icon--uv {
    background: #fef3c7;
    color: #d97706;
}
.why-film-card__icon--heat {
    background: #fee2e2;
    color: #dc2626;
}
.why-film-card__icon--privacy {
    background: #e0e7ff;
    color: #4f46e5;
}
.why-film-card__icon--safety {
    background: #d1fae5;
    color: #059669;
}
.why-film-card__icon--glare {
    background: #fce7f3;
    color: #db2777;
}
.why-film-card__icon--interior {
    background: #e0f2fe;
    color: #0284c7;
}

.why-film-card h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 8px;
}

.why-film-card p {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
}

/* ── Comparison Table ───────────────────────────────────────────────────── */
.comparison-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    min-width: 600px;
}

.comparison-table thead {
    background: var(--dark);
    color: white;
}

.comparison-table thead th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.comparison-table thead th:first-child {
    border-radius: var(--radius) 0 0 0;
}

.comparison-table thead th:last-child {
    border-radius: 0 var(--radius) 0 0;
}

.comparison-table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    vertical-align: top;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.comparison-table tbody tr:hover {
    background: #fefce8;
}

.comparison-table .check {
    color: #16a34a;
    font-weight: 600;
}

.comparison-table .cross {
    color: #dc2626;
}

.comparison-table .highlight-cell {
    background: #fffbeb !important;
    font-weight: 500;
}

/* ── Film Type Cards ────────────────────────────────────────────────────── */
.film-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.film-type-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.film-type-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.film-type-card__header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.film-type-card__icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.film-type-card__header h4 {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 4px;
}

.film-type-card__header .subtitle {
    font-size: 0.8125rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.film-type-card__body {
    padding: 20px 24px;
}

.film-type-card__body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.film-type-card__body ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.55;
}

.film-type-card__body ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--orange);
    font-weight: 700;
    font-size: 0.8125rem;
}

.film-type-card__footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.film-type-card__price {
    font-size: 0.875rem;
    color: #64748b;
}

.film-type-card__price strong {
    color: var(--dark);
    font-size: 1.125rem;
}

.film-type-card__badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.film-type-card__badge--popular {
    background: #fef3c7;
    color: #92400e;
}

.film-type-card__badge--premium {
    background: #e0e7ff;
    color: #3730a3;
}

.film-type-card__badge--value {
    background: #d1fae5;
    color: #065f46;
}

/* ── Price Factors ──────────────────────────────────────────────────────── */
.price-factors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.price-factor-item {
    display: flex;
    gap: 14px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    transition: box-shadow var(--transition);
}

.price-factor-item:hover {
    box-shadow: var(--shadow-sm);
}

.price-factor-item__num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-factor-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 4px;
}

.price-factor-item p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0;
}

/* ── Selection Guide ────────────────────────────────────────────────────── */
.selection-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.selection-card {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 28px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.selection-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.selection-card__emoji {
    font-size: 2.25rem;
    margin-bottom: 12px;
}

.selection-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 6px;
}

.selection-card .tagline {
    font-size: 0.8125rem;
    color: var(--orange);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.selection-card p {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 12px;
}

.selection-card__rec {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--blue);
    background: #eff6ff;
    padding: 6px 14px;
    border-radius: 9999px;
}

/* ── FAQ Accordion ──────────────────────────────────────────────────────── */
.faq-list {
    max-width: 760px;
    margin: 32px auto 0;
}

.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--white);
}

.faq-item__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    text-align: left;
    transition: background var(--transition);
}

.faq-item__question:hover {
    background: #f8fafc;
}

.faq-item__question[aria-expanded="true"] {
    color: var(--orange);
}

.faq-item__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    transition: transform var(--transition);
    color: #94a3b8;
}

.faq-item__question[aria-expanded="true"] .faq-item__icon {
    transform: rotate(180deg);
    color: var(--orange);
}

.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item__answer.open {
    max-height: 600px;
}

.faq-item__answer-inner {
    padding: 0 22px 20px;
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.7;
}

/* ── CTA Banner ─────────────────────────────────────────────────────────── */
.cta-banner {
    position: relative;
    background: linear-gradient(135deg, var(--dark) 0%, #1e3a5f 100%);
    border-radius: 16px;
    padding: 56px 40px;
    text-align: center;
    overflow: hidden;
    margin-top: 56px;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(217, 148, 53, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(72, 129, 159, 0.15) 0%, transparent 50%);
}

.cta-banner__content {
    position: relative;
    z-index: 1;
}

.cta-banner h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--white);
    margin: 0 0 12px;
}

.cta-banner p {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.cta-banner__buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--orange), #c17f25);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 30px;
    border-radius: 9999px;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 20px rgba(217, 148, 53, 0.3);
}

.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(217, 148, 53, 0.4);
}

.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 30px;
    border-radius: 9999px;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: border-color var(--transition), background var(--transition);
}

.btn-cta-secondary:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.08);
}

/* ── Sticky Table of Contents ───────────────────────────────────────────── */
.toc-sidebar {
    position: sticky;
    top: 96px; /* below header */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.toc-sidebar__title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 12px;
}

.toc-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-sidebar ul li {
    margin-bottom: 2px;
}

.toc-sidebar ul li a {
    display: block;
    padding: 8px 14px;
    font-size: 0.875rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 6px;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.toc-sidebar ul li a:hover {
    color: var(--dark);
    background: #f1f5f9;
}

.toc-sidebar ul li a.active {
    color: var(--orange);
    background: #fffbeb;
    border-left-color: var(--orange);
    font-weight: 600;
}

/* ── Highlight Box ──────────────────────────────────────────────────────── */
.highlight-box {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    border-left: 4px solid var(--orange);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 20px 24px;
    margin: 24px 0;
}

.highlight-box p {
    margin: 0;
    font-size: 0.9375rem;
    color: #78350f;
    line-height: 1.6;
}

.highlight-box strong {
    color: #92400e;
}

/* ── Step List ──────────────────────────────────────────────────────────── */
.step-list {
    list-style: none;
    padding: 0;
    counter-reset: step;
}

.step-list li {
    counter-increment: step;
    position: relative;
    padding-left: 56px;
    margin-bottom: 28px;
    min-height: 40px;
}

.step-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--yellow));
    color: white;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-list li h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 4px;
}

.step-list li p {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .toc-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 32px;
        padding-bottom: 20px;
        border-bottom: 1px solid #e2e8f0;
    }

    .toc-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .toc-sidebar ul li {
        margin-bottom: 0;
    }

    .toc-sidebar ul li a {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 6px 10px;
        font-size: 0.8125rem;
    }

    .toc-sidebar ul li a.active {
        border-left-color: transparent;
        border-bottom-color: var(--orange);
    }

    .hero-wf {
        min-height: 400px;
        padding: 64px 20px 48px;
    }

    .cta-banner {
        padding: 40px 24px;
    }

    .comparison-table {
        font-size: 0.8125rem;
        min-width: 500px;
    }

    .comparison-table thead th,
    .comparison-table tbody td {
        padding: 10px 12px;
    }

    .film-type-grid {
        grid-template-columns: 1fr;
    }

    .selection-cards {
        grid-template-columns: 1fr;
    }

    .price-factors-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-wf h1 {
        font-size: 1.75rem;
    }

    .hero-wf__sub {
        font-size: 0.9375rem;
    }

    .hero-wf__cta {
        font-size: 0.875rem;
        padding: 12px 24px;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .why-film-grid {
        grid-template-columns: 1fr;
    }

    .cta-banner__buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-in:nth-child(2) {
    animation-delay: 0.1s;
}
.animate-in:nth-child(3) {
    animation-delay: 0.2s;
}
.animate-in:nth-child(4) {
    animation-delay: 0.3s;
}
.animate-in:nth-child(5) {
    animation-delay: 0.4s;
}
.animate-in:nth-child(6) {
    animation-delay: 0.5s;
}