/* ═══════════════════════════════════════════════════════════════════════════
   home.css – Consulado Ecuatoriano – Mobile-first
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1a1a1a;
    background: #fff;
    line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
    --blue:        #003893;
    --blue-dark:   #002370;
    --blue-light:  #f0f4ff;
    --yellow:      #FFCD00;
    --red:         #CC0001;
    --gray-50:     #f9fafb;
    --gray-100:    #f3f4f6;
    --gray-200:    #e5e7eb;
    --gray-400:    #9ca3af;
    --gray-600:    #4b5563;
    --gray-800:    #1f2937;
    --radius:      10px;
    --shadow:      0 2px 12px rgba(0,0,0,.08);
    --shadow-md:   0 4px 24px rgba(0,0,0,.12);
    --pad-x:       clamp(16px, 5vw, 80px);
}

/* ── Navbar sobre el hero ─────────────────────────────────────────────────── */
header { position: relative; }
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    padding: 14px var(--pad-x);
}
.navbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: flex-end;
}
.nav-item { font-size: 14px; font-weight: 600; }
.nav-item a { color: #fff; text-decoration: none; }
.nav-item a:hover { color: #FFCD00; }

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    background: #001d5c url("/media/images/background_consulado_ecuador.png") center center / cover no-repeat;
    padding: clamp(72px, 14vw, 110px) var(--pad-x) clamp(56px, 12vw, 112px);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,29,92,.78) 0%, rgba(0,29,92,.52) 50%, rgba(0,29,92,.88) 100%);
    pointer-events: none;
}
.hero-overlay { display: none; }
.hero-content {
    position: relative;
    max-width: 720px;
}
.hero-tag {
    display: inline-block;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
    letter-spacing: .03em;
}
.hero h1 {
    font-size: clamp(26px, 5vw, 52px);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 16px;
}
.hero-sub {
    font-size: clamp(15px, 2vw, 18px);
    color: rgba(255,255,255,.85);
    margin: 0 0 28px;
    max-width: 580px;
    line-height: 1.6;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--yellow);
    color: #003893 !important;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: background .2s, transform .15s;
}
.btn-hero-primary:hover { background: #FFD700; transform: translateY(-2px); }
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.15);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 24px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.3);
    transition: background .2s;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,.25); }
.hero-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.hero-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.8) !important;
    font-size: 13px;
    text-decoration: none;
}
.hero-contact-item:hover { color: #fff !important; }

/* ── Stats bar ────────────────────────────────────────────────────────────── */
.stats-bar {
    background: var(--blue);
    padding: 18px var(--pad-x);
}
.stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-around;
}
.stat { text-align: center; }
.stat-n {
    display: block;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    color: var(--yellow);
    line-height: 1;
}
.stat-l {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,.8);
    margin-top: 4px;
}

/* ── Emergency banner ─────────────────────────────────────────────────────── */
.emergency-banner {
    background: #fff3cd;
    border-bottom: 1px solid #f59e0b;
    padding: 10px var(--pad-x);
}
.emergency-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #92400e;
}
.emergency-link {
    font-weight: 700;
    color: #92400e !important;
    text-decoration: underline;
    margin-left: auto;
}

/* ── Main container ───────────────────────────────────────────────────────── */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

/* ── Section intro ────────────────────────────────────────────────────────── */
.section-intro {
    padding: 40px 0 20px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 40px;
}
.section-intro h2 {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    margin: 0 0 12px;
    color: #1a1a1a;
}
.section-intro p {
    font-size: 16px;
    color: var(--gray-600);
    margin: 0 0 20px;
}

/* ── Section header ───────────────────────────────────────────────────────── */
.section-header {
    margin-bottom: 28px;
}
.section-header h2 {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}
.section-header p {
    font-size: 15px;
    color: var(--gray-600);
    margin: 0;
}

/* ── MAP ──────────────────────────────────────────────────────────────────── */
.section-map {
    padding: 40px 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 40px;
}
.section-map .section-header {
    margin-bottom: 20px;
}
.section-map .section-header h2 {
    font-size: clamp(20px, 2.5vw, 26px);
    font-weight: 700;
    color: var(--blue-dark);
    margin: 0 0 8px;
}
.section-map .section-header p {
    font-size: 15px;
    color: var(--gray-600);
    margin: 0;
}
#leaflet {
    height: clamp(260px, 50vw, 480px);
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

