/* ============================================================
   HuellasWorld · Capa de rediseño (pulido con gusto)
   Se carga DESPUÉS de style.css y refina sin romper el tema.
   Principios aplicados:
     · impeccable        → jerarquía, escala ≥1.25, medida 65–75ch,
                           contraste, acento contenido, radios/sombras
                           coherentes, sin "slop".
     · emil-design-eng   → motion <300ms, easings cubic-bezier, scale(0.97)
                           al pulsar, solo transform/opacity, reduced-motion,
                           hover solo en punteros finos.
   ============================================================ */

:root {
  /* Escala tipográfica modular (~1.25) */
  --fs-eyebrow: .78rem;
  --fs-body: 1.0625rem;
  --fs-lead: 1.25rem;

  /* Ritmo de espaciado de secciones */
  --space-section: clamp(3.5rem, 8vw, 6.5rem);

  /* Easings (emil-design-eng) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  /* Radios y sombras coherentes */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(24, 21, 31, .06), 0 2px 6px rgba(24, 21, 31, .06);
  --shadow-md: 0 12px 30px -14px rgba(99, 25, 195, .28);
  --shadow-lg: 0 26px 60px -22px rgba(99, 25, 195, .34);

  /* Superficie neutra tintada hacia el morado de marca */
  --surface: #fdfbff;
}

/* ---------- 1) TIPOGRAFÍA ------------------------------------
   Cuerpo legible (Montserrat); Chilanka se reserva para los
   titulares, que es donde aporta calidez de marca. */
body {
  --bs-font-sans-serif: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  color: #2b2733;
  line-height: 1.65;
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4,
.banner-title,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
.postcard__title, .category-title {
  font-family: 'Chilanka', cursive;
  text-transform: none;            /* quita el capitalize forzado y anticuado */
  letter-spacing: -.01em;
  line-height: 1.12;
  text-wrap: balance;
}

/* El cuerpo y los elementos de interfaz, siempre en Montserrat */
p, li, blockquote, cite,
.text-paragraph, .nav-link, .btn, .tag__item,
.form-label, .form-control, input, textarea, select,
.menu-top-span, .banner-subtitle, .copyright, .filter-button {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
}

p, .text-paragraph {
  font-size: var(--fs-body);
  line-height: 1.72;
  opacity: .9;
  text-wrap: pretty;
}

/* Medida de lectura cómoda (65–75ch) para bloques de texto */
.text-paragraph, #history .history-content, .card-text p {
  max-width: 66ch;
}

.lead, .fs-2 { line-height: 1.4; }

/* Eyebrow legible en vez de minúsculas apretadas */
.banner-subtitle {
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  letter-spacing: .14em;
}

/* ---------- 2) BOTONES: remate + feedback (emil) ------------- */
.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background-color .2s var(--ease-out),
              color .2s var(--ease-out),
              box-shadow .2s var(--ease-out),
              border-color .2s var(--ease-out),
              transform .12s var(--ease-out);
  will-change: transform;
}

.btn-outline-dark {
  padding: .85rem 2.1rem;
  border-width: 2px;
}

.btn-outline-dark:hover {
  color: #fff;
  background: var(--color-principal);
  border-color: var(--color-principal);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--color-principal);
  border-color: var(--color-principal);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-secundario);
  border-color: var(--color-secundario);
  box-shadow: var(--shadow-md);
}

/* Feedback táctil al pulsar (emil: scale 0.97, ~120ms) */
.btn:active { transform: scale(.97); }

/* ---------- 3) FOCO VISIBLE (accesibilidad) ------------------ */
a:focus-visible,
.btn:focus-visible,
button:focus-visible,
.nav-link:focus-visible,
.filter-button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-enlace);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- 4) NAVEGACIÓN: subrayado animado ----------------- */
.main-menu .nav-item .nav-link {
  position: relative;
  font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
  .main-menu .nav-item .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s var(--ease-out);
  }
  .main-menu .nav-item .nav-link:hover::after {
    transform: scaleX(1);
  }
}

/* ---------- 5) BANNER (hero) --------------------------------- */
.banner .content-wrapper { padding-block: clamp(1rem, 4vw, 2.5rem); }
.color-span { color: var(--color-secundario); }

