/* =========================================================
   LA RUTA DE ALMA Y TINA — Design system
   Concepto: la página es literalmente "una ruta". Un sendero
   de tierra recorre el margen izquierdo conectando cada
   sección como una "parada" del camino del rescate.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,700;0,9..144,900;1,9..144,600&family=Nunito:wght@400;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
  --cream:        #F6F0DC;
  --cream-card:   #FCF8EC;
  --bark:         #3D2B1F;
  --bark-soft:    #6B5642;
  --olive:        #7C8A54;
  --olive-dark:   #56613A;
  --terracotta:   #C1683A;
  --terracotta-dark: #A2532C;
  --wheat:        #D9A73B;
  --line:         #E3D6AE;
  --white:        #FFFDF6;

  --font-display: 'Fraunces', serif;
  --font-body:    'Nunito', sans-serif;
  --font-label:   'Space Mono', monospace;

  --radius: 22px;
  --shadow-soft: 0 12px 30px rgba(61, 43, 31, 0.10);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--bark);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--bark);
  margin: 0 0 0.4em;
  line-height: 1.08;
}

.eyebrow {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--terracotta-dark);
  display: inline-block;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------
   NAV
   --------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 240, 220, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: 1120px;
  margin: 0 auto;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}
.nav-brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 700;
  font-size: 0.92rem;
}
.nav-links a { text-decoration: none; opacity: 0.8; }
.nav-links a:hover { opacity: 1; color: var(--terracotta-dark); }
.nav-cta {
  background: var(--terracotta);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 800;
  opacity: 1 !important;
}
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; background: none; border: none; font-size: 1.4rem; cursor: pointer; }
}

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */
.hero {
  position: relative;
  padding: 64px 0 90px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  font-style: italic;
  font-weight: 600;
}
.hero h1 em {
  font-style: italic;
  color: var(--terracotta-dark);
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--bark-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--terracotta); color: var(--white); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--terracotta-dark); }
.btn-outline { background: transparent; border-color: var(--bark); color: var(--bark); }
.btn-outline:hover { background: var(--bark); color: var(--cream); }

.hero-art {
  position: relative;
  background: var(--cream-card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}
.hero-art img { border-radius: 14px; width: 100%; }
.hero-badge {
  position: absolute;
  bottom: -26px;
  left: -26px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  background: var(--white);
  padding: 6px;
}
.hero-badge img { border-radius: 50%; }

.hero-stats {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
}
.stat .num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--olive-dark);
  display: block;
}
.stat .lbl {
  font-size: 0.78rem;
  color: var(--bark-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------
   LA RUTA (trail) — signature element
   --------------------------------------------------------- */
.route {
  position: relative;
  padding: 40px 0 20px;
}
.route-path {
  position: absolute;
  left: 42px;
  top: 0;
  bottom: 0;
  width: 4px;
  background-image: linear-gradient(var(--olive) 60%, transparent 0%);
  background-position: left;
  background-size: 4px 18px;
  background-repeat: repeat-y;
  border-radius: 4px;
}
@media (max-width: 720px) {
  .route-path { left: 22px; }
}

.route-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 46px;
}
.route-step {
  position: relative;
  padding-left: 96px;
  opacity: 0.35;
  transform: translateX(-6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.route-step.in-view { opacity: 1; transform: translateX(0); }

@media (max-width: 720px) {
  .route-step { padding-left: 58px; }
}

.route-marker {
  position: absolute;
  left: 12px;
  top: 0;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--cream-card);
  border: 3px solid var(--olive);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-label);
  font-weight: 700;
  color: var(--olive-dark);
  z-index: 2;
}
.route-step.in-view .route-marker {
  background: var(--olive);
  color: var(--white);
}
@media (max-width: 720px) {
  .route-marker { width: 42px; height: 42px; left: 2px; font-size: 0.75rem; }
}

.route-step h3 { font-size: 1.3rem; margin-bottom: 6px; }
.route-step p { color: var(--bark-soft); margin: 0; max-width: 60ch; }

/* ---------------------------------------------------------
   SECTION shell
   --------------------------------------------------------- */
.section {
  padding: 90px 0;
}
.section-alt { background: var(--cream-card); }
.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.section-head p { color: var(--bark-soft); font-size: 1.05rem; }

/* ---------------------------------------------------------
   PETS
   --------------------------------------------------------- */
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.filter-chip {
  border: 2px solid var(--line);
  background: var(--white);
  padding: 8px 18px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.filter-chip.active,
.filter-chip:hover {
  border-color: var(--olive);
  color: var(--olive-dark);
}

.pet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 26px;
}
.pet-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
.pet-photo {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--wheat) 0%, var(--olive) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.4rem;
  position: relative;
}
.pet-photo img { width: 100%; height: 100%; object-fit: cover; }
.pet-status {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-label);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.92);
  color: var(--bark);
}
.pet-status.disponible { color: var(--olive-dark); }
.pet-status.en_tratamiento { color: var(--terracotta-dark); }
.pet-status.adoptado { color: var(--bark-soft); }