/* ── Consulados section & cards ───────────────────────────────────────────── */
.section-consulados {
    padding: 40px 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 40px;
}
.consulados-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}
.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.filter-input:focus { border-color: var(--blue); }
.consulados-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.consulado-card {
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, border-color .2s, transform .15s;
    display: block;
}
.consulado-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
    transform: translateY(-2px);
}
.card-flag { font-size: 28px; margin-bottom: 10px; }
.card-city {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
}
.card-state {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0 0 12px;
}
.card-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    color: var(--gray-600);
}
.card-info-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.card-cta {
    display: inline-block;
    margin-top: 14px;
    background: var(--blue);
    color: #fff !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s;
}
.consulado-card:hover .card-cta { background: var(--blue-dark); }

/* ── How it works ─────────────────────────────────────────────────────────── */
.section-como-funciona {
    padding: 40px 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 40px;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.step-card {
    background: var(--blue-light);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
}
.step-num {
    width: 36px;
    height: 36px;
    background: var(--blue);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}
.step-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a1a;
}
.step-card p {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

/* ── Guías section ────────────────────────────────────────────────────────── */
.section-guias {
    padding: 40px 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 40px;
}
.guias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.guia-card {
    display: block;
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, border-color .2s, transform .15s;
}
.guia-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
    transform: translateY(-2px);
}
.guia-icon { font-size: 28px; margin-bottom: 10px; }
.guia-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--blue);
    background: var(--blue-light);
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}
.guia-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.3;
}
.guia-card p {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0 0 12px;
    line-height: 1.5;
}
.guia-read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
}

/* ── Emergency section ────────────────────────────────────────────────────── */
.section-emergencias {
    padding: 40px 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 40px;
}
.emergencias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.emergencia-card {
    background: #fff3f3;
    border: 1.5px solid #fecaca;
    border-radius: var(--radius);
    padding: 16px;
}
.emergencia-city {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px;
}
.emergencia-tel {
    font-size: 15px;
    color: #b91c1c;
    font-weight: 600;
    text-decoration: none;
}
.emergencia-tel:hover { text-decoration: underline; }

/* ── FAQ section ──────────────────────────────────────────────────────────── */
.section-faqs {
    padding: 40px 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 40px;
}
.faqs-list { max-width: 800px; }
.faq {
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.faq p { margin: 0; font-size: 15px; font-weight: 600; color: #1a1a1a; }
.faq .show, .faq .hide { color: var(--gray-400); font-size: 18px; flex-shrink: 0; }
.faq-descriptions {
    display: none;
    padding: 12px 18px 16px;
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.7;
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-bottom: 6px;
}
.faq-descriptions p { margin: 0; }

/* ── Fixed button ─────────────────────────────────────────────────────────── */
.fixed-btn--container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
}
.fixed-btn--container button {
    background: var(--blue);
    color: white;
    border: none;
    padding: 13px 22px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,56,147,.35);
    transition: background .2s, transform .15s;
}
.fixed-btn--container button:hover { background: var(--blue-dark); transform: translateY(-2px); }
.up-arrow {
    position: fixed;
    bottom: 78px;
    right: 22px;
    width: 44px;
    height: 44px;
    background: rgba(0,56,147,.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 98;
    cursor: pointer;
}
.up-arrow p { color: white !important; margin: 0; line-height: 44px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .stats-inner { gap: 16px; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .hero-contact { flex-direction: column; gap: 8px; }
    .section-consulados, .section-como-funciona, .section-guias,
    .section-emergencias, .section-faqs, .section-intro { padding: 30px 0; }
}
@media (max-width: 480px) {
    .consulados-grid, .guias-grid, .steps-grid, .emergencias-grid { grid-template-columns: 1fr; }
    .emergency-inner { flex-direction: column; align-items: flex-start; }
    .emergency-link { margin-left: 0; }
}