/* ---------- 6) CATEGORÍAS (Adopta un peludito) --------------- */
a.categories-item {
  display: block;
  padding: 1.75rem 1rem;
  border-radius: var(--r-lg);
  transition: transform .25s var(--ease-out), background-color .25s var(--ease-out);
}
a.categories-item h5 { font-family: 'Montserrat', sans-serif; font-weight: 600; }
@media (hover: hover) and (pointer: fine) {
  a.categories-item:hover {
    transform: translateY(-6px);
    background: var(--surface);
  }
}
i.category-icon { transition: transform .3s var(--ease-out), color .3s var(--ease-out); }
a.categories-item:hover i.category-icon { transform: scale(1.08) rotate(-3deg); }

/* ---------- 7) TARJETAS de fichas (postcard) ----------------- */
.postcard {
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .postcard:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
  }
  /* zoom de imagen más contenido que el 1.1 original */
  .postcard:hover .postcard__img { transform: scale(1.04); }
}
.postcard .postcard__tagbox .tag__item {
  border-radius: 999px;
  border-color: rgba(24, 21, 31, .18);
  font-weight: 500;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out);
}

/* ---------- 8) TARJETAS de consejos (tips) ------------------- */
#tips .card,
.container-history .card {
  transition: transform .3s var(--ease-out);
}
#tips img.rounded-4 {
  border-radius: var(--r-md) !important;
  box-shadow: var(--shadow-sm);
}
.btn-summary { border-radius: 999px; }
details article { border-radius: var(--r-md); }

/* ---------- 9) SECCIÓN CONTACTO / CTA ------------------------ */
#link-contact { background-size: cover; }

/* ---------- 10) FORMULARIOS ---------------------------------- */
.form-control {
  border-radius: var(--r-sm);
  text-transform: none;
  padding: .9rem 1rem;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.form-control:focus {
  border-color: var(--color-principal);
  box-shadow: 0 0 0 3px rgba(99, 25, 195, .15);
}
.form-control::placeholder { color: #8a8794; opacity: 1; }

/* ---------- 11) PIE DE PÁGINA -------------------------------- */
#footer-bottom .copyright p { opacity: .8; }

/* ---------- 12) BARRA DE COOKIES (más limpia) ---------------- */
.cookiesms {
  opacity: 1;
  font-size: 15px;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
  height: auto;
  padding: 14px 18px;
  box-shadow: 0 -8px 30px -12px rgba(24, 21, 31, .35);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cookiesms button {
  border: 0;
  border-radius: 999px;
  padding: .5rem 1.4rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-principal);
  cursor: pointer;
  transition: background-color .2s var(--ease-out), transform .12s var(--ease-out);
}
.cookiesms button:hover { background: var(--color-secundario); }
.cookiesms button:active { transform: scale(.97); }

/* ============================================================
   MOTION (emil-design-eng)
   ============================================================ */

/* Sustituye el reveal brusco de las fichas (scale 10% → sutil) */
@keyframes show {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

/* Utilidad de aparición al hacer scroll (progressive enhancement:
   donde no hay scroll-timeline, la animación se reproduce al cargar
   y termina visible; nunca deja contenido oculto). */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up {
    animation: reveal-up .7s var(--ease-out) both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
  @keyframes reveal-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: none; }
  }
}

/* Respeta prefers-reduced-motion: sin desplazamientos ni zooms */
@media (prefers-reduced-motion: reduce) {
  .postcard,
  .reveal-up,
  * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .postcard { opacity: 1 !important; transform: none !important; }
  .postcard:hover .postcard__img { transform: none; }
}

/* ============================================================
   PERSONALIDAD / JUEGO (con buen gusto)
   ============================================================ */

/* Barra de acento bajo los títulos de sección (lenguaje visual
   coherente con el postcard__bar de las fichas) */
h2.display-3 { position: relative; }
h2.display-3::after {
  content: "";
  display: block;
  width: 64px;
  height: 5px;
  margin-top: .7rem;
  border-radius: 999px;
  background: var(--color-secundario);
}
.text-center h2.display-3::after,
.section-header.text-center h2.display-3::after { margin-inline: auto; }

/* Iconos de categoría: rebote juguetón al pasar el cursor */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  a.categories-item:hover i.category-icon {
    animation: paw-bounce .6s var(--ease-out);
  }
}
@keyframes paw-bounce {
  0%, 100% { transform: translateY(0) rotate(0); }
  30%      { transform: translateY(-12px) rotate(-5deg); }
  55%      { transform: translateY(0) rotate(0); }
  75%      { transform: translateY(-5px); }
}

