/* ==========================================================================
   Cruz Roja Mexicana — Delegación Colima
   Hoja de estilos institucional
   ========================================================================== */

/* ---------- Variables de diseño ---------- */
:root {
  --rojo: #D52B1E;
  --rojo-oscuro: #A81F14;
  --rojo-profundo: #7C150E;
  --blanco: #FFFFFF;
  --gris-50: #F7F8FA;
  --gris-100: #EEF0F3;
  --gris-200: #E2E5EA;
  --gris-400: #9AA1AB;
  --gris-600: #5B636E;
  --texto: #111827;
  --texto-suave: #374151;

  --fuente: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radio: 14px;
  --radio-grande: 20px;
  --sombra-s: 0 1px 3px rgba(20, 24, 33, .07), 0 1px 2px rgba(20, 24, 33, .04);
  --sombra-m: 0 6px 18px rgba(20, 24, 33, .08), 0 2px 6px rgba(20, 24, 33, .05);
  --sombra-l: 0 18px 48px rgba(20, 24, 33, .14);

  --header-h: 76px;
  --transicion: 220ms cubic-bezier(.4, 0, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--texto);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 800; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
a { color: var(--rojo); text-decoration-thickness: 1px; text-underline-offset: 2px; }
code {
  background: var(--gris-100);
  border: 1px solid var(--gris-200);
  border-radius: 6px;
  padding: .1em .4em;
  font-size: .88em;
}

:focus-visible {
  outline: 3px solid var(--rojo);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* ---------- Enlace de salto (accesibilidad) ---------- */
.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  z-index: 200;
  background: var(--rojo);
  color: var(--blanco);
  padding: .6rem 1rem;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transicion);
}
.skip-link:focus { top: 0; color: var(--blanco); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .78rem 1.6rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transicion), color var(--transicion),
              border-color var(--transicion), transform var(--transicion),
              box-shadow var(--transicion);
  min-height: 48px;               /* objetivo táctil accesible */
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--rojo);
  color: var(--blanco);
  box-shadow: 0 6px 16px rgba(213, 43, 30, .32);
}
.btn-primary:hover { background: var(--rojo-oscuro); color: var(--blanco); }
.btn-primary:focus-visible { outline-color: var(--blanco); }

.btn-outline-light {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .85);
  color: var(--blanco);
}
.btn-outline-light:hover { background: var(--blanco); color: var(--rojo); }

.btn-lg { padding: 1rem 2.1rem; font-size: 1.06rem; }
.btn-icon { width: 1.15em; height: 1.15em; flex: none; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gris-200);
  transition: box-shadow var(--transicion);
}
.site-header.is-scrolled { box-shadow: var(--sombra-m); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--texto);
  min-width: 0;
}
.brand-logo { 
  width: 85px; 
  height: 85px; 
  border-radius: 10px; 
  object-fit: contain; 
  flex: none; 
  background: transparent;
  mix-blend-mode: multiply; 
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.brand-sub { font-size: .8rem; color: var(--rojo); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Navegación ---------- */
.main-nav { display: flex; align-items: center; }
.nav-menu {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}
.nav-link {
  display: block;
  padding: .55rem .85rem;
  border-radius: 10px;
  color: var(--texto-suave);
  font-weight: 500;
  font-size: .95rem;
  text-decoration: none;
  transition: color var(--transicion), background var(--transicion);
}
.nav-link:hover { color: var(--rojo); background: var(--gris-50); }
.nav-link.is-active { color: var(--rojo); font-weight: 600; }
.nav-cta-item { margin-left: .5rem; }
.btn-nav-cta { padding: .6rem 1.25rem; min-height: 42px; }

/* ---------- Botón hamburguesa ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 10px;
  background: none;
  border: 1px solid var(--gris-200);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--texto);
  border-radius: 2px;
  transition: transform var(--transicion), opacity var(--transicion);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex;
  align-items: center;
  color: var(--blanco);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../assets/images/hero.jpg") center / cover no-repeat;
  transform: scale(1.03);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg,
      rgba(15, 2, 2, 0.90) 0%,
      rgba(80, 10, 6, 0.80) 50%,
      rgba(15, 2, 2, 0.65) 100%);
}
.hero-content { 
  padding-block: clamp(4rem, 10vw, 7rem); 
  max-width: 720px; 
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.hero-eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .45rem 1rem;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  margin-bottom: 1.4rem;
  background: rgba(255, 255, 255, .08);
}
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 3.9rem);
  font-weight: 800;
  margin-bottom: .35em;
}
.hero-subtitle {
  font-weight: 600;
  font-size: .62em;
  color: #FFD9D5;
  letter-spacing: .02em;
}
.hero-tagline {
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 500;
  margin-bottom: .5em;
}
.hero-description {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .88);
  max-width: 34em;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ==========================================================================
   SECCIONES GENERALES
   ========================================================================== */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-muted { background: var(--gris-50); }

.section-header { max-width: 720px; margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.section-kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rojo);
  margin-bottom: .7rem;
}
.section-header h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.section-lead { color: var(--texto-suave); font-size: 1.05rem; margin: 0; }

/* ==========================================================================
   NOSOTROS — Misión y Visión
   ========================================================================== */
.mv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 1.6rem;
}
.card {
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  border-radius: var(--radio-grande);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: var(--sombra-s);
  transition: transform var(--transicion), box-shadow var(--transicion);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sombra-m); }
