/* 
   ==================================================================
   PREMIUM EV PROTECTION GUIDE - ARTICLE SPECIFIC STYLES
   Designed for: Volvo EX90, Zeekr 009, IM Motors
   Theme: Modern Premium Light with Cinematic Depth
   ==================================================================
*/

:root {
    --ev-accent: #0066cc; /* Premium Blue */
    --ev-gold: #c5a059;   /* Luxury Gold */
    --ev-bg-light: #f8f9fa;
    --ev-text-dark: #1a1a1a;
    --ev-text-muted: #666;
    --ev-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --ev-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --ev-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --ev-radius: 16px;
}

/* Scroll Margin for TOC Anchors */
h2, h3 {
    scroll-margin-top: 120px;
}

/* ==================================================================
   HERO SECTION
   ================================================================== */
.ev-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    background: #000;
}

.ev-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ev-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: transform 0.5s ease;
}

.ev-hero:hover .ev-hero__img {
    transform: scale(1.05);
}

.ev-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 2;
}

.ev-hero__content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 2rem;
    text-align: center;
}

/* Breadcrumb in Hero */
.ev-breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.ev-breadcrumb a {
    color: var(--ev-gold);
    text-decoration: none;
    transition: opacity 0.2s;
}

.ev-breadcrumb a:hover {
    opacity: 0.7;
}

.ev-breadcrumb span {
    color: #fff;
}

.ev-hero__category {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--ev-accent);
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.ev-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.ev-hero__highlight {
    color: var(--ev-gold);
}

.ev-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.ev-hero__meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 0.9375rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* ==================================================================
   LAYOUT
   ================================================================== */
.ev-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

@media (max-width: 1024px) {
    .ev-layout {
        grid-template-columns: 1fr;
    }
}

.ev-article__container {
    /* inner wrapper for article content */
}

/* ==================================================================
   TOC SIDEBAR (Desktop)
   ================================================================== */
.ev-toc {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.ev-toc__inner {
    background: #fff;
    border-radius: var(--ev-radius);
    padding: 2rem;
    box-shadow: var(--ev-shadow-md);
    border: 1px solid rgba(0,0,0,0.05);
}

.ev-toc__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--ev-text-dark);
}

.ev-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ev-toc__list li {
    margin-bottom: 0.75rem;
}

.ev-toc__list a {
    color: var(--ev-text-muted);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
}

.ev-toc__list a:hover {
    color: var(--ev-accent);
    background: rgba(0, 102, 204, 0.05);
    padding-left: 1.25rem;
}

.ev-toc__list a.ev-toc--active {
    color: var(--ev-accent);
    background: rgba(0, 102, 204, 0.05);
    font-weight: 700;
}

/* ==================================================================
   MOBILE TOC
   ================================================================== */
.ev-toc-mobile {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999;
}

@media (max-width: 1024px) {
    .ev-toc-mobile {
        display: block;
    }
    
    .ev-toc {
        display: none;
    }
}

.ev-toc-mobile__btn {
    background: var(--ev-accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--ev-shadow-md);
    transition: background 0.3s;
}

.ev-toc-mobile__btn:hover {
    background: #0052a3;
}

.ev-toc-mobile__menu {
    display: none;
    position: absolute;
    bottom: 60px;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--ev-shadow-xl);
    padding: 1rem 0;
    min-width: 260px;
    max-height: 50vh;
    overflow-y: auto;
}

.ev-toc-mobile__menu.show {
    display: block;
}

.ev-toc-mobile__menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--ev-text-dark);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: background 0.2s;
}

.ev-toc-mobile__menu a:hover {
    background: var(--ev-bg-light);
    color: var(--ev-accent);
}

/* ==================================================================
   ARTICLE STYLING
   ================================================================== */
.ev-article {
    background: #fff;
    color: var(--ev-text-dark);
    line-height: 1.8;
    font-size: 1.125rem;
}

.ev-section {
    margin-bottom: 6rem;
}

/* Section header / body wrappers */
.ev-section__header {
    margin-bottom: 2rem;
}

.ev-section__body {
    /* content wrapper */
}

.ev-section__num {
    display: block;
    color: var(--ev-accent);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ev-section__title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--ev-text-dark);
}

.ev-section h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    color: var(--ev-accent);
}

.ev-section p {
    margin-bottom: 1.5rem;
}

.ev-section strong {
    color: var(--ev-text-dark);
}

