/* ==========================================================================
   CSS SECCIÓN CONTACTO: VERSIÓN FINAL INTEGRAL RECONSTRUIDA
   ========================================================================== */

/* --- CONTENEDOR MAESTRO --- */
div.contacto-page-section {
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    color: #1d2a44;
    padding-top: 60px;
    padding-bottom: 60px;
    width: 100%;
    max-width: 1140px; 
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* --- CABECERA --- */
.contacto-page-section .contacto-header {
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
}

.contacto-page-section .contacto-main-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #1d2a44;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.contacto-page-section .contacto-subtitle {
    font-size: 1.15rem;
    color: #5b7bb0;
    font-weight: 500;
}

/* --- COLUMNAS (GRID) --- */
.contacto-page-section .contacto-container-flex {
    display: grid;
    grid-template-columns: 46% 50%; 
    column-gap: 4%;
    align-items: start;
    width: 100%;
    margin-bottom: 60px;
    box-sizing: border-box;
}

/* --- COLUMNA IZQUIERDA --- */
.contacto-page-section .contacto-info-column {
    width: 100%;
    box-sizing: border-box;
}

.contacto-page-section .contacto-info-column h2 {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1d2a44;
    margin-top: 0;
    margin-bottom: 20px;
}

.contacto-page-section .contacto-info-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 35px;
}


.contacto-page-section .contacto-item-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    border-top: 1px solid #e2e8f0;
    padding-top: 25px;
}

.contacto-page-section .contacto-item {
    display: grid;
    grid-template-columns: 35px 1fr; 
    align-items: center; 
    font-size: 1rem;
    line-height: 1.5;
}

.contacto-page-section .contacto-item:nth-child(2) {
    align-items: start;
}
.contacto-page-section .contacto-item:nth-child(2) .contacto-icon {
    margin-top: 3px;
}

.contacto-page-section .contacto-icon {
    width: 22px;
    height: auto;
    object-fit: contain;
    justify-self: start;
}

.contacto-page-section .contacto-item span {
    font-weight: 500;
    color: #1d2a44;
}

.contacto-page-section .contacto-form-card {
    width: 100%;
    background-color: #e4eef9; 
    padding: 35px;
    border-radius: 8px;
    box-sizing: border-box;
}

.contacto-page-section .form-group {
    margin-bottom: 18px;
    width: 100%;
}

.contacto-page-section .form-group input,
.contacto-page-section .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    color: #333333;
    background-color: #ffffff;
    box-sizing: border-box;
    outline: none;
}

.contacto-page-section .form-group textarea {
    height: 110px;
    resize: none;
}

.contacto-page-section .btn-enviar-contacto {
    width: 100%;
    padding: 15px;
    background-color: #1d2a44;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.contacto-page-section .btn-enviar-contacto:hover {
    background-color: #263757;
}

/* --- MAPA Y ELEMENTOS INFERIORES --- */
.contacto-page-section .contacto-mapa-section {
    width: 100%;
    box-sizing: border-box;
}

.contacto-page-section .contacto-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #5b7bb0;
    margin-top: 50px;
    margin-bottom: 25px;
    width: 100%;
    display: inline-block; 
    animation: flotarTitulo 3s ease-in-out infinite;
}




.contacto-page-section .contacto-mapa-wrapper {
    width: 100%;
    height: 400px; 
    border-radius: 8px; 
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    
    opacity: 0;
    animation: entrarMapa 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.4s;
    
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.contacto-page-section .contacto-mapa-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.85;
    filter: grayscale(10%) contrast(95%);
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.contacto-page-section .contacto-mapa-wrapper:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12); 
}

.contacto-page-section .contacto-mapa-wrapper:hover iframe {
    opacity: 1; 
    filter: grayscale(0%) contrast(100%); 
}

@keyframes entrarMapa {
    from {
        opacity: 0;
        margin-top: 35px;
    }
    to {
        opacity: 1;
        margin-top: 0;
    }
}
    

.contacto-page-section .contacto-estudio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px; 
    width: 100%;
}

.contacto-page-section .estudio-photo-box {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3; 
    background-color: #1d2a44; 
    border-radius: 4px;
    
 
    
    opacity: 0;
    animation: entrarDesdeArriba 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.contacto-page-section .estudio-photo-box:nth-child(1) { animation-delay: 0.2s; }
.contacto-page-section .estudio-photo-box:nth-child(2) { animation-delay: 0.4s; }
.contacto-page-section .estudio-photo-box:nth-child(3) { animation-delay: 0.6s; }

.contacto-page-section .estudio-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    border-radius: 4px;
    filter: grayscale(25%) brightness(0.92);
    opacity: 0.95;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    
    /* Controla la velocidad y fluidez del agrandado del borde e imagen */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
}

/* 🌟 EL HOVER AHORA INTERACTÚA DIRECTAMENTE CON LA IMAGEN Y SU BORDE EXTERIOR */
.contacto-page-section .estudio-photo-box:hover img {
    transform: scale(1.06); 
    filter: grayscale(0%) brightness(1); 
    opacity: 1;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); /* La sombra acompaña al borde agrandado */
}

@keyframes entrarDesdeArriba {
    from {
        opacity: 0;
        transform: translateY(-35px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* --- BANNER DE CABECERA --- */
.banner-contacto {
    background-image: url('../imagenes/contbanner.jpg'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    min-height: 350px; 
    position: relative;
    display: flex;
    align-items: center;
}

/* Capa oscura transparente para que resalte el texto blanco */
.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 25, 44, 0.75); 
    display: flex;
    align-items: center;
    padding: 0 10%; 
    box-sizing: border-box;
}

/* Contenedor del texto */
.banner-overlay {
   display: flex;
    justify-content: center; /* Centra el contenido horizontalmente */
    align-items: center;     /* Centra el contenido verticalmente */
    width: 100%;
    min-height: 100%; 
    padding: 20px;           /* Colchón de seguridad para pantallas pequeñas */
    box-sizing: border-box;
}

.banner-contenido {
color: #ffffff;
    font-family: 'Poppins', 'Arial', sans-serif; 
    max-width: 600px;
    text-align: center;      /* Alinea los textos internamente al centro */
    margin: 0 auto;          /* Asegura el centrado en cualquier circunstancia */
}

/* El texto pequeño de arriba verde/turquesa */
.banner-subtitulo {
    color: #4db6ac; 
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 10px;

    /* 🌟 Aparece primero */
    opacity: 0;
    animation: deslizarElegante 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.1s;
}

/* El título gigante "Contáctanos" */
.banner-titulo {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 10px 0;

    /* 🌟 Aparece segundo */
    opacity: 0;
    animation: deslizarElegante 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.3s;
}

/* El texto descriptivo opcional */
.banner-texto {
    font-size: 18px;
    color: #e0e0e0;
    margin: 0;

    /* 🌟 Aparece al final */
    opacity: 0;
    animation: deslizarElegante 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.5s;
}


/* ==========================================================================
   REGLA DE ANIMACIÓN (Agrégala al final si no está en este archivo CSS)
   ========================================================================== */
@keyframes deslizarElegante {
    from {
        opacity: 0;
        transform: translateX(-35px); /* Desplazamiento sutil desde la izquierda */
    }
    to {
        opacity: 1;
        transform: translateX(0); /* Posición final */
    }
}

/* ==========================================================================
   --- RESPONSIVE MEDIA QUERIES ---
   ========================================================================== */
@media (max-width: 1200px) {
    div.contacto-page-section {
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (max-width: 768px) {
    div.contacto-page-section {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 40px;
        padding-bottom: 40px;
    }
    
    .contacto-page-section .contacto-main-title {
        font-size: 2rem;
    }

    .contacto-page-section .contacto-container-flex {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }
    
    .contacto-page-section .contacto-item {
        grid-template-columns: 35px 1fr; 
        gap: 0;
    }
    
    /* Ajuste responsivo de la galería para evitar estiramientos desproporcionados */
    .contacto-page-section .contacto-estudio-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .banner-contacto {
        min-height: 250px;
    }
    
    .banner-overlay {
        padding: 0 20px;
        justify-content: center;
        text-align: center;
    }
    
    .banner-titulo {
        font-size: 36px;
    }
    
    .banner-texto {
        font-size: 16px;
    }
}
.contacto-info-column h2,
.contacto-info-desc {
    opacity: 0;
    display: inline-block; /* Asegura el correcto funcionamiento de los transforms */
    width: 100%; /* Evita problemas de ancho al usar inline-block */
    
    /* 1. Entrada desde la izquierda (0.8s) */
    /* 2. Flotación infinita (4s) que inicia tras terminar la entrada */
    animation: 
        contactoEntradaIzquierda 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards,
        contactoFlotarInfinito 4s ease-in-out 0.8s infinite;
    
    will-change: transform, opacity;
}

/* 🌟 ANIMACIÓN 1: ENTRADA DESDE LA IZQUIERDA */
@keyframes contactoEntradaIzquierda {
    from {
        opacity: 0;
        transform: translateX(-30px) translateY(0);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

/* 🌟 ANIMACIÓN 2: FLOTAR SUAVEMENTE DE ARRIBA A ABAJO */
@keyframes contactoFlotarInfinito {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px); /* Sube 4px sutilmente */
    }
}
.contacto-item {
    /* Asegura que el cambio de tamaño sea suave al entrar y salir con el mouse */
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    cursor: pointer; /* Cambia el cursor a una mano para indicar que es interactivo */
}


.contacto-item:hover {
    transform: scale(1.05) translateX(5px); /* Se agranda un 5% y se mueve 5px a la derecha */
}
/* 1. Preparamos las casillas del formulario para una transición suave */
.form-group input, 
.form-group textarea {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

/* 🌟 EFECTO AL PASAR EL MOUSE POR ENCIMA DE UNA CASILLA */
.form-group input:hover, 
.form-group textarea:hover {
    transform: translateY(-3px); /* Levanta solo esa casilla 3px */
    box-shadow: 0 5px 15px rgba(22, 29, 58, 0.08); /* Le da una sombra suave individual */
}


.form-group input:focus, 
.form-group textarea:focus {
    transform: translateY(-3px); 
    box-shadow: 0 6px 18px rgba(91, 123, 176, 0.15); 
    outline: none; 
}

.contacto-item-link {
    text-decoration: none; 
    color: inherit;        
    display: block;        
}

.contacto-item-link:hover .contacto-item {
    opacity: 0.85;         
}