/* ============================================================
   ARTEAGA 24/7 — Home público (tema claro)
   Usado por: /index.php
   El panel de operadores sigue usando assets/style.css (tema oscuro)
   ============================================================ */

:root{
  --bg: #f6f8fb;
  --surface: #ffffff;
  --line: #e4e9f2;
  --text: #101a2b;
  --text-muted: #5b6b85;

  --alert: #dc2626;   /* pánico — rojo de emergencia */
  --info: #1d4ed8;    /* buzón / visitas — azul institucional */
  --live: #15803d;    /* redes / estado — verde */
  --live-bright: #34e5a8; /* verde brillante, solo sobre fondo oscuro (footer) */

  --ink: #0b1626;     /* franja oscura del footer */
  --ink-line: #20304a;
  --ink-text-muted: #8493ac;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(16,26,43,.05), 0 10px 26px rgba(16,26,43,.06);
  --shadow-hover: 0 14px 32px rgba(16,26,43,.12);

  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font-body);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
.wrap{ max-width:1160px; margin:0 auto; padding:0 24px; }
a{ color:inherit; text-decoration:none; }
img,svg{ display:block; max-width:100%; }
a:focus-visible, button:focus-visible{
  outline:2px solid var(--info); outline-offset:3px; border-radius:4px;
}

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:20;
  background:rgba(246,248,251,.9);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
/* min-height, no height fijo: así el logo grande siempre entra completo,
   nunca se recorta ni se esconde, y el header crece si hace falta. */
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  min-height:120px; gap:24px; padding:14px 24px;
}

/* Marca Comuna de Arteaga — el logo ya trae el texto incorporado */
.brand-comuna{ display:flex; align-items:center; min-width:0; }
.brand-comuna img{ width:170px; height:auto; max-height:120px; object-fit:contain; flex-shrink:0; }

.header-actions{ display:flex; align-items:center; gap:12px; flex-shrink:0; flex-wrap:wrap; justify-content:flex-end; }
.header-actions svg{ width:16px; height:16px; }

.status-pill{ display:flex; align-items:center; gap:8px; color:var(--live); font-family:var(--font-mono); font-size:12px; letter-spacing:.5px; text-transform:uppercase; }
.dot{ width:8px; height:8px; border-radius:50%; background:var(--live); animation:pulse-dot 2s infinite; }
@media (prefers-reduced-motion: reduce){ .dot{ animation:none; } }
@keyframes pulse-dot{
  0%{ box-shadow:0 0 0 0 rgba(21,128,61,.4); }
  70%{ box-shadow:0 0 0 8px rgba(21,128,61,0); }
  100%{ box-shadow:0 0 0 0 rgba(21,128,61,0); }
}

/* Emergencias / WhatsApp / Administración — los tres son el MISMO
   componente de botón (.btn-header), solo cambia el color de acento.
   Así los tres se ven igual de "botón", no solo uno. */
