/* ==========================================================================
   Tesla Battery Experts — Premium Dark Theme
   "Porsche Classic, nicht Meineke"
   ========================================================================== */

/* --- Google Fonts (Inter + JetBrains Mono) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- Design Tokens --- */
:root {
    --bg-main: #09090b;
    --bg-surface: #18181b;
    --bg-elevated: #27272a;
    --accent: #39FF14;
    --accent-light: #66FF44;
    --accent-glow: rgba(57, 255, 20, 0.15);
    --accent-glow-strong: rgba(57, 255, 20, 0.35);
    --green: #22c55e;
    --amber: #f59e0b;
    --red: #ef4444;
    --text-main: #fafafa;
    --text-secondary: #d4d4d8;
    --text-muted: #a1a1aa;
    --text-subtle: #71717a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--bg-main);
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: rgba(57, 255, 20, 0.3);
    color: #fff;
}

img { max-width: 100%; height: auto; }

/* --- Subtle Grid Background --- */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
}

/* --- Layout --- */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 100px 2rem;
}

.section-container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 2rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.huge {
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.xx-large {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.025em;
}

.x-large {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
}

.large {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, var(--accent) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-blue {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Header & Navigation --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.site-header.scrolled {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    transition: var(--transition);
}

.site-header.scrolled .header-inner {
    padding: 0.75rem 2rem;
}

.logo-text {
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.logo-text span {
    color: var(--accent);
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    transition: var(--transition);
    position: relative;
}

.main-nav a:hover {
    color: var(--text-main);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.header-cta {
    padding: 0.6rem 1.5rem !important;
    font-size: 0.85rem !important;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.98);
    backdrop-filter: blur(16px);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow-strong);
    background: var(--accent-light);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25d366;
    color: #fff;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

/* --- Cards --- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(57, 255, 20, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--accent-glow);
}

.card-subtle {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

/* --- Hero Terminal --- */
.hero-terminal {
    font-family: var(--font-mono);
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 0 60px var(--accent-glow), 0 25px 50px rgba(0,0,0,0.5);
    transform: perspective(1200px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.6s ease;
}

.hero-terminal:hover {
    transform: perspective(1200px) rotateY(-2deg) rotateX(2deg);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-content {
    padding: 20px;
    font-size: 0.8rem;
    line-height: 1.8;
    color: #4ade80;
}

.terminal-line {
    transition: opacity 0.4s ease;
}

.typing-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #4ade80;
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Stats --- */
.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--accent);
    display: block;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 0.75rem;
    display: block;
}

/* --- Trust Badges --- */
.trust-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.trust-badge {
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
}

.trust-badge:hover {
    border-color: var(--accent);
    color: var(--text-main);
}

/* --- Process Timeline --- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
}

.process-grid::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.process-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.step-number-filled {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.step-number-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: var(--bg-main);
}

/* --- FAQ Accordion --- */
.faq-list {
    max-width: 800px;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-question {
    padding: 1.5rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-secondary);
    transition: var(--transition);
    user-select: none;
}

.faq-question:hover {
    color: var(--text-main);
}

.faq-question span {
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item.active .faq-question span {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 1.5rem;
}

/* --- Testimonials --- */
.testimonial-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.15;
    line-height: 1;
}

.stars {
    color: #f59e0b;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

/* --- CTA Section --- */
.cta-box {
    background: linear-gradient(135deg, var(--bg-surface) 0%, rgba(57, 255, 20, 0.05) 100%);
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: var(--radius-lg);
    padding: 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- WhatsApp Sticky Floating Button --- */
.wa-sticky {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #25d366;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: var(--transition);
    text-decoration: none;
    animation: wa-pulse 2s infinite;
}

.wa-sticky:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
    animation: none;
}

.wa-sticky-label {
    position: fixed;
    bottom: 2.35rem;
    right: 5.5rem;
    background: #fff;
    color: #1a1a1a;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9998;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.wa-sticky-label::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #fff;
}

.wa-sticky-label.hidden {
    opacity: 0;
}

@keyframes wa-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 768px) {
    .wa-sticky { width: 56px; height: 56px; bottom: 1.25rem; right: 1.25rem; }
    .wa-sticky-label { bottom: 1.5rem; right: 5rem; font-size: 0.8rem; padding: 6px 12px; }
}

/* --- Grid Helpers --- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* --- Separator Line --- */
.sep {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 0;
    border: none;
}

/* --- Service Price Tag --- */
.price-tag {
    display: inline-block;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--accent);
    margin-top: 1.5rem;
}

/* --- Diagnostic Data Visual (Expertise) --- */
.diag-panel {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
}

.diag-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), transparent);
}

/* --- Footer --- */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
}

.site-footer a:hover {
    color: var(--accent) !important;
}

.site-footer h4 {
    color: var(--text-main);
    letter-spacing: 0.02em;
}

/* --- WP Overrides --- */
.wp-block-group {
    padding: 0;
}

.wp-site-blocks {
    padding: 0;
}

.wp-block-template-part {
    margin: 0;
}

/* --- Responsive: Tablet --- */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .process-grid::before { display: none; }
    .section-container { padding: 80px 1.5rem; }
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .header-cta { display: none; }
    .mobile-toggle { display: flex; }

    .grid-2,
    .grid-3,
    .grid-4 { grid-template-columns: 1fr; }

    .process-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }

    .section-container { padding: 60px 1rem; }

    .huge { font-size: 2.25rem; }
    .xx-large { font-size: 1.75rem; }

    .hero-terminal {
        transform: none;
        margin-top: 2rem;
    }

    .hero-terminal:hover {
        transform: none;
    }

    .trust-bar {
        gap: 1rem;
    }

    .trust-badge {
        font-size: 0.65rem;
        padding: 0.4rem 0.75rem;
    }

    .cta-box {
        padding: 2.5rem 1.5rem;
    }

    .card {
        padding: 2rem;
    }

    .footer-grid {
        gap: 2.5rem !important;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .process-grid { grid-template-columns: 1fr; }
    .trust-bar { flex-direction: column; align-items: center; }
}

/* --- Pain Point Card Icons --- */
.card:hover svg,
.card:hover div[style*="font-size: 1.3rem"] {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* --- Service Price Highlight --- */
.card div[style*="color: var(--green)"] {
    position: relative;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 6px;
    display: inline-block;
}

/* --- Service Cards equal height --- */
.service-card {
    display: flex;
    flex-direction: column;
}
.service-card > div:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Better section spacing on large screens --- */
@media (min-width: 1025px) {
    .section-container { padding: 120px 2rem; }
}

/* --- Print --- */
@media print {
    body { background: #fff; color: #000; }
    body::before { display: none; }
    .site-header, .wa-sticky, .btn { display: none; }
    .card { border: 1px solid #ccc; break-inside: avoid; }
    .reveal { opacity: 1; transform: none; }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
