/* ==========================================================================
   AES Importadora - Estilos del sitio
   Paleta tomada del logo: azul marino, azul medio y rojo de acento.
   ========================================================================== */

:root {
    --navy: #0f3b6e;
    --navy-dark: #0a2a50;
    --blue: #1a63b5;
    --blue-light: #e8f0fa;
    --red: #c8102e;
    --text: #1d2a3a;
    --muted: #5b6b7f;
    --border: #dbe3ee;
    --bg: #ffffff;
    --bg-alt: #f4f7fb;
    --success: #1e7d4f;
    --success-bg: #e7f6ee;
    --error: #b42318;
    --error-bg: #fdecea;

    --font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 6px 24px rgba(15, 59, 110, 0.08);
    --shadow-lg: 0 14px 40px rgba(15, 59, 110, 0.14);
    --container: 1180px;
    --header-h: 76px;
}

/* --- Base ------------------------------------------------------------------ */

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

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
    font-family: var(--font-head);
    color: var(--navy);
    line-height: 1.2;
    margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1em; }

.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}
.narrow { max-width: 820px; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 100;
    background: var(--navy);
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 0.8em;
}
.lead { font-size: 1.12rem; color: var(--muted); }

/* --- Botones --------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.8em 1.5em;
    border: 2px solid transparent;
    border-radius: 999px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn .icon { width: 1.1em; height: 1.1em; }

.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #a50d26; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--blue-light); }
.btn-outline-light { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }
.btn-block { width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.4em; font-weight: 600; }

/* --- Cabecera -------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(6px);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--header-h);
}
.brand img { width: 170px; }

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--navy);
    cursor: pointer;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle-close { display: none; }
.nav-open .nav-toggle-open { display: none; }
.nav-open .nav-toggle-close { display: inline-flex; }

.main-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 8px 16px 20px;
    display: none;
}
.nav-open .main-nav { display: block; }
.main-nav ul { list-style: none; margin: 0 0 12px; padding: 0; }
.main-nav li a {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--navy);
}
.main-nav li a:hover { text-decoration: none; color: var(--blue); }
.main-nav li a.is-active { color: var(--red); }
.nav-cta { width: 100%; }

@media (min-width: 900px) {
    .brand img { width: 200px; }
    .nav-toggle { display: none; }
    .main-nav,
    .nav-open .main-nav {
        position: static;
        display: flex;
        align-items: center;
        gap: 28px;
        padding: 0;
        border: 0;
        box-shadow: none;
        background: transparent;
    }
    .main-nav ul { display: flex; gap: 28px; margin: 0; }
    .main-nav li a { padding: 6px 0; border: 0; border-bottom: 2px solid transparent; }
    .main-nav li a.is-active { border-bottom-color: var(--red); }
    .nav-cta { width: auto; padding: 0.65em 1.3em; }
}

/* --- Hero ------------------------------------------------------------------ */

.hero {
    position: relative;
    background:
        radial-gradient(circle at 85% 20%, rgba(26, 99, 181, 0.14), transparent 45%),
        linear-gradient(180deg, #f4f8fd 0%, #fff 100%);
    padding: 56px 0 64px;
    overflow: hidden;
}
.hero-inner { display: grid; gap: 40px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }

.hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    max-width: 420px;
}
.hero-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--navy);
}
.hero-card .icon { width: 34px; height: 34px; color: var(--blue); }
.hero-card-1 { background: var(--navy); color: #fff; }
.hero-card-1 .icon { color: #fff; }
.hero-card-4 { border-top: 4px solid var(--red); }

@media (min-width: 900px) {
    .hero { padding: 88px 0 96px; }
    .hero-inner { grid-template-columns: 1.25fr 1fr; }
    .hero-visual { justify-self: end; width: 100%; }
    .hero-card { padding: 28px; }
    .hero-card-2, .hero-card-4 { transform: translateY(28px); }
}

.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    color: #fff;
    padding: 56px 0;
}
.page-hero h1 { color: #fff; max-width: 820px; }
.page-hero .eyebrow { color: #ffd2d8; }
.page-hero .lead { color: rgba(255, 255, 255, 0.85); max-width: 720px; margin: 0; }

/* --- Destacados ------------------------------------------------------------ */

.highlights { border-block: 1px solid var(--border); background: #fff; }
.highlights-grid { display: grid; gap: 18px; padding-block: 26px; }
.highlight { display: flex; align-items: center; gap: 14px; }
.highlight > .icon { width: 40px; height: 40px; color: var(--red); }
.highlight strong { display: block; font-family: var(--font-head); color: var(--navy); }
.highlight span { color: var(--muted); font-size: 0.93rem; }

@media (min-width: 760px) {
    .highlights-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Secciones ------------------------------------------------------------- */

.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p:last-child { color: var(--muted); }
.section-more { margin: 28px 0 0; }

@media (min-width: 900px) {
    .section { padding: 88px 0; }
}

.split { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) {
    .split { grid-template-columns: 1fr 1fr; gap: 64px; }
}

/* --- Tarjetas -------------------------------------------------------------- */

.card-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: transparent; }
.card p { color: var(--muted); margin: 0; }

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: var(--radius-sm);
    background: var(--blue-light);
    color: var(--blue);
    flex-shrink: 0;
}
.card-icon .icon { width: 26px; height: 26px; }

/* --- Pasos del proceso ----------------------------------------------------- */

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
    counter-reset: none;
}
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(5, 1fr); } }

