/* =========================================
   VARIABLES GLOBALES
========================================= */
:root {
    --color-primario: #1A2E52; 
    --color-secundario: #AF8D11; 
    --color-fondo: #FFFFFF; 
    --color-fondo-alt: #F8F9FA; 
    --color-texto: #4A4A4A; 
    --color-gris: #888888; 
    --color-borde: #EAEAEA; 
    
    --fuente-titulos: 'Playfair Display', serif;
    --fuente-texto: 'Montserrat', sans-serif;
    --shadow-soft: 0 10px 40px rgba(26, 46, 82, 0.06);
}

/* =========================================
   ESTILOS BASE
========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--fuente-texto); background-color: var(--color-fondo); color: var(--color-texto); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: var(--fuente-titulos); color: var(--color-primario); }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section { padding: 90px 0; }
.bg-alt { background-color: var(--color-fondo-alt); }
.text-center { text-align: center; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

h2.section-title { font-size: 2.5rem; border-bottom: 2px solid var(--color-secundario); padding-bottom: 12px; margin-bottom: 10px; display: inline-block; }
.section-subtitle { color: var(--color-gris); font-size: 1.1rem; margin-bottom: 40px; }
ul.custom-list { list-style: none; padding: 0; }
ul.custom-list li { position: relative; padding-left: 25px; margin-bottom: 12px; color: var(--color-texto); }
ul.custom-list li::before { content: '—'; color: var(--color-secundario); font-weight: bold; position: absolute; left: 0; top: 0; }

/* =========================================
   BOTONES
========================================= */
.btn { padding: 12px 30px; font-family: var(--fuente-texto); font-weight: 600; text-decoration: none; border-radius: 6px; transition: all 0.3s ease; cursor: pointer; font-size: 0.95rem; display: inline-block; }
.btn-primary { 
    background-color: var(--color-secundario); 
    color: #ffffff; 
    border: 1px solid var(--color-secundario);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2); 
}
.btn-primary i { margin-right: 5px; }
.btn-primary:hover { background-color: var(--color-primario); color: #ffffff; border-color: var(--color-primario);}
.btn-secondary { background-color: transparent; color: var(--color-primario); border: 1px solid var(--color-primario); }
.btn-secondary:hover { background-color: var(--color-primario); color: #ffffff; }

/* --- Botón Flotante Top Completamente Redondo con Icono de Doc --- */
.floating-btn-top {
    position: fixed;
    top: 120px;
    right: 20px;
    background-color: var(--color-secundario);
    color: #ffffff;
    width: 100px;
    height: 100px;
    border-radius: 50%; 
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    text-decoration: none;
    z-index: 1001;
    box-shadow: 0 5px 20px rgba(175, 141, 17, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 5px;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    line-height: 1.1;
}
.floating-btn-top i { font-size: 1.5rem; margin-bottom: 2px;}
.floating-btn-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(175, 141, 17, 0.6);
    background-color: var(--color-primario);
    color: #ffffff;
}

/* --- Widget WhatsApp Bottom --- */
.whatsapp-widget { position: fixed; bottom: 30px; right: 30px; z-index: 1000; }
.whatsapp-btn {
    width: 60px; height: 60px; border-radius: 50%; background-color: #25D366; color: white;
    border: none; font-size: 2rem; cursor: pointer; box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
    display: flex; align-items: center; justify-content: center; transition: transform 0.3s; float: right;
}
.whatsapp-btn:hover { transform: scale(1.1); }
.whatsapp-popup {
    position: absolute; bottom: 80px; right: 0; width: 320px; background: white; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); overflow: hidden; opacity: 0; visibility: hidden;
    transform: translateY(20px); transition: all 0.3s ease;
}
.whatsapp-popup.active { opacity: 1; visibility: visible; transform: translateY(0); }
.wa-header { background: #075E54; color: white; padding: 20px; position: relative; display: flex; align-items: flex-start; gap: 12px; }
.wa-header i.fa-whatsapp { font-size: 1.8rem; margin-top: 2px;}
.wa-header p { font-size: 0.9rem; margin: 0; line-height: 1.4; padding-right: 15px;}
.wa-close { position: absolute; top: 10px; right: 10px; background: transparent; border: none; color: white; font-size: 1.2rem; cursor: pointer; }
.wa-options { padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.wa-option {
    display: flex; flex-direction: column; padding: 12px 15px; background: #f9f9f9; border-radius: 8px;
    text-decoration: none; color: var(--color-texto); border-left: 4px solid #25D366; transition: background 0.3s;
}
.wa-option:hover { background: #f0f0f0; }
.wa-option strong { font-size: 0.95rem; color: var(--color-primario); margin-bottom: 3px; }
.wa-option span { font-size: 0.75rem; color: var(--color-gris); }

/* =========================================
   TOP BAR Y CABECERA 
========================================= */
.top-bar { background: var(--color-primario); color: #ffffff; padding: 8px 0; font-size: 0.85rem; }
.top-bar-container { display: flex; justify-content: space-between; align-items: center; }
.top-contact a { color: #ffffff; text-decoration: none; margin-right: 20px; transition: color 0.3s; display: inline-flex; align-items: center; }
.top-contact a i { color: var(--color-secundario); margin-right: 6px; }

/* Íconos sociales y calculadora en color blanco */
.top-socials a { color: #ffffff; text-decoration: none; margin-right: 20px; transition: color 0.3s; display: inline-flex; align-items: center; }
.top-socials a i { color: #ffffff; margin-right: 6px; font-size: 1rem;}
.top-contact a:hover, .top-socials a:hover i { color: var(--color-secundario); }

.header { background-color: #ffffff; border-bottom: 3px solid var(--color-secundario); position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: all 0.3s; }
.header-container { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; position: relative;}
.logo img { height: 75px; object-fit: contain; }

.menu-links { list-style: none; display: flex; gap: 25px; align-items: center;}
.menu-links > li > a { 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.9rem; 
    color: var(--color-primario); 
    transition: color 0.3s ease; 
    text-transform: uppercase; 
}
.menu-links > li > a:hover, .menu-links > li > a.active { color: var(--color-secundario); }

.has-dropdown { position: relative; }
.has-dropdown > a i { margin-left: 5px; font-size: 0.8rem; }
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    min-width: 280px;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 100;
    border-top: 3px solid var(--color-secundario);
}
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li { width: 100%; border-bottom: none; }
.dropdown li a {
    padding: 12px 20px;
    display: block;
    font-size: 0.85rem;
    color: var(--color-texto);
    transition: background 0.3s, color 0.3s;
    text-transform: uppercase;
    font-weight: 700;
    text-decoration: none !important;
}
.dropdown li a:hover { background: var(--color-fondo-alt); color: var(--color-secundario); padding-left: 25px; }

.menu-toggle { display: none; font-size: 1.5rem; color: var(--color-primario); cursor: pointer; }
.mobile-only-btn { display: none; }

/* =========================================
   HERO SLIDER
========================================= */
.hero-slider { position: relative; height: 85vh; overflow: hidden; background-color: var(--color-primario); }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; display: flex; align-items: center; }
.slide-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(26, 46, 82, 0.85); }
.slide-content { position: relative; z-index: 2; color: #ffffff; max-width: 800px; }
.slide-content h1 { font-size: 3.5rem; color: #ffffff; margin-bottom: 25px; line-height: 1.2;}
.slide-content p { font-size: 1.15rem; margin-bottom: 35px; color: rgba(255,255,255,0.9); }
.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; }

/* =========================================
   SERVICIOS Y ESTÁNDARES
========================================= */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-card { background: var(--color-fondo); padding: 40px 30px; border-radius: 12px; border: 1px solid var(--color-borde); box-shadow: var(--shadow-soft); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(26, 46, 82, 0.1); border-color: var(--color-secundario);}
.service-icon { font-size: 2.5rem; color: var(--color-secundario); margin-bottom: 20px; }
.service-card h3 { font-size: 1.3rem; margin-bottom: 15px; line-height: 1.3;}
.service-desc { font-size: 0.95rem; color: var(--color-texto); }

.trust-section { background: var(--color-primario); color: #ffffff; }
.trust-container { display: flex; gap: 60px; align-items: center; }
.trust-text { flex: 1; }
.trust-text h2 { color: var(--color-secundario); font-size: 2.5rem; margin-bottom: 20px; }
.trust-text p { color: rgba(255,255,255,0.85); font-size: 1.05rem; line-height: 1.7;}
.trust-grid { flex: 1.2; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 25px; }
.trust-item { background: rgba(255,255,255,0.05); padding: 25px; border-radius: 12px; border-left: 3px solid var(--color-secundario);}
.trust-icon { font-size: 2rem; color: var(--color-secundario); margin-bottom: 15px; }
.trust-item h3 { font-size: 1.15rem; color: #ffffff; margin-bottom: 10px; }
.trust-item p { font-size: 0.9rem; color: rgba(255,255,255,0.7); }

/* =========================================
   SOBRE NOSOTROS
========================================= */
.about-container { display: flex; gap: 60px; align-items: center; }
.about-content { flex: 1; }
.about-image-wrapper { flex: 1; }
.about-img { width: 100%; border-radius: 12px; box-shadow: var(--shadow-soft); }


/* =========================================
   PUBLICACIONES (Estilo Premium Overlay)
========================================= */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.premium-overlay-card {
    position: relative;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #ffffff;
    text-decoration: none;
}
.premium-overlay-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Degradado oscuro hacia arriba para leer el texto */
    background: linear-gradient(to top, rgba(26, 46, 82, 0.95) 0%, rgba(26, 46, 82, 0.4) 50%, rgba(0,0,0,0) 100%);
    z-index: 1;
    transition: background 0.3s ease;
}
.premium-overlay-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(26, 46, 82, 0.15);
}
.premium-overlay-card:hover::before {
    background: linear-gradient(to top, rgba(26, 46, 82, 0.95) 0%, rgba(26, 46, 82, 0.6) 60%, rgba(0,0,0,0.1) 100%);
}
.poc-content {
    position: relative;
    z-index: 2;
    padding: 30px 25px;
    width: 100%;
    transform: translateY(15px);
    transition: transform 0.3s ease;
}
.premium-overlay-card:hover .poc-content {
    transform: translateY(0);
}
.poc-category {
    display: inline-block;
    background-color: var(--color-secundario);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.poc-title {
    font-family: var(--fuente-titulos);
    font-size: 1.4rem;
    color: #ffffff;
    margin: 0 0 15px 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.poc-link {
    color: var(--color-secundario);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease, color 0.3s;
}
.premium-overlay-card:hover .poc-link {
    opacity: 1;
}
.poc-link:hover {
    color: #ffffff;
}

/* =========================================
   EVENTOS (CARRUSEL Y CAPA AZUL)
========================================= */
.events-carousel-container { display: flex; align-items: center; gap: 15px; position: relative; }
.events-track-wrapper { overflow: hidden; flex-grow: 1; padding: 15px 0; }
.events-track { display: flex; transition: transform 0.4s ease-in-out; }

.modern-event-card { flex: 0 0 calc(33.333% - 20px); margin: 0 10px; background: var(--color-fondo); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(26, 46, 82, 0.06); display: flex; flex-direction: column; border: 1px solid rgba(0,0,0,0.04); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.modern-event-card:hover { transform: translateY(-6px); box-shadow: 0 15px 40px rgba(26, 46, 82, 0.1); }

.modern-event-img-wrapper { position: relative; width: 100%; height: 200px; background-color: #ffffff; overflow: hidden; }

.modern-event-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(26, 46, 82, 0.4); 
    z-index: 1;
    transition: all 0.4s ease;
}
.modern-event-card:hover .modern-event-img-wrapper::after {
    background-color: rgba(26, 46, 82, 0.15); 
}

.modern-event-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; filter: brightness(1.15) contrast(1.05); }
.modern-event-card:hover .modern-event-img { transform: scale(1.05); }
.modern-event-tag { position: absolute; top: 15px; left: 15px; background: rgba(255, 255, 255, 0.95); color: var(--color-primario); padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; box-shadow: 0 2px 8px rgba(0,0,0,0.05); z-index: 2; }
.modern-event-content { padding: 30px 25px; display: flex; flex-direction: column; flex-grow: 1; }
.modern-event-category { color: var(--color-secundario); font-size: 0.75rem; font-weight: 700; margin-bottom: 12px; }
.modern-event-title { font-family: var(--fuente-titulos); font-size: 1.25rem; color: var(--color-primario); margin: 0 0 15px 0; line-height: 1.3; }
.modern-event-desc { font-size: 0.9rem; color: var(--color-texto); margin: 0 0 25px 0; flex-grow: 1; }
.modern-event-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--color-borde); padding-top: 20px; }
.modern-event-datetime { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 500; color: var(--color-gris); }
.modern-event-link { color: var(--color-primario); font-weight: 600; font-size: 0.9rem; text-decoration: none; transition: color 0.3s; }
.modern-event-link:hover { color: var(--color-secundario); }

.carousel-btn { background: var(--color-primario); color: white; border: none; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: var(--transition); flex-shrink: 0; z-index: 10; }
.carousel-btn:hover { background: var(--color-secundario); color: var(--color-primario); }

/* =========================================
   PRE-FOOTER CTA 
========================================= */
.events-section { position: relative; z-index: 1; }
.cta-prefooter { background-color: var(--color-fondo); position: relative; border-top: 1px solid var(--color-borde); z-index: 10; }
.cta-container { display: flex; align-items: center; justify-content: space-between; min-height: 380px; position: relative; }
.cta-text { flex: 1; max-width: 600px; padding: 60px 0; z-index: 2; }
.cta-text h2 { color: var(--color-primario); font-size: 2.6rem; margin-bottom: 15px; line-height: 1.2; }
.cta-text p { font-size: 1.1rem; color: var(--color-texto); margin-bottom: 20px; }
.cta-image-wrapper { position: absolute; right: 5%; bottom: 0; height: 100%; z-index: 1; display: flex; align-items: flex-end; pointer-events: none; }
.cta-person-img { height: 100%; width: auto; object-fit: contain; object-position: bottom; }

/* =========================================
   FOOTER (FULL WIDTH)
========================================= */
.footer-fullwidth { background-color: var(--color-primario); width: 100%; padding: 60px 0 0 0; }
.minimal-footer-component { color: #ffffff; padding: 0 0 30px 0; display: flex; flex-direction: column; gap: 50px; }
.mf-top { display: grid; grid-template-columns: 1.5fr 2fr; gap: 40px; align-items: start; }
.mf-brand { display: flex; flex-direction: column; gap: 20px; }
.mf-brand img { max-width: 240px; height: auto; object-fit: contain; } 
.mf-brand p { color: rgba(255,255,255,0.7); font-size: 0.95rem; line-height: 1.7; margin: 0; max-width: 320px; }
.mf-links-group { display: flex; gap: 80px; flex-wrap: wrap; justify-content: flex-end; }
.mf-col h4 { font-family: var(--fuente-texto); font-weight: 600; color: var(--color-secundario); margin: 0 0 20px 0; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 1px; }
.mf-col ul { list-style: none; padding: 0; margin: 0; }
.mf-col ul li { margin-bottom: 12px; }
.mf-col ul li a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.95rem; transition: color 0.3s; }
.mf-col ul li a i { margin-right: 8px; color: var(--color-secundario);}
.mf-col ul li a:hover { color: var(--color-secundario); }
.mf-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 25px; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: rgba(255,255,255,0.5); flex-wrap: wrap; gap: 15px; }
.mf-legal-links a { color: rgba(255,255,255,0.5); text-decoration: none; margin-left: 10px; }

/* =========================================
   DISEÑO RESPONSIVO
========================================= */
@media (max-width: 1024px) {
    .modern-event-card { flex: 0 0 calc(50% - 20px); } 
}

@media (max-width: 992px) {
    .section { padding: 60px 0; }
    .trust-container, .about-container { flex-direction: column; }
    .slide-content h1 { font-size: 2.8rem; }
    .cta-image-wrapper { opacity: 0.3; right: -5%; } 
    .cta-text { position: relative; z-index: 5; }
    
    .mf-top { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .mf-brand { align-items: center; }
    .mf-brand p { max-width: 100%; }
    .mf-links-group { justify-content: center; gap: 40px; }
}

@media (max-width: 768px) {
    .top-bar { display: none; }
    .header-btn { display: none; }
    .menu-toggle { display: block; }
    
    .logo img { height: 60px; }
    
    .nav-wrapper { position: absolute; top: 100%; left: 0; width: 100%; background-color: #ffffff; box-shadow: 0 10px 15px rgba(0,0,0,0.1); display: none; max-height: 80vh; overflow-y: auto;}
    .nav-wrapper.active { display: block; } 
    .menu-links { flex-direction: column; padding: 20px 0; gap: 0; width: 100%; }
    .menu-links > li { width: 100%; border-bottom: 1px solid var(--color-borde); }
    .menu-links > li:last-child { border-bottom: none; }
    .menu-links > li > a { display: block; padding: 15px 20px; text-align: center; }
    
    .has-dropdown .dropdown { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; background: #f9f9f9; min-width: 100%; border-top: none; border-radius: 0; }
    .has-dropdown.open .dropdown { display: block; }
    .has-dropdown .dropdown li { border-bottom: none; }

    .mobile-only-btn { display: block; padding: 15px 20px; }
    
    .section { padding: 50px 0; }
    h2.section-title { font-size: 1.8rem; }
    .slide-content h1 { font-size: 2.2rem; margin-bottom: 15px;}
    .trust-text h2 { font-size: 1.8rem; text-align: center; }
    .trust-text p { text-align: center; }
    
    .services-grid { grid-template-columns: 1fr; }
    .trust-grid { grid-template-columns: 1fr; }
    
    .modern-event-card { flex: 0 0 calc(100% - 20px); }
    .carousel-btn { width: 35px; height: 35px; font-size: 1rem; }
    
    .floating-btn-top { top: 100px; right: 15px; width: 50px; height: 50px; padding: 0; }
    .floating-btn-text { display: none; }
    .floating-btn-top i { margin: 0; font-size: 1.2rem; }

    .whatsapp-widget { bottom: 20px; right: 20px; }
    .whatsapp-popup { right: 0; bottom: 70px; width: 280px; }
    
    .cta-image-wrapper { display: none; } 
    .cta-container { min-height: auto; }
    .cta-text { padding: 40px 0; text-align: center; }
    .cta-text h2 { font-size: 1.8rem; }
    
    .minimal-footer-component { padding: 40px 20px 20px; gap: 40px; }
    .mf-links-group { flex-direction: column; gap: 40px; align-items: center; }
    .mf-col { text-align: center; }
    .mf-bottom { flex-direction: column; text-align: center; gap: 15px; }
}