/* ==========================================================================
   HOJA DE ESTILOS INSTITUCIONAL - CRUZ ROJA JUNTA PROVINCIAL DEL CARCHI
   ========================================================================== */

/* RESETS Y CONFIGURACIÓN BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2D3748;
    background-color: #FAFAFA;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   ENCABEZADO Y NAVEGACIÓN (HEADER) - FIJO AL DESPLAZARSE
   -------------------------------------------------------------------------- */
header {
    background-color: #ffffff;
    border-bottom: 3px solid #E50914; /* Rojo institucional */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Ajustes del Logo Oficial */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 52px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.logo img:hover {
    transform: scale(1.02);
}

.nav-container nav {
    display: contents;
}

/* Enlaces del Menú */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.nav-links a {
    text-decoration: none;
    color: #1A2530;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #E50914;
}

/* --------------------------------------------------------------------------
   MENÚ DESPLEGABLE (SUBMENÚ) - para "Servicios" y "Eventos"
   -------------------------------------------------------------------------- */
.nav-item-dropdown {
    position: relative;
}

.nav-item-dropdown > a::after {
    content: '▾';
    display: inline-block;
    margin-left: 0.3rem;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.submenu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background-color: #ffffff;
    min-width: 260px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid #F0F2F5;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1100;
}

/* Estas reglas de :hover / :focus-within son solo para escritorio.
   En móvil, tocar el enlace también dispara :focus-within, y como esta
   selección tiene más especificidad que la regla del acordeón (más abajo),
   el "transform: translateX(-50%)" ganaba y empujaba el submenú medio
   ancho hacia la izquierda, cortándolo por el overflow-x:hidden del body. */
@media (min-width: 769px) {
    .nav-item-dropdown:hover .submenu,
    .nav-item-dropdown:focus-within .submenu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    .nav-item-dropdown:hover > a::after {
        transform: rotate(180deg);
    }
}

.submenu li {
    width: 100%;
}

.submenu a {
    display: block;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1A2530;
    border-radius: 6px;
    white-space: nowrap;
}

.submenu a:hover {
    background-color: #FCEBEC;
    color: #E50914;
}

.submenu .submenu-destacado {
    border-bottom: 1px solid #F0F2F5;
    margin-bottom: 0.3rem;
    padding-bottom: 0.6rem;
}

.submenu .submenu-destacado a {
    color: #E50914;
    font-weight: 800;
}

/* --------------------------------------------------------------------------
   SUB-SUBMENÚ (FLYOUT) - para "Capacitación" dentro de "Servicios"
   -------------------------------------------------------------------------- */
.submenu-item-dropdown {
    position: relative;
}

.submenu-item-dropdown > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.submenu-flecha {
    font-size: 0.75rem;
    color: #98A2B3;
    flex-shrink: 0;
}

.submenu-flyout {
    list-style: none;
    position: absolute;
    top: -0.5rem;
    left: 100%;
    margin-left: 0.4rem;
    background-color: #ffffff;
    min-width: 250px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid #F0F2F5;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateX(-6px);
    z-index: 1200;
}

/* Igual que arriba: solo para escritorio, para no pelear con el
   acordeón móvil de menu-acordeon.js */
@media (min-width: 769px) {
    .submenu-item-dropdown:hover .submenu-flyout,
    .submenu-item-dropdown:focus-within .submenu-flyout {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
    }
}

.submenu-flyout li {
    width: 100%;
}

.submenu-flyout a {
    display: block;
    padding: 0.6rem 0.9rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1A2530;
    border-radius: 6px;
    white-space: nowrap;
}

.submenu-flyout a:hover {
    background-color: #FCEBEC;
    color: #E50914;
}

/* En móvil el submenú empieza contraído (acordeón): se despliega al
   tocar la flechita, en vez de mostrarse siempre abierto ocupando espacio */
