/* ============================================== */
/* ===         COMIENZO DEL CSS           === */
/* ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
   
}

body {
    font-family: "Roboto", sans-serif; /* Fuente original restaurada */
    background-color: white;
    /* Evita el desbordamiento horizontal de las animaciones AOS */
    overflow-x: hidden; 
}

/* Estilo general del menú */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: white;
    position: relative;
    z-index: 998; 
    width: 100%;
    transition: all 0.3s ease;
}

.logo {
    height: 50px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px; 
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px; 
    font-weight: bold;
    font-size: 1rem;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: #444;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #f98930;
}

/* Estilo para el dropdown */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    z-index: 1000;
    min-width: 200px;
}

.dropdown-content li {
    padding: 10px 20px;
    list-style: none
}

.dropdown-content a {
    display: block;
    color: #444;
    text-decoration: none;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #f0f0f0;
    color: #f98930;
}

/* Mostrar el dropdown al pasar el cursor */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Estilo para el botón de menú en pantallas pequeñas */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1000; 
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #444;
    transition: all 0.3s ease;
}

/* Estilos del Hero (reemplaza .carousel) */
.hero {
    width: 100%;
    height: 600px; 
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.btn-hero {
    background-color: #f98930;
    color: white;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    border: 2px solid #f98930;
    transition: all 0.3s ease;
}

.btn-hero:hover {
    background-color: white;
    color: #f98930;
    transform: scale(1.05);
}

/* === INICIO ESTILOS RESTAURADOS (Historias de Vida) === */
/* Transición para las imágenes del carrusel */
.carousel-image {
    opacity: 0;
    transform: scale(0.8) rotate(-5deg); /* Escalado inicial más pequeño y rotación */
    transition: opacity 1s ease, transform 1s cubic-bezier(0.25, 1, 0.5, 1); /* Transición más larga y fluida */
}

.carousel-image.active {
    opacity: 1;
    transform: scale(1) rotate(0deg); /* Escalado normal y sin rotación */
}

/* Transición para el texto del carrusel */
.carousel-text {
    opacity: 0;
    transform: translateY(50px) scale(0.9); /* Movimiento hacia abajo y escalado inicial */
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); /* Transición más fluida */
}

.carousel-text.active {
    opacity: 1;
    transform: translateY(0) scale(1); /* Sin movimiento y escalado normal */
}
/* === FIN ESTILOS RESTAURADOS === */


/* Botones del carrusel de testimonios */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}
.carousel-btn:hover { background-color: rgba(0, 0, 0, 0.8); }
.prev-btn { left: 20px; margin-left: 100px; }
.next-btn { right: 20px; margin-right: 100px; }

/* Sección Patrocinadores */
.sponsors {
    text-align: center;
    padding: 50px 10px;
    background-color: #ffffff;
}
.sponsor-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    justify-items: center;
    align-items: center;
}
.sponsor-logos img {
    width: 100%;
    max-width: 150px;
    height: auto;
    transition: transform 0.3s ease;
}
.sponsor-logos img:hover { transform: scale(1.2); }
.sponsor-logos img:nth-child(1), img:nth-child(5) { max-width: 120px; transform: scale(1.1); }
.sponsor-logos img:nth-child(2), img:nth-child(4) { max-width: 300px; transform: scale(1.1); }
.sponsor-logos img:nth-child(2):hover { transform: scale(1.3); }

/* Sección Naranja (Testimonios) */
.orange-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f98930;
    height: 500px;
    position: relative;
    padding: 20px;
    margin-top: 50px;
    overflow: hidden; 
}
.orange-section::before {
    content: "";
    position: absolute;
    top: 10%; bottom: 10%;
    left: 50%;
    width: 2px;
    background-color: white;
    transform: translateX(-50%);
    z-index: 1;
}
.orange-left,
.orange-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Estilo original de la imagen del carrusel */
.orange-left img {
    width: 100%; 
    max-width: 350px; 
    height: auto; 
    position: relative;
    margin-top: -70px; 
    transition: transform 4s cubic-bezier(0.5, 0.8, 0.5, 1), opacity 0.5s ease-in-out; 
    opacity: 1; 
}

