/* ==========================================================================
   En nuestra casa de madera — hoja de estilos
   Paleta cálida y natural inspirada en la ilustración en acuarela del logo.
   ========================================================================== */

:root {
  --cream:        #FBF6EE;   /* fondo principal */
  --cream-2:      #FFFDF9;   /* secciones claras */
  --wood:         #9A6E44;   /* madera / acento primario */
  --wood-dark:    #7A5636;   /* madera oscura (hover) */
  --terracotta:   #C98A6B;   /* acento cálido */
  --sage:         #8B9A6E;   /* verde suave */
  --sage-dark:    #6E7D53;
  --yellow:       #E8B84B;   /* amarillo flores */
  --ink:          #3F332A;   /* texto principal */
  --ink-soft:     #6B5D50;   /* texto secundario */
  --line:         #E7DCCB;   /* bordes suaves */
  --shadow:       0 14px 40px rgba(80, 60, 40, .14);
  --radius:       18px;
  --maxw:         1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Mulish', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--wood-dark); text-decoration: none; }

h1, h2, h3 {
  font-family: 'Mulish', system-ui, sans-serif;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 .4em;
}

/* Título manuscrito (igual que el rótulo del sitio real) */
.script {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  line-height: 1.05;
}

/* ------------------------------- NAVBAR --------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 238, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: .6rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: 'Mulish', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
}
.brand img { width: 46px; height: 46px; border-radius: 50%; }
.brand span { max-width: 190px; line-height: 1.15; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.nav-links a {
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color .2s;
}
.nav-links a:hover { color: var(--wood); }
.nav-links a.active { color: var(--wood); border-bottom: 2px solid var(--wood); }
.nav-links a.ig { color: var(--wood); border-bottom: 0; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: .3s;
}

/* -------------------------------- HERO ---------------------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(40,28,18,.25) 0%, rgba(40,28,18,.15) 40%, rgba(40,28,18,.55) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 2rem 1.4rem;
  max-width: 820px;
}
.hero-logo {
  width: 150px; height: 150px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  padding: 6px;
  box-shadow: var(--shadow);
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  text-shadow: 0 3px 24px rgba(0,0,0,.4);
  margin-bottom: .2em;
}
.tagline {
  font-family: 'Mulish', sans-serif;
  font-weight: 400;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  letter-spacing: .02em;
  margin: 0 0 1.8rem;
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
.hero-cta {
  display: flex;
  gap: .9rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------------- BOTONES -------------------------------- */
.btn {
  display: inline-block;
  padding: .85rem 1.9rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .15s ease, background .2s, color .2s, box-shadow .2s;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--wood);
  color: #fff;
  box-shadow: 0 8px 20px rgba(122, 86, 54, .35);
}
.btn-primary:hover { background: var(--wood-dark); color: #fff; }
.btn-outline {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: #fff;
  backdrop-filter: blur(2px);
}
.btn-outline:hover { background: #fff; color: var(--wood-dark); }
/* Variante para fondos claros */
.btn-outline.dark {
  background: transparent;
  color: var(--wood-dark);
  border-color: var(--wood);
  backdrop-filter: none;
}
.btn-outline.dark:hover { background: var(--wood); color: #fff; }
.btn-small { padding: .6rem 1.3rem; font-size: .72rem; }
.center-cta { justify-content: center; margin-top: 1.6rem; }
.split-text .btn { margin-top: 1.4rem; }

/* ------------------------------ SECCIONES ------------------------------- */
.section { padding: 5.5rem 1.4rem; }
.section-cream { background: var(--cream-2); }
.container { max-width: var(--maxw); margin: 0 auto; }
.narrow { max-width: 720px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.kicker {
  display: inline-block;
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: .8rem;
}
.kicker.light { color: var(--yellow); }

.section h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.lead {
  font-size: 1.16rem;
  color: var(--ink-soft);
  margin: 0 auto 1.8rem;
  max-width: 620px;
}

/* Secciones divididas (imagen + texto) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
}
.split.reverse .split-img { order: 2; }
.split-img img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.split-text h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.split-text p { font-size: 1.14rem; color: var(--ink-soft); }
.split-text strong { color: var(--wood-dark); }
.aprende { background: var(--cream-2); border-radius: 0; }

/* ------------------------- TARJETAS (habitantes) ------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  margin-top: 2.6rem;
  text-align: left;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(80,60,40,.10);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-img { aspect-ratio: 1 / 1; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.06); }
.card-body { padding: 1.4rem 1.4rem 1.6rem; }
.card-body h3 { font-size: 1.5rem; margin-bottom: .1em; }
.especie {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: .6rem;
}
.card-body p { color: var(--ink-soft); font-size: .98rem; margin: 0 0 1.2rem; }

/* ------------------------------ VOLUNTARIADO ---------------------------- */
.voluntariado {
  position: relative;
  color: #fff;
  background: linear-gradient(rgba(50,45,30,.62), rgba(50,45,30,.62)),
              url("../images/bosque.jpg") center/cover fixed;
}
.voluntariado h2 { color: #fff; }
.voluntariado .lead { color: rgba(255,255,255,.92); }

/* ------------------------------ CONTACTO -------------------------------- */
.contact-form {
  max-width: 560px;
  margin: 2rem auto 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-form .row { display: flex; gap: 1rem; }
.contact-form .row input { flex: 1; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .95rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--wood);
  box-shadow: 0 0 0 3px rgba(154,110,68,.15);
}
.contact-form textarea { resize: vertical; }
.contact-form button { align-self: center; margin-top: .4rem; }

/* ------------------------------- FLASH ---------------------------------- */
.flash-wrap {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(92%, 460px);
}
.flash {
  padding: 1rem 1.4rem;
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
  animation: drop .4s ease;
}
.flash-ok    { background: var(--sage); color: #fff; }
.flash-error { background: var(--terracotta); color: #fff; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; } }

/* ------------------------------- FOOTER --------------------------------- */
.footer { background: var(--ink); color: #efe6d8; padding: 3.5rem 1.4rem 1.5rem; }
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 1rem; }
.footer-brand img { width: 66px; height: 66px; border-radius: 50%; background: #fff; padding: 4px; }
.footer-title { font-family: 'Mulish', sans-serif; font-weight: 800; font-size: 1.3rem; margin: 0; color: #fff; }
.footer-info p { margin: .2rem 0; }
.footer-info a { color: var(--yellow); }
.footer-social { display: flex; align-items: center; gap: 1rem; }
.footer-social img { width: 42px; height: 42px; border-radius: 10px; }
.ig-foot { color: #efe6d8; display: flex; }
.ig-foot:hover { color: var(--yellow); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 2.5rem auto 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,.12);
  text-align: center;
  font-size: .85rem;
  color: rgba(239,230,216,.7);
}

/* ---------------------- PAGE HERO (subpáginas) -------------------------- */
.page-hero {
  position: relative;
  min-height: 56vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.page-hero > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(40,28,18,.30), rgba(40,28,18,.55));
}
.page-hero-text { position: relative; z-index: 2; color: #fff; padding: 2rem 1.4rem; }
.page-hero-text h1 {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  text-shadow: 0 3px 24px rgba(0,0,0,.45);
  margin: 0;
}

/* ------------------------------ GALERÍA --------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 2.4rem;
}
.gallery-item {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(80,60,40,.10);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .4s;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.4rem .9rem .7rem;
  font-size: .85rem;
  font-weight: 700;
  color: #fff;
  text-align: left;
  background: linear-gradient(transparent, rgba(30,20,12,.75));
}

/* ------------------------ INFO GRID (visitas) --------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}
.info-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: 0 10px 30px rgba(80,60,40,.10);
  border-top: 4px solid var(--terracotta);
}
.info-card h3 { font-size: 1.35rem; }
.info-card p { color: var(--ink-soft); margin: 0; }

/* ------------------------ LISTA DE REQUISITOS --------------------------- */
.req-list {
  max-width: 560px;
  margin: 1.4rem auto 2rem;
  padding: 0;
  list-style: none;
}
.req-list li {
  position: relative;
  padding: .7rem 0 .7rem 2rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.req-list li::before {
  content: "🐾";
  position: absolute;
  left: 0;
}

/* ------------------------------ RESPONSIVE ------------------------------ */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--cream-2);
    border-bottom: 1px solid var(--line);
    padding: .5rem 1.4rem 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 400px; }
  .nav-links a { width: 100%; padding: .8rem 0; }

  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split.reverse .split-img { order: 0; }
  .voluntariado { background-attachment: scroll; }
  .section { padding: 4rem 1.2rem; }
}

@media (max-width: 480px) {
  .brand span { display: none; }
  .contact-form .row { flex-direction: column; }
  .hero-logo { width: 118px; height: 118px; }
}
