/* ============================= */
/* HACEMOS RESET Y INGRESAMOS ALGUNAS VARIABLES */
/* ============================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --accent: #facc15;
    --dark: #111827;
    --light: #f4f6f9;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(to right, #f4f6f9, #eef2f7);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================= */
/* HEADER Y NAVEGACIÓN */
/* ============================= */
.header {
    background: var(--dark);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

.logo img {
    width: 45px;
    transition: transform 0.5s;
}

.logo:hover img {
    transform: rotate(360deg);
}

.nav {
    display: flex;
    gap: 25px;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
    position: relative;
}

.nav a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--accent);
    left: 0;
    bottom: -4px;
    transition: 0.3s;
}

.nav a:hover::after {
    width: 100%;
}

.nav a:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    font-size: 26px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* ============================= */
/* MAIN Y HERO */
/* ============================= */
main {
    flex: 1;
    padding: 40px 20px;
}

.hero {
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    color: white;
    padding: 80px 20px;
    text-align: center;
    border-radius: 15px;
    margin-bottom: 50px;
    animation: fadeInDown 1s ease-out;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================= */
/*              CARDS 
/* ============================= */
.cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.card {
    background: white;
    padding: 30px;
    width: 280px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
    opacity: 0;
    /* Para animación JS */
    transform: translateY(30px);
    /* Para animación JS */
    transition: var(--transition);
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-bottom: 4px solid var(--primary);
}

/* ============================= */
/* FORMULARIO Y CONTACTO */
/* ============================= */
.formulario {
    max-width: 450px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: 1s ease-out;
}

.formulario.visible {
    opacity: 1;
}

.formulario input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    transition: 0.3s;
}

.formulario input:focus {
    border-color: var(--primary);
    transform: scale(1.02);
    outline: none;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.2);
}

.formulario button {
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.formulario button:hover {
    background: var(--primary-dark);
    letter-spacing: 1px;
}

/* ============================= */
/* MULTIMEDIA */
/* ============================= */
.galeria {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.galeria img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    transition: 0.5s;
    filter: grayscale(30%);
}

.galeria img:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.video {
    display: block;
    margin: auto;
    width: 100%;
    max-width: 700px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.mapa {
    width: 100%;
    height: 350px;
    border-radius: 15px;
    border: 0;
    margin-top: 20px;
}

/* ============================= */
/* FOOTER */
/* ============================= */
.footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: auto;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9rem;
}

/* ============================= */
/* ANIMACIONES KEYFRAMES */
/* ============================= */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================= */
/* RESPONSIVE */
/* ============================= */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 0;
        background: var(--dark);
        width: 100%;
        text-align: center;
        padding: 20px;
    }

    .nav.activo {
        display: flex;
    }

    .hero h1 {
        font-size: 2rem;
    }
}


.custom-carousel {
    max-width: 900px;
    margin: 0 auto;
    border: 3px solid white;
    border-radius: 20px;
    overflow: hidden;
}

.img-full {
    height: 260px;
    object-fit: cover;
    object-position: center 20%;
}

/* CAJA DE TEXTO FLOTANTE */
.carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 5px 15px;
    bottom: 35px;
    width: fit-content;
    left: 50%;
    transform: translateX(-50%);
}

.carousel-caption h5 {
    color: var(--accent);
    font-size: 1rem;
    margin: 0;
    font-weight: bold;
}


.carousel-indicators {
    bottom: 5px;
}

.carousel-indicators [data-bs-target] {
    background-color: var(--primary);
    height: 4px;
    width: 25px;
    border: none;
    opacity: 0.8;
}

.carousel-indicators .active {
    background-color: var(--accent);
    opacity: 1;
}

/* Integración con el estilo */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

.rounded-4 {
    border-radius: 1rem !important;
}

.btn-primary {
    background-color: var(--primary);
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

/* Estilo para los tooltips */
.bi-question-circle {
    cursor: help;
}

/* --- FIX DEFINITIVO PARA EL LOGIN --- */

/* Forzamos que el body se porte bien solo en el login */
body.login-body {
    background-color: #f0f2f5 !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    /* IMPORTANTE: anula el column previo */
    margin: 0 !important;
    padding: 0 !important;
}

/* Forzamos visibilidad de la card */
.card-login {
    border: none !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
    border-radius: 20px !important;
    background-color: white !important;
    display: block !important;
    /* Asegura que no esté oculta */
}

.logo-img-login {
    width: 100px;
    height: auto;
    margin-bottom: 15px;
}

/* Estética de los inputs */
.login-body .input-group-text {
    border-right: none;
    color: #6c757d;
}

.login-body .form-control {
    border-left: none;
}

.card-login {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.body-login {
    background-color: #e9ecef !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* --- Estilos para el Mapa Interactivos --- */

#map { 
    height: 450px; 
    width: 100%; 
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1; /* Asegura que el mapa no tape el menú desplegable */
}

.contacto-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 1.5rem;
    border-radius: 8px;
}

.titulo {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    color: #333;
}