/* =============================================
   EcoEV — Calculadora de Carga Inteligente
   style.css
   ============================================= */

/* --- Variables & Reset --- */
:root {
    --green:      #1a9e5f;
    --green-dark: #147a48;
    --green-light:#e6f7ef;
    --blue:       #1a6fcf;
    --blue-light: #e8f0fc;
    --teal:       #0d6b7a;
    --text:       #1a1f2e;
    --text-muted: #6b7280;
    --bg:         #f4f6f9;
    --bg-card:    #ffffff;
    --border:     #e5e9ef;
    --shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:  0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
    --shadow-lg:  0 12px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);
    --radius:     14px;
    --radius-sm:  8px;
    --font:       'DM Sans', sans-serif;
    --font-mono:  'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- Navbar --- */
.navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.logo-img {
    height: 38px;
    width: auto;
    object-fit: contain;
    transition: transform .2s;
}
.logo-img:hover { transform: scale(1.04); }
.nav-tagline {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: .03em;
    text-transform: uppercase;
}

/* --- Page Layout --- */
.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
}
@media (max-width: 1100px) {
    .page-wrapper { grid-template-columns: 1fr; }
    .sidebar-ad-column { display: none; }
}

/* --- Header --- */
.page-header {
    padding: 48px 0 32px;
    text-align: left;
}
.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--green-light);
    color: var(--green);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 100px;
    margin-bottom: 16px;
}
.page-header h1 {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 12px;
}
.accent-text { color: var(--green); }
.header-sub {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 480px;
}

/* --- Calculator Grid --- */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}
@media (max-width: 780px) {
    .calc-grid { grid-template-columns: 1fr; }
}
.calc-inputs { display: flex; flex-direction: column; gap: 20px; }

/* --- Card --- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.card-icon {
    width: 36px; height: 36px;
    background: var(--green-light);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.card-header h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .01em;
}

/* --- Select Row --- */
.select-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 600px) {
    .select-row { grid-template-columns: 1fr; }
}

/* --- Field Group --- */
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.label-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 100px;
    letter-spacing: .04em;
}
.label-badge.red { background: #fee2e2; color: #b91c1c; }

/* --- Select --- */
.select-wrapper { position: relative; }
.select-wrapper select {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f9fafb;
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    appearance: none;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.select-wrapper select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(26,158,95,.12);
    background: #fff;
}
.select-wrapper select:disabled { opacity: .45; cursor: default; }
.select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 11px;
    color: var(--text-muted);
}

/* --- Inputs --- */
input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f9fafb;
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    transition: border-color .15s, box-shadow .15s;
    -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type="number"]:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(26,158,95,.12);
    background: #fff;
}

.input-prefix-wrap, .input-suffix-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-prefix {
    position: absolute;
    left: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    pointer-events: none;
}
.input-prefix-wrap input { padding-left: 22px; }
.input-suffix {
    position: absolute;
    right: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
}
.input-suffix-wrap input { padding-right: 32px; }

/* --- Params Grid --- */
.params-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}
@media (max-width: 520px) {
    .params-grid { grid-template-columns: 1fr; }
}