.step {
    position: relative;
    padding: 24px 22px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}
.step p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 800;
}
.step:last-child .step-number { background: var(--red); }

/* --- Listas con tilde ------------------------------------------------------ */

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .icon {
    width: 28px;
    height: 28px;
    padding: 5px;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--blue);
}
.check-list-compact { gap: 8px; margin-top: 12px; }
.check-list-compact .icon { width: 22px; height: 22px; padding: 4px; }

/* --- Servicios ------------------------------------------------------------- */

.service-list { display: grid; gap: 22px; }
@media (min-width: 900px) { .service-list { grid-template-columns: 1fr 1fr; } }

.service {
    display: flex;
    gap: 20px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.service h2 { font-size: 1.3rem; }
.service p { color: var(--muted); }
@media (max-width: 520px) { .service { flex-direction: column; gap: 0; } }

/* --- FAQ ------------------------------------------------------------------- */

.faq { display: grid; gap: 12px; }
.faq details {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 0 20px;
}
.faq summary {
    cursor: pointer;
    padding: 18px 0;
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--navy);
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--red); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--muted); padding-bottom: 6px; }

/* --- Nosotros -------------------------------------------------------------- */

.about-logo {
    padding: 32px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.origins { display: grid; gap: 20px; }
@media (min-width: 800px) { .origins { grid-template-columns: 1.3fr 1fr 1fr; } }

.origin {
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.origin p { color: var(--muted); margin: 0; }
.origin-main { background: var(--navy); border-color: var(--navy); }
.origin-main h3 { color: #fff; }
.origin-main p { color: rgba(255, 255, 255, 0.85); }

.origin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--blue);
    font-family: var(--font-head);
    font-weight: 800;
}
.origin-badge .icon { width: 26px; height: 26px; }
.origin-badge-cn { background: var(--red); color: #ffde00; }
.origin-badge-us { background: var(--blue-light); color: var(--navy); box-shadow: inset 0 -4px 0 var(--red); }

/* --- Banda CTA ------------------------------------------------------------- */

.cta-band {
    background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 55%, var(--blue) 100%);
    color: #fff;
    padding: 56px 0;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin: 0; }
.cta-inner { display: grid; gap: 24px; align-items: center; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
    .cta-inner { grid-template-columns: 1fr auto; }
}

/* --- Contacto -------------------------------------------------------------- */

.contact-layout { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .contact-layout { grid-template-columns: 1fr 1.6fr; gap: 56px; } }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-list .card-icon { margin: 0; width: 46px; height: 46px; }
.contact-list strong { display: block; font-family: var(--font-head); color: var(--navy); font-size: 0.95rem; }
.contact-list span, .contact-list a { overflow-wrap: anywhere; }

.contact-form-wrap {
    padding: 28px 20px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-lg);
    scroll-margin-top: calc(var(--header-h) + 16px);
}
@media (min-width: 640px) { .contact-form-wrap { padding: 36px; } }

.form-row { display: grid; gap: 0 20px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.93rem; }
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    font: inherit;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26, 99, 181, 0.18);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { margin: 6px 0 0; color: var(--error); font-size: 0.88rem; }
.req { color: var(--red); }
.form-note { margin: 14px 0 0; font-size: 0.85rem; color: var(--muted); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 18px;
    margin-bottom: 22px;
    border-radius: var(--radius-sm);
}
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--error-bg); color: var(--error); }

/* --- 404 ------------------------------------------------------------------- */

.not-found { text-align: center; }
.not-found .hero-actions { justify-content: center; }
.not-found-code {
    font-family: var(--font-head);
    font-size: clamp(4rem, 14vw, 7rem);
    font-weight: 800;
    line-height: 1;
    color: var(--blue-light);
    -webkit-text-stroke: 2px var(--blue);
    margin-bottom: 0.2em;
}

/* --- Pie ------------------------------------------------------------------- */

.site-footer { background: var(--navy-dark); color: rgba(255, 255, 255, 0.78); font-size: 0.95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 32px; padding-block: 56px 40px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.4fr; } }
@media (min-width: 1000px) { .footer-grid:has(> :nth-child(4)) { grid-template-columns: 1.4fr 1fr 1.4fr 1fr; } }

.footer-brand img {
    width: 96px;
    padding: 8px;
    margin-bottom: 14px;
    border-radius: var(--radius-sm);
    background: #fff;
}
.footer-name { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.1rem; margin-bottom: 0.3em; }
.footer-title {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1em;
}
.footer-links,
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { margin-top: 3px; color: #8fb6e6; }
.footer-contact a, .footer-contact span { overflow-wrap: anywhere; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-block: 18px; font-size: 0.85rem; }
.footer-bottom p { margin: 0; }

/* --- WhatsApp flotante ----------------------------------------------------- */

.whatsapp-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.07); }
.whatsapp-float .icon { width: 30px; height: 30px; }

/* --- Animación de entrada (solo si el JS la activa) ------------------------ */

.js .reveal { transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.2s, border-color 0.2s; }
.js .reveal:not(.is-visible) { opacity: 0; transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
    .js .reveal:not(.is-visible) { opacity: 1; transform: none; }
}
