/* --- RESET Y CONFIGURACIÓN GENERAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Montserrat', sans-serif;
    color: #2d3748;
    background-color: #f0f2f5;
    line-height: 1.6;
}

/* CONTENEDOR MAESTRO */
.page-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    background-color: #ffffff;
    box-shadow: 0 0 25px rgba(0,0,0,0.04);
    min-height: 100vh;
    position: relative;
}

/* --- NAVBAR FIJA --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 1440px;
    height: 80px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
}
.navbar-brand img {
    height: 75px;
    width: auto;
    display: block;
}
.navbar-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}
.navbar-menu a {
    text-decoration: none;
    color: #072442;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.navbar-menu a:hover {
    color: #006E6D;
}
.btn-contacto-nav {
    border: 1.5px solid #072442;
    padding: 8px 20px;
    border-radius: 20px;
}
.btn-contacto-nav:hover {
    background-color: #072442;
    color: #ffffff !important;
}

.main-container {
    margin-top: 80px;
}

/* --- BANNER DE TÍTULO INSTITUCIONAL --- */
.header-banner {
    background-color: #072442; 
    color: #ffffff;
    text-align: center;
    padding: 50px 20px;
}
.header-banner h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- BLOQUE DE PRESENTACIÓN (HOME) --- */
.intro-block {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.intro-tags {
    font-size: 0.8rem;
    font-weight: 700;
    color: #718096;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.intro-text p {
    font-size: 1.15rem;
    text-align: justify;
    color: #072442;
    font-weight: 600;
    margin-bottom: 20px;
}
.intro-text p.sub {
    font-size: 1rem;
    color: #718096;
    font-weight: 400;
}
.intro-image {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.intro-image img {
    width: 100%;
    max-width: 350px;
    height: auto;
}

/* --- BANNER PANORÁMICO --- */
.panoramic-container {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid #cbd5e0;
    border-bottom: 1px solid #cbd5e0;
    display: flex;
}
.panoramic-container img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
}

/* --- MALLA 3X3 DE TARJETAS --- */
.hub-section {
    background-color: #ffffff;
    padding: 80px 0;
}
.hub-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}
.hub-title-container {
    text-align: center;
    margin-bottom: 50px;
}
.hub-title-container h2 {
    font-family: 'Poppins', sans-serif;
    color: #072442;
    font-size: 2.3rem;
    margin-bottom: 10px;
}
.hub-title-container h3 {
    font-family: 'Montserrat', sans-serif;
    color: #718096;
    font-size: 1.05rem;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}
.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
}

/* Tarjeta */
.card {
    background: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)), var(--card-bg, url('placeholder.png')) center/cover no-repeat;
    border: 1px solid #cbd5e0;
    border-radius: 16px;
    padding: 35px 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(7, 36, 66, 0.1);
    border-color: #072442;
}
.card-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.card .icon-container {
    font-size: 1.5rem;
    color: #072442;
}
.card-number {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #a0aec0;
    letter-spacing: 1px;
}
.card h3 {
    font-family: 'Poppins', sans-serif;
    color: #072442;
    font-size: 1.25rem;
    margin-bottom: 12px;
}
.card p {
    font-size: 0.9rem;
    color: #718096;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 20px;
}
.card-footer-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: #072442;
    display: flex;
    align-items: center;
    gap: 5px;
}
.card.highlight {
    border: 1.5px solid #006E6D; 
}
.card.highlight h3, .card.highlight .icon-container, .card.highlight .card-footer-link {
    color: #006E6D;
}

/* --- MODAL INMERSIVO CORREGIDO --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(7, 36, 66, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2000;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-container {
    width: 950px;
    height: 520px;
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    position: relative;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.2rem;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.modal-close:hover { color: #072442; }

.modal-photo-wrapper {
    width: 45%; 
    height: 100%;
    position: relative;
    background-color: #072442;
}
.modal-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.85;
}

/* PASTILLA DE CÓDIGO CORREGIDA CON FONDO SÓLIDO */
.modal-photo-tag {
    position: absolute;
    bottom: 25px;
    left: 25px;
    background-color: rgba(7, 36, 66, 0.85);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    z-index: 5;
}

.modal-content {
    width: 55%; 
    padding: 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.modal-subtitle-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.modal-content h2 {
    font-family: 'Poppins', sans-serif;
    color: #072442;
    font-size: 1.7rem;
    margin-bottom: 15px;
}
.modal-content p {
    font-size: 0.92rem;
    text-align: justify;
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.6;
}
.modal-badges-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 25px;
}
.modal-badge-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    color: #4a5568;
    font-weight: 500;
}
.modal-btn {
    align-self: flex-start;
    background-color: #072442;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.modal-btn:hover { background-color: #0b3866; }

/* --- SECCIÓN PILARES Y CONTACTO --- */
.pillars-section {
    background-color: #f8fafc;
    padding: 80px 0;
    border-top: 1px solid #cbd5e0;
}
.pillars-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1.1fr 1.9fr;
    gap: 50px;
    align-items: center;
}
.pillars-text h2 {
    font-family: 'Poppins', sans-serif;
    color: #072442;
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.3;
}
.pillars-text p {
    color: #718096;
    font-size: 0.95rem;
    text-align: justify;
}
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.pillar-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px 20px;
}
.pillar-num {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #072442;
    margin-bottom: 10px;
}
.pillar-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4a5568;
}

/* --- FORMULARIO Y FOOTER --- */
.contact-main-section {
    background-color: #ffffff;
    padding: 80px 0;
    border-top: 1px solid #cbd5e0;
}
.contact-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}
.contact-info-side h2 {
    font-family: 'Poppins', sans-serif;
    color: #072442;
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.2;
}
.contact-info-side p {
    color: #718096;
    font-size: 0.95rem;
    margin-bottom: 25px;
    text-align: justify;
}
.contact-data-list {
    font-size: 0.9rem;
    color: #4a5568;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.contact-data-list strong { color: #072442; }

.contact-form-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 8px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    background: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: #072442;
}
.form-submit-btn {
    background-color: #072442;
    color: #ffffff;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    transition: background 0.2s;
    width: 100%;
}
.form-submit-btn:hover { background-color: #0b3866; }

/* Footer */
.footer-section {
    background-color: #072442;
    color: #a0aec0;
    padding: 60px 0 30px 0;
}
.footer-content-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}
.footer-brand-col h4 {
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.footer-brand-col p {
    font-size: 0.9rem;
    max-width: 350px;
    line-height: 1.6;
}
.footer-links-col h5 {
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-weight: 600;
}
.footer-links-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-links-col a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links-col a:hover { color: #ffffff; }

.footer-bottom-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 5% 0 5%;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

/* --- WHATSAPP FLOTANTE --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background-color: #00E676; 
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    text-decoration: none;
    z-index: 1500;
    transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 28px; height: 28px; fill: #ffffff; }

/* --- RESPONSIVIDAD --- */
@media (max-width: 992px) {
    .hub-grid { grid-template-columns: repeat(2, 1fr); }
    .intro-block, .pillars-container, .contact-grid, .footer-content-grid { grid-template-columns: 1fr; }
    .pillars-grid { grid-template-columns: 1fr; }
    .modal-container { width: 95%; height: auto; flex-direction: column; }
    .modal-photo-wrapper { width: 100%; height: 200px; }
    .modal-content { width: 100%; padding: 30px; }
}
@media (max-width: 600px) {
    .hub-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}