/* =========================================
   VARIABLES Y RESET
   ========================================= */
:root {
    --primary-blue: #002366;
    --secondary-blue: #003380;
    --dark-blue: #00153d;
    --gold: #D4AF37;
    --gold-hover: #b5952f;
    --white: #ffffff;
    --light-gray: #f4f4f4;
    --text-dark: #333333;
    --success-green: #28a745;
    --danger-red: #dc3545;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a { text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* UTILIDADES DE TEXTO */
.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.text-gold { color: var(--gold) !important; }

/* =========================================
   HEADER & NAV
   ========================================= */
#main-header {
    background-color: var(--primary-blue);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 20, 60, 0.5), 0 0 15px rgba(212, 175, 55, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 60px;
    width: auto;
    border-radius: 50%;
    background: white;
    padding: 2px;
}

.logo-container h1 {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--gold);
    cursor: pointer;
}

nav ul {
    display: flex;
    gap: 20px;
    align-items: center;
}

nav ul li a {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

nav ul li a:hover { color: var(--gold); }

.btn-plataforma {
    background: linear-gradient(135deg, var(--gold) 0%, #e6c86e 100%);
    color: var(--primary-blue) !important;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: bold !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s;
}
.btn-plataforma:hover { transform: translateY(-2px); }

/* =========================================
   HERO SECTION (BIENVENIDA)
   ========================================= */
.hero {
    height: 85vh;
    background: linear-gradient(to bottom, rgba(0, 35, 102, 0.6) 0%, rgba(0, 21, 61, 0.9) 100%), url('../images/fondo1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-text { max-width: 800px; padding: 0 20px; animation: fadeInUp 1s ease-out; }

.hero-logo {
    /* CAMBIO: TAMAÑO MUCHO MÁS GRANDE (160px) */
    height: 160px; 
    width: auto;
    margin-bottom: 25px;
    filter: brightness(0) invert(1);
    opacity: 0.95;
    drop-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}
.hero-logo:hover { transform: scale(1.05); }

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p { font-size: 1.5rem; margin-bottom: 40px; font-weight: 300; }

.btn-gold {
    background-color: transparent;
    color: var(--gold);
    padding: 15px 35px;
    border: 2px solid var(--gold);
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s;
}
.btn-gold:hover { background-color: var(--gold); color: var(--primary-blue); }

/* =========================================
   SECCIONES GENERALES & IMÁGENES
   ========================================= */
.section-padding { padding: 80px 0; }
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary-blue);
    position: relative;
    text-transform: uppercase;
}
.section-title::after {
    content: ''; display: block; width: 60px; height: 3px;
    background: var(--gold); margin: 20px auto 0;
}

.content-image {
    width: 100%;
    max-width: 900px;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 35, 102, 0.15);
    margin: 0 auto 40px;
    display: block;
}

/* =========================================
   SECCIÓN ICONOS ACADÉMICOS
   ========================================= */
.academic-bar {
    background: var(--primary-blue);
    padding: 60px 0;
    color: white;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}
.academic-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    text-align: center;
}
.academic-item {
    flex: 1;
    min-width: 200px;
    transition: transform 0.3s;
}
.academic-item:hover { transform: translateY(-5px); }
.academic-item i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.academic-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* =========================================
   GALERÍA DE INSTALACIONES
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.15); 
}

/* =========================================
   BOTÓN FLOTANTE WHATSAPP
   ========================================= */
.float-whatsapp {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s;
}

.float-whatsapp:hover {
    transform: scale(1.1);
    background-color: #20ba5a;
    color: white;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* =========================================
   NOTICIAS (MODAL)
   ========================================= */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); border-color: var(--gold); }
