/* --- ESTILOS GLOBALES CPPe CUSCO - VERSIÓN FINAL CON INTRANET --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&family=Playfair+Display:wght@400;700;900&display=swap');

* { outline: none !important; }

body, h1, h2, h3, h4, h5, h6, p, a, span, div { font-family: 'Lato', sans-serif !important; }
h1, h2, h3, h4, .hero-title, .titulo-seccion, .hero-welcome-title span, .inst-body h4 { font-family: 'Playfair Display', serif !important; }

body { background-color: #ffffff !important; color: #333; display: flex; flex-direction: column; min-height: 100vh; margin: 0; }

/* =======================================================
   ENCABEZADO
   ======================================================= */
.main-header { 
    background-color: #ffffff !important; 
    height: 90px; position: fixed; top: 0; left: 0; right: 0; z-index: 99999; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.05); border-bottom: 1px solid #e0e0e0; 
}
.header-container { max-width: 1200px; margin: 0 auto; height: 100%; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; }

.header-left-group { display: flex; align-items: center; }
.logo-area img { height: 70px !important; width: auto; display: block; }

/* MENÚ PC */
.main-nav { display: block; }
.main-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.main-menu li { position: relative; margin-left: 5px; }
.main-menu li a { 
    text-decoration: none !important; color: #444 !important; 
    font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 8px 12px; display: block; border-radius: 2px; transition: all 0.3s ease; 
}
.main-menu li:hover > a { color: #800020 !important; background-color: rgba(128, 0, 32, 0.05) !important; }

/* SUBMENÚ */
.sub-menu { 
    position: absolute; top: 100%; left: 0; width: 240px; background-color: #fff !important; 
    display: none; padding: 10px 0; border-top: 3px solid #d4af37; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); list-style: none; 
}
.has-submenu:hover .sub-menu { display: block; }
.sub-menu li { width: 100%; margin: 0; }
.sub-menu li a { color: #555 !important; padding: 10px 20px; font-weight: 400; font-size: 14px; text-transform: none; }
.sub-menu li a:hover { color: #800020 !important; background-color: #f9f9f9 !important; padding-left: 25px; }

/* REDES SOCIALES PC */
.social-icons-pc { display: flex; align-items: center; gap: 8px; margin-left: 20px; border-left: 1px solid #eee; padding-left: 15px; }
.social-link {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: #800020 !important; border: 1px solid #d4af37;
    transition: 0.3s; font-size: 16px; text-decoration: none !important;
}
.social-link:hover { background-color: #800020; color: #fff !important; border-color: #800020; transform: translateY(-2px); }

/* BOTÓN INTRANET ESPECIAL (DORADO) */
.intranet-link {
    width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: #fff !important; background-color: #d4af37; border: 1px solid #d4af37;
    transition: 0.3s; font-size: 16px; text-decoration: none !important; margin-left: 5px;
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.4);
}
.intranet-link:hover { background-color: #b59020; transform: translateY(-2px); }

/* CONTROLES MÓVILES */
.mobile-controls { display: none; align-items: center; gap: 8px; margin-left: auto; }
.menu-link { 
    display: flex; align-items: center; justify-content: center; 
    width: 40px; height: 40px; border: 1px solid #d4af37; border-radius: 4px; 
    color: #800020 !important; font-size: 22px; cursor: pointer; background: #fff;
}
.mobile-icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    color: #fff !important; font-size: 18px; text-decoration: none !important;
}
.btn-call-mobile { background-color: #800020; border: 1px solid #d4af37; }
.btn-wsp-mobile { background-color: #25D366; border: 1px solid #fff; }
.btn-intranet-mobile { background-color: #d4af37; border: 1px solid #fff; } /* Dorado en móvil */

/* =======================================================
   HERO SECTION
   ======================================================= */
.hero-split-section {
    padding-top: 90px; background-color: #fff; width: 100%; overflow: hidden;
    min-height: 700px; display: flex; align-items: center;
}
.hero-container-flex { display: flex; width: 100%; max-width: 1400px; margin: 0 auto; align-items: center; }

.hero-title-mobile-wrapper { display: none; width: 100%; text-align: center; padding: 0 15px; margin-bottom: 15px; }
.hero-title-mobile { font-size: 1.6rem; line-height: 1.2; color: #1a1a1a; margin: 0; }
.hero-title-mobile span { color: #800020; display: block; font-weight: 900; margin-top: 5px; font-size: 1.8rem; }

.hero-text-side { width: 45%; padding: 40px 0 40px 5%; z-index: 10; }
.hero-title-pc {
    font-size: 3rem; line-height: 1.1; color: #1a1a1a; margin-bottom: 20px;
    border-left: 6px solid #800020; padding-left: 25px; display: block;
}
.hero-title-pc span { color: #800020; display: block; font-weight: 900; }
.hero-desc { font-size: 1.1rem; line-height: 1.7; color: #555; margin-bottom: 40px; max-width: 600px; text-align: justify; }
.hero-stats { display: flex; gap: 40px; border-top: 1px solid #d4af37; padding-top: 25px; }
.stat-box h3 { font-size: 2.5rem; font-weight: 700; color: #800020; margin: 0; line-height: 1; }
.stat-box p { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: #777; margin-top: 5px; font-weight: 700; }

.hero-image-side { width: 55%; height: 700px; position: relative; }
.hero-image-img { width: 100%; height: 100%; object-fit: contain; object-position: center right; }

/* =======================================================
   TRÁMITES & COMUNICADOS
   ======================================================= */
.seccion-tarjetas { background-color: #f8f8f8 !important; padding: 80px 0; border-top: 1px solid #d4af37; }
.titulo-seccion { color: #800020; font-weight: 900; font-size: 2.2rem; margin-bottom: 10px; text-transform: uppercase; text-align: center; letter-spacing: 1px; }
.subtitulo-seccion { color: #666; margin-bottom: 60px; max-width: 700px; margin-left: auto; margin-right: auto; text-align: center; font-size: 1rem; font-style: italic; }

.tarjeta-clean { background: #fff; padding: 40px 30px; border: 1px solid #eee; border-top: 4px solid #800020; height: 100%; transition: all 0.3s ease; text-align: center; display: flex; flex-direction: column; align-items: center; text-decoration: none !important; }
.tarjeta-clean:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.08); border-color: #d4af37; }
.icon-box-clean { font-size: 3rem; color: #d4af37; margin-bottom: 25px; }
.tarjeta-clean h4 { font-size: 1.25rem; font-weight: 700; color: #222; margin-bottom: 15px; text-transform: uppercase; }
.tarjeta-clean p { font-size: 0.9rem; color: #666; line-height: 1.6; margin-bottom: 25px; }
.btn-link-clean { margin-top: auto; color: #800020; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid transparent; transition: 0.3s; }
.tarjeta-clean:hover .btn-link-clean { border-bottom: 1px solid #800020; }

.seccion-comunicados { background-color: #fff !important; padding: 80px 0; border-top: 1px solid #d4af37; }
.tarjeta-noticia { background: #fff !important; border: 1px solid #eee !important; border-radius: 8px; overflow: hidden; box-shadow: none !important; transition: 0.3s; height: 100%; display: flex; flex-direction: column; position: relative; }
.tarjeta-noticia:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important; border-color: #d4af37 !important; transform: translateY(-5px); }
.img-noticia { height: 220px !important; position: relative; width: 100%; overflow: hidden; }
.img-noticia img { width: 100%; height: 100% !important; object-fit: cover; transition: 0.5s; }
.tarjeta-noticia:hover .img-noticia img { transform: scale(1.05); }
.fecha-badge { position: absolute; top: 15px; right: 15px; background-color: #800020 !important; color: #fff !important; padding: 8px 12px; border-radius: 4px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.fecha-badge .dia { display: block; font-size: 1.2rem; font-weight: 800; line-height: 1; }
.fecha-badge .mes { display: block; font-size: 0.7rem; text-transform: uppercase; }
.cuerpo-noticia { padding: 25px !important; text-align: left; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.categoria-noticia { display: block; font-size: 0.75rem; color: #d4af37; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.cuerpo-noticia h4 { font-size: 1.1rem !important; font-weight: 800 !important; color: #333 !important; margin-bottom: 10px; line-height: 1.3; }
.cuerpo-noticia p { font-size: 0.9rem !important; color: #666 !important; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.btn-leer-mas { display: inline-block; background-color: transparent !important; color: #800020 !important; padding: 0; font-weight: 700; text-decoration: none !important; font-size: 0.85rem; border-bottom: 1px solid #800020; width: fit-content; }

/* =======================================================
   FOOTER
   ======================================================= */
.page-spacer { flex: 1; }
footer { 
    background-color: #5e0018 !important; color: #fff !important; padding: 20px 0 !important; 
    margin-top: auto; width: 100%; text-align: center; border-top: 4px solid #d4af37;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
footer .container { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
footer p { margin: 2px 0 !important; padding: 0 !important; line-height: 1.4 !important; font-size: 12px !important; color: #f0f0f0; opacity: 0.95; }
footer strong { color: #d4af37; font-weight: 600; text-transform: uppercase; }
.footer-divider { width: 50%; max-width: 300px; height: 1px; background: rgba(255,255,255,0.2); margin: 10px auto; }

/* =======================================================
   RESPONSIVE MÓVIL
   ======================================================= */
@media (max-width: 991px) {
    .main-header { height: 70px; }
    .mobile-controls { display: flex !important; margin-left: auto; }
    .social-icons-pc { display: none !important; }
    .logo-area img { height: 45px !important; margin-left: 5px; }

    .main-nav { 
        position: absolute; top: 70px; left: 0; width: 100%; 
        background-color: #ffffff !important; border-top: 1px solid #d4af37; display: none; 
        box-shadow: 0 10px 40px rgba(0,0,0,0.2); z-index: 999999; 
        max-height: calc(100vh - 70px); overflow-y: auto;
    }
    .main-nav.active { display: block !important; }
    .main-menu { flex-direction: column; width: 100%; align-items: flex-start; }
    .main-menu li { width: 100%; border-bottom: 1px solid #eee; margin: 0; background: #fff; }
    .main-menu li a { padding: 15px 20px; color: #333 !important; width: 100%; font-size: 14px; background: #fff; }
    
    .sub-menu { 
        position: static; width: 100%; box-shadow: none; border: none; display: none; 
        background-color: #f9f9f9 !important; 
    }
    .has-submenu:hover .sub-menu, .has-submenu.active .sub-menu { display: block; }
    .sub-menu li a { padding-left: 30px; font-size: 13px; color: #555 !important; }

    .hero-split-section { padding-top: 70px; display: block; min-height: auto; padding-bottom: 40px; }
    .hero-container-flex { display: flex; flex-direction: column; }
    .hero-title-mobile-wrapper { display: block; margin-bottom: 15px; }
    
    .hero-image-side { width: 100%; height: 280px; margin-bottom: 15px; display: flex; justify-content: center; }
    .hero-image-img { max-height: 280px; object-position: center bottom; }
    
    .hero-text-side { width: 100%; padding: 0 20px; text-align: center; }
    .hero-title-pc { display: none; }
    .hero-desc { margin: 0 auto 30px; text-align: center; font-size: 1rem; }
    .hero-stats { justify-content: center; gap: 20px; border-top-color: #eee; }
    
    .tarjeta-inst { max-width: 400px; margin: 0 auto 60px; }
    .btn-cerrar-modal { top: 10px; right: 10px; }
}
/* =======================================================
   ESTILOS FINALES DEL FOOTER (PEGA ESTO AL FINAL DEL CSS)
   ======================================================= */

.footer-institucional {
    background-color: #1a1a1a !important; /* Fondo negro elegante */
    color: #ffffff !important;
    padding: 50px 0 30px 0;
    border-top: 5px solid #800020; /* Borde rojo arriba */
    font-family: 'Lato', sans-serif;
    position: relative;
    z-index: 10;
}

.footer-block {
    margin-bottom: 15px;
    padding: 5px;
}

.footer-icon {
    color: #d4af37; /* Iconos dorados */
    font-size: 1.2rem;
    margin-right: 8px;
    vertical-align: middle;
}

.footer-institucional p {
    display: inline-block;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #e0e0e0;
    vertical-align: middle;
}

.footer-institucional strong {
    color: #d4af37; /* Títulos dorados */
    font-weight: 700;
    text-transform: uppercase;
}

/* Resaltado especial para el teléfono */
.phone-highlight p {
    font-size: 1.1rem;
    color: #fff;
    font-weight: bold;
    background: rgba(255,255,255,0.1);
    padding: 5px 15px;
    border-radius: 20px;
}

.footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    width: 60%;
    margin: 30px auto;
}

.copyright {
    text-align: center;
    font-size: 13px !important;
    opacity: 0.6;
    margin-top: 10px;
    display: block !important;
    width: 100%;
}

/* Asegurar que en móviles se vea bien */
@media (max-width: 768px) {
    .footer-block {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 25px;
    }
    .footer-icon { margin-bottom: 5px; margin-right: 0; font-size: 1.5rem; }
    .footer-institucional p { text-align: center; display: block; }
}