/* Flechas de los botones/enlaces que se desplazan al pasar el cursor */
.btn i.fa-arrow-right,
.btn-summary i.fa-arrow-right {
  transition: transform .2s var(--ease-out);
}
.btn:hover i.fa-arrow-right,
.btn-summary:hover i.fa-arrow-right {
  transform: translateX(5px);
}

/* Viñetas con huella en las listas de consejos */
.tips-list,
details .details-list {
  list-style: none;
  padding-left: 0;
}
.tips-list li,
details .details-list li {
  position: relative;
  padding-left: 1.9rem;
}
.tips-list li::before,
details .details-list li::before {
  content: "\f1b0";                 /* fa-paw */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: .12em;
  color: var(--color-enlace);
  font-size: .82em;
}

/* Cita de "Nuestra historia": comillas decorativas con más vida */
i.quote-icon { transition: transform .3s var(--ease-out); }
.testimonial-swiper:hover i.quote-icon { transform: rotate(-6deg) scale(1.05); }

/* Enlaces de texto (dentro de contenido) con subrayado animado cálido */
.text-paragraph a:not(.btn),
.history-content a:not(.btn) {
  color: var(--color-enlace);
  background-image: linear-gradient(var(--color-enlace), var(--color-enlace));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size .25s var(--ease-out);
}
.text-paragraph a:not(.btn):hover,
.history-content a:not(.btn):hover { background-size: 100% 2px; }

/* Iconos sociales: un pelín de rebote al pasar el cursor */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .link-social:hover { animation: wobble .5s var(--ease-out); }
}
@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(-8deg); }
  75%      { transform: rotate(8deg); }
}

/* ============================================================
   APARTADO DE ADOPCIÓN · cuadrícula + filtros + ficha (modal)
   ============================================================ */

/* Filtros (chips) */
.adopt-filters { display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; justify-content: center; margin: 0 0 1.25rem; }
.adopt-filter-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: .9rem;
  border: 2px solid rgba(99, 25, 195, .18); background: #fff; color: #4a4458;
  border-radius: 999px; padding: .5rem 1.1rem; cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out),
              border-color .2s var(--ease-out), transform .12s var(--ease-out);
}
.chip:hover { border-color: var(--color-principal); color: var(--color-principal); }
.chip:active { transform: scale(.97); }
.chip.is-active { background: var(--color-principal); border-color: var(--color-principal); color: #fff; }

.adopt-count { text-align: center; font-family: 'Montserrat', sans-serif; font-weight: 600; color: var(--color-secundario); margin-bottom: 1.75rem; }

/* Cuadrícula */
.adopt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }

/* Tarjeta compacta (es un <button>) */
.adopt-card {
  display: flex; flex-direction: column; text-align: left; padding: 0;
  background: #fff; border: 1px solid rgba(24, 21, 31, .06); border-radius: var(--r-md);
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .adopt-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
  .adopt-card:hover .adopt-card__media img { transform: scale(1.06); }
}
.adopt-card:focus-visible { outline: 3px solid var(--color-enlace); outline-offset: 3px; }
.adopt-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.adopt-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
.adopt-card__count {
  position: absolute; right: .55rem; bottom: .55rem; background: rgba(24, 21, 31, .6); color: #fff;
  font-size: .75rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; backdrop-filter: blur(2px);
}
.adopt-badge.reserved {
  display: inline-block; background: #ffe08a; color: #8a5a00; font-weight: 700;
  padding: .2rem .7rem; border-radius: 999px; font-size: .75rem;
}
.adopt-card__media .adopt-badge.reserved { position: absolute; left: .55rem; top: .55rem; }
.adopt-card__body { padding: .9rem 1rem 1.1rem; }
.adopt-card__name { font-family: 'Chilanka', cursive; color: var(--color-principal); font-size: 1.5rem; margin: 0 0 .5rem; line-height: 1; }
.adopt-card__tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.adopt-card__tags li {
  font-family: 'Montserrat', sans-serif; font-size: .78rem; color: #4a4458;
  background: #f4f0fa; border-radius: 999px; padding: .2rem .6rem; display: inline-flex; align-items: center; gap: .35rem;
}
.adopt-card__tags i { color: var(--color-secundario); }
.adopt-card.is-hidden { display: none; }
.adopt-empty { text-align: center; margin-top: 2rem; font-weight: 600; }