.pet-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pet-body h3 { font-size: 1.25rem; margin: 0; }
.pet-meta { font-size: 0.85rem; color: var(--bark-soft); font-weight: 700; }
.pet-body p.story { color: var(--bark-soft); font-size: 0.92rem; flex: 1; }
.pet-cta {
  margin-top: 6px;
  font-weight: 800;
  color: var(--terracotta-dark);
  text-decoration: none;
  font-size: 0.9rem;
}

.pet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; align-items: center; }
.pet-cta-whatsapp {
  background: #25D366;
  color: var(--white);
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}
.pet-cta-whatsapp:hover { background: #1EBE5A; }
.pet-cta-story {
  background: none;
  border: 2px solid var(--line);
  color: var(--bark-soft);
  padding: 8px 14px;
  border-radius: 100px;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
}
.pet-cta-story:hover { border-color: var(--olive); color: var(--olive-dark); }

/* ---------- Story modal ---------- */
.story-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.story-modal.open { display: flex; }
.story-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 43, 31, 0.55);
}
.story-modal-panel {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.story-modal-panel h3 {
  font-style: italic;
  font-size: 1.5rem;
  padding-right: 30px;
}
.story-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--bark);
}
.story-modal-close:hover { background: var(--terracotta); color: var(--white); border-color: var(--terracotta); }
.story-modal-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.story-modal-images img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.story-modal-text {
  color: var(--bark-soft);
  font-size: 1rem;
  line-height: 1.7;
  white-space: pre-line;
}

/* ---------------------------------------------------------
   GALLERY
   --------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.gallery-item {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1/1;
  position: relative;
  border: 1px solid var(--line);
  background: var(--cream-card);
}
.gallery-item img, .gallery-item video { width: 100%; height: 100%; object-fit: cover; }
.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(transparent, rgba(61,43,31,0.75));
  color: var(--white);
  font-size: 0.78rem;
  padding: 22px 12px 10px;
  font-weight: 700;
}
.gallery-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2.2rem;
  background: rgba(61,43,31,0.25);
}

/* ---------------------------------------------------------
   PARTNERS
   --------------------------------------------------------- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.partner-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.partner-type {
  font-family: var(--font-label);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--olive-dark);
}
.partner-card h4 { margin: 0; font-family: var(--font-body); font-weight: 800; font-size: 1.05rem; }
.partner-card p { margin: 0; font-size: 0.88rem; color: var(--bark-soft); }

/* ---------------------------------------------------------
   DONATIONS
   --------------------------------------------------------- */
.donate-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: start;
}
.donate-copy h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.donate-copy p { color: var(--bark-soft); font-size: 1.05rem; margin-bottom: 26px; }
.donate-reasons { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.donate-reasons li { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; }
.donate-reasons li::before {
  content: '🐾';
  flex-shrink: 0;
}

.donate-card {
  background: var(--bark);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-soft);
}
.donate-card h3 {
  color: var(--cream);
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 22px;
}
.donate-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(246,240,220,0.25);
  font-size: 0.92rem;
}
.donate-row:last-of-type { border-bottom: none; }
.donate-row .k { color: rgba(246,240,220,0.65); font-weight: 700; }
.donate-row .v { font-weight: 800; text-align: right; }
.donate-qr {
  margin-top: 22px;
  background: rgba(246,240,220,0.08);
  border: 1px dashed rgba(246,240,220,0.3);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(246,240,220,0.75);
}

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */
.footer {
  background: var(--olive-dark);
  color: var(--cream);
  padding: 60px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer h4 { color: var(--cream); font-family: var(--font-body); font-weight: 800; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 16px; }
.footer p, .footer a { color: rgba(246,240,220,0.8); font-size: 0.92rem; text-decoration: none; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 46px; height: 46px; border-radius: 50%; }
.footer-brand span { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--cream); }
.footer-bottom {
  border-top: 1px solid rgba(246,240,220,0.15);
  padding-top: 22px;
  font-size: 0.8rem;
  color: rgba(246,240,220,0.55);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; }
  .donate-wrap { grid-template-columns: 1fr; }
}

/* Empty state (org not found) */
.empty-state {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  gap: 12px;
  padding: 60px 20px;
}