.card h3 { font-size: 1.6rem; color: var(--texto); }
.card p { color: var(--texto-suave); margin-bottom: 0; }
.card-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  color: var(--rojo);
  background: rgba(213, 43, 30, .08);
  border-radius: 16px;
  margin-bottom: 1.2rem;
}
.card-icon svg { width: 28px; height: 28px; }

.vision-list {
  list-style: none;
  margin-top: 1.1rem;
  display: grid;
  gap: .8rem;
}
.vision-list li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--texto-suave);
}
.vision-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .32em;
  width: 1.1rem; height: 1.1rem;
  border-radius: 50%;
  background: rgba(213, 43, 30, .1);
  border: 1.5px solid var(--rojo);
}
.vision-list li::after {
  content: "";
  position: absolute;
  left: .32rem; top: .6em;
  width: .55rem; height: .32rem;
  border-left: 2px solid var(--rojo);
  border-bottom: 2px solid var(--rojo);
  transform: rotate(-45deg);
}

/* ==========================================================================
   PRINCIPIOS FUNDAMENTALES
   ========================================================================== */
.principles-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.3rem;
}
.principle-card {
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  border-radius: var(--radio-grande);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--sombra-s);
  transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
}
.principle-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sombra-m);
  border-color: rgba(213, 43, 30, .35);
}
.principle-card h3 { font-size: 1.14rem; margin-bottom: .45em; }
.principle-card p { font-size: .93rem; color: var(--texto-suave); margin: 0; }
.principle-icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  color: var(--rojo);
  background: rgba(213, 43, 30, .08);
  border-radius: 50%;
  margin-bottom: 1rem;
  transition: background var(--transicion), color var(--transicion);
}
.principle-icon svg { width: 25px; height: 25px; }
.principle-card:hover .principle-icon { background: var(--rojo); color: var(--blanco); }

/* ==========================================================================
   TRANSPARENCIA — Sección prioritaria
   ========================================================================== */
.section-transparency {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(255, 255, 255, .07), transparent 60%),
    linear-gradient(135deg, var(--rojo-profundo) 0%, var(--rojo-oscuro) 55%, var(--rojo) 100%);
  color: var(--blanco);
}
.section-header-light .section-kicker { color: #FFC7C2; }
.section-header-light .section-lead { color: rgba(255, 255, 255, .85); }

.transparency-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.4rem, 4vw, 2.6rem);
  align-items: center;
  background: var(--blanco);
  color: var(--texto);
  border-radius: 26px;
  padding: clamp(1.8rem, 5vw, 3.2rem);
  box-shadow: var(--sombra-l);
}
.transparency-icon {
  width: clamp(72px, 10vw, 104px);
  height: clamp(72px, 10vw, 104px);
  display: grid; place-items: center;
  color: var(--rojo);
  background: rgba(213, 43, 30, .09);
  border-radius: 26px;
}
.transparency-icon svg { width: 55%; height: 55%; }
.transparency-body h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .35em; }
.transparency-body > p { color: var(--texto-suave); max-width: 46em; }
.transparency-note {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0 0;
  font-size: .9rem;
  color: var(--gris-600);
}
.note-icon { width: 1.15em; height: 1.15em; flex: none; color: var(--rojo); }

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 1.3rem;
}
.contact-card {
  background: var(--blanco);
  border: 1px solid var(--gris-200);
  border-radius: var(--radio-grande);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--sombra-s);
  transition: transform var(--transicion), box-shadow var(--transicion);
}
.contact-card p {
  word-break: break-word;
  overflow-wrap: break-word;
}