/* --- Charge Bar --- */
.charge-bar-container { margin-top: 4px; }
.charge-bar-track {
    position: relative;
    height: 28px;
    background: #eef1f5;
    border-radius: 100px;
    overflow: visible;
}
.charge-bar-fill {
    position: absolute;
    top: 0; bottom: 0;
    background: linear-gradient(90deg, var(--green), #2ec77a);
    border-radius: 100px;
    transition: left .3s, width .3s;
}
.charge-bar-label {
    position: absolute;
    bottom: -22px;
    font-size: 11px;
    font-weight: 700;
    color: var(--green);
    transform: translateX(-50%);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* --- Spec Strip --- */
.spec-strip {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.spec-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f4f6f9;
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 12px;
}
.spec-pill.highlight-green { background: var(--green-light); border-color: rgba(26,158,95,.25); }
.spec-pill.highlight-blue  { background: var(--blue-light);  border-color: rgba(26,111,207,.25); }
.spec-label { color: var(--text-muted); font-weight: 500; }
.spec-value { font-weight: 700; color: var(--text); }
.spec-unit  { color: var(--text-muted); font-size: 11px; }

/* --- Brand Badge --- */
.brand-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}
.brand-badge img {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: none;
}

/* --- Results Card --- */
.results-card {
    background: linear-gradient(160deg, #1a9e5f 0%, #0d6b7a 100%);
    border-radius: var(--radius);
    padding: 28px 24px;
    color: #fff;
    box-shadow: var(--shadow-lg);
    margin-bottom: 16px;
}
.result-label-top {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .75;
    text-align: center;
    margin-bottom: 8px;
}
.result-cost-main {
    text-align: center;
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
    margin-bottom: 20px;
}
.result-cost-main .currency {
    font-size: 28px;
    font-weight: 600;
    vertical-align: super;
    opacity: .8;
    margin-right: 3px;
}
.result-divider {
    height: 1px;
    background: rgba(255,255,255,.2);
    margin: 16px 0;
}
.result-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.result-item {
    background: rgba(0,0,0,.15);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}
.result-item-icon  { font-size: 18px; margin-bottom: 4px; }
.result-item-label { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.result-item-value { font-size: 18px; font-weight: 800; font-family: var(--font-mono); }
.result-bimestral {
    background: rgba(0,0,0,.2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.bimestral-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .8;
    line-height: 1.4;
}
.bimestral-label small { font-size: 10px; opacity: .7; }
.bimestral-value {
    font-size: 26px;
    font-weight: 800;
    white-space: nowrap;
    font-family: var(--font-mono);
}

/* --- Ad Blocks --- */
.ad-block {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.ad-label {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #a0aec0;
    z-index: 1;
}
.ad-placeholder {
    background: #eef1f5;
    border: 1.5px dashed #cbd5e0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    color: #a0aec0;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    padding: 12px;
}
.ad-placeholder.vertical { min-height: 300px; }
.ad-placeholder.wide     { min-height: 90px; }

.ad-horizontal .ad-placeholder { min-height: 90px; }
.ad-vertical   .ad-placeholder { min-height: 300px; }
.ad-fullwidth  .ad-placeholder { min-height: 90px; }

/* Hide in-calc horizontal ad on desktop (sidebar handles it) */
@media (min-width: 1100px) { #adBelowCalc { display: none; } }
/* Full width ad below section */
.ad-fullwidth { margin-top: 24px; }
/* Sticky sidebar ad */
.sticky-ad { position: sticky; top: 76px; }

/* Sidebar ad column */
.sidebar-ad-column {
    padding-top: 0;
}
.sidebar-ad-column .ad-block {
    margin-top: 0;
}

/* Ad strip above footer */
.ad-strip-footer {
    max-width: 1400px;
    margin: 0 auto 0;
    padding: 0 20px 32px;
}

/* --- Calc Results column (right side of calc grid) --- */
.calc-results { display: flex; flex-direction: column; gap: 14px; }
.calc-results .ad-block { display: none; }
@media (max-width: 780px) {
    .calc-results .ad-block { display: block; }
}

/* --- FAQ --- */
.faq-section {
    margin-top: 56px;
    padding-bottom: 20px;
}
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
}
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq-item {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color .2s;
}
.faq-item.active { border-color: var(--green); }
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    gap: 12px;
    transition: background .15s;
}
.faq-question:hover { background: #f9fafb; }
.faq-icon {
    width: 18px; height: 18px;
    flex-shrink: 0;
    transition: transform .25s;
    color: var(--text-muted);
}
.faq-item.active .faq-icon { transform: rotate(180deg); color: var(--green); }
.faq-answer {
    display: none;
    padding: 0 20px 18px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.faq-item.active .faq-answer { display: block; }
.faq-img {
    margin-top: 14px;
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* --- Disclaimer --- */
.disclaimer {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fffbeb;
    border: 1.5px solid #fcd34d;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 12px;
    color: #78350f;
    line-height: 1.55;
}
.disclaimer-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.disclaimer strong { font-weight: 700; }

/* --- Footer --- */
.site-footer {
    background: var(--text);
    color: rgba(255,255,255,.6);
    text-align: center;
    padding: 36px 24px;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer-logo {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: .7;
    margin-bottom: 4px;
}
.site-footer p { font-size: 13px; }
.footer-note { font-size: 11px; opacity: .5; }

/* --- Nav Links (shared) --- */
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    font-size: 13px; font-weight: 600;
    color: var(--text-muted); text-decoration: none;
    padding: 6px 12px; border-radius: 8px;
    transition: background .15s, color .15s;
}
.nav-links a:hover,
.nav-links a.active { background: var(--green-light); color: var(--green); }
