﻿/* ==========================================================
   MEJORAS.CSS — Fundación Huellitas de Amor
   Complementa styles.css con clases extraídas de los
   estilos inline del HTML, animaciones y mejoras de diseño.
   IMPORTAR DESPUÉS de styles.css en el <head>
   ========================================================== */

/* ----------------------------------------------------------
   0. ANIMACIONES GLOBALES (Keyframes)
   ---------------------------------------------------------- */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulseBeat {
  0%   { transform: scale(1)    translateY(0);   box-shadow: 0 6px 24px rgba(0,0,0,.35); }
  50%  { transform: scale(1.07) translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,.45); }
  100% { transform: scale(1)    translateY(0);   box-shadow: 0 6px 24px rgba(0,0,0,.35); }
}

/* ----------------------------------------------------------
   1. HERO SECTION — Clases extraídas de inline styles
   ---------------------------------------------------------- */

/* Reemplaza style="font-size:2.5rem;margin-bottom:15px;..." del h1 */
.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 15px;
  line-height: 1.2;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.65);
  animation: fadeInUp 0.8s ease both;
}

/* Reemplaza el span style="font-size:1.8rem;font-weight:500;" dentro del h1 */
.hero-subtitle-inline {
  display: block;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
  font-weight: 500;
  opacity: 0.95;
}

/* Reemplaza p style="font-size:1.1rem;max-width:600px;margin:0 auto 20px;" */
.hero-description {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  max-width: 600px;
  margin: 0 auto 22px;
  line-height: 1.7;
  animation: fadeInUp 0.9s 0.2s ease both;
}

.hero-overlay .btn-primary {
  animation: fadeInUp 1s 0.4s ease both;
}

/* ----------------------------------------------------------
   2. SECCIONES DE CONTENIDO — Clases extraídas de inline
   ---------------------------------------------------------- */

/* Reemplaza style="margin-bottom:40px;" en .historias-section */
.historias-section {
  margin-bottom: 40px;
}
.historias-section:last-child {
  margin-bottom: 0;
}

/* Reemplaza h3 style="margin-bottom:20px;font-size:1.3rem;" */
.section-subtitle {
  margin-bottom: 20px;
  font-size: 1.3rem;
  font-weight: 600;
}

/* ----------------------------------------------------------
   3. DONACIONES — Reemplaza el p style= amarillo
   ---------------------------------------------------------- */

/* Reemplaza p style="background-color:#fff3cd;padding:10px;..." */
.info-highlight-box {
  background-color: #fff3cd;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-top: 12px;
  border-left: 4px solid #ffc107;
  line-height: 1.6;
}

/* ----------------------------------------------------------
   4. CARDS — Hover profesional con transición suave
   ---------------------------------------------------------- */

.card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* ----------------------------------------------------------
   5. SPA SECTIONS — Fade-in al cambiar sección
   ---------------------------------------------------------- */

.spa-section.active {
  animation: fadeIn 0.35s ease both;
}

/* ----------------------------------------------------------
   6. BOTÓN FLOTANTE — Pulso mejorado
   ---------------------------------------------------------- */

.btn-plato-flotante {
  animation: pulseBeat 2.5s ease-in-out infinite;
}
.btn-plato-flotante:hover {
  animation-play-state: paused;
  transform: scale(1.1) translateY(-6px);
}

/* ----------------------------------------------------------
   7. FOOTER — Íconos SVG de redes sociales
   ---------------------------------------------------------- */

