/* =========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================= */
:root {
    /* Colores DREMH PASCO */
    --primary-color: #e65100;  /* Naranja Institucional */
    --accent-color: #f39c12;   /* Amarillo/Dorado */
    
    /* CORRECCIÓN: Color Secundario ahora es Negro/Gris muy oscuro, NO AZUL */
    --secondary-color: #222222; 
    
    /* CORRECCIÓN: Textos en Negro Neutro */
    --text-dark: #111111;      /* Negro casi puro para títulos y enlaces */
    --text-light: #ecf0f1;
    --white: #ffffff;
    --bg-light: #f4f6f8;

    /* Efectos */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.08); /* Sombra negra suave, no azul */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* CORRECCIÓN: Evita que el menú fijo tape el título al hacer clic en un enlace */
    scroll-padding-top: 90px; 
}

/* CORRECCIÓN: Ocultar los íconos sociales móviles en la versión de escritorio */
.mobile-socials {
    display: none;
}
body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-light);
    color: #444; /* Texto de párrafos gris oscuro neutro */
    line-height: 1.6;
}
/* =========================================
   2. PRELOADER: CUBO 3D GIRATORIO
   ========================================= */
#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--white);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

/* Contenedor del cubo */
.spinner {
    width: 50px;
    height: 50px;
    position: relative;
    transform-style: preserve-3d; /* Clave para el 3D */
    animation: rotateCube 2s infinite linear;
}

/* Las caras del cubo (usa los 6 divs de tu HTML) */
.spinner div {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(230, 81, 0, 0.8); /* Naranja semitransparente */
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(230, 81, 0, 0.5);
}

/* Posicionar cada cara en 3D */
.spinner div:nth-child(1) { transform: rotateY(0deg) translateZ(25px); }
.spinner div:nth-child(2) { transform: rotateY(90deg) translateZ(25px); }
.spinner div:nth-child(3) { transform: rotateY(180deg) translateZ(25px); }
.spinner div:nth-child(4) { transform: rotateY(-90deg) translateZ(25px); }
.spinner div:nth-child(5) { transform: rotateX(90deg) translateZ(25px); }
.spinner div:nth-child(6) { transform: rotateX(-90deg) translateZ(25px); }

@keyframes rotateCube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* =========================================
   3. BARRA DE NAVEGACIÓN (Corrección: Letras Negras al bajar)
   ========================================= */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    /* ESTADO INICIAL: Transparente y letras Blancas */
    background: transparent; 
    box-shadow: none; 
    border-bottom: 1px solid rgba(255,255,255,0.1);
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- ESTADO SCROLLED (Cuando bajas) --- */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98); /* Fondo Blanco */
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); /* Sombra negra suave */
    padding: 10px 0;
    /* Línea naranja abajo */
    border-bottom: 3px solid var(--primary-color);
}

.container.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo img {
    height: 55px;
    width: auto;
    object-fit: contain;
    transition: 0.3s;
}

/* TEXTO DEL LOGO */
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

/* Inicio: Blanco */
.logo-text .title {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--white); 
    letter-spacing: 1px;
    transition: color 0.3s;
}

.logo-text .subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    font-weight: 700;
    letter-spacing: 2px;
    transition: color 0.3s;
}

/* Al bajar: NEGRO y Naranja (Ya no azul) */
#navbar.scrolled .logo-text .title { color: var(--primary-color); /* Naranja */ }
#navbar.scrolled .logo-text .subtitle { color: #333; /* Negro suave */ }

/* ENLACES DEL MENÚ */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    /* Inicio: Blanco */
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Al bajar: NEGRO (Corrección de palabras azules) */
#navbar.scrolled .nav-links a {
    color: #111111; /* Negro puro */
    text-shadow: none;
}

/* Efecto hover (Subrayado Naranja) */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-color); /* Naranja al pasar el mouse */
}

/* MENÚ MÓVIL (Hamburguesa) */
.menu-toggle { 
    display: none; 
    color: var(--white); 
    font-size: 1.5rem; 
    cursor: pointer; 
    transition: color 0.3s;
}

#navbar.scrolled .menu-toggle { color: #111; /* Negro al bajar */ }
/* =========================================
   4. HERO (INICIO)
   ========================================= */