.orange-right .text-box {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0);
    text-align: left;
    color: #333;
    font-size: 1rem;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 3s ease-in-out;
}
.orange-right .text-box h1 { font-size: 1.8rem; color: #ffffff; margin: 0; }
.orange-right .text-box p { margin: 0; word-break: break-word; color: #ffffff; }

/* Sección de 3 Tarjetas (Historia, Misión, Proyectos) */
.three-divs {
    display: flex;
    justify-content: space-around;
    align-items: stretch; 
    margin: 50px auto;
    max-width: 1400px;
    gap: 20px;
    border-bottom: #f98930 5px solid;
    padding-bottom: 20px;
}
.outer-div {
    padding: 20px;
    width: 300px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    text-align: center;
    color: #f98930;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 rgba(0,0,0,0); 
    text-decoration: none; 
}
.outer-div:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}
.outer-div p {
    color: #444;
    margin-bottom: 10px;
}
.inner-div {
    width: 100px;
    height: 100px;
    background-color: #f98a3000;
    border-radius: 5px;
    background-position: center;
    background-size: cover;
}

/* Botón general */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #ffffff;
    color: #f98930;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #f98930;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 15px;
}
.btn:hover {
    background-color: #444;
    color: #ffffff;
    border-color: #444;
    transform: scale(1.05);
}

