/* --- Estructura General --- */
.wpo-contact-section {
    position: relative;
    padding: 84px 0;
    /* Imagen de fondo */
    background-image: url("/static/app_core/images/roofing_2 (2048x886) (4).png");
    background-size: cover;
    background-position: center;
    /* Parallax solo en pantallas grandes (mejor rendimiento) */
    background-attachment: scroll;
}

@media (min-width: 992px) {
    .wpo-contact-section {
        background-attachment: fixed;
    }
}

/* Capa oscura sobre la imagen para que resalte el formulario */
.contact-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65); /* Ajusta la opacidad aquí */
    z-index: 1;
}

.wpo-contact-section .container {
    position: relative;
    z-index: 2;
}

/* Allow wider layout just inside this section so inputs become longer */
.wpo-contact-section .container {
    max-width: 1200px; /* wider than default container to give more room */
}

/* --- Tarjeta del Formulario (El contenedor blanco) --- */
.contact-card {
    background: #ffffff;
    padding: 48px;
    border-radius: 22px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 35px;
}

.contact-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.15;
}

.contact-header p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* Gutter control (más aire entre columnas/filas) */
.wpo-contact-section .row.g-4 {
    --bs-gutter-x: 1rem; /* reduce horizontal gutters so columns are wider */
    --bs-gutter-y: 1.6rem;
}

/* --- Inputs y Labels --- */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    min-height: 52px;
    padding: 18px 18px;
    font-size: 1.06rem;
    color: #333;
    background-color: #f8f9fa; /* Gris muy claro */
    border: 2px solid #eaeff3;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* On very large screens make the two-column inputs a bit wider visually */
@media (min-width: 1200px) {
    .wpo-contact-section .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Efecto al hacer click en un input */
.form-control:focus {
    background-color: #fff;
    border-color: #e9c603; /* Tu color azul */
    box-shadow: 0 0 0 4px rgba(9, 200, 250, 0.1);
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 160px;
    padding-top: 14px;
}

/* --- Captcha Styling --- */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 10px;
    border: 2px solid #eaeff3;
    border-radius: 10px;
}

.captcha-container .form-control {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 8px 6px;
}

.captcha-input {
    flex: 1 1 240px;
    min-width: 220px;
}

/* Make two-column inputs wider on larger screens */
@media (min-width: 992px) {
    .wpo-contact-section .col-md-6 {
        flex: 0 0 55%;
        max-width: 55%;
    }
}

@media (min-width: 1400px) {
    .wpo-contact-section .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.captcha-visuals {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    flex: 0 0 auto;
}

.captcha-img {
    height: 44px;
    border-radius: 4px;
}

.btn-refresh {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: transform 0.3s ease, color 0.3s;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-refresh:hover {
    color: #09c8fa;
    transform: rotate(180deg);
}

/* --- Botón de Envío --- */
.submit-btn {
    width: 100%;
    padding: 16px;
    background-color: #e9c603;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(240, 255, 36, 0.3);
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: #06a0c9;
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(9, 200, 250, 0.4);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .contact-card {
        padding: 25px 20px;
    }
    
    .contact-header h2 {
        font-size: 1.8rem;
    }

    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .captcha-visuals {
        justify-content: space-between;
    }

    .form-control {
        min-height: 48px;
        padding: 12px 14px;
    }

    textarea.form-control {
        min-height: 130px;
    }
}

/* --- Google Map Embed --- */
.map-embed {
    width: 100%;
    height: 450px;
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}