.contact-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-m); }
.contact-card h3 { font-size: 1.3rem; margin-bottom: .4em; }
.contact-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  color: var(--rojo);
  background: rgba(213, 43, 30, .08);
  border-radius: 14px;
  margin-bottom: 1rem;
}
.contact-icon svg { width: 24px; height: 24px; }

.placeholder {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: .88rem;
  color: var(--gris-600);
  background: var(--gris-100);
  border: 1px dashed var(--gris-400);
  border-radius: 10px;
  padding: .55rem .8rem;
  margin: 0;
  word-break: break-word;
}
.tag-pendiente {
  display: inline-block;
  margin-top: .8rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--rojo-oscuro);
  background: rgba(213, 43, 30, .08);
  padding: .3rem .7rem;
  border-radius: 999px;
}

/* ==========================================================================
   UBICACIÓN
   ========================================================================== */
.map-container {
  border-radius: var(--radio-grande);
  overflow: hidden;
  border: 1px solid var(--gris-200);
  box-shadow: var(--sombra-m);
  background: var(--blanco);
}
.map-placeholder {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  color: var(--texto-suave);
}
.map-placeholder p { max-width: 46em; margin-inline: auto; }
.map-placeholder-icon {
  width: 54px; height: 54px;
  color: var(--rojo);
  margin-bottom: 1rem;
}
#map-iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #1B1E24;
  color: #C6CBD3;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-logo { 
  width: 90px; 
  height: 90px; 
  border-radius: 12px; 
  object-fit: contain; 
  background: #FFFFFF; 
  padding: 5px; 
}
.footer-name { font-weight: 800; color: var(--blanco); font-size: 1.1rem; margin: 0; }
.footer-sub { color: #F0807A; font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin: 0; }

.footer-heading {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--blanco);
  margin-bottom: 1rem;
}
.footer-nav ul, .footer-contact ul { list-style: none; display: grid; gap: .55rem; }
.footer-nav a {
  color: #C6CBD3;
  text-decoration: none;
  font-size: .95rem;
  transition: color var(--transicion);
}
.footer-nav a:hover { color: var(--blanco); text-decoration: underline; }
.footer-label { font-weight: 600; color: #8E96A1; }
.footer-contact .placeholder { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); color: #9AA1AB; display: inline; padding: .15rem .5rem; font-size: .8rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-block: 1.3rem;
}
.footer-bottom p { margin: 0; font-size: .86rem; color: #8E96A1; text-align: center; }

/* ==========================================================================
   ANIMACIONES DISCRETAS
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

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

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  :root { --header-h: 66px; }

  .brand-logo { width: 44px; height: 44px; }
  .brand-name { font-size: .92rem; }
  .brand-sub { font-size: .72rem; }

  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: .35rem;
    background: var(--blanco);
    border-bottom: 1px solid var(--gris-200);
    box-shadow: var(--sombra-l);
    padding: 1rem clamp(1rem, 4vw, 2rem) 1.4rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transicion), opacity var(--transicion), visibility var(--transicion);
  }
  .nav-menu.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-link { padding: .85rem 1rem; font-size: 1.02rem; }
  .nav-cta-item { margin: .5rem 0 0; }
  .btn-nav-cta { width: 100%; }

  .hero { min-height: 0; }
  .hero-content { padding-block: 3.6rem; }
  .hero-actions .btn { flex: 1 1 100%; }

  .transparency-card { grid-template-columns: 1fr; text-align: center; }
  .transparency-icon { margin-inline: auto; }
  .transparency-body .btn-lg { width: 100%; }
  .transparency-note { justify-content: center; flex-wrap: wrap; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  #map-iframe { height: 320px; }
}