/* Ficha (modal) */
.adopt-modal { border: 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.adopt-modal__close { position: absolute; top: 1rem; right: 1rem; z-index: 5; background-color: #fff; border-radius: 999px; padding: .75rem; opacity: 1; box-shadow: var(--shadow-sm); }
.adopt-modal__media { background: #f4f0fa; min-height: 300px; }
.adopt-modal__info { padding: 2rem 1.75rem; display: flex; flex-direction: column; gap: .35rem; }
.adopt-modal__title { font-family: 'Chilanka', cursive; color: var(--color-principal); font-size: 2.2rem; margin: .2rem 0; }
.adopt-modal__tags { justify-content: flex-start; margin: .2rem 0 .6rem; }
.adopt-modal__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: auto; padding-top: 1rem; }
.adopt-modal__cta .btn { flex: 1 1 auto; }
.btn-whatsapp { background: #25D366; color: #fff; border: 0; }
.btn-whatsapp:hover { background: #1eb959; color: #fff; box-shadow: var(--shadow-md); }

/* Galería del modal */
.adopt-gallery { position: relative; height: 100%; min-height: 300px; }
.adopt-gallery__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adopt-gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0;
  border-radius: 999px; background: rgba(255, 255, 255, .9); color: var(--color-principal); font-size: 1.6rem; line-height: 1;
  cursor: pointer; box-shadow: var(--shadow-sm); display: grid; place-items: center;
  transition: background-color .2s var(--ease-out), transform .12s var(--ease-out);
}
.adopt-gallery__nav:hover { background: #fff; }
.adopt-gallery__nav:active { transform: translateY(-50%) scale(.94); }
.adopt-gallery__nav.prev { left: .6rem; }
.adopt-gallery__nav.next { right: .6rem; }
.adopt-gallery__dots { position: absolute; bottom: .6rem; left: 0; right: 0; display: flex; justify-content: center; gap: .4rem; }
.adopt-gallery__dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .6); border: 0; padding: 0; cursor: pointer; transition: width .2s var(--ease-out); }
.adopt-gallery__dot.is-active { background: #fff; width: 22px; }

@media (max-width: 767px) {
  .adopt-modal__media, .adopt-gallery, .adopt-gallery__img { min-height: 240px; }
}

/* ============================================================
   ADOPCIÓN v2 · imagen sin recortes, filtros desplegables, pistas
   ============================================================ */

/* --- Filtros: principales visibles + avanzados desplegables --- */
.adopt-filter-bar { display: flex; flex-wrap: wrap; gap: .75rem 1rem; justify-content: center; align-items: center; }
.adopt-filter-group { align-items: center; }

.adopt-more {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: .9rem;
  border: 2px solid rgba(99, 25, 195, .18); background: #fff; color: #4a4458;
  border-radius: 999px; padding: .5rem 1.1rem; cursor: pointer;
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out), transform .12s var(--ease-out);
}
.adopt-more:hover, .adopt-more.has-active { border-color: var(--color-principal); color: var(--color-principal); }
.adopt-more:active { transform: scale(.97); }
.adopt-more__badge { background: var(--color-enlace); color: #fff; font-size: .72rem; min-width: 18px; height: 18px; border-radius: 999px; display: inline-grid; place-items: center; padding: 0 .3rem; }

.adopt-advanced {
  max-height: 0; opacity: 0; overflow: hidden;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: center; align-items: center;
  transition: max-height .32s var(--ease-out), opacity .32s var(--ease-out), margin .32s var(--ease-out);
}
.adopt-advanced.is-open { max-height: 600px; opacity: 1; margin-top: 1rem; }
.adopt-filter-label { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .78rem; color: #8a8397; text-transform: uppercase; letter-spacing: .04em; margin-right: .15rem; }
.adopt-clear { background: transparent; border: 0; color: var(--color-enlace); font-weight: 600; font-family: 'Montserrat', sans-serif; cursor: pointer; font-size: .85rem; }
.adopt-clear:hover { text-decoration: underline; }

/* --- Tarjeta: pistas de que abre la ficha --- */
.adopt-card__overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(to top, rgba(99, 25, 195, .55), rgba(99, 25, 195, .04));
  opacity: 0; transition: opacity .25s var(--ease-out);
}
.adopt-card__overlay-pill {
  background: #fff; color: var(--color-principal); font-family: 'Montserrat', sans-serif; font-weight: 700;
  padding: .5rem 1.1rem; border-radius: 999px; font-size: .85rem; box-shadow: var(--shadow-sm);
  transform: translateY(8px); transition: transform .25s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .adopt-card:hover .adopt-card__overlay { opacity: 1; }
  .adopt-card:hover .adopt-card__overlay-pill { transform: none; }
}
@media (hover: none) { .adopt-card__overlay { display: none; } } /* en táctil basta el "Ver ficha →" */
.adopt-card__more {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: .7rem;
  color: var(--color-enlace); font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: .85rem;
}
.adopt-card__more i { transition: transform .2s var(--ease-out); }
.adopt-card:hover .adopt-card__more i { transform: translateX(4px); }

/* --- Galería del modal: imagen COMPLETA sobre fondo desenfocado --- */
.adopt-modal__media { min-height: 360px; }
.adopt-gallery { min-height: 360px; background: #241f2e; }
.adopt-gallery__bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: blur(26px) brightness(.6); transform: scale(1.2);
}
.adopt-gallery__img { position: relative; z-index: 1; object-fit: contain; }

@media (max-width: 767px) {
  .adopt-modal__media, .adopt-gallery { min-height: 300px; }
}

/* ============================================================
   ADOPCIÓN v3 · galería integrada (sin espejo) + fix flechas + móvil
   ============================================================ */

/* Panel suave e integrado en vez del fondo desenfocado ("espejo") */
.adopt-gallery { background: linear-gradient(160deg, #f7f2fb 0%, #ece3f6 100%); }
.adopt-gallery__bg { display: none; }               /* ya no se usa */
.adopt-gallery__img { object-fit: contain; z-index: 1; }

/* FIX: las flechas y los puntos deben ir POR ENCIMA de la imagen */
.adopt-gallery__nav { z-index: 3; }
.adopt-gallery__dots { z-index: 3; }
.adopt-gallery__dot { background: rgba(99, 25, 195, .28); }
.adopt-gallery__dot.is-active { background: var(--color-principal); }

/* Filtros mejor acomodados en móvil */
@media (max-width: 575px) {
  .adopt-filter-bar { gap: .5rem; }
  .chip, .adopt-more { padding: .45rem .9rem; font-size: .85rem; }
  .adopt-advanced { flex-direction: column; align-items: stretch; gap: .7rem; margin-top: 0; }
  .adopt-advanced.is-open { margin-top: .9rem; }
  .adopt-advanced .adopt-filter-group { justify-content: center; }
  .adopt-filter-label { width: 100%; text-align: center; margin: 0 0 .2rem; }
  .adopt-clear { align-self: center; padding: .3rem; }
}

/* ============================================================
   ADOPCIÓN v4 · modal a una columna, badges y tipografía ajustada
   ============================================================ */

/* Una sola columna: foto arriba (marco fijo), datos debajo.
   Evita el "mar de lavanda" al no estirar la imagen con el texto. */
#animalModal .modal-body > .row { flex-direction: column; flex-wrap: nowrap; }
#animalModal .adopt-modal__media,
#animalModal .adopt-modal__info { flex: 0 0 auto; width: 100%; max-width: 100%; }

#animalModal .adopt-modal__media { min-height: 0; }
#animalModal .adopt-gallery { height: auto; min-height: 0; aspect-ratio: 4 / 3; }

/* Características como BADGES (antes salían como lista con viñetas) */
.adopt-modal__tags {
  list-style: none; padding: 0; margin: .5rem 0 .9rem;
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-start;
}
.adopt-modal__tags .tag__item {
  display: inline-flex; align-items: center; gap: .35rem; margin: 0;
  background: #f4f0fa; color: #4a4458; border: 0; border-radius: 999px;
  padding: .38rem .85rem; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: .82rem;
}
.adopt-modal__tags .tag__item i { color: var(--color-secundario); }

/* Tipografía del modal un punto más contenida */
#animalModal .adopt-modal__title { font-size: 2rem; }
#animalModal .adopt-modal__info { padding: 1.6rem 1.75rem 1.9rem; }
#animalModal .adopt-modal__info .text-paragraph { font-size: .95rem; line-height: 1.6; }

/* El botón de cerrar bien visible sobre la foto */
.adopt-modal__close { top: .8rem; right: .8rem; }

/* ============================================================
   ADOPCIÓN v5 · botones de acción del modal bien alineados
   ============================================================ */
.adopt-modal__cta { gap: .6rem; align-items: stretch; }
.adopt-modal__cta .btn {
  flex: 1 1 160px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.1rem; min-height: 52px; border-width: 2px; margin: 0;
  line-height: 1.2;
}

/* ============================================================
   HEADER · logo de marca en móvil (icono sin letras)
   ============================================================ */
.mobile-brand { display: inline-flex; align-items: center; padding: .25rem 0; }
.mobile-brand img { height: 44px; width: auto; display: block; }

/* ============================================================
   FIX · evitar scroll lateral (el offcanvas de 400px desbordaba)
   ============================================================ */
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100%; }

/* El menú lateral no debe ser más ancho que la pantalla en móvil */
.offcanvas.offcanvas-end { --bs-offcanvas-width: min(86vw, 360px); }

/* ============================================================
   MENÚ LATERAL MÓVIL · logo separado + iconos sociales
   ============================================================ */
@media (max-width: 991.98px) {
  .offcanvas .main-logo {
    text-align: center;
    margin: 0 auto 1.5rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid #ece3f2;
  }
  .offcanvas .main-logo img { max-height: 56px; width: auto; }
  .offcanvas .menu-list .nav-link { padding-block: .4rem; font-size: 1.15rem; }
  .offcanvas-social {
    padding-top: 1.35rem;
    margin-top: 1.5rem;
    border-top: 1px solid #ece3f2;
  }
  .offcanvas-social .link-social { font-size: 1.4rem; }
}

/* ============================================================
   BARRA DE COOKIES · limpia, sube al cargar, sin la pestaña rara
   ============================================================ */
.cookiesms {
  position: fixed; left: 0; right: 0; bottom: 0; width: 100%;
  transform: translateY(115%); transition: transform .35s var(--ease-out);
  z-index: 1030; opacity: 1; height: auto; margin: 0;
  display: flex; align-items: center; justify-content: center; gap: .35rem .9rem; flex-wrap: wrap;
  padding: 14px 18px;
  font-family: 'Montserrat', sans-serif; font-size: 15px; font-weight: 500; color: #2b2733;
  background: #fff; border-top: 3px solid var(--color-principal);
  box-shadow: 0 -8px 30px -12px rgba(24, 21, 31, .3);
}
.cookiesms.is-visible { transform: translateY(0); }
.cookiesms:hover { bottom: 0; }          /* neutraliza el antiguo hover-reveal */
.cookies2 { display: none !important; }  /* quita la pestaña "Política de cookies 🍪" */
.cookiesms a { color: var(--color-enlace); font-weight: 600; }
.cookiesms button {
  border: 0; border-radius: 999px; padding: .5rem 1.4rem; margin-left: .3rem;
  font-family: 'Montserrat', sans-serif; font-weight: 600; color: #fff;
  background: var(--color-principal); cursor: pointer;
  transition: background-color .2s var(--ease-out), transform .12s var(--ease-out);
}
.cookiesms button:hover { background: var(--color-secundario); }
.cookiesms button:active { transform: scale(.96); }

/* ============================================================
   FIX modal · imagen FIJA + solo el contenido hace scroll
   La foto queda como cabecera fija; el nombre, los datos, la descripción
   y los botones son lo único que se desplaza (por debajo de la foto).
   Así en móvil la imagen no se va al leer y los botones no se cortan.
   El botón de cerrar queda fuera del área desplazable, siempre visible.
   ============================================================ */
#animalModal .modal-body { overflow: hidden; display: flex; flex-direction: column; }
#animalModal .modal-body > .row { flex: 1 1 auto; min-height: 0; }

/* La foto NO scrollea: cabecera fija de altura adaptable */
#animalModal .adopt-modal__media { flex: 0 0 auto; }
/* La imagen encaja EXACTA en su caja (anula el min-height:240 de móvil que
   la desbordaba y hacía que pisara el nombre) */
#animalModal .adopt-gallery__img { height: 100%; min-height: 0; }

/* Solo el bloque de datos se desplaza */
#animalModal .adopt-modal__info {
  flex: 1 1 auto;
  min-height: 0;                       /* imprescindible para que el hijo pueda hacer scroll */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;   /* inercia en iOS */
  overscroll-behavior: contain;        /* no arrastra la página de detrás */
}

/* Botón cerrar fijo sobre la foto aunque se haga scroll dentro del modal */
#animalModal .adopt-modal__close { position: absolute; z-index: 6; }

#animalModal .adopt-gallery {
  aspect-ratio: auto;
  height: clamp(190px, 38vh, 420px);
  height: clamp(190px, 38dvh, 420px);   /* dvh: respeta la barra del navegador móvil */
}

/* Pantallas bajas o móviles en horizontal: galería más contenida
   para que la descripción y los botones entren sin cortarse. */
@media (max-height: 680px) {
  #animalModal .adopt-gallery {
    height: clamp(140px, 30vh, 240px);
    height: clamp(140px, 30dvh, 240px);
  }
  #animalModal .adopt-modal__info { padding: 1.15rem 1.4rem 1.4rem; }
}

/* Muy poca altura (apaisado en móviles pequeños) */
@media (max-height: 460px) {
  #animalModal .adopt-gallery {
    height: clamp(120px, 46vh, 200px);
    height: clamp(120px, 46dvh, 200px);
  }
}

