/* ============================================================
   Consulados del Perú en EE.UU. — v20260607b
   Colores: Azul #002B7F | Rojo #CE1126
   Arquitectura: basada en Guatemala / Colombia
   ============================================================ */

:root {
  --azul:        #002B7F;
  --azul-medio:  #003DA6;
  --azul-claro:  #dbeafe;
  --rojo:        #CE1126;
  --dorado:      #f5a623;
  --dorado-osc:  #d4891a;
  --texto:       #1e293b;
  --texto-claro: #64748b;
  --borde:       #cbd5e1;
  --fondo:       #e8f0f7;
  --blanco:      #ffffff;
  --verde:       #16a34a;
  --radio:       8px;
  --sombra:      0 2px 12px rgba(0,0,0,0.10);
  --sombra-h:    0 6px 24px rgba(0,0,0,0.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--texto); background: var(--fondo); line-height: 1.6; font-size: 16px; }

/* TIPOGRAFÍA */
h1 { font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 700; color: var(--azul); line-height: 1.2; }
h2 { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 600; color: var(--azul); margin-bottom: 1rem; }
h3 { font-size: 1.05rem; font-weight: 600; color: var(--azul-medio); margin-bottom: 0.5rem; }
p  { margin-bottom: 0.8rem; }
a  { color: var(--azul-medio); text-decoration: none; }
a:hover { color: var(--dorado-osc); text-decoration: underline; }

/* LAYOUT */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; }

