/* ═══════════════════════════════════════════════════════════════════════════
   home.css – Consulado México – Mobile-first
   ═══════════════════════════════════════════════════════════════════════════ */

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

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::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 {
    --green:      #006847;
    --green-dark: #004d32;
    --green-light:#f0fdf4;
    --red:        #ce1126;
    --white:      #ce1126;
    --navy:       #0e3650;
    --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 (transparente, encima de la imagen) ───────────────── */
header { position: relative; }
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 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: #86efac; }

/* ── HERO ─────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    background: #003d28 url("/media/images/background_consulado_mexico.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,61,40,.75) 0%, rgba(0,61,40,.5) 50%, rgba(0,61,40,.85) 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, 2.5vw, 18px);
    color: rgba(255,255,255,.88);
    max-width: 580px;
    margin: 0 0 28px;
    line-height: 1.65;
}
.hero-sub strong { color: #fff; }
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.btn-hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--green);
    font-size: 15px;
    font-weight: 700;
    padding: 13px 22px;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    transition: transform .15s, box-shadow .15s;
}
.btn-hero-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 13px 22px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,.6);
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.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);
    font-size: 13px;
    text-decoration: none;
}
.hero-contact-item:hover { color: #fff; }

/* ── STATS BAR ────────────────────────────────────────────────────────────── */
.stats-bar {
    background: var(--navy);
    padding: 20px var(--pad-x);
}
.stats-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
}
.stat-n {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: #86efac;
}
.stat-l {
    font-size: 12px;
    color: rgba(255,255,255,.7);
    margin-top: 3px;
    text-align: center;
}

/* ── EMERGENCY BANNER ─────────────────────────────────────────────────────── */
.emergency-banner {
    background: #fff8e1;
    border-bottom: 2px solid #f59e0b;
    padding: 12px var(--pad-x);
}
.emergency-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    max-width: 1200px;
    margin: 0 auto;
}
.emergency-inner svg { color: #d97706; flex-shrink: 0; }
.emergency-inner span { flex: 1; color: #92400e; }
.emergency-link {
    font-weight: 700;
    color: var(--green);
    text-decoration: none;
    white-space: nowrap;
}

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

/* ── SECTION COMMONS ──────────────────────────────────────────────────────── */
section { padding: 48px 0; }
section + section { border-top: 1px solid var(--gray-100); }
.section-header { margin-bottom: 32px; }
.section-header h2 {
    font-size: clamp(20px, 3.5vw, 30px);
    font-weight: 800;
    color: var(--gray-800);
    margin: 0 0 8px;
}
.section-header p {
    font-size: 16px;
    color: var(--gray-600);
    max-width: 620px;
    margin: 0;
}
.section-intro h2 {
    font-size: clamp(20px, 3.5vw, 28px);
    font-weight: 800;
    color: var(--gray-800);
    margin: 0 0 12px;
}
.section-intro p {
    font-size: 16px;
    color: var(--gray-600);
    max-width: 800px;
    line-height: 1.75;
}

/* ── MAP ──────────────────────────────────────────────────────────────────── */
#leaflet {
    height: clamp(260px, 50vw, 480px);
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

/* ── BÚSQUEDA POR CIUDAD ───────────────────────────────────────────────────── */
.search-city-wrap {
    margin-bottom: 16px;
}
.search-city-input {
    width: 100%;
    max-width: 360px;
    padding: 12px 16px 12px 40px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 12px center;
    transition: border-color .15s, box-shadow .15s;
}
.search-city-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0,104,71,.15);
}
.search-city-input::placeholder { color: var(--gray-400); }

/* ── STATE FILTER ─────────────────────────────────────────────────────────── */
.state-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.filter-btn {
    padding: 8px 16px;
    border: 1.5px solid var(--gray-200);
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all .15s;
}
.filter-btn:hover { border-color: var(--green); color: var(--green); }
.filter-btn.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ── CONSULADOS GRID ──────────────────────────────────────────────────────── */
.consulados-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.consulado-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    min-width: 0;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.consulado-card:hover {
    border-color: var(--green);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.consulado-card-flag {
    font-size: 28px;
    flex-shrink: 0;
    width: 48px;
    text-align: center;
}
.consulado-card-body { flex: 1; min-width: 0; }
.consulado-card-state {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--green);
}
.consulado-card-body h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 2px 0 4px;
    color: var(--gray-800);
}
.consulado-card-address {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.consulado-card-phone {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0 0 6px;
}
.consulado-card-phone .fa-phone { color: var(--green); margin-right: 4px; }
.consulado-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    background: var(--green-light);
    color: var(--green);
    padding: 2px 8px;
    border-radius: 4px;
}
.consulado-card-tag--movil {
    background: #fff8e1;
    color: #b45309;
}
.consulado-card-arrow {
    font-size: 20px;
    color: var(--gray-400);
    flex-shrink: 0;
}
.consulado-card:hover .consulado-card-arrow { color: var(--green); }