.social-icons-enhanced {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
  letter-spacing: 0.3px;
}
.social-icon-link:hover {
  transform: translateY(-3px) scale(1.04);
  filter: brightness(1.12);
}
.social-icon-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.social-icon-link.facebook  { background-color: #1877f2; color: #fff; }
.social-icon-link.instagram { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; }
.social-icon-link.tiktok    { background-color: #010101; color: #fff; border: 1px solid #444; }
.social-icon-link.whatsapp  { background-color: #25d366; color: #fff; }

/* ----------------------------------------------------------
   8. ACCESIBILIDAD — Focus ring visible
   ---------------------------------------------------------- */

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(255,140,0,0.55);
  outline-offset: 2px;
}

/* ----------------------------------------------------------
   9. NOSCRIPT — Banner de aviso sin JavaScript
   ---------------------------------------------------------- */

.noscript-banner {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: #fff;
  text-align: center;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 9999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* ----------------------------------------------------------
   10. HIGHLIGHT DE BÚSQUEDA
   ---------------------------------------------------------- */

.highlight-search {
  background-color: #fff176;
  border-radius: 4px;
  padding: 2px 4px;
  outline: 2px solid #f9a825;
  outline-offset: 2px;
  transition: background-color 1s ease;
}

/* ----------------------------------------------------------
   11. RESPONSIVIDAD ADICIONAL
   ---------------------------------------------------------- */

@media (max-width: 480px) {
  .hero-title { font-size: 1.6rem; }
  .social-icons-enhanced { flex-direction: column; }
  .social-icon-link { width: 100%; justify-content: center; }
}

/* ----------------------------------------------------------
   12. SKIP LINK, HEADER BAR, HERO CTAs
   ---------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 10000;
  background: var(--azul-logo, #0d47a1);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 12px;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  flex-direction: row;
}

.header-wrapper.header-bar {
  flex-direction: row;
  align-items: center;
}

.header-search-col {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  justify-content: flex-end;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  animation: fadeInUp 1s 0.4s ease both;
}

.hero-overlay .btn-secondary {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(4px);
}
.hero-overlay .btn-secondary:hover {
  background: rgba(255,255,255,0.28);
  color: #fff;
}

.home-below-fold {
  margin-top: 8px;
}

.section-center-title {
  text-align: center;
  margin-bottom: 10px;
}
.section-center-lead {
  text-align: center;
  margin-bottom: 20px;
  color: var(--texto-secundario, #667);
}

.testimonials-block {
  margin-top: 50px;
}

/* ----------------------------------------------------------
   13. PLACEHOLDER FOTOS + PET MEDIA
   ---------------------------------------------------------- */

.pet-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 220px;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 30%, rgba(251, 192, 45, 0.35), transparent 45%),
    linear-gradient(145deg, #0d47a1 0%, #1565c0 55%, #1a237e 100%);
  color: #fff;
  text-align: center;
  padding: 24px 16px;
}
.placeholder-emoji { font-size: 2.4rem; line-height: 1; }
.placeholder-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}
.placeholder-note {
  font-size: 0.8rem;
  opacity: 0.85;
}

.pet-image-container picture,
.story-img-wrapper picture,
.medical-case-card > picture,
.happy-ending-card > picture {
  display: block;
  width: 100%;
  height: 100%;
}
.pet-image-container img,
.pet-card-image,
.case-image,
.happy-image,
.story-img-wrapper img,
.pet-details-img {
  width: 100%;
  object-fit: cover;
}

/* ----------------------------------------------------------
   14. DONATION MODAL + VOLUNTEER + PROJECTS
   ---------------------------------------------------------- */

.donation-modal-content {
  text-align: center;
  padding: 30px;
}
.donation-plan-line {
  margin-bottom: 12px !important;
  color: var(--azul-logo, #0d47a1) !important;
  font-size: 0.95rem !important;
}
.donation-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 18px 0;
}
.btn-amount {
  appearance: none;
  border: 2px solid var(--azul-logo, #0d47a1);
  background: #fff;
  color: var(--azul-logo, #0d47a1);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn-amount:hover {
  background: var(--azul-logo, #0d47a1);
  color: #fff;
  transform: translateY(-2px);
}
.donation-quick-banks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
}
.copy-success {
  background-color: var(--color-verde, #4caf50) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.volunteer-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  max-width: 520px;
}
.volunteer-form label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 4px;
}
.volunteer-form input,
.volunteer-form select,
.volunteer-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gris-borde, #dde3ea);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}
.project-feature {
  max-width: 720px;
}
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.button-row .btn-primary,
.button-row .btn-secondary {
  text-align: center;
}

.modal-wide {
  max-width: 860px;
}
.share-hint {
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--texto-secundario, #667);
  word-break: break-all;
}
.share-hint a {
  color: var(--azul-logo, #0d47a1);
  text-decoration: underline;
}

.anchor-flash {
  outline: 2px solid var(--amarillo-logo, #fbc02d);
  outline-offset: 4px;
  transform: scale(1.01);
  transition: outline 0.3s ease, transform 0.3s ease;
}

/* ----------------------------------------------------------
   15. A11Y / MOTION / NAV CALM
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn-plato-flotante {
    animation: none !important;
  }
}

nav ul li ul li a {
  border-left-width: 3px;
}

@media (max-width: 768px) {
  .header-bar {
    flex-direction: column;
  }
  .header-logo-col {
    max-width: min(94vw, 420px);
    width: 100%;
  }
  .header-logo-col img,
  .header-logo-col .site-logo {
    max-height: 128px;
  }
  .hero-card {
    height: min(62vh, 420px);
  }
  .hero-cta-row {
    width: 100%;
  }
  .hero-cta-row .btn-primary,
  .hero-cta-row .btn-secondary {
    width: 100%;
    text-align: center;
  }
}
