.ccl-contact-section {
    padding: 60px 0;
}

.ccl-contact-grid {
    display: flex;
    flex-direction: column;
    column-gap: 30px;
    margin-top: 40px;
}

.ccl-contact-section .wp-block-columns {
    gap: 60px;
}

/* Contact Item Row (Left Side) */
.ccl-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid var(--color-gray-light);
    padding: 30px 20px;
    border-radius: 16px;
}

.ccl-contact-icon-box {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    background-color: #FFF7E9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-warning);
    font-size: 22px;
}

.ccl-contact-icon-box p {
    margin: 0 !important;
}

.ccl-contact-icon-box i,
.ccl-contact-icon-box svg {
    width: 24px;
    height: 24px;
    display: block;
    line-height: 1;
}

.ccl-contact-icon-box i::before {
    margin: 0 !important;
}

.ccl-contact-content {
    flex: 1;
    margin-top: 0 !important;
}

.ccl-contact-content p {
    margin: 0 !important;
    line-height: 1.5;
    font-size: 16px;
    color: var(--color-gray-dark);
}

.ccl-contact-content a {
    color: inherit;
    text-decoration: none;
    transition: var(--ccl-transition);
}

.ccl-contact-content a:hover {
    color: var(--color-accent);
}

/* Image Blur Overlay (Right Side) */
.ccl-contact-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: 100%;
    min-height: 400px;
}