@media (max-width: 768px) {
    .nav-item-dropdown > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.6rem;
    }

    .nav-item-dropdown > a::after {
        display: inline-block;
        font-size: 0.75rem;
        color: #98A2B3;
        transition: transform 0.25s ease;
    }

    .nav-item-dropdown.abierto > a::after {
        transform: rotate(180deg);
    }

    .submenu {
        position: static;
        transform: none;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 0 1rem;
        margin-bottom: 0;
        background-color: #FAFAFA;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        transition: max-height 0.3s ease;
    }

    .nav-item-dropdown.abierto > .submenu {
        margin-bottom: 0.3rem;
    }

    .submenu a {
        padding: 0.55rem 0.2rem;
        font-size: 0.9rem;
        border-bottom: 1px solid #F1F5F9;
    }

    .submenu-flecha {
        display: inline-block;
        transition: transform 0.25s ease;
    }

    .submenu-item-dropdown.abierto > a .submenu-flecha {
        transform: rotate(90deg);
    }

    .submenu-flyout {
        position: static;
        transform: none;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 0 1rem;
        margin: 0;
        background-color: #F1F1F1;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        transition: max-height 0.3s ease;
    }

    .submenu-item-dropdown.abierto > .submenu-flyout {
        margin: 0.2rem 0 0.3rem 0;
    }

    .submenu-flyout a {
        padding: 0.5rem 0.2rem;
        font-size: 0.85rem;
        border-bottom: 1px solid #F1F5F9;
    }
}

/* Botón de menú hamburguesa: oculto en escritorio, visible solo en móvil */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: #1A2530;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
}

/* Botón Destacado en el Menú */
.btn-donar {
    background-color: #E50914;
    color: #ffffff !important;
    padding: 0.55rem 1.2rem;
    border-radius: 6px;
    font-weight: 700 !important;
    transition: background-color 0.2s ease, transform 0.1s ease !important;
}