/* Sección Dona Vida */
.new-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 20px; 
    margin-top: 50px;
}
.new-content { text-align: center; font-family: 'Roboto', sans-serif; color: #333; margin-bottom: 30px; }
.new-content h2 { font-size: 2rem; color: #f98930; margin-bottom: 20px; }
.new-content p { font-size: 1rem; line-height: 1.6; }

.three-boxes {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}
.box {
    flex: 1;
    padding: 20px;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    color: #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-size: contain;
    height: 200px;
    background-repeat: no-repeat;
    background-position: center;
}
.box:hover { transform: scale(1.05); box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.2); }
.box h3 { font-size: 1.5rem; color: #f98930; margin-bottom: 10px; }
.box p { font-size: 1rem; line-height: 1.6; }

/* Sección "Descubre nuestros proyectos" (fondo imagen) */
.new-div {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    background-image: url(../jaen_acoge_assets/fondoproyectos.png);
    background-repeat: no-repeat;
    background-size: cover;
    height: 400px;
}
.new-div2 {
    text-align: center;
    font-family: 'Roboto', sans-serif;
    color: #333;
    background-color: #444444;
    padding: 50px;
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.new-div2:hover { transform: scale(1.05); box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3); }
.new-div2 .btn { background-color: #f98930; color: white; }
.new-div2 .btn:hover { background-color: #e07828; transform: scale(1.1); box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); }
.new-div2 h2 { font-size: 2rem; color: #ffffff; margin-bottom: 20px; }
.new-div2 p { font-size: 1rem; line-height: 1.6; margin-bottom: 20px; color: #ffffff; }

/* Sección Formulario de Contacto */
.contact-form-section {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
    min-height: 400px;
    color: #ffffff;
    text-align: center;
}
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 1rem; color: #333; margin-bottom: 5px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px; font-size: 1rem; border: 1px solid #ccc; border-radius: 5px; box-sizing: border-box; }
.form-group textarea { resize: none; height: 150px; }
.form-group input:focus, .form-group textarea:focus { border-color: #f98930; outline: none; box-shadow: 0px 0px 5px rgba(249, 137, 48, 0.5); }
.contact-form .btn { background-color: #f98930; color: white; border: none; cursor: pointer; }
.contact-form .btn:hover { background-color: #e07828; }

/* Footer */
.footer { background-color: #333; color: white; padding: 40px 20px; font-size: 0.9rem; }
.footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; gap: 20px; }
.footer-section { flex: 1; min-width: 250px; }
.footer-section h3 { font-size: 1.2rem; margin-bottom: 15px; color: #f98930; }
.footer-section ul { list-style: none; padding: 0; }
.footer-section ul li { margin-bottom: 10px; }
.footer-section ul li a { text-decoration: none; color: white; transition: color 0.3s ease; }
.footer-section ul li a:hover { color: #f98930; }
.footer-section p { margin-bottom: 10px; }
.social-icons { display: flex; gap: 15px; }
.social-icons a img { width: 30px; height: 30px; transition: transform 0.3s ease; }
.social-icons a img:hover { transform: scale(1.2); }
.footer-bottom { text-align: center; margin-top: 20px; border-top: 1px solid #444; padding-top: 10px; font-size: 0.8rem; color: #ccc; }

/* Banner de Cookies */
:root {
  --accent: #f98930;
  --dark: #333;
  --light: #fff;
  --overlay: rgba(0,0,0,0.6);
  --btn-accept: #f98930;
  --btn-reject: #fff;
  --btn-reject-border: #f98930;
  --transition: 0.3s ease;
}
body.banner-active { overflow: hidden; }
#cookie-banner-bottom.hidden { display: none; }
#cookie-banner-bottom { 
  position: fixed; 
  bottom: 0; left: 0; right: 0; 
  max-height: 50vh; 
  background: var(--light); 
  box-shadow: 0 -6px 20px rgba(0,0,0,0.2); 
  z-index: 9999; 
  display: flex; 
  flex-direction: column; 
  border-top: 4px solid var(--accent); 
  animation: slideUp 0.5s var(--transition); 
}
@keyframes slideUp { 
  from { transform: translateY(100%); } 
  to   { transform: translateY(0); } 
}
.banner-actions { 
  display: flex; 
  justify-content: flex-end; 
  flex-wrap: wrap; /* Para que botones se ajusten en móvil */
  padding: 12px 24px; 
  background: #fafafa; 
  border-bottom: 1px solid #eee; 
  gap: 10px; /* Añadido para espaciado */
}
.banner-actions p { /* Párrafo del banner */
  flex-basis: 100%; /* Ocupa todo el ancho */
  margin-bottom: 10px;
}
.banner-actions button { 
  margin-left: 0; /* Reseteado */
  padding: 8px 20px; 
  font-size: 0.95em; 
  font-weight: 600; 
  border-radius: 4px; 
  cursor: pointer; 
  transition: background var(--transition), transform var(--transition); 
  flex-grow: 1; /* Para que botones ocupen espacio */
}
.btn-accept { background: var(--btn-accept); color: var(--light); border: none; }
.btn-accept:hover { background: #e57617; transform: translateY(-2px); }
.btn-reject { background: var(--btn-reject); color: var(--accent); border: 2px solid var(--btn-reject-border); }
.btn-reject:hover { background: #fff; transform: translateY(-2px); }
.banner-accordion { overflow-y: auto; flex: 1; }
.accordion-item + .accordion-item { border-top: 1px solid #eee; }
.accordion-header { 
  padding: 14px 24px; 
  font-size: 1em; 
  font-weight: bold; 
  color: var(--dark); 
  cursor: pointer; 
  position: relative; 
  transition: background var(--transition); 
}
.accordion-header:hover { background: #f8f8f8; }
.accordion-header::after { 
  content: "+"; 
  position: absolute; 
  right: 24px; 
  font-size: 1.2em; 
  transition: transform var(--transition); 
}
.accordion-header.active::after { content: "−"; transform: rotate(180deg); }
.accordion-summary { padding: 0 24px 12px 24px; font-size: 0.9em; color: #555; }
.accordion-content { padding: 0 24px 18px 24px; font-size: 0.9em; color: #444; line-height: 1.5; }
.accordion-content.hidden { display: none; }
.banner-accordion::-webkit-scrollbar { width: 6px; }
.banner-accordion::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 3px; }
.banner-accordion::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }


/* ============================================== */
/* === INICIO DE NUEVOS ESTILOS Y AJUSTES === */
/* ============================================== */

/* --- 1. Estilos Barra Superior Cabecera --- */
.header-top-bar {
    background-color: #f4f4f4;
    padding: 8px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #555;
    z-index: 999;
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}

.top-bar-contact {
    display: flex;
    gap: 20px;
}

.top-bar-contact span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-contact i {
    color: #f98930;
}

.language-flags {
    display: flex;
    gap: 8px;
    align-items: center;
}

.language-flags img {
    width: 24px; /* Más pequeño para la barra superior */
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #ddd;
}

.language-flags img:hover {
    transform: scale(1.2);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* --- 2. Ajustes Cabecera Principal (Sticky) --- */
.navbar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    animation: slideDown 0.5s ease-out;
}

/* Relleno para el body cuando la cabecera es sticky */
body {
    transition: padding-top 0.5s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* Botón de Donar */
.btn-donate {
    background-color: #f98930;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #f98930;
    margin-left: 20px;
}
.btn-donate:hover {
    background-color: white;
    color: #f98930;
    transform: scale(1.05);
}

/* --- 3. Nueva Sección de Datos (KPIs) --- */
.stats-section {
    padding: 60px 20px;
    background-color: #f9f9f9; /* Fondo gris claro */
}

.section-title {
    font-size: 2.5rem; /* Consistente con otros títulos */
    color: #f98930;
    text-align: center;
    font-weight: bold;
    margin-bottom: 50px;
}

.stats-container {
    display: grid;
    /* 4 columnas en desktop, 2 en tablet, 1 en móvil */
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2.5rem;
    color: #f98930;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 3rem; 
    font-weight: 700;
    color: #333;
    display: block;
    line-height: 1.1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    color: #555;
    font-weight: 500;
}

/* --- 4. Nueva Sección de Gráficos --- */
.charts-section {
    padding: 60px 20px;
    background-color: #ffffff;
}

.subsection-title {
    font-size: 2rem;
    color: #333;
    text-align: center;
    font-weight: 600;
    margin-bottom: 40px;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.chart-wrapper {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    height: 400px; /* Altura fija para alinear */
    position: relative; /* Para Chart.js */
}

.chart-wrapper h4 {
    text-align: center;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
}

#donut-chart, #bar-chart {
    max-height: 300px; /* Limita la altura del canvas */
}

/* ============================================== */
/* ===     SECCIÓN ESPACIOS SEGUROS (NUEVO)   === */
/* ============================================== */

.safe-spaces-section {
    padding: 80px 20px;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

.safe-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
}

.safe-intro p {
    font-size: 1.1rem;
    color: #666;
    margin-top: 10px;
}

.safe-cards-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.safe-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid transparent;
}

.safe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* --- Estilos Específicos Violeta --- */
.violet-card {
    border-top-color: #8e44ad;
}

.violet-blob {
    background-color: rgba(142, 68, 173, 0.15);
    color: #8e44ad;
}

.violet-btn {
    background-color: #8e44ad;
    color: white;
    border: 2px solid #8e44ad;
}

.violet-btn:hover {
    background-color: transparent;
    color: #8e44ad;
}

/* --- Estilos Específicos Arcoíris --- */
.rainbow-card {
    border-top-image: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet) 1;
}

.rainbow-blob {
    background: linear-gradient(135deg, rgba(255,0,0,0.1), rgba(0,0,255,0.1));
    color: #e67e22; /* Naranja corporativo para el icono */
}

/* --- CORRECCIÓN BOTÓN ARCOÍRIS --- */
.rainbow-btn {
    /* El fondo es el gradiente arcoíris completo */
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    /* CAMBIO IMPORTANTE: Color de texto gris oscuro para que se vea sobre blanco */
    color: #333; 
    border: none;
    position: relative;
    z-index: 1;
    /* Aseguramos formato de botón */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espacio entre texto e icono */
    font-weight: bold;
    text-decoration: none; /* Quitar subrayado de enlace */
}

/* El pseudo-elemento crea el fondo blanco interior */
.rainbow-btn::before {
    content: "";
    position: absolute;
    top: 2px; left: 2px; right: 2px; bottom: 2px; /* Grosor del borde */
    background: white;
    border-radius: 3px;
    z-index: -1;
    transition: opacity 0.3s ease;
}

/* Al pasar el ratón: desaparece lo blanco y el texto se vuelve blanco */
.rainbow-btn:hover {
    color: white;
}

.rainbow-btn:hover::before {
    opacity: 0; /* El fondo blanco se desvanece mostrando el arcoíris */
}

/* Corrección para el icono del enlace */
.rainbow-btn i {
    font-size: 1rem;
    /* Hacemos que el icono herede el color del texto */
    background: none; 
    -webkit-text-fill-color: initial;
}

/* --- Elementos Comunes de la Tarjeta --- */
.card-header-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
}

.blob {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 0;
    animation: pulse 2s infinite;
}

.card-header-icon i {
    position: relative;
    z-index: 1;
}

.safe-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #333;
}

.highlight-text {
    font-weight: bold;
    font-style: italic;
    margin-bottom: 15px;
    color: #555;
}

.emergency-box {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

.emergency-box h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.emergency-box ul {
    list-style: none;
    padding: 0;
}

.emergency-box ul li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #444;
}

.emergency-box ul li strong {
    color: #333;
}

.btn-safe {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 80%;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.1); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* --- Ajustes Responsive para esta sección --- */
@media (max-width: 768px) {
    .safe-cards-container {
        flex-direction: column;
        align-items: center;
    }
    .safe-card {
        width: 100%;
        max-width: 100%;
    }
}

/* ============================================== */
/* === INICIO ESTILOS RESPONSIVE (CORREGIDOS) === */
/* ============================================== */

@media (max-width: 1024px) {
    /* Ajustes para tablet */
    .stats-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas */
    }
    .charts-container {
        grid-template-columns: 1fr; /* 1 columna */
    }
    .chart-wrapper {
        height: 350px; /* Ajustar altura */
    }
    .nav-links {
        gap: 25px;
    }
    .navbar {
        padding: 15px 30px;
    }
    .header-top-bar {
        padding: 8px 30px;
    }
}

@media (max-width: 768px) {
    
    /* --- INICIO CORRECCIÓN MENÚ MÓVIL --- */
    
    /* Ocultar barra superior en móvil */
    .header-top-bar {
        display: none;
    }

    .navbar {
        flex-wrap: wrap; /* Permite que el menú se expanda */
        padding: 20px;
        position: relative; /* Quitar sticky para menú hamburguesa */
    }
    
    /* Reiniciar el padding-top del body en móvil si estaba sticky */
    body {
        padding-top: 0 !important;
    }
    
    .navbar.sticky {
        position: relative; /* Desactivar sticky en móvil */
        box-shadow: none;
        animation: none;
    }

    .logo {
        height: 45px;
    }

    .menu-toggle {
        display: flex; /* Mostrar botón hamburguesa */
    }

    /* Ocultar menú y botón Dona por defecto */
    .nav-menu {
        display: none; /* Oculto por defecto */
        width: 100%;
        order: 3; /* Poner debajo del logo y botón */
        flex-direction: column; /* Apilar links */
    }
    .btn-donate {
        display: none; /* Oculto por defecto */
    }
    
    /* Contenedor de links, siempre flex-column en móvil */
    .nav-links {
        display: flex; /* Visible, pero su padre .nav-menu está oculto */
        flex-direction: column;
        gap: 20px;
        background-color: white;
        width: 100%;
        padding: 20px 0;
        text-align: center;
    }

    /* Estilos cuando el menú está activo (tocado por JS) */
    .nav-menu.active {
        display: flex; /* Muestra el .nav-menu (y sus hijos, .nav-links) */
    }
    .btn-donate.active {
        display: block; /* Muestra el botón de donar */
        text-align: center;
        margin: 15px 0 0 0;
        width: 100%;
    }
    
    /* --- FIN CORRECCIÓN MENÚ MÓVIL --- */
    

    /* Ajustes generales de coherencia móvil */
    .section-title {
        font-size: 2.2rem;
    }
    .stats-section, .charts-section, .new-section {
        padding: 40px 20px;
    }

    .hero { height: 450px; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1rem; }

    .orange-section { flex-direction: column; height: auto; padding: 30px 20px; }
    .orange-section::before { display: none; }
    .orange-left, .orange-right { width: 100%; padding: 20px 0; }
    
    /* === INICIO CORRECCIÓN SUPERPOSICIÓN === */
    .orange-left img { 
        max-width: 250px; 
        margin-top: -50px; /* Restaurar superposición en tablet */
    }
    /* === FIN CORRECCIÓN SUPERPOSICIÓN === */
    
    .orange-right .text-box { max-width: 100%; font-size: 0.95rem; }
    
    .stats-container {
        grid-template-columns: 1fr; /* 1 columna en móvil */
    }
    .charts-container {
        grid-template-columns: 1fr;
    }
    .chart-wrapper {
        height: 300px; /* Reducir altura en móvil */
    }

    .three-divs { flex-direction: column; align-items: center; gap: 30px; }
    .outer-div { width: 90%; max-width: 400px; padding-bottom: 40px; }
    .new-section .three-boxes { flex-direction: column; align-items: center; }
    .box { width: 80%; max-width: 300px; height: auto; aspect-ratio: 1 / 1; }
    .new-div { height: 300px; padding: 30px; }
    .new-div2 { padding: 30px; }
    .footer-container { flex-direction: column; align-items: center; }
    .footer-section { width: 100%; text-align: center; }

    /* Banner cookies responsive */
    #cookie-banner-bottom { max-height: 60vh; }
    .banner-actions { padding: 8px 16px; justify-content: center; }
    .banner-actions button { padding: 6px 16px; font-size: 0.9em; flex-grow: 0; }
    .accordion-header { padding: 12px 16px; }
    .accordion-summary, .accordion-content { padding: 0 16px 12px 16px; }
}

@media (max-width: 480px) {
    .navbar {
        padding: 15px;
    }
    .logo { height: 35px; }
    
    .hero { height: 400px; }
    .hero-content h1 { font-size: 1.7rem; }
    .hero-content p { font-size: 0.9rem; }
    
    .section-title {
        font-size: 2rem;
    }
    .subsection-title {
        font-size: 1.6rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    .stat-label {
        font-size: 0.9rem;
    }
    
    .carousel-btn { width: 40px; height: 40px; font-size: 1.2rem; }
    .prev-btn { margin-left: 10px; }
    .next-btn { margin-right: 10px; }
    
    /* === INICIO CORRECCIÓN SUPERPOSICIÓN === */
    .orange-left img { 
        max-width: 200px; 
        margin-top: -40px; /* Restaurar superposición en móvil */
    }
    /* === FIN CORRECCIÓN SUPERPOSICIÓN === */
    
    .orange-right .text-box h1 { font-size: 1.3rem; }
    .orange-right .text-box p { font-size: 0.9rem; line-height: 1.5; }
    
    .new-content h2, .new-div2 h2 { font-size: 1.5rem; }
    .new-content p, .new-div2 p { font-size: 0.9rem; }
    
    .footer { font-size: 0.8rem; }
    .footer-section h3 { font-size: 1rem; }
    .social-icons a img { width: 25px; height: 25px; }
}