/* Scroll animation classes */
.ev-scene {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.ev-scene--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================================================================
   COMPONENTS
   ================================================================== */
.ev-card {
    background: var(--ev-bg-light);
    border-radius: var(--ev-radius);
    padding: 2.5rem;
    margin: 3rem 0;
    box-shadow: var(--ev-shadow-sm);
    border-left: 6px solid var(--ev-accent);
}

.ev-science-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.ev-science-card {
    background: #fff;
    border-radius: var(--ev-radius);
    padding: 2rem;
    box-shadow: var(--ev-shadow-md);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.ev-science-card:hover {
    transform: translateY(-10px);
}

.ev-science-card h4 {
    color: var(--ev-accent);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* ==================================================================
   CHECKLIST
   ================================================================== */
.ev-checklist {
    list-style: none;
    padding: 0;
    margin: 3rem 0;
}

.ev-checklist li {
    display: flex;
    gap: 1.5rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--ev-shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
}

.ev-checklist__check {
    background: #e6f0ff;
    color: var(--ev-accent);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
}

.ev-checklist__text {
    /* text wrapper for checklist items */
}

/* ==================================================================
   FAQ (native <details>)
   ================================================================== */
.ev-faq-item {
    background: var(--ev-bg-light);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.ev-faq-item summary {
    padding: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.ev-faq-item summary:hover {
    background: #eceef1;
}

.ev-faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--ev-accent);
}

.ev-faq-item[open] summary::after {
    content: '−';
}

.ev-faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--ev-text-muted);
}

/* ==================================================================
   FIGURES & MEDIA
   ================================================================== */
.ev-figure {
    margin: 3rem 0;
    border-radius: var(--ev-radius);
    overflow: hidden;
    box-shadow: var(--ev-shadow-xl);
}

.ev-figure img {
    width: 100%;
    height: auto;
    display: block;
}

.ev-figure figcaption {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    font-size: 0.9375rem;
    color: var(--ev-text-muted);
    border-bottom: 3px solid var(--ev-accent);
    font-style: italic;
}

.ev-figure--full {
    /* full-width media */
}

/* YouTube wrapper */
.yt-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
}

.yt-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Facebook wrapper */
.fb-wrap {
    display: flex;
    justify-content: center;
}

.fb-wrap iframe {
    max-width: 100%;
}

/* ==================================================================
   CALLOUT
   ================================================================== */
.ev-callout {
    background: #fff;
    border-radius: var(--ev-radius);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--ev-shadow-sm);
}

.ev-callout--gold {
    border-left: 6px solid var(--ev-gold);
}

.ev-callout h4 {
    color: var(--ev-text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.ev-callout p {
    margin-bottom: 0;
}

/* ==================================================================
   CTA SECTION
   ================================================================== */
.ev-section--cta {
    background: linear-gradient(135deg, #001a33 0%, #004080 100%);
    color: #fff;
    border-radius: var(--ev-radius);
    padding: 4rem;
    text-align: center;
    margin-top: 6rem;
}

.ev-section--cta .ev-section__title {
    color: #fff;
    font-size: 2.5rem;
}

.ev-section--cta p {
    color: rgba(255,255,255,0.9);
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.ev-cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.ev-cta-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--ev-radius);
    padding: 2rem;
    color: #fff;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.ev-cta-card:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

.ev-cta-card strong {
    font-size: 1.25rem;
    color: #fff;
}

.ev-cta-card span {
    font-size: 0.9375rem;
    opacity: 0.85;
}

.ev-cta-card--primary {
    background: var(--ev-gold);
    border-color: var(--ev-gold);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
}

.ev-cta-card--primary:hover {
    background: #d4ae6a;
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.6);
}

.ev-cta-contact {
    margin-top: 2rem;
}

.ev-cta-contact a {
    color: var(--ev-gold);
    text-decoration: underline;
}

.ev-cta-contact a:hover {
    color: #d4ae6a;
}

/* ==================================================================
   BACK TO TOP
   ================================================================== */
#back-to-top {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 50;
    background: rgba(31, 41, 55, 0.7);
    color: #fff;
    border-radius: 9999px;
    padding: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

#back-to-top:hover {
    background: rgba(17, 24, 39, 0.9);
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */
@media (max-width: 768px) {
    .ev-hero {
        height: auto;
        min-height: 60vh;
    }

    .ev-layout {
        padding: 2rem 1rem;
    }

    .ev-section {
        margin-bottom: 4rem;
    }

    .ev-section__title {
        font-size: 1.75rem;
    }

    .ev-section--cta {
        padding: 2rem;
    }

    .ev-section--cta .ev-section__title {
        font-size: 1.75rem;
    }

    .ev-hero__meta {
        gap: 1rem;
        flex-direction: column;
    }

    .ev-science-grid {
        grid-template-columns: 1fr;
    }

    .ev-cta-grid {
        grid-template-columns: 1fr;
    }
}