/* ============================================================
   PÁGINA DE CONTACTO · datos con identidad de marca + formulario
   Iconos en pastillas con degradado (no el azul de Bootstrap),
   jerarquía clara y más aire; formulario en tarjeta cuidada.
   ============================================================ */
.contact-section {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

/* --- Intro --- */
.contact-eyebrow {
  display: inline-block;
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: var(--fs-eyebrow); letter-spacing: .12em; text-transform: uppercase;
  color: var(--color-enlace); margin-bottom: .55rem;
}
.contact-heading { font-size: clamp(1.9rem, 5vw, 2.6rem); color: var(--color-principal); margin-bottom: .6rem; }
.contact-lead {
  font-size: var(--fs-lead); line-height: 1.6; color: #4a4458;
  max-width: 44ch; margin-bottom: 2.2rem;
}

/* --- Lista de datos de contacto --- */
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.15rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-item__icon {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; font-size: 1.2rem; color: #fff;
  background: linear-gradient(135deg, var(--color-principal), var(--color-secundario));
  box-shadow: 0 8px 18px -8px rgba(99, 25, 195, .5);
}
.contact-item__body { display: flex; flex-direction: column; gap: .12rem; padding-top: .2rem; min-width: 0; }
.contact-item__label {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .07em; color: #8a8397;
}
.contact-item__value {
  font-size: 1.05rem; font-weight: 600; font-style: normal; color: #2b2733;
  text-decoration: none; word-break: break-word;
  transition: color .2s var(--ease-out);
}
a.contact-item__value:hover { color: var(--color-enlace); }

.contact-hours { display: grid; gap: .25rem; margin-top: .15rem; }
.contact-hours__row { display: flex; justify-content: space-between; gap: 1.25rem; max-width: 300px; }
.contact-hours__row span:first-child { font-weight: 600; color: #2b2733; }
.contact-hours__row span:last-child { color: #6b6577; font-variant-numeric: tabular-nums; }

/* --- Tarjeta del formulario --- */
.contact-form-card {
  height: 100%;
  background: #fff; border: 1px solid #efe9f6; border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: clamp(1.4rem, 4vw, 2.4rem);
}
.contact-form .form-label { font-weight: 600; color: #3a3546; margin-bottom: .4rem; font-size: .95rem; }
.req { color: var(--color-enlace); font-weight: 700; }
.form-label__opt { color: #a49db2; font-weight: 500; font-size: .85em; }

.contact-form .input-group-text {
  background: #f6f1fb; border-color: #e6e0ef; color: var(--color-principal);
}
.contact-form .form-control { background: #fbf9fe; border-color: #e6e0ef; }
.contact-form .form-control:focus { background: #fff; }
.contact-form textarea.form-control { min-height: 130px; resize: vertical; }

.contact-submit {
  width: 100%; border-radius: 999px; padding-block: .85rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.contact-form__note { font-size: .82rem; color: #8a8397; margin: 1rem 0 0; text-align: center; }

/* --- Avisos de éxito / error --- */
.contact-alert {
  display: flex; align-items: center; gap: .6rem;
  border-radius: var(--r-sm); padding: .85rem 1.1rem; margin-bottom: 1.4rem;
  font-weight: 600; font-size: .95rem;
}
.contact-alert i { font-size: 1.1rem; flex: 0 0 auto; }
.contact-alert--ok { background: #e9f9ef; color: #1c7d45; border: 1px solid #bfe6cc; }
.contact-alert--err { background: #fdecef; color: #b32c45; border: 1px solid #f5c2cd; }

/* --- Móvil: iconos algo menores y horarios a lo ancho --- */
@media (max-width: 575px) {
  .contact-item__icon { width: 46px; height: 46px; border-radius: 14px; font-size: 1.05rem; }
  .contact-hours__row { max-width: none; }
  .contact-lead { margin-bottom: 1.8rem; }
}

/* ============================================================
   PÁGINA AYÚDANOS · formas de ayudar con acción + compartir + FAQ
   ============================================================ */
.help-section { padding-block: clamp(2.5rem, 7vw, 5rem); }

.help-head { text-align: center; max-width: 640px; margin: 0 auto clamp(1.8rem, 5vw, 3rem); }
.help-eyebrow {
  display: inline-block; font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: var(--fs-eyebrow); letter-spacing: .12em; text-transform: uppercase;
  color: var(--color-enlace); margin-bottom: .5rem;
}
.help-title { font-size: clamp(1.9rem, 5vw, 2.8rem); color: var(--color-principal); margin-bottom: .6rem; }
.help-sub { font-size: var(--fs-lead); line-height: 1.6; color: #4a4458; margin: 0; }

/* --- Tarjeta "forma de ayudar" --- */
.help-way {
  height: 100%; display: flex; flex-direction: column;
  background: #fff; border: 1px solid #efe9f6; border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .help-way:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
  .help-way:hover .help-way__img { transform: scale(1.06); }
}
/* media NO recorta (para que el badge pueda sobresalir); el zoom se recorta en imgwrap */
.help-way__media { position: relative; aspect-ratio: 16 / 11; }
.help-way__imgwrap { position: absolute; inset: 0; overflow: hidden; }
.help-way__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease-out); }
.help-way__badge {
  position: absolute; left: 1.1rem; bottom: -1.1rem; width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; color: #fff; font-size: 1.25rem;
  background: linear-gradient(135deg, var(--color-principal), var(--color-secundario));
  box-shadow: 0 10px 22px -8px rgba(99, 25, 195, .55);
}
.help-way__body { padding: 1.9rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1 1 auto; }
.help-way__title { font-size: 1.5rem; color: var(--color-principal); margin: 0; }
.help-way__text { font-size: .98rem; line-height: 1.6; color: #4a4458; margin: 0; }
.help-way__cta {
  margin-top: auto; align-self: stretch;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  border-radius: 999px; padding: .7rem 1rem; min-height: 50px; font-weight: 600;
  white-space: nowrap;   /* sin icono el texto cabe en una línea en cualquier ancho */
}

/* --- Botones de compartir (ciber-ayudante) ---
   Rejilla de 4: siempre en una fila, se adaptan al ancho de la tarjeta
   (antes se partían en 3+1 en columnas estrechas). */
.share-row { margin-top: auto; padding-top: .5rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.share-btn {
  width: 100%; max-width: 52px; height: 46px; justify-self: center;
  border-radius: 14px; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 1.15rem; color: #fff; text-decoration: none;
  transition: transform .12s var(--ease-out), filter .2s var(--ease-out);
}
.share-btn:hover { filter: brightness(1.08); color: #fff; }
.share-btn:active { transform: scale(.92); }
.share-btn--wa   { background: #25D366; }
.share-btn--fb   { background: #1877F2; }
.share-btn--x    { background: #111111; }
.share-btn--copy { background: var(--color-principal); }
.share-btn.is-copied { background: #1c7d45; }

/* --- FAQ (acordeón con marca) --- */
.faq-section { padding-block: clamp(2rem, 6vw, 4.5rem); background: linear-gradient(180deg, #ffffff, var(--surface)); }
.faq-accordion { max-width: 760px; margin: 0 auto; display: grid; gap: .8rem; }
.faq-accordion .accordion-item {
  border: 1px solid #ece3f6; border-radius: var(--r-md) !important;
  overflow: hidden; background: #fff;
}
.faq-accordion .accordion-button {
  font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1.02rem; color: #2b2733;
  padding: 1.1rem 1.25rem; background: #fff;
}
.faq-accordion .accordion-button:not(.collapsed) { color: var(--color-principal); background: #faf6ff; box-shadow: none; }
.faq-accordion .accordion-button:focus { box-shadow: 0 0 0 3px rgba(99, 25, 195, .15); border-color: transparent; }
.faq-accordion .accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236b6577' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}
.faq-accordion .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236319C3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}
.faq-accordion .accordion-body { color: #4a4458; line-height: 1.65; padding: .85rem 1.25rem 1.3rem; border-top: 1px solid #f0e9f8; }
.faq-cta { text-align: center; margin: 1.6rem 0 0; color: #6b6577; }
.faq-cta a { color: var(--color-enlace); font-weight: 600; text-decoration: none; }
.faq-cta a:hover { text-decoration: underline; }

/* --- Aparición suave al hacer scroll (solo si JS la activa) --- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 575px) {
  .help-way__title { font-size: 1.35rem; }
  .help-way__body { padding: 1.7rem 1.25rem 1.4rem; }
}