/* ── CITA – STEPS ─────────────────────────────────────────────────────────── */
.section-cita { background: var(--gray-50); border-radius: var(--radius); padding: 48px var(--pad-x); margin: 0 calc(-1 * var(--pad-x)); }
.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
}
.step {
    display: flex;
    gap: 16px;
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.step-num {
    width: 40px;
    height: 40px;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
}
.step-body h3 { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.step-body p  { font-size: 14px; color: var(--gray-600); margin: 0; line-height: 1.6; }

.cita-channels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.channel-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, transform .15s;
}
.channel-card:hover { border-color: var(--green); transform: translateY(-1px); }
.channel-icon { font-size: 24px; }
.channel-body { flex: 1; }
.channel-body strong { display: block; font-size: 15px; color: var(--gray-800); }
.channel-body span  { font-size: 13px; color: var(--gray-600); }
.channel-arrow { font-size: 18px; color: var(--gray-400); }

/* ── SERVICIOS ────────────────────────────────────────────────────────────── */
.servicios-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.servicio-item {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 18px;
    border: 1px solid var(--gray-200);
}
.servicio-icon { font-size: 26px; margin-bottom: 8px; }
.servicio-item h3 { font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.servicio-item p  { font-size: 13px; color: var(--gray-600); margin: 0; line-height: 1.55; }

/* ── PASAPORTE ────────────────────────────────────────────────────────────── */
.section-pasaporte {}
.pasaporte-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
.req-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}
.req-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    line-height: 1.5;
}
.req-list li:last-child { border-bottom: none; }
.req-check { color: var(--green); font-weight: 800; flex-shrink: 0; margin-top: 1px; }
.pasaporte-requisitos h3,
.pasaporte-tabla h3 { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.pasaporte-tabla { overflow-x: auto; }
.pasaporte-tabla table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 12px 0;
}
.pasaporte-tabla th {
    background: var(--green);
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}
.pasaporte-tabla td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-800);
}
.pasaporte-tabla tr:nth-child(even) td { background: var(--gray-50); }
.table-note { font-size: 12px; color: var(--gray-400); margin: 4px 0 0; }
.table-note a { color: var(--green); }
.pasaporte-tiempo {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--green-light);
    border-left: 3px solid var(--green);
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: var(--gray-700, #374151);
    line-height: 1.5;
}

/* ── EMERGENCIAS ──────────────────────────────────────────────────────────── */
.emergency-box {
    background: #fff1f2;
    border: 2px solid #fecaca;
    border-radius: var(--radius);
    padding: 28px;
}
.emergency-box-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.emergency-box-icon { font-size: 28px; }
.emergency-box-header h2 { font-size: clamp(17px, 3vw, 22px); font-weight: 800; color: #991b1b; margin: 0; }
.emergency-box > p { font-size: 14px; color: #7f1d1d; line-height: 1.65; margin: 0 0 20px; }
.emergency-phones {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.eph {
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 14px;
}
.eph-city { font-size: 12px; font-weight: 700; color: #991b1b; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.eph-num  { font-size: 15px; font-weight: 700; color: var(--green); text-decoration: none; }
.eph-num:hover { text-decoration: underline; }
.emergency-footer-note { font-size: 13px; color: #7f1d1d; margin: 0; }
.emergency-footer-note a { color: var(--green); font-weight: 600; }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { border: 1.5px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.faq-q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}
.faq-q:hover { background: var(--gray-50); }
.faq-icon { font-size: 20px; color: var(--green); font-weight: 700; flex-shrink: 0; }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.faq-a.open { max-height: 400px; }
.faq-a p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.7;
    padding: 0 18px 16px;
    margin: 0;
}

/* ── GUÍAS ────────────────────────────────────────────────────────────────── */
.section-guias {
    padding: 56px var(--pad-x);
    background: #f8faf9;
}
.guias-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 32px;
}
.guia-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .18s, transform .18s, border-color .18s;
}
.guia-card:hover {
    box-shadow: 0 6px 24px rgba(0,80,40,.1);
    transform: translateY(-2px);
    border-color: var(--green);
}
.guia-card-icon {
    font-size: 2rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}
.guia-card-body { flex: 1; }
.guia-card-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--green);
    background: rgba(0,104,71,.08);
    border-radius: 4px;
    padding: 2px 7px;
    margin-bottom: 6px;
}
.guia-card-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 6px;
    line-height: 1.3;
}
.guia-card-body p {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0 0 10px;
    line-height: 1.5;
}
.guia-card-cta {
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
}
@media (min-width: 640px) {
    .guias-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .guias-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Footer → definido en footer.css (cargado desde layouts/footer.php) */
/* Solo override: quitar margin-top en la home */
.footer { margin-top: 0; }

/* ── FIXED BTN ────────────────────────────────────────────────────────────── */
.up-arrow {
    width: 44px; height: 44px; line-height: 44px;
    font-size: 20px; text-align: center;
    color: var(--green); background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    position: fixed; bottom: 16px; right: 16px;
    display: block; z-index: 9999;
}
.up-arrow p { margin: 0; }

/* ════════════════════════════════════════════════════════════════════════════
   TABLET (≥ 640px)
   ════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
    .stats-inner { grid-template-columns: repeat(4, 1fr); }
    .consulados-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid { grid-template-columns: repeat(3, 1fr); }
    .cita-channels { grid-template-columns: repeat(3, 1fr); }
    .servicios-grid { grid-template-columns: repeat(3, 1fr); }
    .pasaporte-layout { grid-template-columns: 1fr 1fr; }
    .emergency-phones { grid-template-columns: repeat(3, 1fr); }
}

/* ════════════════════════════════════════════════════════════════════════════
   DESKTOP (≥ 1024px)
   ════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
    .consulados-grid { grid-template-columns: repeat(3, 1fr); }
    .servicios-grid { grid-template-columns: repeat(4, 1fr); }
    .emergency-phones { grid-template-columns: repeat(6, 1fr); }
    .section-cita {
        padding: 56px var(--pad-x);
    }
}