/* HEADER */
.site-header { background: var(--azul); color: #fff; padding: 0.8rem 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 52px; }
.site-logo { font-size: 1rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 0.4rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-logo span { color: #f0c040; }
.site-nav a { color: rgba(255,255,255,0.85); font-size: 0.88rem; margin-left: 1.25rem; }
.site-nav a:hover { color: #f0c040; text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: #fff; font-size: 1.5rem; padding: 0.25rem 0.5rem; }

/* MOBILE NAV */
.mobile-nav { display: none; position: fixed; top: 52px; left: 0; right: 0; background: var(--azul-medio); border-top: 1px solid rgba(255,255,255,0.1); box-shadow: 0 4px 16px rgba(0,0,0,0.25); z-index: 99; max-height: calc(100vh - 52px); overflow-y: auto; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 0.95rem 1.25rem; color: rgba(255,255,255,0.95); font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.08); text-decoration: none; }
.mobile-nav a:hover { background: rgba(255,255,255,0.1); color: #f0c040; }

/* BREADCRUMB */
.breadcrumb { background: #fff; border-bottom: 1px solid var(--borde); padding: 0.6rem 0; font-size: 0.82rem; color: var(--texto-claro); }
.breadcrumb .container { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.breadcrumb a { color: var(--azul-medio); }
.breadcrumb span { margin: 0 0.2rem; }

/* JUMP NAV */
.jump-nav { background: #fff; border-bottom: 1px solid var(--borde); position: sticky; top: 52px; z-index: 90; }
.jump-nav .container { display: flex; flex-wrap: wrap; }
.jump-nav a { display: inline-block; padding: 0.55rem 0.85rem; font-size: 0.78rem; color: var(--texto-claro); border-bottom: 2px solid transparent; white-space: nowrap; }
.jump-nav a:hover { color: var(--azul); border-bottom-color: var(--azul); text-decoration: none; }

/* HERO */
.hero { background: linear-gradient(135deg, var(--azul) 0%, #001f5e 60%, var(--rojo) 100%); color: #fff; padding: 2.5rem 0 2rem; }
.hero-inner { display: flex; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.hero-flag { font-size: 3.5rem; line-height: 1; flex-shrink: 0; }
.hero-content { flex: 1; min-width: 260px; }
.hero h1 { color: #fff; margin-bottom: 0.5rem; }
.hero-seo-intro { font-size: 0.95rem; color: rgba(255,255,255,0.88); margin-top: 0.6rem; max-width: 680px; line-height: 1.65; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge-green { background: rgba(22,163,74,0.2); color: #86efac; }
.badge-red   { background: rgba(206,17,38,0.25); color: #fca5a5; }
.badge-blue  { background: rgba(255,255,255,0.15); color: #fff; }
.badge-gold  { background: #f0c040; color: var(--azul); }

/* MAIN GRID */
.main-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.75rem; padding: 2rem 0; align-items: start; }

/* CARDS */
.card { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 1.5rem; margin-bottom: 1.5rem; }
.card-title { font-size: 1.1rem; font-weight: 700; color: var(--azul); display: flex; align-items: center; gap: 0.5rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--azul-claro); margin-bottom: 1rem; }

/* ACCORDION */
.accordion-card { padding: 0; overflow: hidden; }
.accordion-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.5rem; background: none; border: none; cursor: pointer; font-size: 1rem; font-family: inherit; text-align: left; gap: 0.5rem; }
.accordion-btn .card-title { margin-bottom: 0; font-size: clamp(1rem,2.5vw,1.2rem); border-bottom: none; padding-bottom: 0; }
.accordion-btn:hover { background: var(--azul-claro); }
.accordion-btn.open  { background: var(--azul-claro); }
.accordion-arrow { font-size: 0.75rem; color: var(--texto-claro); flex-shrink: 0; }
.accordion-body { padding: 0 1.5rem 1.5rem; }
.accordion-body[hidden] { display: none; }

/* CONTACTO */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 1rem; }
.contact-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.contact-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 0.1rem; }
.contact-label { font-size: 0.75rem; color: var(--texto-claro); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-value { font-weight: 600; color: var(--texto); font-size: 0.95rem; }
.contact-value a { color: var(--azul-medio); }

/* HORARIO */
.schedule-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.schedule-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--borde); }
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table td:first-child { font-weight: 600; color: var(--azul); width: 45%; }
.open-tag    { color: var(--verde); font-weight: 700; }
.closed-tag  { color: var(--texto-claro); }
.citas-box   { background: var(--azul-claro); border-radius: var(--radio); padding: 0.85rem; margin-top: 1rem; font-size: 0.9rem; }
.horario-nota { margin-top: 0.75rem; font-size: 0.88rem; color: var(--texto-claro); }

/* ALERTAS */
.alerta-cita     { background: #fff7ed; border-left: 4px solid #f97316; padding: 0.9rem 1.2rem; border-radius: var(--radio); margin-bottom: 1rem; font-size: 0.9rem; }
.alerta-honorario{ background: #fefce8; border-left: 4px solid #eab308; padding: 0.9rem 1.2rem; border-radius: var(--radio); margin-bottom: 1rem; font-size: 0.9rem; }
.alerta-info     { background: #eff6ff; border-left: 4px solid var(--azul); padding: 0.9rem 1.2rem; border-radius: var(--radio); font-size: 0.9rem; }

/* NOVEDADES */
.novedad-item { padding: 0.75rem; background: var(--azul-claro); border-radius: var(--radio); margin-bottom: 0.75rem; }
.novedad-date { font-size: 0.78rem; color: var(--texto-claro); display: block; margin-bottom: 0.25rem; }
.novedades-empty-box { background: var(--azul-claro); border-radius: var(--radio); padding: 1.1rem 1.25rem; margin-bottom: 0.5rem; }
.novedades-empty-box p { margin: 0; font-size: 0.9rem; }
.novedades-empty-box a { color: var(--azul-medio); font-weight: 600; }
.novedades-actualizado { font-size: 0.75rem; color: var(--texto-claro); margin-top: 0.75rem; display: block; }

/* PAGO AVISO */
.pago-aviso { background: #fef3c7; border-left: 4px solid #f59e0b; padding: 0.75rem 1rem; border-radius: var(--radio); margin-bottom: 1rem; font-size: 0.88rem; }

/* SERVICIOS */
.cat-title { font-size: 1rem; color: var(--azul); margin: 1.2rem 0 0.75rem; border-bottom: 1px solid var(--borde); padding-bottom: 0.4rem; }
.servicios-lista { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.servicio-item { background: var(--fondo); border-radius: var(--radio); padding: 0.75rem 1rem; display: grid; grid-template-columns: 1fr auto; gap: 0.25rem; align-items: start; }
.servicio-nombre { font-weight: 600; font-size: 0.9rem; grid-column: 1; }
.servicio-precio { text-align: right; grid-column: 2; grid-row: 1 / 3; align-self: center; }
.servicio-nota   { font-size: 0.78rem; color: var(--texto-claro); grid-column: 1; }
.precio-usd      { font-weight: 700; color: var(--azul); font-size: 1rem; }
.precio-gratis   { font-weight: 700; color: var(--verde); }
.precio-consultar{ color: var(--texto-claro); font-size: 0.85rem; }

/* MAPA */
.map-container { border-radius: var(--radio); overflow: hidden; border: 1px solid var(--borde); }
.map-container iframe { display: block; width: 100%; height: 320px; }
.btn-maps { display: inline-flex; align-items: center; gap: 0.4rem; background: var(--azul); color: #fff; padding: 0.55rem 1rem; border-radius: var(--radio); font-size: 0.88rem; font-weight: 600; margin-top: 0.75rem; }
.btn-maps:hover { background: var(--azul-medio); text-decoration: none; color: #fff; }

/* CÓMO LLEGAR */
.directions-grid { display: grid; gap: 1rem; }
.direction-item  { display: flex; gap: 0.75rem; align-items: flex-start; background: var(--fondo); padding: 0.85rem; border-radius: var(--radio); }
.direction-icon  { font-size: 1.4rem; flex-shrink: 0; }

/* REQUISITOS */
.requisito-bloque { margin-bottom: 1.25rem; }
.requisito-bloque h4 { font-size: 0.88rem; font-weight: 600; color: var(--azul); margin-bottom: 0.5rem; }
.requisito-bloque ul { padding-left: 1.25rem; }
.requisito-bloque li { font-size: 0.88rem; margin-bottom: 0.25rem; }

/* JURISDICCIÓN */
.estados-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.estado-tag   { background: var(--azul-claro); color: var(--azul); padding: 0.3rem 0.75rem; border-radius: 20px; font-size: 0.82rem; font-weight: 500; }

/* FAQ */
.faq-list { display: grid; gap: 0.5rem; }
.faq-item { border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1rem; background: #fff; border: none; cursor: pointer; font-size: 0.9rem; font-weight: 500; text-align: left; gap: 0.5rem; font-family: inherit; }
.faq-q:hover { background: var(--azul-claro); }
.faq-arrow { font-size: 0.7rem; flex-shrink: 0; color: var(--texto-claro); }
.faq-a { padding: 0.85rem 1rem; background: var(--fondo); font-size: 0.88rem; }
.faq-a[hidden] { display: none; }

/* SIDEBAR */
.sidebar .card { margin-bottom: 1.25rem; }
.sidebar-card  { padding: 1.25rem; }
.sidebar-card h3 { font-size: 0.95rem; margin-bottom: 0.85rem; }
.quick-links { display: grid; gap: 0.5rem; }
.quick-btn   { display: block; padding: 0.6rem 0.9rem; border-radius: var(--radio); font-size: 0.82rem; font-weight: 600; text-align: center; }
.quick-btn:hover { opacity: 0.88; text-decoration: none; }
.quick-blue  { background: var(--azul); color: #fff; }
.quick-green { background: #d1fae5; color: #065f46; }
.quick-red   { background: #fee2e2; color: #991b1b; }
.quick-gray  { background: var(--fondo); color: var(--texto); border: 1px solid var(--borde); }
.quick-fb    { background: #dbeafe; color: #1e40af; }

/* PRICE TABLE SIDEBAR */
.price-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-bottom: 0.75rem; }
.price-table td { padding: 0.4rem 0; border-bottom: 1px solid var(--borde); }
.price-table .price-val { text-align: right; font-weight: 600; color: var(--azul); white-space: nowrap; }
.price-table .gratis { color: var(--verde); }
.price-nota { font-size: 0.78rem; color: var(--texto-claro); }

/* INDEX */
.hero-index { background: linear-gradient(135deg, var(--azul) 0%, #001f5e 60%, var(--rojo) 100%); color: #fff; padding: 3rem 0; text-align: center; }
.hero-index h1 { color: #fff; margin-bottom: 0.75rem; }
.hero-index-inner { display: flex; align-items: center; gap: 1.5rem; justify-content: center; }
.hero-index-inner .hero-flag { font-size: 4rem; flex-shrink: 0; }
.search-box { display: flex; max-width: 480px; margin: 0 auto; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra-h); }
.search-box input { flex: 1; padding: 0.85rem 1rem; border: none; font-size: 0.95rem; outline: none; }
.search-box button { background: #f0c040; color: var(--azul); border: none; padding: 0 1.25rem; font-weight: 700; cursor: pointer; }
.estado-titulo { font-size: 1.2rem; color: var(--azul); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--borde); }
.consulados-grid { display: grid; gap: 0; }
.consulado-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--borde); background: #fff; color: var(--texto); text-decoration: none; }
.consulado-card:hover { background: var(--azul-claro); text-decoration: none; }
.consulado-card-flag { font-size: 1.4rem; }
.consulado-card-info h3 { font-size: 0.95rem; font-weight: 600; color: var(--azul); margin-bottom: 0.2rem; }
.consulado-addr { font-size: 0.82rem; color: var(--texto-claro); margin: 0; }
.consulado-tel  { font-size: 0.82rem; color: var(--azul-medio); margin: 0.15rem 0 0; }
.consulado-card-arrow { color: var(--texto-claro); font-size: 1.1rem; }
.badge-honorario { background: #f59e0b; color: #fff; font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 1rem; font-weight: 600; }

/* FOOTER */
.site-footer { background: var(--azul); color: rgba(255,255,255,0.75); padding: 2.5rem 0 1.5rem; margin-top: 3rem; font-size: 0.85rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-copy { text-align: center; font-size: 0.78rem; color: rgba(255,255,255,0.5); border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem; margin-top: 1.5rem; }

/* CHATBOT — igual que Guatemala pero con colores CR */
.chat-float-btn { position: fixed; bottom: 1.5rem; right: 1.5rem; display: flex; align-items: center; gap: 0.5rem; background: var(--azul); color: #fff; border: none; border-radius: 50px; cursor: pointer; padding: 0.75rem 1.1rem; box-shadow: 0 4px 16px rgba(0,0,0,0.28); font-size: 0.88rem; font-weight: 700; font-family: inherit; z-index: 999; transition: background 0.2s, transform 0.2s; }
.chat-float-btn:hover { background: var(--azul-medio); transform: scale(1.05); }
.chat-robot { font-size: 1.3rem; }
.chat-float-window { position: fixed; bottom: 5.5rem; right: 1.5rem; width: 330px; max-width: calc(100vw - 2rem); background: #fff; border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,0.18); z-index: 998; display: none; flex-direction: column; overflow: hidden; max-height: 440px; }
.chat-float-window.open { display: flex; }
.chat-float-header { background: var(--azul); color: #fff; padding: 0.85rem 1rem; font-weight: 600; font-size: 0.92rem; display: flex; align-items: center; justify-content: space-between; }
.chat-float-header button { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.1rem; padding: 0; }
.chatbot-messages { flex: 1; overflow-y: auto; padding: 0.85rem; display: flex; flex-direction: column; gap: 0.6rem; font-size: 0.86rem; min-height: 120px; }
.chat-msg { max-width: 85%; padding: 0.55rem 0.85rem; border-radius: 10px; line-height: 1.45; }
.chat-user { background: var(--azul); color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.chat-bot  { background: var(--azul-claro); color: var(--texto); align-self: flex-start; border-bottom-left-radius: 3px; }
.chatbot-form { display: flex; border-top: 1px solid var(--borde); }
.chatbot-form input  { flex: 1; border: none; padding: 0.7rem 0.9rem; font-size: 0.86rem; outline: none; color: var(--texto); }
.chatbot-form button { background: var(--azul); color: #fff; border: none; padding: 0.7rem 0.9rem; cursor: pointer; font-size: 0.95rem; }
.chatbot-form button:hover { background: var(--azul-medio); }

/* RESPONSIVE */
@media (max-width: 900px) { .main-grid { grid-template-columns: 1fr; } .sidebar { order: -1; } }
@media (max-width: 700px) { .site-nav { display: none; } .nav-toggle { display: block; } }
@media (max-width: 600px) {
  .site-header .container { gap: 0.5rem; }
  .site-logo { font-size: 0.85rem; }
  .nav-toggle { font-size: 1.6rem; flex-shrink: 0; }
  .hero-inner { flex-direction: column; align-items: center; text-align: center; gap: 1rem; }
  .hero-flag  { font-size: 3rem; }
  .hero-seo-intro { text-align: center; }
  .hero-meta  { justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
  .jump-nav a { padding: 0.45rem 0.55rem; font-size: 0.72rem; }
  .footer-grid { text-align: center; }
  .chat-label { display: none; }
  .chat-float-btn { padding: 0.75rem; border-radius: 50%; }
  .chat-float-window { width: calc(100vw - 2rem); right: 1rem; }
  .hero-index-inner { flex-direction: column; text-align: center; }
}


/* Bandera Peru SVG */
.flag-pe{display:inline-block;vertical-align:middle;border:1px solid rgba(0,0,0,0.1);border-radius:2px;}
.hero-flag .flag-pe{width:64px;height:40px;border-radius:4px;}