.ccl-contact-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ccl-blur-overlay-contact {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    /* Blur effect starting from bottom-left corner */
    mask-image: radial-gradient(circle at bottom left, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(circle at bottom left, black 0%, transparent 70%);
}

.ccl-contact-image-content {
    position: absolute;
    bottom: 0;
    left: 50px;
    right: 0;
    z-index: 3;
    background: rgba(5, 28, 44, 0.65);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 50px;
    border-radius: 0;
}

.ccl-contact-image-content h3 {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ccl-contact-image-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ccl-contact-full-bleed-section .ccl-full-height-img img {
    height: 100% !important;
    object-fit: cover !important;
}

@media (max-width: 991px) {
    .ccl-contact-image-wrapper {
        margin-top: 40px;
        min-height: 300px;
    }
}

/* Editor Specific Adjustments */
.editor-styles-wrapper .ccl-contact-image-wrapper {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 400px !important;
}

.editor-styles-wrapper .ccl-contact-image-wrapper>.wp-block-image {
    height: 100% !important;
    margin: 0 !important;
}

.editor-styles-wrapper .ccl-contact-image-wrapper img {
    height: 100% !important;
    object-fit: cover !important;
}

.editor-styles-wrapper .ccl-blur-overlay-contact {
    position: absolute !important;
    inset: 0 !important;
    z-index: 5 !important;
    pointer-events: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    mask-image: radial-gradient(circle at bottom left, black 0%, transparent 70%) !important;
    -webkit-mask-image: radial-gradient(circle at bottom left, black 0%, transparent 70%) !important;
}

.editor-styles-wrapper .ccl-contact-image-content {
    position: absolute !important;
    bottom: 0 !important;
    left: 50px !important;
    right: 0 !important;
    width: auto !important;
    z-index: 10 !important;
    background: rgba(5, 28, 44, 0.65) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    padding: 50px !important;
    border-radius: 0 !important;
}

.editor-styles-wrapper .ccl-contact-image-content h3 {
    color: #fff !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

.editor-styles-wrapper .ccl-contact-image-content p {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 20px !important;
    margin: 0 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
}

/* ==========================================================================
   CONTACT FORM - ESTRUCTURA BASE (Layout y Funcionalidad)
   ========================================================================== */

.ccl-contact-form-wrapper {
    padding: 30px;
    border-radius: 20px;
}

/* GRID */
.ccl-contact-form-wrapper .form-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.ccl-contact-form-wrapper .col-md-6 {
    width: calc(50% - 7px);
    flex: none;
}

.ccl-contact-form-wrapper .col-md-12 {
    width: 100%;
    flex: none;
}

.ccl-contact-form-wrapper .col-md-6:last-child:nth-child(odd) {
    width: 100%;
}

/* Inputs y Selects - Estructura */
.ccl-contact-form-wrapper input:not([type="submit"]),
.ccl-contact-form-wrapper select,
.ccl-contact-form-wrapper textarea {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 8px;
    padding: 0 18px;
    font-size: 14px;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box;
}

.ccl-contact-form-wrapper select {
    appearance: none;
    cursor: pointer;
}

/* Contenedor de la flecha (Select) */
.ccl-contact-form-wrapper .wpcf7-form-control-wrap:has(select)::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 12px;
    height: 12px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.ccl-contact-form-wrapper .wpcf7-form-control-wrap:has(select:focus)::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Botón - Estructura */
.ccl-contact-form-wrapper .wpcf7-submit {
    width: 100%;
    height: 56px;
    border: none;
    border-radius: 50px !important;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

/* Validación Flotante - Configuración General */
.wpcf7 .wpcf7-form-control-wrap {
    display: block;
    position: relative;
    width: 100%;
}

/* Términos - Estructura */
.terminos-inline-int {
    margin-bottom: 40px;
    width: 100%;
}

.terminos-inline-int p {
    display: flex !important;
    align-items: self-end !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    width: auto !important;
}

/* Forzar que todos los contenedores internos de CF7 sean inline */
.terminos-inline-int .wpcf7-form-control-wrap,
.terminos-inline-int .wpcf7-checkbox,
.terminos-inline-int .wpcf7-list-item,
.terminos-inline-int .wpcf7-list-item-label,
.terminos-inline-int label,
.terminos-inline-int span {
    display: inline-flex !important;
    align-items: self-end !important;
    white-space: nowrap !important;
    width: auto !important;
    margin: 0 !important;
}

.terminos-inline-int .terminos-link {
    display: inline-block !important;
    white-space: nowrap !important;
    text-decoration: underline !important;
}

.terminos-inline-int input[type="checkbox"] {
    margin: 0 4px 0 0 !important;
    flex-shrink: 0 !important;
}

.ccl-contact-form-wrapper .wpcf7-not-valid-tip {
    position: absolute;
    top: -15px;
    left: 12px;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   STYLE 1 - DARK BLUE (Actual)
   ========================================================================== */

.ccl-contact-form-wrapper.style-1 {
    background: #012c54;
}

.ccl-contact-form-wrapper.style-1 input:not([type="submit"]),
.ccl-contact-form-wrapper.style-1 select,
.ccl-contact-form-wrapper.style-1 textarea {
    background: #143b6a !important;
    color: #ffffff !important;
}

.ccl-contact-form-wrapper.style-1 input:focus,
.ccl-contact-form-wrapper.style-1 select:focus,
.ccl-contact-form-wrapper.style-1 textarea:focus {
    color: #ffffff !important;
}

/* Placeholder Styling Style 1 */
.ccl-contact-form-wrapper.style-1 input::placeholder,
.ccl-contact-form-wrapper.style-1 textarea::placeholder {
    color: #ffffff !important;
    opacity: 1 !important;
}

.ccl-contact-form-wrapper.style-1 input::-webkit-input-placeholder,
.ccl-contact-form-wrapper.style-1 textarea::-webkit-input-placeholder {
    color: #ffffff !important;
    opacity: 1 !important;
}

.ccl-contact-form-wrapper.style-1 input::-moz-placeholder,
.ccl-contact-form-wrapper.style-1 textarea::-moz-placeholder {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Flecha Select Style 1 */
.ccl-contact-form-wrapper.style-1 .wpcf7-form-control-wrap:has(select)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' 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'/%3E%3C/svg%3E");
}

/* Botón Style 1 */
.ccl-contact-form-wrapper.style-1 .wpcf7-submit {
    background: #fff;
    color: #0d3966;
}

.ccl-contact-form-wrapper.style-1 .wpcf7-submit:hover,
.ccl-contact-form-wrapper.style-1 .wpcf7-submit:focus,
.ccl-contact-form-wrapper.style-1 .wpcf7-submit:active,
.ccl-contact-form-wrapper.style-1 .wpcf7-submit[disabled] {
    background: #fff !important;
    color: #0d3966 !important;
}

/* Términos Style 1 */
.ccl-contact-form-wrapper.style-1 .terminos-inline-int p,
.ccl-contact-form-wrapper.style-1 .terminos-inline-int .terminos-link {
    color: #fff;
}

/* Validación Style 1 */
.ccl-contact-form-wrapper.style-1 .wpcf7-not-valid-tip {
    background: #ffc325;
    color: #051c2c;
}

.ccl-contact-form-wrapper.style-1 .wpcf7-response-output {
    color: #fff;
}

/* Focus Style 1 */
.ccl-contact-form-wrapper.style-1 input:focus,
.ccl-contact-form-wrapper.style-1 select:focus,
.ccl-contact-form-wrapper.style-1 textarea:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   STYLE 2 - LIGHT FORM / DARK GRID
   ========================================================================== */

/* Grid Variant */
.ccl-contact-grid.style-2 .ccl-contact-item {
    background-color: var(--color-primary-dark);
    border: none !important;
}

.ccl-contact-grid.style-2 .ccl-contact-content p,
.ccl-contact-grid.style-2 .ccl-contact-content a {
    color: #fff !important;
}

.ccl-contact-grid.style-2 .ccl-contact-content a:hover {
    color: var(--color-warning) !important;
}

.ccl-contact-grid.style-2 .ccl-contact-icon-box {
    color: var(--color-warning);
}

/* Form Variant */
.ccl-contact-form-wrapper.style-2 {
    background: #ffffff !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.ccl-contact-form-wrapper.style-2 input:not([type="submit"]),
.ccl-contact-form-wrapper.style-2 select,
.ccl-contact-form-wrapper.style-2 textarea {
    background: var(--color-gray-light) !important;
    color: var(--color-gray-dark) !important;
}

/* Placeholder Styling Style 2 */
.ccl-contact-form-wrapper.style-2 input::placeholder,
.ccl-contact-form-wrapper.style-2 textarea::placeholder {
    color: var(--color-gray-dark) !important;
    opacity: 1 !important;
    /* Asegurar que no se vea desvanecido */
}

/* Chrome/Safari/Edge Placeholder */
.ccl-contact-form-wrapper.style-2 input::-webkit-input-placeholder,
.ccl-contact-form-wrapper.style-2 textarea::-webkit-input-placeholder {
    color: var(--color-gray-dark) !important;
}

/* Firefox Placeholder */
.ccl-contact-form-wrapper.style-2 input::-moz-placeholder,
.ccl-contact-form-wrapper.style-2 textarea::-moz-placeholder {
    color: var(--color-gray-dark) !important;
}

/* Flecha Select Style 2 */
.ccl-contact-form-wrapper.style-2 .wpcf7-form-control-wrap:has(select)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234b535d' 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'/%3E%3C/svg%3E");
}

/* Botón Style 2 */
.ccl-contact-form-wrapper.style-2 .wpcf7-submit {
    background-color: var(--color-primary-alt) !important;
    color: #fff !important;
}

.ccl-contact-form-wrapper.style-2 .wpcf7-submit:hover,
.ccl-contact-form-wrapper.style-2 .wpcf7-submit:focus,
.ccl-contact-form-wrapper.style-2 .wpcf7-submit:active {
    background-color: var(--color-primary-alt) !important;
    color: #fff !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Términos Style 2 */
.ccl-contact-form-wrapper.style-2 .terminos-inline-int,
.ccl-contact-form-wrapper.style-2 .terminos-inline-int p,
.ccl-contact-form-wrapper.style-2 .terminos-inline-int label,
.ccl-contact-form-wrapper.style-2 .terminos-inline-int span,
.ccl-contact-form-wrapper.style-2 .terminos-inline-int .terminos-link {
    color: var(--color-gray-dark) !important;
}

/* Validación Style 2 */
.ccl-contact-form-wrapper.style-2 .wpcf7-not-valid-tip {
    background: var(--color-warning) !important;
    color: var(--color-primary-dark) !important;
}

/* Focus Style 2 */
.ccl-contact-form-wrapper.style-2 input:focus,
.ccl-contact-form-wrapper.style-2 select:focus,
.ccl-contact-form-wrapper.style-2 textarea:focus {
    outline: none !important;
    box-shadow: none !important;
    background-color: var(--color-gray-light) !important;
    border: none !important;
}

/* ==========================================================================
   STYLE 3 - TRANSPARENT / NO PADDING
   ========================================================================== */

.ccl-contact-form-wrapper.style-3 {
    padding: 0 !important;
    background: transparent !important;
}

.ccl-contact-form-wrapper.style-3 input:not([type="submit"]),
.ccl-contact-form-wrapper.style-3 select,
.ccl-contact-form-wrapper.style-3 textarea:not(.wp-block-shortcode textarea) {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

/* Forzar que el textarea del bloque de shortcode en el editor sea legible */
.editor-styles-wrapper .ccl-contact-form-wrapper.style-3 .wp-block-shortcode textarea {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #ccc !important;
}

.ccl-contact-form-wrapper.style-3 input::placeholder,
.ccl-contact-form-wrapper.style-3 textarea::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Flecha Select Style 3 */
.ccl-contact-form-wrapper.style-3 .wpcf7-form-control-wrap:has(select)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' 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'/%3E%3C/svg%3E");
}

/* Términos Style 3 */
.ccl-contact-form-wrapper.style-3 .terminos-inline-int p,
.ccl-contact-form-wrapper.style-3 .terminos-inline-int label,
.ccl-contact-form-wrapper.style-3 .terminos-inline-int span:not(.wpcf7-not-valid-tip),
.ccl-contact-form-wrapper.style-3 .terminos-inline-int .terminos-link {
    color: #ffffff !important;
}

/* Validación Style 3 - Asegurar visibilidad */
.ccl-contact-form-wrapper.style-3 .wpcf7-not-valid-tip {
    background-color: var(--color-warning) !important;
    color: var(--color-primary-dark) !important;
    display: block !important;
    /* Evitar el inline-flex de los términos */
    width: auto !important;
    position: absolute !important;
}

/* Mensaje de respuesta global (Error/Éxito) en blanco para Style 3 */
.ccl-contact-form-wrapper.style-3 .wpcf7-response-output {
    color: #ffffff !important;
    border-color: #ffffff !important;
    margin-top: 20px !important;
}

/* Forzar color de texto en los "globos" de validación del navegador si el fondo es blanco */
.ccl-contact-form-wrapper.style-3 input:invalid,
.ccl-contact-form-wrapper.style-3 select:invalid,
.ccl-contact-form-wrapper.style-3 textarea:invalid {
    box-shadow: none;
    /* Reset shadow para evitar bordes rojos feos nativos */
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 781px) {
    .ccl-contact-form-wrapper .col-md-6 {
        width: 100%;
    }

    .ccl-contact-image img {
        max-height: 360px;
        object-fit: cover;
    }

    .ccl-image-column:not(:has(img)) {
        display: none;
    }
}


.ccl-contact-card {
    border: 1px solid #D8DCE2;
    border-radius: 22px;
    padding: 20px;
}

.ccl-image-column {
    display: flex;
}


.ccl-contact-image img {
    height: 100% !important;
    object-position: left;
    object-fit: cover;
}


/* Ocultar errores duplicados — CF7 los genera 2 veces */
.contact-form-wrapper .input-filled .wpcf7-not-valid-tip + .wpcf7-not-valid-tip {
    display: none !important;
}
