/* ==========================================================================
   PÁGINA DE CONTACTO
   ========================================================================== */

.page-contact {
    position: relative;
    overflow-x: hidden;
}

.page-contact > *:not(.contact-bg-svg) {
    position: relative;
    z-index: 2;
}

.contact-bg-svg {
    position: absolute !important;
    bottom: 0;
    left: 0;
    width: auto;
    z-index: 3; 
    pointer-events: none;
    display: block;
    height: auto;
}

@media (max-width: 992px) {
  .contact-bg-svg {
    z-index: 2; 
  }
}
/* ==========================================================================
   PÁGINA DE CONTACTO - GRID
   ========================================================================== */

.page-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

/* --- COLUMNA IZQUIERDA --- */
.contact-left {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: sticky;
    top: 100px;
}

.contact-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-subtitle {
    font-size: 18px;
    color: #1e1348;
    margin: 0;
}

.contact-image-wrapper {
    width: calc(50vw - 40px);
    max-width: none;
    margin-left: calc(100% - (50vw - 40px));
    border-radius: 0 24px 24px 0; 
    overflow: hidden;
}

.contact-image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 4/3;
    display: block;
}

/* --- COLUMNA DERECHA (FORMULARIO CF7) --- */
.contact-form-section {
    width: 100%;
}

.custom-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.custom-form .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.custom-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.custom-form label {
    font-size: 14px;
    line-height: 22px;
    font-weight: 700;
    color: #450737;
    margin: 0;
}

.custom-form .label-optional {
    font-weight: 500;
    color: #6D6D6D;
}

.custom-form input[type="text"],
.custom-form input[type="email"],
.custom-form input[type="tel"],
.custom-form select,
.custom-form textarea {
    width: 100%;
    padding: 14px 16px;
    background-color: transparent;
    border: 1px solid rgba(81, 17, 59, 0.2);
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.custom-form input::placeholder,
.custom-form textarea::placeholder {
    color: #999;
}

.custom-form input:focus,
.custom-form select:focus,
.custom-form textarea:focus {
    outline: none;
    border-color: #51113b;
}

.custom-form textarea {
    min-height: 180px;
    resize: vertical;
}

/* ==========================================================================
   CUSTOM CHECKBOX CF7
   ========================================================================== */

.form-acceptance .wpcf7-list-item {
    margin: 0;
    display: block;
}

.form-acceptance .wpcf7-list-item > label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.form-acceptance input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-acceptance .wpcf7-list-item-label {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.form-acceptance .wpcf7-list-item-label::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 2px solid #450737;
    border-radius: 4px;
    background-color: transparent;
    transition: all 0.2s ease;
    background-position: center;
    background-size: 12px 12px;
    background-repeat: no-repeat;
    margin-right: 10px;
}

.form-acceptance input[type="checkbox"]:checked + .wpcf7-list-item-label::before {
    background-color: #450737;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-acceptance a {
    color: #450737;
    font-weight: 700;
    text-decoration: underline;
}

/* ==========================================================================
   BOTÓN SUBMIT Y ALERTAS
   ========================================================================== */

.form-submit-wrapper {
    position: relative;
    margin-top: 8px;
    display: flex;
    align-items: center;
}
.button-submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    background-color: #450737 !important;
    color: #FFF6B5 !important;
    padding: 14px 32px !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
    width: fit-content;
    line-height: 1;
}

.button-submit:hover {
    background-color: var(--color-brand-primary-03) !important;
}

.button-submit .button-text,
.button-submit svg {
    transition: transform 0.3s ease !important;
}

.button-submit svg {
    width: 16px;
    height: 16px;
    display: block;
    margin-top: 2px;
}

.button-submit:hover .button-text {
    transform: translateX(4px) !important;
}

.button-submit:hover svg {
    transform: translateX(-4px) !important;
}

.form-submit-wrapper .wpcf7-spinner {
    position: absolute;
    right: -40px;
}

.wpcf7 form .wpcf7-response-output {
    border-radius: 8px;
    margin-top: 24px;
    padding: 16px;
    border-color: #51113b;
}

.form-submit-wrapper br {
    display: none !important;
}

/* ==========================================================================
   RESPONSIVE (MÓVILES Y TABLETS)
   ========================================================================== */

@media (max-width: 992px) {
    .page-contact-grid {
        grid-template-columns: 1fr; 
        gap: 48px;
    }
    
    .contact-left {
        position: relative;
        top: 0;
    }

    .contact-image-wrapper {
        width: 100%;
        margin-left: 0;
        border-radius: 24px;
    }
}

@media (max-width: 600px) {
    .custom-form .form-row-2 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .form-group.form-acceptance .wpcf7-list-item {
        display: flex;
        justify-content: center;
    }
    .form-group.form-acceptance .wpcf7-list-item-label {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }
    .form-submit-wrapper{
        justify-content: center;
    }
}