.btn-donar:hover {
    background-color: #B90710 !important;
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   SECCIÓN HERO (PORTADA PRINCIPAL) - Con margen superior por el header fijo
   -------------------------------------------------------------------------- */
.hero {
    background: linear-gradient(rgba(26, 37, 48, 0.82), rgba(26, 37, 48, 0.88)), url('imagenes/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    padding: 5rem 2rem;
    text-align: center;
    margin-top: 75px; /* Espacio para que la barra fija no tape el contenido */
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 1.15rem;
    color: #E2E8F0;
    max-width: 750px;
    margin: 0 auto 2rem auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   BOTONES
   -------------------------------------------------------------------------- */
.btn-primary {
    display: inline-block;
    background-color: #E50914;
    color: #ffffff;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #B90710;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #1A2530;
}

/* --------------------------------------------------------------------------
   SECCIONES Y TARJETAS
   -------------------------------------------------------------------------- */
.servicios {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.titulo-seccion {
    text-align: center;
    color: #1A2530;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    position: relative;
}

.titulo-seccion::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #E50914;
    margin: 0.6rem auto 0 auto;
    border-radius: 2px;
}

.grid-servicios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* --------------------------------------------------------------------------
   BANNER A TODO EL ANCHO (imagen + panel de texto), sin recuadro central.
   Se usa en "¿Quiénes Somos?" para que la sección llegue de extremo a
   extremo de la pantalla.
   -------------------------------------------------------------------------- */
.seccion-banner-ancho {
    display: flex;
    width: 100%;
    min-height: 460px;
}

.seccion-banner-ancho.invertido {
    flex-direction: row-reverse;
}

.seccion-banner-ancho-imagen {
    width: 50%;
    min-height: 460px;
    background-size: cover;
    background-position: center;
}

.seccion-banner-ancho-info {
    width: 50%;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #1A2530 0%, #2A3B4C 100%);
    padding: 3.5rem 4.5rem;
    color: #ffffff;
}

.seccion-banner-ancho.invertido .seccion-banner-ancho-info {
    background: linear-gradient(90deg, #2A3B4C 0%, #1A2530 100%);
}

.seccion-banner-ancho-contenido {
    max-width: 520px;
}

.seccion-banner-ancho-contenido h2 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    text-align: left;
}

.seccion-banner-ancho-contenido h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #E50914;
    margin: 0.8rem 0 0 0;
    border-radius: 2px;
}

.seccion-banner-ancho-contenido p {
    color: #E2E8F0;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .seccion-banner-ancho,
    .seccion-banner-ancho.invertido {
        flex-direction: column;
        min-height: 0;
    }

    .seccion-banner-ancho-imagen {
        width: 100%;
        min-height: 280px;
    }

    .seccion-banner-ancho-info,
    .seccion-banner-ancho.invertido .seccion-banner-ancho-info {
        width: 100%;
        padding: 2rem 1.6rem;
        background: linear-gradient(180deg, #1A2530 0%, #2A3B4C 100%);
    }
}

/* --------------------------------------------------------------------------
   GALERÍA DE TARJETAS A TODO EL ANCHO CON REVELADO AL PASAR EL PUNTERO
   La imagen ocupa toda la tarjeta; el título va abajo con su propio fondo.
   Al pasar el puntero: se tiñe de rojo y aparece la descripción + botón.
   -------------------------------------------------------------------------- */
.galeria-hover {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    width: 100%;
}

.tarjeta-hover {
    position: relative;
    display: block;
    min-height: 420px;
    overflow: hidden;
    isolation: isolate;
    text-decoration: none;
    color: inherit;
}

.tarjeta-hover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tarjeta-hover:hover img {
    transform: scale(1.08);
}

.tarjeta-hover-titulo {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 1.6rem 1.6rem 1.4rem;
    background: linear-gradient(to top, rgba(13, 13, 13, 0.85) 0%, rgba(13, 13, 13, 0) 100%);
    color: #ffffff;
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
    transition: opacity 0.3s ease;
}

.tarjeta-hover-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background-color: rgba(229, 9, 20, 0.93);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.tarjeta-hover:hover .tarjeta-hover-overlay {
    opacity: 1;
    visibility: visible;
}

.tarjeta-hover:hover .tarjeta-hover-titulo {
    opacity: 0;
}

.tarjeta-hover-overlay h3 {
    font-family: 'Poppins', 'Inter', sans-serif;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.tarjeta-hover-overlay p {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.4rem;
}

.btn-contraste {
    display: inline-block;
    background-color: #ffffff;
    color: #E50914;
    padding: 0.65rem 1.5rem;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-contraste:hover {
    background-color: #1A2530;
    color: #ffffff;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .tarjeta-hover-overlay {
        /* En pantallas táctiles no hay "hover" real: mostramos la
           descripción siempre visible sobre un degradado, sin depender
           del puntero */
        opacity: 1;
        visibility: visible;
        position: static;
        inset: auto;
        background-color: #1A2530;
        padding: 1.4rem;
    }

    .tarjeta-hover {
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .tarjeta-hover img {
        position: relative;
        height: 200px;
    }

    .tarjeta-hover-titulo {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   SECCIÓN "SÉ PARTE DE ESTA GRAN FAMILIA" - VERSIÓN NOSTÁLGICA
   -------------------------------------------------------------------------- */
.seccion-nostalgica {
    background-color: #EFE6D8;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(139, 94, 52, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(139, 94, 52, 0.08) 0%, transparent 45%);
    padding: 4.5rem 2rem;
    text-align: center;
}

.seccion-nostalgica-marco {
    display: inline-block;
    background-color: #ffffff;
    padding: 0.8rem 0.8rem 0.4rem;
    border-radius: 3px;
    box-shadow: 0 12px 25px rgba(76, 56, 27, 0.25);
    transform: rotate(-2deg);
    margin-bottom: 2.2rem;
}

.seccion-nostalgica-marco img {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    border-radius: 1px;
    filter: sepia(0.45) contrast(1.05) brightness(0.97);
}

.seccion-nostalgica-marco p {
    font-family: 'Poppins', 'Inter', sans-serif;
    color: #7A6647;
    font-size: 0.85rem;
    padding: 0.6rem 0.4rem 0.2rem;
    text-align: center;
}

.seccion-nostalgica h2 {
    font-family: 'Playfair Display', 'Poppins', serif;
    font-size: 2.3rem;
    font-weight: 800;
    color: #4A3B26;
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
}

.seccion-nostalgica p.texto-nostalgico {
    font-family: 'Playfair Display', 'Poppins', serif;
    font-style: italic;
    font-size: 1.15rem;
    color: #6B5A3E;
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.btn-nostalgico {
    display: inline-block;
    background-color: #8B5E34;
    color: #FFF8ED;
    padding: 0.9rem 2.1rem;
    border-radius: 3px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 6px 14px rgba(139, 94, 52, 0.35);
}

.btn-nostalgico:hover {
    background-color: #6E4A27;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .seccion-nostalgica h2 {
        font-size: 1.7rem;
    }
}

.card {
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    overflow: hidden;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1.2rem;
}

.card h3 {
    color: #1A2530;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.card p {
    color: #4A5568;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   SECCIÓN DE IMPACTO / CIFRAS
   -------------------------------------------------------------------------- */
.impacto {
    background-color: #1A2530;
    color: #ffffff;
    padding: 3.5rem 2rem;
}

.grid-impacto {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.dato-numero {
    font-size: 2.8rem;
    font-weight: 800;
    color: #E50914;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.grid-impacto p {
    font-weight: 600;
    font-size: 1.05rem;
    color: #E2E8F0;
}

/* --------------------------------------------------------------------------
   PIE DE PÁGINA (FOOTER)
   -------------------------------------------------------------------------- */
footer {
    margin-top: auto;
    background-color: #111827;
    color: #9CA3AF;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
    border-top: 1px solid #1F2937;
}

footer p {
    margin-bottom: 0.4rem;
}

/* --------------------------------------------------------------------------
   ENLACES LEGALES DEL FOOTER (Políticas de Uso, Aviso de Privacidad, etc.)
   -------------------------------------------------------------------------- */
.footer-legal {
    margin-top: 1.3rem;
    padding-top: 1.2rem;
    border-top: 1px solid #1F2937;
}

.footer-legal-titulo {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.7rem;
}

.footer-legal-links {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem 1.6rem;
}

.footer-legal-links a {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-legal-links a:hover {
    color: #E50914;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   CARRUSEL DE BENEFICIOS - Imagen a la izquierda / Info a la derecha,
   a todo el ancho de la pantalla, con degradado de transición al centro
   -------------------------------------------------------------------------- */
.beneficios-carousel {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    background-color: #1A2530;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.carousel-imagen {
    position: relative;
    width: 50%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* El degradado que hace la transición suave entre la imagen y el panel de color.
   Usamos varias paradas de color para que el desvanecido sea más gradual
   y no se note un salto brusco en el punto de unión */
.carousel-imagen::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 70%;
    background: linear-gradient(
        to right,
        rgba(26, 37, 48, 0) 0%,
        rgba(26, 37, 48, 0.35) 45%,
        rgba(26, 37, 48, 0.75) 75%,
        #1A2530 100%
    );
}

.carousel-info {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    /* Degradado HORIZONTAL (no diagonal): así el color del borde izquierdo
       es siempre #1A2530 sin importar la altura, y calza exactamente con
       el final del degradado de la imagen, sin dejar ninguna línea visible */
    background: linear-gradient(90deg, #1A2530 0%, #2A3B4C 100%);
    padding: 3rem 4rem;
}

.carousel-info-contenido {
    max-width: 480px;
}

.carousel-info-contenido span {
    display: inline-block;
    background-color: #E50914;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.carousel-info-contenido h3 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.carousel-info-contenido p {
    color: #E2E8F0;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Flechas de navegación */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.carousel-arrow:hover {
    background-color: #E50914;
    border-color: #E50914;
}

.carousel-prev {
    left: 1.5rem;
}

.carousel-next {
    right: 1.5rem;
}

/* Puntos indicadores de posición */
.carousel-dots {
    position: absolute;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 0.6rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease;
}

.carousel-dot.active {
    background-color: #E50914;
}

@media (max-width: 900px) {
    .beneficios-carousel {
        height: 640px;
    }

    .carousel-slide {
        flex-direction: column;
    }

    .carousel-imagen {
        width: 100%;
        height: 42%;
    }

    .carousel-imagen::after {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 65%;
        background: linear-gradient(
            to bottom,
            rgba(26, 37, 48, 0) 0%,
            rgba(26, 37, 48, 0.35) 45%,
            rgba(26, 37, 48, 0.75) 75%,
            #1A2530 100%
        );
    }

    .carousel-info {
        width: 100%;
        height: 58%;
        padding: 1.5rem 1.8rem;
        /* Degradado VERTICAL: el color de arriba es siempre #1A2530,
           igual al final del degradado de la imagen que está justo encima */
        background: linear-gradient(180deg, #1A2530 0%, #2A3B4C 100%);
    }

    .carousel-info-contenido h3 {
        font-size: 1.5rem;
    }

    .carousel-info-contenido p {
        font-size: 0.95rem;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* --------------------------------------------------------------------------
   DISEÑO ADAPTATIVO (RESPONSIVE) - OPTIMIZADO PARA MÓVILES
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .nav-container {
        /* Ya NO ponemos flex-direction: column aquí: logo y botón ☰
           se quedan en una sola fila para que el header sea compacto */
        padding: 0.5rem 1rem;
        position: relative;
    }

    header {
        border-bottom-width: 2px;
    }

    .logo img {
        height: 35px; /* Logo más compacto en celulares */
    }

    /* El botón hamburguesa solo aparece en móvil */
    .menu-toggle {
        display: block;
    }

    /* El menú se oculta por defecto y se abre como panel
       desplegable debajo del header (que es position: fixed,
       así que sirve como referencia para este position: absolute) */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background-color: #ffffff;
        border-top: 1px solid #E2E8F0;
        box-shadow: 0 8px 12px -6px rgba(0, 0, 0, 0.12);
        padding: 0.5rem 1rem 1rem 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.7rem 0.2rem;
        font-size: 1rem;
        border-bottom: 1px solid #F1F5F9;
    }

    .btn-donar {
        display: inline-block;
        margin-top: 0.6rem;
        text-align: center;
        padding: 0.6rem 0.8rem !important;
        font-size: 0.9rem !important;
    }

    .hero {
        margin-top: 65px; /* Margen superior reducido acorde al nuevo tamaño de la barra */
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}
/* --------------------------------------------------------------------------
   SECCIÓN DONACIÓN DE SANGRE - Fondo animado a todo el ancho, tarjetas
   estilo "vidrio" (glassmorphism) y elementos decorativos flotantes.
   -------------------------------------------------------------------------- */
.seccion-donacion {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 5rem 2rem 4.5rem;
    background: linear-gradient(-45deg, #8B0000, #E50914, #B90710, #E50914);
    background-size: 400% 400%;
    animation: donacionGradiente 14s ease infinite;
    color: #ffffff;
    text-align: center;
}

@keyframes donacionGradiente {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.donacion-gotas {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.donacion-gotas .gota {
    position: absolute;
    font-size: 2.4rem;
    opacity: 0.16;
    animation: gotaFlotante 9s ease-in-out infinite;
}

.gota.g1 { top: 10%; left: 6%; animation-delay: 0s; }
.gota.g2 { top: 62%; left: 90%; font-size: 3rem; animation-delay: 2.5s; }
.gota.g3 { top: 80%; left: 14%; font-size: 1.8rem; animation-delay: 5s; }
.gota.g4 { top: 18%; left: 80%; font-size: 2.1rem; animation-delay: 7.5s; }

@keyframes gotaFlotante {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-24px) rotate(10deg); }
}

.donacion-contenedor {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
}

.donacion-encabezado {
    max-width: 750px;
    margin: 0 auto 3rem;
}

.donacion-latido {
    display: inline-block;
    font-size: 2.6rem;
    margin-bottom: 0.8rem;
    animation: latido 1.6s ease-in-out infinite;
}

@keyframes latido {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.25); }
    30% { transform: scale(1); }
    45% { transform: scale(1.18); }
    60% { transform: scale(1); }
}

.donacion-encabezado h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.donacion-encabezado p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.95;
}

.donacion-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: 1.8rem;
    align-items: stretch;
    margin-bottom: 2.8rem;
}

.donacion-card {
    background-color: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    padding: 1.8rem 1.6rem;
    text-align: left;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.donacion-card:hover {
    transform: translateY(-6px);
    background-color: rgba(255, 255, 255, 0.2);
}

.donacion-card h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.donacion-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.donacion-card li {
    font-size: 0.95rem;
    line-height: 1.5;
    padding-left: 1.1rem;
    position: relative;
}

.donacion-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ffffff;
}

.donacion-imagen-wrap {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease;
}

.donacion-imagen-wrap:hover {
    transform: scale(1.02);
}

.donacion-imagen-wrap img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    display: block;
}

@media (max-width: 900px) {
    .donacion-grid {
        grid-template-columns: 1fr;
    }

    .donacion-imagen-wrap {
        order: -1;
    }

    .donacion-encabezado h2 {
        font-size: 1.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .seccion-donacion,
    .donacion-latido,
    .donacion-gotas .gota {
        animation: none !important;
    }
}
/* ==========================================================================
   NOTICIAS: CINTA EN MOVIMIENTO (index.html) Y PÁGINA noticias.html
   Los textos se editan en noticias-data.js
   ========================================================================== */

/* ---- Cinta ---- */
.cinta-noticias {
    display: flex;
    align-items: stretch;
    background-color: #1A2530;
    color: #ffffff;
    border-bottom: 4px solid #E50914;
    overflow: hidden;
}

.cinta-titulo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1.4rem;
    background-color: #E50914;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-decoration: none;
    position: relative;
    z-index: 2;
    box-shadow: 6px 0 12px rgba(0, 0, 0, 0.25);
}

.cinta-titulo:hover { background-color: #B90710; }

.cinta-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.cinta-pista {
    display: flex;
    width: max-content;
    animation: cintaMover 55s linear infinite;
}

.cinta-viewport:hover .cinta-pista,
.cinta-viewport:focus-within .cinta-pista {
    animation-play-state: paused;
}

.cinta-grupo { display: flex; flex: 0 0 auto; }

@keyframes cintaMover {
    from { transform: translateX(0); }
    to   { transform: translateX(-25%); } /* 4 copias del mismo grupo */
}

.cinta-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 2rem;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    transition: background-color 0.2s ease;
}

a.cinta-item:hover,
a.cinta-item:focus-visible { background-color: rgba(255, 255, 255, 0.1); outline: none; }

.cinta-tag {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.16);
}

.cinta-campana .cinta-tag { background-color: #E50914; }

.cinta-cuerpo { display: flex; flex-direction: column; line-height: 1.25; }
.cinta-cuerpo strong { font-size: 0.95rem; font-weight: 700; }
.cinta-fecha { font-size: 0.78rem; color: #CBD5E0; }

.cinta-estatica .cinta-viewport { overflow-x: auto; }
.cinta-estatica .cinta-pista { animation: none; }

@media (max-width: 640px) {
    .cinta-titulo { padding: 0 0.9rem; font-size: 0.75rem; }
    .cinta-titulo .cinta-titulo-icono { display: none; }
    .cinta-item { padding: 0.75rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .cinta-pista { animation: none; }
}

/* ---- Página de noticias ---- */
.noticias-seccion {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 3.5rem 2rem 1rem;
}

.noticias-intro {
    text-align: center;
    color: #4A5568;
    max-width: 640px;
    margin: -1.5rem auto 2.5rem;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.noticia-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.noticia-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.noticia-media {
    position: relative;
    height: 190px;
    background-color: #1A2530;
    overflow: hidden;
}

.noticia-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.noticia-media-color {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8B0000, #E50914);
}

.noticia-proximo .noticia-media-color { background: linear-gradient(135deg, #1A2530, #2C3E50); }

.noticia-icono { font-size: 3.2rem; }

.noticia-estado {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    background-color: rgba(17, 17, 17, 0.85);
    color: #ffffff;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.noticia-campana .noticia-estado { background-color: #E50914; }
.noticia-proximo .noticia-estado { background-color: #0056B3; }

.noticia-cuerpo { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.noticia-cuerpo h3 { color: #1A2530; font-size: 1.15rem; line-height: 1.3; margin: 0.6rem 0 0.4rem; }
.noticia-cuerpo p { color: #4A5568; font-size: 0.95rem; margin-bottom: 0.8rem; }
.noticia-cuerpo .noticia-fecha { color: #718096; font-size: 0.85rem; margin-bottom: 0.5rem; }

.noticia-etiqueta {
    align-self: flex-start;
    background-color: #1A2530;
    color: #ffffff;
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.noticia-campana .noticia-etiqueta { background-color: #E50914; }
.noticia-proximo .noticia-etiqueta { background-color: #0056B3; }

.noticia-enlace {
    margin-top: auto;
    color: #E50914;
    font-weight: 700;
    text-decoration: none;
}

.noticia-enlace:hover { text-decoration: underline; }

.noticias-vacio { text-align: center; color: #718096; }

@media (max-width: 640px) {
    .noticias-seccion { padding: 2.5rem 1.2rem 0.5rem; }
}

/* ---- Ajuste del menú de escritorio al sumar "Noticias" ---- */
@media (min-width: 769px) {
    .nav-links { gap: 1.3rem; }
    .nav-links a { white-space: nowrap; }
    .nav-container { gap: 1.2rem; }
    .btn-donar { padding-left: 1rem; padding-right: 1rem; }
}

@media (min-width: 769px) and (max-width: 1150px) {
    .nav-container { padding-left: 1rem; padding-right: 1rem; }
    .nav-links { gap: 0.8rem; }
    .nav-links a { font-size: 0.86rem; }
    .logo img { height: 42px; }
}