.hero {
    height: 100vh;
    background: url('img/mina.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding-top: 80px;
}

/* Overlay Naranja/Oscuro para identidad */
.overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Gradiente de Negro a Naranja oscuro */
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.8), rgba(230, 81, 0, 0.6));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 30px;
    animation: fadeInUp 1s ease-out;
}

.badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 20px;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 25px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.text-gradient {
    color: var(--accent-color); /* Dorado/Naranja claro */
    background: none;
    -webkit-text-fill-color: initial; /* Reseteamos para que se vea el color sólido brillante */
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 35px;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-socials {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero-socials a {
    width: 45px; height: 45px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.hero-socials a:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* =========================================
   5. SECCIONES Y GLASSMORPHISM
   ========================================= */
.section { padding: 100px 0; }
.bg-light { background-color: var(--bg-light); }
.bg-white { background-color: var(--white); }
.bg-gradient { background: linear-gradient(180deg, var(--white) 0%, #fff3e0 100%); } /* Fondo cálido suave */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.5rem; color: var(--secondary-color); font-weight: 800; }
.line { width: 70px; height: 4px; background: var(--primary-color); margin: 15px auto; }

/* Grid */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.grid-2-center { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 40px; }

/* Glass Cards */
.glass {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 35px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* Decoración lateral naranja */
.glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.glass:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.glass:hover::before { opacity: 1; }

/* =========================================
   6. PRINCIPIOS (CARDS) - ALTO IMPACTO "WOW"
   ========================================= */
.card {
    background: var(--white);
    padding: 45px 30px; /* Más espacio interno para elegancia */
    border-radius: 20px;
    text-align: center;
    position: relative;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efecto rebote suave */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); /* Sombra sutil inicial */
    border-bottom: 5px solid transparent; /* Borde invisible listo para aparecer */
    z-index: 1;
    overflow: hidden;
}

/* Efecto de fondo sutil al pasar el mouse */
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Un gradiente muy suave naranja/blanco */
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(230, 81, 0, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

/* ESTADO HOVER (AL PASAR EL MOUSE) */
.card:hover {
    transform: translateY(-15px) scale(1.02); /* Se eleva y crece un poco */
    box-shadow: 0 25px 50px rgba(0, 42, 84, 0.15); /* Sombra profunda */
    border-bottom-color: var(--primary-color); /* Línea naranja abajo */
}

.card:hover::before { opacity: 1; }

/* --- ICONOS DE ALTO IMPACTO --- */
.icon-box {
    width: 90px; 
    height: 90px;
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    margin: 0 auto 35px;
    font-size: 2.5rem;
    color: var(--white);
    position: relative;
    /* Gradiente vibrante por defecto */
    background: linear-gradient(135deg, var(--primary-color), #ff9800);
    box-shadow: 0 15px 35px rgba(230, 81, 0, 0.3); /* Resplandor del color del icono */
    transition: all 0.5s ease;
}

/* Anillo de energía detrás del icono */
.icon-box::after {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    top: 0; left: 0;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.card:hover .icon-box {
    transform: scale(1.1) rotate(5deg); /* Crece y gira un poco */
    box-shadow: 0 20px 50px rgba(230, 81, 0, 0.5); /* Resplandor más fuerte */
}

.card:hover .icon-box::after {
    opacity: 1;
    transform: scale(1.4); /* El anillo se expande hacia afuera */
    border-color: rgba(230, 81, 0, 0.1); /* Se desvanece al expandirse */
}

/* Variaciones de color para que cada tarjeta brille en su tono */
.blue { background: linear-gradient(135deg, #0277bd, #4fc3f7); box-shadow: 0 10px 25px rgba(2, 119, 189, 0.3); }
.card:hover .blue { box-shadow: 0 20px 40px rgba(2, 119, 189, 0.5); }

.red { background: linear-gradient(135deg, #c62828, #ef5350); box-shadow: 0 10px 25px rgba(198, 40, 40, 0.3); }
.card:hover .red { box-shadow: 0 20px 40px rgba(198, 40, 40, 0.5); }

.green { background: linear-gradient(135deg, #2e7d32, #66bb6a); box-shadow: 0 10px 25px rgba(46, 125, 50, 0.3); }
.card:hover .green { box-shadow: 0 20px 40px rgba(46, 125, 50, 0.5); }

/* --- TIPOGRAFÍA --- */
.card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    transition: color 0.3s;
}

/* Subrayado animado */
.card h3::after {
    content: '';
    display: block;
    width: 0;
    height: 4px;
    background: var(--primary-color);
    margin: 8px auto 0;
    transition: width 0.4s ease;
    border-radius: 2px;
}

.card:hover h3 { color: var(--primary-color); }
.card:hover h3::after { width: 100%; } /* El subrayado crece de 0 a 100% */

.card p {
    font-size: 1rem;
    color: #546e7a; /* Gris azulado moderno */
    line-height: 1.7;
}
/* =========================================
   7. GALERÍA (Slider) - Altura Reducida
   ========================================= */
.section-header.flex-between {
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end;
}

.gallery-slider {
    display: flex; 
    gap: 20px; 
    overflow-x: auto;
    padding: 20px 5px; 
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.gallery-slider::-webkit-scrollbar { display: none; }

.gallery-item {
    min-width: 300px; 
    height: 300px; /* <--- CAMBIO: Altura reducida de 420px a 300px */
    border-radius: 12px; 
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.gallery-item img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-overlay {
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%;
    padding: 15px 20px; /* Padding un poco más pequeño */
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--white);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay { transform: translateY(0); }

/* Botones de navegación de la galería */
.gallery-nav {
    display: flex;
    gap: 10px;
}

.gallery-nav button {
    width: 40px; 
    height: 40px;
    border: 2px solid var(--text-dark);
    border-radius: 50%; 
    background: transparent;
    cursor: pointer; 
    transition: 0.3s;
    font-size: 1rem; 
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* =========================================
   8. EQUIPO (Team) - Botones Mejorados
   ========================================= */
.team-card { 
    padding: 0 !important; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: var(--shadow-soft);
}

.team-img { 
    height: 350px; 
    position: relative; 
    overflow: hidden; 
}

.team-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: top center;
    transition: transform 0.6s ease;
}

.team-card:hover .team-img img { 
    transform: scale(1.05); 
}

.role-badge {
    position: absolute; 
    top: 20px; 
    right: 20px;
    background: var(--primary-color); 
    color: var(--white);
    padding: 6px 15px; 
    border-radius: 30px;
    font-size: 0.7rem; 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Overlay oscuro al pasar el mouse */
.team-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    /* Gradiente Naranja a Oscuro */
    background: linear-gradient(to top, rgba(230, 81, 0, 0.95), rgba(0, 0, 0, 0.6));
    display: flex; 
    justify-content: center; 
    align-items: center;
    opacity: 0; 
    transition: all 0.4s ease;
    backdrop-filter: blur(2px);
}

.team-card:hover .team-overlay { 
    opacity: 1; 
}

/* --- NUEVOS ESTILOS PARA LOS BOTONES --- */
.team-actions { 
    display: flex; 
    flex-direction: column; /* Uno encima del otro para mejor clic en móvil */
    gap: 15px; 
    width: 80%; /* Ancho controlado */
}

.btn-action {
    background: var(--white); 
    color: var(--primary-color);
    border: none; 
    padding: 12px 25px; 
    border-radius: 50px; /* Forma de píldora */
    font-weight: 700; 
    font-size: 0.9rem;
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Iconos dentro del botón */
.btn-action i {
    font-size: 1.1rem;
    color: var(--accent-color); /* Icono dorado/amarillo */
    transition: 0.3s;
}

/* Efecto Hover (Al pasar el mouse) */
.btn-action:hover {
    background: var(--primary-color); 
    color: var(--white);
    transform: translateY(-5px) scale(1.02); /* Se eleva y crece un poco */
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.btn-action:hover i {
    color: var(--white); /* El icono se vuelve blanco */
}
/* --------------------------------------- */

.team-info { 
    padding: 25px; 
    text-align: center; 
    background: var(--white); 
    position: relative;
    z-index: 5;
}

.team-info h3 { 
    font-size: 1.2rem; 
    color: var(--secondary-color); 
    font-weight: 800; 
    margin-bottom: 5px; 
}

.team-role { 
    color: var(--primary-color); 
    font-weight: 600; 
    font-size: 0.85rem; 
    margin-bottom: 15px; 
    display: block; 
    text-transform: uppercase;
}

.team-contact-data { 
    border-top: 1px solid rgba(0,0,0,0.05); 
    padding-top: 15px; 
}

.contact-row {
    display: flex; 
    justify-content: center; 
    align-items: center;
    gap: 8px;
    color: #666; 
    font-size: 0.85rem; 
    margin-bottom: 8px;
}

.contact-row i { 
    color: var(--primary-color); 
    font-size: 1rem;
}
/* =========================================
   9. MUSEO Y VIDEO
   ========================================= */
.museum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.info-icon {
    width: 60px; height: 60px;
    background: rgba(230, 81, 0, 0.1);
    border-radius: 12px; color: var(--primary-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}
.museum-map iframe { width: 100%; height: 400px; border-radius: 12px; border: 4px solid var(--white); box-shadow: var(--shadow-soft); }

.video-wrapper {
    position: relative; padding-bottom: 56.25%; height: 0;
    overflow: hidden; border-radius: 12px; background: #000;
}
.video-wrapper iframe, .video-wrapper video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* =========================================
   10. ÁREAS (Competencias) - Estructura Alineada
   ========================================= */
/* Ajuste de grids para asegurar alturas iguales */
.grid-3, .grid-2-center {
    align-items: stretch; /* Estira las tarjetas para igualar alturas */
}

/* Tarjeta contenedora */
.area-card {
    display: flex;          /* Activamos Flexbox */
    flex-direction: column; /* Dirección vertical */
    height: 100%;           /* Ocupa toda la altura de la fila */
    text-align: left;
    padding: 35px 30px;
    border-bottom: 5px solid transparent;
    background: var(--white);
    border-radius: 15px;
    /* Efecto Glass sutil si se quita la clase .glass, o refuerzo */
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

/* Efecto Hover: Sube y muestra el color abajo */
.area-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    /* El color del borde se define más abajo por tipo */
}

/* Icono Centrado */
.area-icon {
    width: 70px; 
    height: 70px;
    border-radius: 12px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: var(--white);
    font-size: 1.8rem;
    margin: 0 auto 20px; /* Centrado horizontalmente */
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* Título Centrado */
.area-card h3 {
    text-align: center;
    color: var(--secondary-color);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Descripción */
.area-desc {
    text-align: center;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Lista de items: Ocupa el espacio disponible para empujar el botón */
.area-list {
    list-style: none;
    margin-bottom: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.05);
    flex-grow: 1; /* CLAVE: Esto empuja el botón hacia abajo */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.area-list li {
    font-size: 0.9rem;
    color: var(--text-dark);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.area-list li i {
    color: var(--primary-color); /* Check naranja/corporativo */
    margin-top: 4px;
    font-size: 0.85rem;
}

/* Botón Alineado al Fondo */
.btn-full {
    display: block;
    width: 100%;
    padding: 14px;
    text-align: center;
    border-radius: 50px; /* Estilo píldora consistente con el equipo */
    text-decoration: none;
    color: var(--white);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: 0.3s;
    margin-top: auto; /* Asegura doblemente que se pegue al fondo */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-full:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* --- COLORES POR ÁREA (Iconos, Bordes y Botones) --- */

/* Minería (Naranja DREMH) */
.border-orange:hover { border-bottom-color: #e65100; }
.bg-orange, .area-card.border-orange .btn-full { background: #e65100; }

/* Hidrocarburos (Azul) */
.border-blue:hover { border-bottom-color: #0277bd; }
.bg-blue, .area-card.border-blue .btn-full { background: #0277bd; }

/* Electricidad (Amarillo/Dorado) */
.border-yellow:hover { border-bottom-color: #fbc02d; }
.bg-yellow, .area-card.border-yellow .btn-full { background: #fbc02d; color: #333; /* Texto oscuro para contraste */ }
.area-card.border-yellow .btn-full:hover { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }

/* Ambiental (Verde) */
.border-green:hover { border-bottom-color: #2e7d32; }
.bg-green, .area-card.border-green .btn-full { background: #2e7d32; }

/* Fiscalización (Rojo) */
.border-red:hover { border-bottom-color: #c62828; }
.bg-red, .area-card.border-red .btn-full { background: #c62828; }
/* =========================================
   11. FOOTER
   ========================================= */
footer {
    background: var(--secondary-color); /* Fondo oscuro elegante */
    color: var(--white);
    padding: 80px 0 0;
    position: relative;
}
footer::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 6px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 60px; }

.footer-info .logo-text .title { font-size: 1.4rem; color: var(--white); }
.footer-info .logo-text .subtitle { color: var(--primary-color); font-weight: 700; }

.social-links a {
    width: 40px; height: 40px; background: rgba(255,255,255,0.1);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--white); transition: 0.3s; text-decoration: none;
}
.social-links a:hover { background: var(--primary-color); }

footer h4 { margin-bottom: 25px; color: var(--white); text-transform: uppercase; letter-spacing: 1px; font-size: 1.1rem; }

.footer-links a { color: #bdc3c7; display: block; margin-bottom: 12px; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: var(--primary-color); padding-left: 5px; }

.footer-contact-list li { display: flex; gap: 15px; margin-bottom: 15px; color: #bdc3c7; }
.footer-contact-list i { color: var(--primary-color); font-size: 1.1rem; }

.footer-bottom {
    background: rgba(0,0,0,0.2); padding: 25px 0;
    display: flex; justify-content: space-between; align-items: center;
    color: #7f8c8d; font-size: 0.9rem;
}
/* =========================================
   12. RESPONSIVE / MÓVIL (CORREGIDO)
   ========================================= */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 3rem; }
}

/* =========================================
   CORRECCIONES RESPONSIVE (MÓVIL)
   Pega esto al final de style.css
   ========================================= */

/* 1. EVITAR DESBORDAMIENTO HORIZONTAL (Que se salga de la pantalla) */
html, body {
    overflow-x: hidden; /* Corta cualquier cosa que se salga a los lados */
    width: 100%;
    position: relative;
}

/* 2. HACER QUE MAPAS Y VIDEOS SEAN ELÁSTICOS */
/* Esto arregla el mapa del museo que tiene width="600" fijo */
iframe, video, .video-wrapper {
    max-width: 100% !important; /* Nunca más ancho que la pantalla */
    height: auto;
}

/* 3. AJUSTES DEL MENÚ EN CELULAR */
@media (max-width: 768px) {
    
    /* El contenedor del menú (nav-links) */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Escondido a la derecha */
        height: 100vh;
        width: 80%;   /* Que ocupe el 80% de la pantalla */
        background-color: #fff; /* Fondo blanco */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease;
        z-index: 1000; /* Por encima de todo */
        box-shadow: -5px 0 15px rgba(0,0,0,0.1); /* Sombra para que se note */
        padding-top: 60px; /* Espacio para que no se pegue arriba */
    }

    /* Clase para cuando el menú está abierto */
    .nav-links.active {
        right: 0; /* Lo trae a la pantalla */
    }

    /* Estilo de los enlaces en el menú móvil */
    .nav-links li {
        margin: 20px 0;
        width: 100%; /* Para que el clic sea más fácil */
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
        color: #333 !important; /* Texto oscuro para que se lea sobre blanco */
        display: block;
    }

    /* Botón Hamburguesa */
    .menu-toggle {
        display: block;
        font-size: 1.8rem;
        cursor: pointer;
        z-index: 1001; /* Más arriba que el menú para poder cerrarlo */
        color: #333; /* Color oscuro por defecto */
        position: absolute; /* Asegura posición */
        right: 20px;
        top: 20px;
    }

    /* Ocultar botón contacto extra del header */
    .nav-container .btn {
        display: none; 
    }
}

/* 4. CORRECCIÓN DE TARJETAS Y CONTENEDORES */
@media (max-width: 480px) {
    /* Ajustar títulos grandes */
    .hero h1 {
        font-size: 2rem !important;
    }
    
    /* Reducir padding en tarjetas para ganar espacio */
    .card, .glass, .team-card {
        padding: 20px !important;
    }

    /* Galería: evitar que las fotos sean más anchas que el cel */
    .gallery-item {
        min-width: 90vw; /* 90% del ancho de la pantalla */
    }

    /* Botones del slider más pequeños */
    .gallery-nav button {
        width: 30px;
        height: 30px;
    }
}

/* =========================================
   CORRECCIONES FINALES MÓVIL (EQUIPO, ÁREAS, GALERÍA)
   ========================================= */

@media (max-width: 768px) {

    /* --- 1. CORRECCIÓN DE GRILLAS (ÁREAS Y EQUIPO) --- */
    /* Esto hace que las tarjetas se pongan una debajo de otra y no se aplasten */
    .grid-3, 
    .grid-4, 
    .grid-2-center,
    .museum-grid,
    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 30px; /* Espacio entre tarjetas */
        width: 100%;
    }

    /* --- 2. CORRECCIÓN DE LA TARJETA DE EQUIPO (FOTO) --- */
    /* Ocultamos la capa naranja con botones sobre la foto para que se vea la cara */
    .team-card .team-overlay {
        display: none !important; 
    }
    
    /* Ajustamos la imagen para que se vea completa */
    .team-img {
        height: 300px; /* Un poco menos alto en celular */
    }
    
    .team-img img {
        object-position: top center; /* Asegura que no se corte la cabeza */
    }

    /* --- 3. CORRECCIÓN DE FLECHAS DE GALERÍA --- */
    /* Centramos las flechas y las hacemos más grandes para el dedo */
    .section-header.flex-between {
        flex-direction: column; /* Título arriba, flechas abajo */
        align-items: flex-start;
        gap: 15px;
    }

    .gallery-nav {
        width: 100%;
        justify-content: flex-end; /* Alineadas a la derecha o center según gusto */
        margin-top: -10px;
        margin-bottom: 20px;
    }

    .gallery-nav button {
        width: 50px; /* Más grandes */
        height: 50px;
        font-size: 1.2rem;
        background-color: var(--white); /* Fondo blanco para que resalten */
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    /* --- 4. CORRECCIÓN GENERAL DE DESBORDAMIENTO --- */
    /* Esto arregla la barra extraña a la izquierda */
    .container {
        padding: 0 20px; /* Asegura margen a los lados */
        width: 100%;
        overflow-x: hidden;
    }
    
    .section {
        padding: 60px 0; /* Menos espacio vertical en celular */
    }
}

/* =========================================
   ESTILOS FALTANTES: BOTONES (HERO Y NAV)
   ========================================= */

/* 1. Estilo Base para todos los botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espacio entre texto y flecha */
    padding: 12px 35px;
    border-radius: 50px; /* Bordes redondos tipo píldora */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    font-size: 0.9rem;
    border: 2px solid transparent; /* Prepara el borde */
}

/* 2. Estilo específico "Outline" (Borde Blanco) para el Hero */
.btn-outline {
    background: transparent; /* Fondo transparente */
    border-color: #ffffff;   /* Borde blanco */
    color: #ffffff;          /* Texto blanco */
}

/* Efecto al pasar el mouse (Se vuelve naranja) */
.btn-outline:hover {
    background: var(--primary-color); /* Fondo naranja */
    border-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-3px); /* Se eleva un poco */
    box-shadow: 0 10px 20px rgba(230, 81, 0, 0.4); /* Sombra naranja brillante */
}

/* Animación de la flechita */
.btn-outline:hover i {
    transform: translateX(5px); /* La flecha se mueve a la derecha */
    transition: transform 0.3s;
}

/* 3. Estilo extra para el botón "Contacto" del menú (Por si acaso se ve mal) */
.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background: #ffffff;
    color: var(--primary-color);
}

.btn-sm {
    padding: 8px 25px; /* Más pequeño para el menú */
    font-size: 0.8rem;
}

/* =========================================
   CENTRAR FLECHAS DE GALERÍA EN MÓVIL
   ========================================= */
@media (max-width: 768px) {
    /* 1. Contenedor de las flechas centrado */
    .gallery-nav {
        display: flex;
        justify-content: center !important; /* Fuerza la alineación al centro */
        width: 100%;
        margin-top: 15px; /* Un poco de espacio arriba para que no se pegue al texto */
        margin-bottom: 20px; /* Espacio abajo */
    }

    /* 2. Opcional: Centrar también el título "Galería Institucional" */
    /* Si quieres que TODO el encabezado de la sección esté centrado, usa esto: */
    .section-header.flex-between {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }
}

/* =========================================
   MEJORA DE IMÁGENES DE GALERÍA EN MÓVIL
   ========================================= */
@media (max-width: 768px) {
    .gallery-item {
        /* 1. Ancho cómodo: 85% de la pantalla para invitar a deslizar */
        min-width: 85vw !important; 
        
        /* 2. Altura automática basada en proporción (evita recortes feos) */
        height: auto !important; 
        aspect-ratio: 4/3; /* Proporción rectangular estándar de fotografía */
        
        /* Opcional: Si sientes que son muy altas, prueba aspect-ratio: 16/9; */
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Rellena el cuadro sin estirar la foto */
    }
}

/* =========================================
   MEJORA TOTAL DEL FOOTER (PREMIUM)
   ========================================= */

/* --- ESTILOS GENERALES Y MONITOR --- */
footer {
    background: linear-gradient(to bottom, #1a1a1a, #0d0d0d); /* Fondo oscuro con profundidad */
    color: #ecf0f1;
    padding-top: 70px;
    font-size: 0.95rem;
    position: relative;
    border-top: none;
    z-index: 10;
}

/* Línea superior con gradiente animado */
footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: gradientMove 4s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* GRILLA DESKTOP */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255,255,255,0.05); /* Línea separadora sutil */
}

/* Títulos con detalle subrayado */
footer h4 {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    letter-spacing: 1px;
}

footer h4::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Efecto: El subrayado crece al pasar el mouse sobre la columna */
.footer-col:hover h4::after {
    width: 100%;
}

/* Enlaces con efecto deslizante */
.footer-links a {
    color: #b0bec5;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 0px; /* Empiezan pegados */
    transition: all 0.3s ease;
    width: fit-content;
}

/* Pequeña flecha invisible que aparece al pasar el mouse */
.footer-links a::before {
    content: '\f0da'; /* Código de flecha FontAwesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    margin-right: 0px;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px; /* Se mueve un poco */
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.footer-links a:hover::before {
    opacity: 1;
    transform: translateX(0);
    margin-right: 8px; /* Hace espacio para la flecha */
}

/* Redes Sociales Circulares */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.social-links a {
    width: 42px; height: 42px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Rebote suave */
}

.social-links a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px rgba(230, 81, 0, 0.5); /* Resplandor naranja */
}

/* Contacto */
.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    color: #b0bec5;
    line-height: 1.4;
}

.footer-contact-list i {
    color: var(--primary-color);
    font-size: 1.1rem;
    background: rgba(230, 81, 0, 0.1); /* Fondo naranja muy suave */
    padding: 10px;
    border-radius: 50%;
    margin-top: -5px;
}

/* Barra inferior de Copyright */
.footer-bottom {
    padding: 25px 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #78909c;
    border-top: none; 
}

/* --- ESTILOS EXCLUSIVOS PARA MÓVIL (CELULAR) --- */
@media (max-width: 768px) {
    footer {
        padding-top: 50px;
        text-align: center; /* Centrar todo el texto */
    }

    .footer-grid {
        display: flex;
        flex-direction: column; /* Uno debajo del otro */
        gap: 50px; /* Más espacio entre secciones */
        padding-bottom: 30px;
    }

    /* Centrar títulos y subrayados */
    footer h4::after {
        left: 50%;
        transform: translateX(-50%); /* Centrar la línea naranja */
    }

    /* Enlaces centrados y fáciles de tocar */
    .footer-links a {
        justify-content: center;
        padding: 10px 0; /* Zona de toque más grande */
        font-size: 1rem;
        background: rgba(255,255,255,0.02); /* Fondo muy sutil para separar */
        margin-bottom: 8px;
        border-radius: 8px;
        width: 100%; /* Botón ancho completo */
        text-decoration: none;
    }

    .footer-links a::before {
        display: none; /* Quitamos la flecha en móvil para limpieza */
    }

    /* Redes sociales centradas */
    .social-links {
        justify-content: center;
    }

    /* Lista de contacto centrada y con iconos grandes */
    .footer-contact-list li {
        flex-direction: column; /* Icono arriba, texto abajo */
        align-items: center;
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .footer-contact-list i {
        font-size: 1.5rem; /* Iconos más visibles */
        margin-top: 0;
    }

    /* Copyright apilado */
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 40px;
    }
}

/* =========================================
   ESTILO PREMIUM: MUSEO EN MÓVIL
   ========================================= */
@media (max-width: 768px) {
    
    /* 1. Reorganizar la estructura: Texto arriba, Mapa abajo */
    .museum-grid {
        display: flex;
        flex-direction: column;
        gap: 40px; /* Más espacio entre el texto y el mapa */
    }

    /* 2. Estilizar el texto principal para que se lea fácil */
    .museum-info {
        text-align: center; /* Todo centrado */
        background: #fff;
    }

    .museum-info h3 {
        font-size: 1.6rem;
        margin-bottom: 20px;
        color: var(--secondary-color);
    }

    .museum-info p {
        font-size: 0.95rem;
        padding: 0 10px; /* Margen para que no toque los bordes */
        margin-bottom: 30px;
    }

    /* 3. Transformar la lista de datos (Horario, Dirección) en "Tarjetas" */
    .info-list {
        display: flex;
        flex-direction: column;
        gap: 15px; /* Espacio entre tarjetas */
    }

    .info-item {
        background-color: #f8f9fa; /* Fondo gris muy suave */
        border: 1px solid rgba(0,0,0,0.05);
        border-radius: 12px;
        padding: 20px;
        display: flex;
        flex-direction: column; /* Icono arriba, texto abajo */
        align-items: center;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0,0,0,0.02); /* Sombra sutil */
        transition: transform 0.3s;
    }

    /* Iconos más atractivos */
    .info-icon {
        background-color: var(--white);
        box-shadow: 0 4px 10px rgba(230, 81, 0, 0.15); /* Sombra naranja suave */
        width: 55px;
        height: 55px;
        margin-bottom: 15px; /* Separar del texto */
        font-size: 1.3rem;
    }

    .info-item h4 {
        margin-bottom: 5px;
        font-size: 1rem;
        color: var(--secondary-color);
    }

    /* 4. Mejorar el Mapa */
    .museum-map iframe {
        height: 300px !important; /* Altura cómoda para celular */
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    /* 5. Separar y embellecer el Video */
    .museum-video-container {
        margin-top: 20px;
        padding: 0 5px;
    }

    .video-card {
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    }
    
    .video-info {
        padding: 20px;
        text-align: center;
        background: var(--white);
    }
}

/* =========================================
   CORRECCIONES VISUALES FINALES
   (Redes Sociales y Listas del Footer)
   ========================================= */

/* 1. QUITAR LÍNEA DEBAJO DE LOS ÍCONOS DE REDES SOCIALES */
/* Esto asegura que ningún ícono (arriba, abajo o móvil) tenga esa raya */
.hero-socials a, 
.social-links a, 
.mobile-socials a {
    text-decoration: none !important; /* Elimina el subrayado estándar */
    border-bottom: none !important;   /* Elimina cualquier borde inferior */
    box-shadow: none !important;      /* Elimina sombras si las hubiera */
}

/* 2. QUITAR PUNTOS (VIÑETAS) EN EL FOOTER */
/* Esto limpia las listas de "Enlaces Rápidos" y "Servicios" */
.footer-links {
    list-style: none !important;      /* Quita el punto negro */
    padding-left: 0 !important;       /* Quita el espacio a la izquierda */
    margin-left: 0 !important;
}

.footer-links li {
    list-style-type: none !important; /* Refuerzo para asegurar que desaparezcan */
}

/* =========================================
   SCROLLBAR PERSONALIZADO (Barra de Desplazamiento)
   ========================================= */

/* 1. Ancho de la barra */
::-webkit-scrollbar {
    width: 10px; /* Ancho en vertical */
    height: 10px; /* Alto en horizontal */
}

/* 2. El fondo de la barra (Riel) */
::-webkit-scrollbar-track {
    background: #f1f1f1; /* Un gris muy suave */
    border-radius: 0px;
}

/* 3. La parte que se mueve (Pulgar) */
::-webkit-scrollbar-thumb {
    background: var(--primary-color); /* Tu Naranja (#e65100) */
    border-radius: 5px; /* Bordes redondeados */
    border: 2px solid #f1f1f1; /* Pequeño borde blanco para que respire */
}

/* 4. Al pasar el mouse sobre la barra */
::-webkit-scrollbar-thumb:hover {
    background: #d35400; /* Un naranja un poco más oscuro */
}

/* OPCIONAL: Para Firefox (Navegadores modernos usan esto) */
html {
    scrollbar-width: thin; /* Barra delgada */
    scrollbar-color: var(--primary-color) #f1f1f1; /* Pulgar Naranja, Fondo Gris */
}