.news-img-container { height: 200px; overflow: hidden; position: relative; }
.news-img-container img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-card:hover .news-img-container img { transform: scale(1.1); }
.news-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.news-date { font-size: 0.8rem; color: var(--gold); font-weight: bold; text-transform: uppercase; margin-bottom: 10px; }
.news-title { font-size: 1.2rem; color: var(--primary-blue); margin-bottom: 10px; line-height: 1.4; }
.news-excerpt { 
    font-size: 0.95rem; color: #666; line-height: 1.6; margin-bottom: 15px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.no-news { text-align: center; grid-column: 1 / -1; color: #777; font-style: italic; padding: 40px; }

/* MODAL */
.news-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 21, 61, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 15px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease-out;
}
.modal-header-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 4px solid var(--gold);
}
.modal-body { padding: 30px; }
.modal-close {
    position: absolute; top: 15px; right: 20px; color: white;
    font-size: 30px; font-weight: bold; cursor: pointer;
    text-shadow: 0 0 10px rgba(0,0,0,0.8); background: rgba(0,0,0,0.3);
    width: 40px; height: 40px; border-radius: 50%;
    text-align: center; line-height: 40px; transition: 0.3s;
}
.modal-close:hover { background: var(--gold); color: var(--primary-blue); }
.modal-title { font-size: 2rem; color: var(--primary-blue); margin-bottom: 10px; }
.modal-date { display: block; color: var(--gold); font-weight: bold; margin-bottom: 20px; text-transform: uppercase; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.modal-text { font-size: 1.1rem; color: #444; line-height: 1.8; white-space: pre-wrap; }

@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* =========================================
   FILOSOFÍA, FOOTER
   ========================================= */
.filosofia-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px;
}
.filosofia-card {
    background: var(--white); border-radius: 12px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); text-align: center; padding-bottom: 25px;
}
.img-wrapper { height: 220px; overflow: hidden; }
.img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.filosofia-card h3 { margin: 20px 0 10px; color: var(--primary-blue); }
.filosofia-card p { padding: 0 20px; color: #666; }

/* =========================================
   CONTACTO (DISEÑO CRISTAL & MAPA)
   ========================================= */
#contacto {
    background: radial-gradient(circle at center, var(--secondary-blue) 0%, var(--primary-blue) 100%);
    position: relative; 
    overflow: hidden;
    color: var(--white);
    padding-bottom: 0;
}
#contacto p.text-center { margin-bottom: 30px; font-size: 1.1rem; opacity: 0.9; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.crystal-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, background 0.3s;
}
.crystal-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border-color: var(--gold);
}
.crystal-card i { font-size: 2rem; color: var(--gold); margin-bottom: 15px; }
.crystal-card h3 { color: var(--white); margin-bottom: 10px; font-size: 1.2rem; }
.crystal-card p, .crystal-card a { color: #ddd; font-size: 0.95rem; line-height: 1.5; }
.crystal-card a:hover { color: var(--gold); }

.contact-form {
    max-width: 600px; margin: 0 auto 60px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px); padding: 50px; border-radius: 15px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: var(--white); margin-bottom: 8px; font-weight: bold; }
.form-group input, .form-group select {
    width: 100%; padding: 15px; border-radius: 5px; border: none;
    background-color: #ffffff; color: #333333; font-size: 1rem;
}
.btn-gold-full {
    width: 100%; background: linear-gradient(to right, var(--gold), #e6c86e);
    color: var(--primary-blue); padding: 15px; border: none; border-radius: 5px;
    font-weight: bold; cursor: pointer; transition: 0.3s;
}

.map-responsive {
    overflow: hidden;
    position: relative;
    height: 400px;
    width: 100%;
    margin-top: 20px;
    border-top: 4px solid var(--gold);
}
.map-responsive iframe {
    left: 0; top: 0; height: 100%; width: 100%; position: absolute;
    filter: grayscale(20%) contrast(1.2);
}

/* =========================================
   FOOTER & ADMIN STYLES
   ========================================= */
footer {
    background: linear-gradient(to top, #000a20, #00153d);
    color: var(--white); text-align: center; padding: 40px 0 20px; position: relative;
}
footer::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.visit-counter {
    margin-top: 20px; padding: 10px; display: inline-block;
    border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 5px;
    font-size: 0.9rem; color: var(--gold); background: rgba(0,0,0,0.3);
}
.visit-number { font-weight: bold; font-size: 1.1rem; color: var(--white); margin-left: 5px; }

/* Admin */
.admin-body { background-color: #f0f2f5; color: #333; }
.admin-container { max-width: 800px; margin: 50px auto; padding: 20px; }
.login-card {
    background: white; padding: 40px; border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); max-width: 400px; margin: 100px auto;
    text-align: center; border-top: 4px solid var(--gold);
}
.dashboard-header {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--primary-blue); color: white; padding: 20px; border-radius: 10px 10px 0 0;
}
.dashboard-content {
    background: white; padding: 30px; border-radius: 0 0 10px 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.admin-form textarea { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 5px; min-height: 100px; }
.btn-danger { background: var(--danger-red); color: white; padding: 5px 10px; border-radius: 4px; border: none; cursor: pointer; font-size: 0.8rem;}
.news-list-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #eee; }
.news-list-item:last-child { border-bottom: none; }
.thumbnail { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; margin-right: 15px; }

/* RESPONSIVE */
@media (max-width: 991px) {
    .header-content { padding: 10px 20px; position: relative; }
    .logo-container img.logo { max-height: 50px; }
    
    /* CAMBIO MÓVIL: LOGO HERO MÁS GRANDE (110px) */
    .hero-logo { height: 110px; }
    
    .menu-toggle { display: block; }
    nav ul {
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background-color: var(--dark-blue); flex-direction: column;
        padding: 0; border-top: 2px solid var(--gold);
    }
    nav ul.active { display: flex; }
    nav ul li a { display: block; padding: 20px 0; color: white; text-align: center; }
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }