/* ==========================================
   SECCIÓN CONTACTO Y FORMULARIO (HOME)
   ========================================== */
.home-contact-section {
    background-color: #2222FF; 
    padding: 100px 40px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.contact-marquee-mobile {
    display: none;
}

.contact-section-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    gap: 80px; 
    align-items: stretch;
}

.contact-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-main-title {
    font-family: 'Arial Black', sans-serif;
    font-weight: 900;
    font-size: 6rem; 
    line-height: 0.9;
    letter-spacing: -3px;
    text-transform: uppercase;
    margin: 0 0 50px 0;
}

.text-cyan {
    color: #00A5E6; 
}

.text-white {
    color: #ffffff;
}

.contact-logo-wrap {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
}

.contact-together-logo {
    height: 85px; 
    width: auto;
    display: block;
    filter: invert(1); 
}

.contact-form-col {
    flex: 1.2;
    width: 100%;
}

/* ==========================================
   SISTEMA DE CONTROL DE FILAS Y RESET DE CF7
   ========================================== */
.cf7-custom-form p {
    margin: 0 !important;
    padding: 0 !important;
}

.cf7-custom-form br {
    display: none !important;
}

.cf7-custom-form .form-row {
    position: relative;
    margin-bottom: 25px; 
    width: 100%;
}

.cf7-custom-form .form-grid-2 {
    display: flex;
    gap: 20px;
    margin-bottom: 25px; 
    width: 100%;
}

.cf7-custom-form .form-grid-2 .form-col {
    position: relative;
    flex: 1;
    width: 100%;
}

.cf7-custom-form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

/* Estilo unificado de inputs */
.cf7-custom-form input[type="text"],
.cf7-custom-form input[type="email"],
.cf7-custom-form input[type="tel"],
.cf7-custom-form select,
.cf7-custom-form textarea {
    width: 100% !important;
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important; 
    color: #ffffff !important;
    padding: 16px 15px !important;
    font-size: 16px;
    font-family: Arial, sans-serif;
    outline: none;
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    height: 56px;
    position: relative;
    z-index: 1; 
}

.cf7-custom-form textarea {
    height: 130px !important;
    resize: none;
}

/* Estilos de Select de Servicios */
.cf7-custom-form select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white'><path d='M10.293 3.293 6 7.586 1.707 3.293A1 1 0 0 0 .293 4.707l5 5a1 1 0 0 0 1.414 0l5-5a1 1 0 1 0-1.414-1.414z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 20px center;
}

.cf7-custom-form select option {
    background-color: #2222FF;
    color: #ffffff;
}

/* ==========================================
   SOLUCIÓN AL COMPORTAMIENTO DEL LABELS
   ========================================== */
.floating-group label {
    position: absolute;
    left: 15px;
    top: 17px; 
    color: rgba(255, 255, 255, 0.6);
    font-family: Arial, sans-serif;
    font-size: 16px;
    pointer-events: none; 
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    background-color: #2222FF; 
    padding: 0 6px;
    z-index: 2;
}

/* Foco del Input */
.cf7-custom-form input:focus,
.cf7-custom-form select:focus,
.cf7-custom-form textarea:focus {
    border-color: #00A5E6 !important;
    box-shadow: 0 0 0 1px #00A5E6;
}

/* Animación de subida controlada por JS */
.floating-group.focused label,
.floating-group.has-value label {
    top: -8px !important;
    font-size: 12px;
    color: #00A5E6;
    font-weight: bold;
    z-index: 3;
}

.floating-group.has-value:not(.focused) label {
    color: rgba(255, 255, 255, 0.9);
}

/* Botón Enviar */
.cf7-custom-form .btn-container {
    margin-top: 10px;
    margin-bottom: 0;
}

.cf7-custom-form input[type="submit"] {
    background-color: #ffffff !important;
    color: #2222FF !important; 
    border: none !important;
    padding: 14px 50px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 35px; 
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: inline-block;
    height: auto;
}

.cf7-custom-form input[type="submit"]:hover {
    transform: scale(1.02);
    opacity: 0.95;
}

/* --- Redes Sociales --- */
.contact-social-wrap {
    margin-top: 35px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-social-wrap a {
    color: #ffffff;
    font-size: 22px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    text-decoration: none !important;
    transition: transform 0.3s ease, color 0.3s ease;
}

.contact-social-wrap a:hover {
    color: #00A5E6;
    transform: translateY(-3px);
}

.contact-social-wrap .social-divider {
    color: #ffffff;
    opacity: 0.3;
    font-size: 20px;
    pointer-events: none;
}

/* --- Validaciones --- */
.wpcf7-not-valid-tip {
    color: #ff4a4a !important;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* ==========================================
   CORRECCIÓN: BLINDAJE PARA WPCF7-RESPONSE-OUTPUT
   ========================================== */
.wpcf7-response-output {
    display: none !important; /* Oculto por defecto absoluto */
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    margin: 20px 0 0 0 !important;
    padding: 10px !important;
    border-radius: 4px;
}

/* Solo se muestra si CF7 activa un estado de respuesta real y remueve el display-none nativo */
.wpcf7-form.sent .wpcf7-response-output,
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.spam .wpcf7-response-output {
    display: block !important;
}

/* Cambios de color sutiles según el estado para mejorar la experiencia */
.wpcf7-form.invalid .wpcf7-response-output {
    border-color: #ff4a4a !important;
}
.wpcf7-form.sent .wpcf7-response-output {
    border-color: #00A5E6 !important;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
    .contact-section-container {
        flex-direction: column;
        gap: 40px;
    }
    .contact-main-title {
        font-size: 4.5rem;
        margin-bottom: 20px;
    }
    .contact-logo-wrap {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .home-contact-section {
        padding: 60px 0; 
    }

    .contact-section-container {
        padding: 0 25px;
        box-sizing: border-box;
    }

    .contact-info-col .contact-main-title {
        display: none; 
    }

    .contact-marquee-mobile {
        display: block;
        width: 100vw;
        background-color: transparent;
        margin-bottom: 40px;
        white-space: nowrap;
    }

    .marquee-inner {
        display: inline-flex;
        animation: contactMarquee 25s linear infinite; 
    }

    .marquee-inner span {
        font-family: 'Arial Black', sans-serif;
        font-weight: 900;
        font-size: 2.2rem; 
        color: #00A5E6;
        text-transform: uppercase;
        letter-spacing: -1px;
    }

    .cf7-custom-form input[type="submit"] {
        width: 100% !important;
        text-align: center;
    }

    .cf7-custom-form .form-grid-2 {
        flex-direction: column;
        gap: 0px; 
    }
    
    .cf7-custom-form .form-grid-2 .form-col {
        margin-bottom: 25px; 
    }

    .contact-social-wrap {
        justify-content: center;
    }
}

@keyframes contactMarquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}