/* ==========================================================================
   1. CONFIGURACIÓN GLOBAL Y TIPOGRAFÍA
   ========================================================================== */
:root {
    --color-primary: #0d6efd;
    --color-dark: #212529;
    --color-light-bg: #f4f6f9;
    --color-border: #e9ecef;
    --font-main: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-light-bg);
    color: #444;
    overflow-x: hidden; /* Evita scroll horizontal indeseado en móviles */
}

/* Utilidad para espaciado de letras en títulos pequeños (ej. "DIRECTORIO") */
.ls-2 {
    letter-spacing: 2px;
}

/* Sombras de texto para mejor lectura sobre imágenes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.text-shadow-sm {
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* ==========================================================================
   2. HERO SECTION (PORTADA BING STYLE)
   ========================================================================== */
.hero-wrapper {
    position: relative;
    height: 85vh; /* Ocupa el 85% de la altura de la pantalla */
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333; /* Fondo de carga mientras llega la imagen */
}

/* La imagen de fondo se comporta como un cover */
.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar sin deformar */
    z-index: 0;
}

/* Capa oscura para que el texto blanco sea legible */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 60px; /* Compensa visualmente el centro */
}

/* ==========================================================================
   3. BOTONES "GLASSMORPHISM" (EFECTO CRISTAL)
   ========================================================================== */
.btn-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Soporte Safari */
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
    color: white;
    border-color: white;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   4. TARJETAS DE CATEGORÍAS
   ========================================================================== */
.cat-card {
    background: white;
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%; /* Asegura altura igual en la fila */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: #dee2e6;
}

.cat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

/* ==========================================================================
   5. TARJETAS DE NOTICIAS
   ========================================================================== */
.news-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Transición suave para la imagen de la noticia */
.news-card img {
    transition: transform 0.5s ease;
}

.news-card:hover img {
    transform: scale(1.05); /* Zoom sutil al pasar el mouse */
}

/* ==========================================================================
   6. PUBLICIDAD Y BANNERS (CLS OPTIMIZATION)
   ========================================================================== */
/* Clases genéricas para asegurar que las imágenes no salten */
.banner-img-mobile, .banner-img-pc {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   7. CLIENTES Y EMPRESAS (LOGO + NOMBRE)
   ========================================================================== */
.client-card-box {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 15px;
    height: 100%;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.client-card-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: #ced4da;
}

.client-logo-wrapper {
    height: 80px; /* Altura fija para alineación perfecta */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.client-img {
    max-height: 70px;
    max-width: 90%;
    object-fit: contain;
    filter: grayscale(100%); /* Efecto Blanco y Negro elegante */
    opacity: 0.7;
    transition: all 0.3s ease;
}

/* Al hacer hover en la tarjeta, el logo cobra vida */
.client-card-box:hover .client-img {
    filter: grayscale(0%);
    opacity: 1;
}

.client-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    line-height: 1.2;
    margin: 0;
}

.client-card-box:hover .client-name {
    color: var(--color-primary);
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
footer {
    background-color: #222;
    color: #aaa;
    padding-top: 60px;
    padding-bottom: 30px;
}

footer h5, footer h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
}

footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Iconos sociales en el footer */
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    margin-right: 5px;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--color-primary);
    transform: scale(1.1);
    text-decoration: none;
}

/* ==========================================================================
   9. ANIMACIONES
   ========================================================================== */
.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* ==========================================================================
   10. MEDIA QUERIES (AJUSTES ESPECÍFICOS)
   ========================================================================== */
@media (max-width: 768px) {
    .hero-content {
        padding-top: 20px;
    }
    
    .display-4 {
        font-size: 2.5rem; /* Título un poco más pequeño en móvil */
    }
    
    .lead {
        font-size: 1.1rem;
    }
}
/* Efecto de elevación suave para las tarjetas */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-3px); /* Sube un poco */
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important; /* Sombra más fuerte */
    background-color: #f8f9fa; /* Cambio sutil de fondo */
}