@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap");

/* 1. RESET Y ESTRUCTURA */
html, body {
    font-family: "Poppins", sans-serif !important;
    background-color: #000 !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

main, section, .contacto, .ubicacion-section {
    background: transparent !important;
    border: none !important;
}

/* 2. FONDO ANIMADO (CON TU DEGRADADO ORIGINAL) */
#canvas_fondo_1 {
    display: block; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 0;
    filter: blur(2px);
    /* Recuperamos tu degradado original */
    background: linear-gradient(180deg, #415b66 0%, #d7feff 10%, #d7feff 90%, #526d6e 100%) !important;
    pointer-events: none;
}

main {
    position: relative;
    z-index: 1;
}

.contacto {
    padding-top: 80px;
}

.contacto h1 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 3em;
    opacity: 0; /* Empieza invisible */
    background-image: linear-gradient(90deg, #ff6f00 0%, #ffca28 35%, #fffde7 70%, #ff6f00 100%) !important; 
    background-size: 200% 100%;
    -webkit-background-clip: text; 
    background-clip: text; 
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 0.8)); 
    text-shadow: 0px 0px 12px rgba(0, 229, 255, 0.3); 
    transform: translateY(20px); /* Empieza un poco abajo */
    
    /* He añadido 'entradaTitulo' para que se vuelva visible y suba */
    animation: tituloGradiente 5s linear infinite, entradaTitulo 0.8s ease-out forwards; 
}

/* --- ESTA ES LA ANIMACIÓN QUE FALTABA --- */
@keyframes entradaTitulo {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ------------------------------------------------------- */

@keyframes tituloGradiente { 
    0% { background-position: 0% 50%; } 
    100% { background-position: 200% 50%; } 
}

/* Subtítulo del mapa */
.ubicacion-section h2 {
    font-size: 2rem;
    text-align: center;
    background: linear-gradient(to right, #022552, #0056b3, #022552);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 3s linear infinite;
    margin-bottom: 25px;
}

/* ==========================================================================
   CONTENEDORES GLASSMORPHISM
   ========================================================================== */
.contacto-container.glassMorph, 
.mapa-container.glassMorph {
    /* Glassmorphism sutil para fondo claro */
    background: rgba(255, 255, 255, 0.25) !important; 
    backdrop-filter: blur(15px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
    border-radius: 25px !important;
    
    margin: 0 auto 50px auto;
    padding: 40px;
    width: 90%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contacto-container { max-width: 650px; }
.mapa-container { max-width: 1000px; }

/* Efecto Hover */
.contacto-container:hover, 
.mapa-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(2, 37, 82, 0.2) !important;
    border-color: rgba(2, 37, 82, 0.3) !important;
}

/* ==========================================================================
   TEXTOS Y FORMULARIO (MÁXIMA LEGIBILIDAD)
   ========================================================================== */
.contacto-container p {
    text-align: center;
    color: #022552 !important; /* Azul oscuro para leer bien sobre fondo claro */
    font-weight: 500;
    margin-bottom: 30px;
}

label {
    display: block;
    color: #022552 !important; 
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

input, textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 25px;
    /* Fondo ligeramente oscuro para que resalte el blanco del texto */
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid rgba(2, 37, 82, 0.2) !important;
    border-radius: 12px;
    color: #022552 !important;
    font-family: inherit;
    box-sizing: border-box;
}

input::placeholder, textarea::placeholder {
    color: rgba(2, 37, 82, 0.5);
}

input:focus, textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: #022552 !important;
    box-shadow: 0 0 10px rgba(2, 37, 82, 0.1);
}

/* BOTÓN CORPORATIVO */
button {
    width: 100%;
    background: linear-gradient(135deg, #022552 0%, #034078 100%) !important;
    color: #fff !important;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(2, 37, 82, 0.3);
    filter: brightness(1.1);
}

/* EL MAPA */
.iframe-wrapper {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(2, 37, 82, 0.1);
}

.iframe-wrapper iframe {
    display: block;
    /* Quitamos el filtro invertido para que se vea natural sobre el fondo claro */
    filter: none; 
}

footer {
    position: relative;
    z-index: 10 !important;
}


/* RESPONSIVE */
@media (max-width: 768px) {
    .titulosGradiente { font-size: 2.2rem; padding-top: 100px; }
    .contacto-container, .mapa-container { padding: 25px; width: 95%; }
}