/* ==========================================================================
    1. Variables Globales y Reset
   ========================================================================== */
:root {
    --primary-color: #008744;       
    --primary-dark: #006633;        
    --bg-light: #f8fafc;            
    --text-dark: #1e293b;           
    --text-muted: #64748b;          
    --white: #ffffff;               
    --footer-bg: #006633;           
    --whatsapp-color: #25d366;     
    --email-color: #ffffff;         
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {            
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   2. Cabecera (Header) y Buscador
   ========================================================================== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-sup {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.Buscar input {
    padding: 0.6rem 1.2rem;
    width: 280px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.Buscar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 135, 68, 0.15);
}

/* ==========================================================================
   3. Menú de Navegación Estilo Dropdown
   ========================================================================== */
.container-menu {
    background-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.MENU {
    max-width: 1400px;
    margin: 0 auto;
}

.nav-principal {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-principal > li {
    position: relative;
}

.nav-principal a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.nav-principal .menu-desplegable > a::after {
    content: '▼';
    font-size: 0.65rem;
    margin-left: 8px;
    display: inline-block;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.nav-principal .menu-desplegable:hover > a::after {
    transform: rotate(180deg);
}

.nav-principal > li > a:hover {
    background-color: var(--primary-dark);
}

.nav-principal ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    list-style: none;
    width: max-content;
    min-width: 260px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--primary-dark);
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: var(--transition-smooth);
    
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    z-index: 1000;
}

.nav-principal .menu-desplegable:hover ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-principal ul[style*="display: block"] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.nav-principal ul li a {
    color: #475569;
    padding: 0.9rem 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    white-space: nowrap;
}

.nav-principal ul li:last-child a {
    border-bottom: none;
}

.nav-principal ul li a:hover {
    background-color: #f8fafc;
    color: var(--primary-color);
    padding-left: 1.8rem; 
}

/* ==========================================================================
   4. Slider (Carrusel de Imágenes)
   ========================================================================== */
.contenido-principal {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 5%;
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 380px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    display: flex;                 
    flex-direction: row;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-media {
    width: 40%;
    height: 100%;
    background-color: #f1f5f9;
    overflow: hidden;
}

.imagen-principal {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-text {
    width: 60%;
    height: 100%;
    padding: 2rem 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
}

.slide-text p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #475569;
    text-align: left;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    color: var(--text-dark);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: var(--transition);
    z-index: 10;
    display: flex;              
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.prev-btn { left: 15px; }
.next-btn { right: 15px; }

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary-color);
    width: 20px;
    border-radius: 4px;
}
/* ==========================================================================
   5. Footer
   ========================================================================== */

.footer {
    border-top: 4px solid #2e7d32; /* Línea verde institucional */
    padding: 0.6rem 1rem;          /* Reduce la altura general del footer */
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.3rem 1rem;
}

/* Textos de la izquierda más compactos */
.footer-text {
    font-size: 0.85rem;
    margin: 0;
}

.footer-subtext {
    font-size: 0.78rem;
    margin: 0.15rem 0 0 0;
}

.footer-direccion {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Bloque de Contactos (Derecha) más pequeño y estilizado */
.footer-contactos {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-titulo-contacto {
    font-size: 0.9rem;
    margin: 0 0 0.35rem 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-icon-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem; /* Menos separación vertical entre WhatsApp y Email */
}

.contacto-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    font-size: 0.82rem; /* Texto más fino y pequeño */
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.contacto-link:hover {
    opacity: 0.85;
    transform: translateX(3px);
}

.icono-contacto {
    width: 1.3rem;  /* Íconos más pequeños (antes 1.9rem / 1.7rem) */
    height: 1.3rem;
    object-fit: contain;
    flex-shrink: 0;
}

/* Ajuste para pantallas de celulares */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 0.8rem;
    }

    .footer-contactos {
        align-items: center;
    }
}

/* ==========================================================================
   6. Ventanas Modales Estructuradas (USF, Dispensarios y Servicios)
   ========================================================================== */
.modal-centro {
    display: none; 
    position: fixed;
    z-index: 10000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-centro.mostrar-modal {
    display: flex;
}

.modal-contenido {
    background-color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: zoomModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomModal {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cerrar-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.cerrar-modal:hover {
    color: #ff3b30;
}

/* Estilos internos para los datos de USF y Dispensarios dentro del modal */
.modal-contenido h2 {
    color: var(--primary-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 0.5rem;
}

.modal-contenido p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #475569;
}

.modal-contenido a {
    color: #0051a8;
    text-decoration: underline;
    font-weight: 600;
}

/* --- CLASES DE DISEÑO ESPECÍFICAS PARA EL FLYER DE SERVICIOS (FARMACIA) --- */
.flyer-servicios h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.6rem;
}

.flyer-cuerpo {
    margin-top: 1rem;
}

.flyer-destacado {
    background-color: #f0fdf4;
    border-left: 4px solid var(--primary-color);
    padding: 0.8rem 1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: #166534 !important;
}

.flyer-seccion-medicamentos {
    margin: 1.2rem 0;
    padding: 0.5rem 0;
}

.flyer-horarios {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1.2rem;
    border-radius: 8px;
margin-top: 1rem;

}
.flyer-horarios h3 {
font-size: 1.1rem;
color: var(--text-dark);
margin-bottom: 0.8rem;
display: flex;
align-items: center;
gap: 5px;
}
.bloque-horario-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.5rem 0;
border-bottom: 1px dashed #e2e8f0;
}
.bloque-horario-item:last-child {
border-bottom: none;
}
.horario-dias {
font-weight: 600;
color: #475569;
}
.horario-horas {
font-weight: 700;
color: var(--primary-dark);
background-color: #e6f6ed;
padding: 0.2rem 0.6rem;
border-radius: 4px;
}
/* ==========================================================================
7. ADAPTACIÓN EXCLUSIVA PARA ENTORNO MÓVIL (TÁCTIL)
========================================================================== */
@media screen and (max-width: 768px) {
.header-sup {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
padding: 10px 5%;
}
.Buscar, .Buscar input {
width: 100%;
}
.Buscar input {
padding: 0.75rem 1.2rem;
font-size: 16px;
}
.nav-principal {
display: flex;
flex-direction: column;
width: 100%;
}
.nav-principal > li {
width: 100%;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-principal a {
padding: 1.2rem 1.5rem;
width: 100%;
}
.nav-principal .menu-desplegable > a::after {
content: ' ▼';
float: right;
transition: transform 0.3s ease;
}
.nav-principal .menu-desplegable.movil-abierto > a::after {
transform: rotate(180deg);
}
.nav-principal ul {
display: none;
position: static;
width: 100%;
box-shadow: none;
border-top: none;
border-radius: 0;
background-color: rgba(0, 0, 0, 0.05);
opacity: 1;
visibility: visible;
transform: none;
}
.nav-principal .menu-desplegable.movil-abierto > ul {
display: block !important;
}
.nav-principal ul li a {
color: var(--white);
padding: 1rem 2.5rem;
opacity: 0.9;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
white-space: normal;
}
.nav-principal ul li a:hover {
background-color: var(--primary-dark);
padding-left: 2.5rem;
color: var(--white);
}
.contenido-principal {
padding: 1rem;
}
.slider-container {
height: auto;
min-height: 400px;
}
.slide {
flex-direction: column;
}
.slide-media {
width: 100%;
height: 180px;
}
.slide-text {
width: 100%;
height: auto;
padding: 1.5rem;
}
/* Ajuste para que los textos en bloques de horarios queden legibles en pantallas muy chicas */
.bloque-horario-item {
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.horario-horas {
align-self: flex-start;
}
.footer-container {
flex-direction: column;
text-align: center;
gap: 1.5rem;
}
}
/* ==========================================================================
7. ADAPTACIÓN EXCLUSIVA PARA ENTORNO MÓVIL Y SOPORTE DE IMÁGENES
========================================================================== */
@media screen and (max-width: 768px) {
    .header-sup {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 10px 5%;
    }
    
    .Buscar, .Buscar input {
        width: 100%;
    }
    
    .Buscar input {
        padding: 0.75rem 1.2rem;
        font-size: 16px;
    }
    
    .nav-principal {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .nav-principal > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-principal a {
        padding: 1.2rem 1.5rem;
        width: 100%;
    }
    
    .nav-principal .menu-desplegable > a::after {
        content: ' ▼';
        float: right;
        transition: transform 0.3s ease;
    }
    
    .nav-principal .menu-desplegable.movil-abierto > a::after {
        transform: rotate(180deg);
    }
    
    .nav-principal ul {
        display: none;
        position: static;
        width: 100%;
        box-shadow: none;
        border-top: none;
        border-radius: 0;
        background-color: rgba(0, 0, 0, 0.05);
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .nav-principal .menu-desplegable.movil-abierto > ul {
        display: block !important;
    }
    
    .nav-principal ul li a {
        color: var(--white);
        padding: 1rem 2.5rem;
        opacity: 0.9;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        white-space: normal;
    }
    
    .nav-principal ul li a:hover {
        background-color: var(--primary-dark);
        padding-left: 2.5rem;
        color: var(--white);
    }
    
    .contenido-principal {
        padding: 1rem;
    }
    
    /* --- CORRECCIÓN CRÍTICA DEL SLIDER EN MÓVILES --- */
    .slider-container {
        height: 520px !important; /* Le damos una altura fija física para evitar que colapse */
        position: relative;
        overflow: hidden;
    }
    
    .slide {
        flex-direction: column !important; /* Apila imagen arriba y texto abajo */
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }
    
    .slide-media {
        width: 100% !important;
        height: 240px !important; /* Muestra la imagen de forma clara en el teléfono */
        display: block !important;
    }
    
    .imagen-principal {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .slide-text {
        width: 100% !important;
        height: 280px !important; /* Espacio exacto asignado para el texto informativo */
        padding: 1.5rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .slide-text p {
        font-size: 0.95rem;
        text-align: center;
        line-height: 1.5;
    }
    
    .bloque-horario-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .horario-horas {
        align-self: flex-start;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}
/* ==========================================================================
   Animación y Efectos Interactivos para el Logo
   ========================================================================== */
.logo a {
    display: inline-block;
    border-radius: 12px; /* Cambia a 50% si el logo es redondo */
    overflow: hidden;
    /* Combina la entrada inicial con un movimiento suave y continuo */
    animation: 
        entradaLogo 0.8s ease-out forwards,
        latidoSuave 3.5s ease-in-out 0.8s infinite;
    transition: box-shadow 0.35s ease, filter 0.35s ease;
}

.logo img {
    display: block;
}

/* Al pasar el mouse, se pausa el movimiento automático y resalta */
.logo a:hover {
    animation-play-state: paused;
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.4);
    filter: brightness(1.05);
}

/* Efecto al hacer clic */
.logo a:active {
    transform: scale(0.96);
}

/* 1. Aparición suave al cargar la página */
@keyframes entradaLogo {
    0% {
        opacity: 0;
        transform: translateY(-12px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 2. Movimiento continuo: flotación + ligero latido institucional */
@keyframes latidoSuave {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-4px) scale(1.03);
        box-shadow: 0 8px 16px rgba(46, 125, 50, 0.3);
    }
}


/* Estilo mejorado solo para los párrafos del slider */
.slider-container .slide-text p {
  font-family: 'Inter', sans-serif !important;
  font-weight: 400 !important;
  font-size: 1.05rem !important;
  line-height: 1.7 !important;
  letter-spacing: -0.01em !important;
  color: #1e293b !important;
  text-align: left !important;
  white-space: pre-line; /* Respeta los saltos de línea que ya pusiste en tu HTML */
}
/* Título de cada tarjeta (ej. "Entrega de Ambulancia Itauguá") */
.seccion-noticias h2,
.seccion-noticias h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

/* Tus párrafos exactos, con mejor tipografía e interlineado */
.seccion-noticias p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 1.7; /* Da aire entre líneas para que no se vea apretado */
  color: #334155;
  text-align: left;
}
.slider-container .slider-btn {
  display: none !important;
}
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dots .dot.active {
  background-color: #0284c7; /* Celeste institucional */
  width: 24px; /* Se alarga suavemente al estar activo */
  border-radius: 999px;
}
/* Estilo para la fecha o subtítulo debajo de cada opción del menú */
.subtitulo-menu {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 400;
    margin-top: 2px;
    line-height: 1.2;
}

/* Asegura que cada fila del desplegable quede compacta y sin separaciones grandes */
.nav-principal ul li {
    margin: 0;
    padding: 0;
}

.nav-principal ul li a {
    line-height: 1.3;
}
.texto-destacado-cursiva {
    font-style: italic;
    font-size: 0.92rem; /* Reduce un pelín el tamaño respecto al texto normal */
    line-height: 1.5;   /* Mantiene una lectura cómoda */
}
.slide {
    transition: opacity 0.8s ease-in-out;
}