.btn-header{
  display:flex; align-items:center; gap:8px;
  padding:10px 16px; border-radius:10px; border:1.5px solid var(--line);
  background:var(--surface); color:var(--text-muted);
  font-family:var(--font-mono); font-size:12px; text-transform:uppercase; letter-spacing:.5px;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.btn-header:hover{ transform:translateY(-2px); box-shadow:0 10px 20px rgba(16,26,43,.14); }
.btn-header:active{ transform:translateY(0) scale(.96); box-shadow:none; }

.btn-header--alert{ border-color:rgba(220,38,38,.35); }
.btn-header--alert strong{ color:var(--alert); font-size:13px; }
.btn-header--alert:hover{ border-color:var(--alert); color:var(--alert); }

.btn-header--live{ border-color:var(--live); color:var(--live); }
.btn-header--live:hover{ background:var(--live); color:#fff; }

.btn-header--neutral{ border-color:var(--line); }
.btn-header--neutral:hover{ border-color:var(--info); color:var(--info); }

/* ---------- Hero ---------- */
.hero{
  padding:64px 0 64px;
  background:radial-gradient(1100px 420px at 15% -25%, rgba(29,78,216,.06), transparent 60%);
}
.hero-grid{ display:grid; grid-template-columns:1.05fr 1fr; gap:56px; align-items:center; }

.hero-content h1{
  font-family:var(--font-display); font-weight:800; font-size:clamp(32px,4vw,50px);
  line-height:1.08; margin:0 0 18px; color:var(--text);
}
.hero-content h1 .accent{ color:var(--info); }
.hero-copy{ max-width:480px; margin:0; color:var(--text-muted); font-size:15.5px; }

.hero-rule{
  display:block; width:64px; height:4px; border-radius:2px; margin:28px 0 22px;
  background:linear-gradient(90deg,var(--info),var(--live));
}

.hero-features{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.feature-pill{
  display:flex; align-items:flex-start; gap:9px;
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  padding:12px 12px;
}
.feature-pill svg{ width:20px; height:20px; color:var(--info); flex-shrink:0; margin-top:1px; }
.feature-pill span{ font-size:12px; line-height:1.28; color:var(--text); font-weight:500; }

/* hero-media es solo el lienzo: la foto vive adentro recortada
   (.hero-photo), y el logo + la ficha de stat se salen a propósito
   de ese marco para dar profundidad. */
.hero-media{ position:relative; }

.hero-photo{
  border-radius:28px; overflow:hidden; aspect-ratio:1/1;
  box-shadow:var(--shadow-hover); background:var(--ink);
}
.hero-photo img{ width:100%; height:100%; object-fit:cover; object-position:center bottom; }

/* ---------- Tarjetas de acción ---------- */
.actions{ padding:8px 0 96px; }
.grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:22px; }

.card{
  display:flex; align-items:stretch;
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); box-shadow:0 14px 32px rgba(16,26,43,.12), 0 2px 8px rgba(16,26,43,.06);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover, .card:focus-visible{
  transform:translateY(-6px);
  box-shadow:0 24px 48px rgba(16,26,43,.18), 0 4px 12px rgba(16,26,43,.08);
  border-color:var(--accent, var(--info));
}
.card-text{ flex:1 1 55%; display:flex; flex-direction:column; gap:10px; padding:28px; min-width:0; justify-content:center; }

.card-media{ flex:1 1 45%; position:relative; min-height:230px; }
.card-media-photo{
  position:absolute; inset:0; overflow:hidden;
  border-radius:0 var(--radius) var(--radius) 0;
}
.card-media-photo img{
  width:100%; height:100%; object-fit:cover; display:block;
  transition:transform .45s ease;
}
/* animación de hover: la foto hace un leve zoom, el título cambia de
   color al acento de la card, y la flecha del cta se corre a la derecha */
.card:hover .card-media-photo img{ transform:scale(1.07); }
.card:hover h2{ color:var(--accent, var(--info)); transition:color .2s ease; }
.card-cta{ display:inline-flex; align-items:center; transition:transform .2s ease; }
.card:hover .card-cta{ transform:translateX(4px); }

.card h2{ font-family:var(--font-display); font-weight:700; font-size:22px; text-transform:uppercase; margin:0; letter-spacing:.3px; color:var(--text); line-height:1.1; transition:color .2s ease; }
.card p{ color:var(--text-muted); margin:0; font-size:14.5px; }
.card-cta{
  margin-top:auto; padding-top:10px; font-family:var(--font-mono); font-size:12px;
  text-transform:uppercase; letter-spacing:.5px; color:var(--accent, var(--info));
}
.card--alert{ --accent:var(--alert); }
.card--info{ --accent:var(--info); }
.card--status{ --accent:var(--live); }

/* ---------- Footer ---------- */
.site-footer{ background:var(--ink); color:var(--ink-text-muted); margin-top:0; }
.footer-rule{ display:block; height:3px; background:linear-gradient(90deg,var(--info),var(--live),var(--live-bright)); }

.footer-top{
  display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:36px;
  padding:52px 24px 36px;
}
.footer-col{ min-width:0; }
.footer-heading{
  display:block; font-family:var(--font-mono); font-size:11px; text-transform:uppercase;
  letter-spacing:1.5px; color:var(--live-bright); margin-bottom:14px;
}

.footer-brand p{ margin:10px 0 0; font-size:13.5px; line-height:1.6; max-width:320px; }
.footer-wordmark{ display:block; font-family:var(--font-display); font-weight:800; font-size:24px; text-transform:uppercase; letter-spacing:.5px; color:#fff; }
.footer-wordmark strong{ color:var(--live-bright); font-weight:800; }
.footer-tagline{ display:block; font-family:var(--font-mono); font-size:10.5px; letter-spacing:1.5px; text-transform:uppercase; color:var(--ink-text-muted); margin-top:6px; }

.footer-line{
  display:flex; align-items:center; gap:10px; margin:0 0 12px; font-size:14px;
}
.footer-line svg{ width:17px; height:17px; color:var(--live-bright); flex-shrink:0; }
.footer-line strong{ color:#fff; }
.footer-line a{ transition:color .15s ease; }
.footer-line a:hover{ color:var(--live-bright); }

.footer-social{ display:flex; gap:12px; }
.social-btn{
  display:flex; align-items:center; justify-content:center;
  width:42px; height:42px; border-radius:50%; border:1.5px solid var(--ink-line);
  color:var(--ink-text-muted);
  transition:transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.social-btn svg{ width:19px; height:19px; }
.social-btn:hover{ background:var(--live-bright); border-color:var(--live-bright); color:var(--ink); transform:translateY(-3px); }

.footer-bottom{
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px;
  padding:20px 24px; border-top:1px solid var(--ink-line);
  font-family:var(--font-mono); font-size:11px; letter-spacing:.4px; color:var(--ink-text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width:980px){
  .hero-grid{ grid-template-columns:1fr; }
  .hero-media{ order:-1; margin-bottom:44px; }
}
@media (max-width:860px){
  .footer-top{ grid-template-columns:1fr 1fr; }
  .footer-brand{ grid-column:1 / -1; }
}
@media (max-width:720px){
  .grid{ grid-template-columns:1fr; }
  .card{ flex-direction:column; }
  .card-media{ min-height:180px; order:-1; }
  .card-media-photo{ border-radius:var(--radius) var(--radius) 0 0; }
  .status-pill{ display:none; }

  /* El logo de la Comuna es lo más importante: en mobile pasa a su
     propia fila arriba, centrado y grande. Los botones van debajo,
     así nunca compiten por el mismo espacio ni se esconden. */
  .header-inner{
    flex-direction:column; align-items:center; justify-content:center;
    min-height:auto; gap:12px; padding:16px 20px;
  }
  .brand-comuna{ justify-content:center; }
  .brand-comuna img{ width:150px; max-height:100px; }
  .header-actions{ justify-content:center; }

  .hero-features{ grid-template-columns:repeat(2,1fr); }
  .footer-top{ grid-template-columns:1fr; padding:40px 24px 28px; }
  .footer-bottom{ flex-direction:column; }
}
@media (max-width:560px){
  .header-actions{ gap:8px; }
  .btn-header{ padding:8px 10px; }
  .btn-header span, .btn-header:not(.btn-header--live) span{ display:inline; }
  .brand-comuna img{ width:120px; max-height:82px; }
}
