/* ============================================
   CONTACTO - NUEVO DISEÑO CORPORATIVO
   CPL Consultores & Asociados
   ============================================ */

/* ============================================
   1. VARIABLES GLOBALES
   ============================================ */
:root {
    /* Colores institucionales */
    --cpl-blue: #002B6F;
    --cpl-blue-dark: #001F4D;
    --cpl-blue-light: #E8EEF8;
    
    /* Grises */
    --cpl-gray-bg: #F8F9FC;
    --cpl-gray-border: #D9DDE5;
    --cpl-gray-text: #5A6F8A;
    --cpl-gray-dark: #2C3E50;
    
    /* Blancos */
    --cpl-white: #FFFFFF;
    
    /* Estados */
    --cpl-success: #28A745;
    --cpl-error: #DC2626;
    --cpl-whatsapp: #25D366;
    
    /* Sombras */
    --cpl-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    --cpl-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.08);
    
    /* Bordes */
    --cpl-radius-card: 12px;
    --cpl-radius-input: 8px;
    --cpl-radius-btn: 8px;
}

/* ============================================
   2. CONTENEDOR PRINCIPAL
   ============================================ */
.cpl-contact-page {
    margin-top: 100px;
    background-color: var(--cpl-gray-bg);
    padding: 4rem 1rem 2rem;
}

.cpl-contact-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 700px 350px;
    gap: 30px;
}

/* ============================================
   3. TARJETAS (FORMULARIO + INFORMACIÓN)
   ============================================ */
.cpl-contact-card,
.cpl-info-card {
    background: var(--cpl-white);
    border-radius: var(--cpl-radius-card);
    box-shadow: var(--cpl-shadow);
    padding: 30px;
}

/* Tarjeta de información con padding interno de 20px */
.cpl-info-card {
    padding: 20px;
}

/* ============================================
   4. COLUMNA FORMULARIO - TÍTULOS
   ============================================ */
.cpl-contact-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cpl-blue);
    margin-bottom: 0.5rem;
}

.cpl-contact-subtitle {
    font-size: 0.9rem;
    color: var(--cpl-gray-text);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cpl-gray-border);
}

/* ============================================
   5. GRID DEL FORMULARIO (2 COLUMNAS)
   ============================================ */
.cpl-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 1.5rem;
}

/* ============================================
   6. INPUTS CON ÍCONO Y LABEL FLOTANTE
   ============================================ */
.cpl-input-group {
    position: relative;
    margin-bottom: 0;
}

/* Icono dentro del input */
.cpl-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cpl-gray-text);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
    line-height: 1;  /* ← Asegura que el icono no tenga altura extra */
}

/* Input base */
.cpl-input {
    width: 100%;
    height: 56px;
    padding: 0 16px 0 44px;
    font-size: 1rem;
    border: 1px solid var(--cpl-gray-border);
    border-radius: var(--cpl-radius-input);
    background: var(--cpl-white);
    transition: all 0.2s ease;
    outline: none;
    line-height: 1.2;  /* ← Ajusta la altura del texto */
}

/* Select personalizado */
.cpl-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235A6F8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

/* Focus en inputs */
.cpl-input:focus {
    border-color: var(--cpl-blue);
    box-shadow: 0 0 0 3px rgba(0, 43, 111, 0.1);
}

/* Estado error */
.cpl-input.cpl-error {
    border-color: var(--cpl-error);
}

.cpl-input-group label {
    position: absolute;
    left: 44px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--cpl-gray-text);
    transition: all 0.2s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 4px;
    line-height: 1.2;  /* ← Alinea el label verticalmente */
}

/* Label flotante activo */
.cpl-input:focus ~ label,
.cpl-input:not(:placeholder-shown) ~ label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.7rem;
    background: var(--cpl-white);
    color: var(--cpl-blue);
}

/* ============================================
   7. MENSAJES DE ERROR
   ============================================ */
.cpl-error-msg {
    display: none;
    font-size: 0.7rem;
    color: var(--cpl-error);
    margin-top: 4px;
    margin-left: 12px;
}

/* ============================================
   8. CHECKBOX DE PROTECCIÓN DE DATOS
   ============================================ */
.cpl-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 1.5rem 0;
}

.cpl-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--cpl-blue);
}

.cpl-checkbox-text {
    flex: 1;
}

.cpl-checkbox-text label {
    font-size: 0.75rem;
    color: var(--cpl-gray-dark);
    line-height: 1.4;
    display: block;
}

.cpl-checkbox-text a {
    color: var(--cpl-blue);
    text-decoration: none;
}

.cpl-checkbox-text a:hover {
    text-decoration: underline;
}

.cpl-checkbox-text .cpl-error-msg {
    margin-top: 8px;
    margin-left: 0;
}

/* ============================================
   9. BOTÓN ENVIAR
   ============================================ */
.cpl-btn-submit {
    width: 100%;
    height: 56px;
    background: var(--cpl-blue);
    color: var(--cpl-white);
    border: none;
    border-radius: var(--cpl-radius-btn);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cpl-btn-submit:hover:not(:disabled) {
    background: var(--cpl-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--cpl-shadow-hover);
}

.cpl-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ============================================
   10. BADGE DE SEGURIDAD (DEBAJO DEL BOTÓN)
   ============================================ */
.cpl-secure-badge {
    text-align: center;
    font-size: 0.75rem;
    color: var(--cpl-gray-text);
    margin-top: 1rem;
}

.cpl-secure-badge i {
    margin-right: 4px;
}

/* ============================================
   11. COLUMNA INFORMACIÓN - NUEVO DISEÑO
   ============================================ */

/* Tarjeta de información */
.cpl-info-card {
    background: var(--cpl-white);
    border-radius: var(--cpl-radius-card);
    box-shadow: var(--cpl-shadow);
    padding: 30px;
}

/* Título Ubíquenos - mismo tamaño que Escríbanos */
.cpl-info-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cpl-blue);
    margin-bottom: 0.5rem;
}

/* Subtítulo - mismo estilo que el del formulario */
.cpl-info-subtitle {
    font-size: 0.9rem;
    color: var(--cpl-gray-text);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cpl-gray-border);
}

/* Fotografía */
.cpl-info-image {
    margin: 0 0 24px 0;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    height: 125px;
}

.cpl-info-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Icono grande para dirección y horario */
.cpl-info-icon-large {
    width: 40px;
    height: 40px;
    background: var(--cpl-blue-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cpl-blue);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.cpl-info-item {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}

.cpl-info-text {
    flex: 1;
    font-size: 14px;
    color: var(--cpl-gray-dark);
    line-height: 1.5;
}

/* Línea divisoria entre elementos */
.cpl-info-divider-light {
    height: 1px;
    background: #e8e8e8;
    margin: 20px 0;
}

/* ===== HORARIO - NUEVO DISEÑO CON BORDES ===== */
.schedule-card {
    width: 100%;
}

.schedule-wrapper {
    display: flex;
    align-items: flex-start;
}

.schedule-group {
    padding: 0 10px;
}

.schedule-group:first-child {
    padding-left: 0;
}

.schedule-group:not(:last-child) {
    border-right: 1px solid #e3e3e3;
}

.weekdays {
    width: 60%;
}

.saturday {
    width: 20%;
}

.sunday {
    width: 20%;
}

.days {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.days span {
    font-size: 13px;
    font-weight: 700;
    color: var(--cpl-blue);
}

.line {
    height: 1px;
    background: #dfe3e8;
    margin-bottom: 8px;
}

.hours {
    text-align: center;
    font-size: 11px;
    color: #444;
}

.closed {
    color: #444;
}

/* Botones de acción - UNA SOLA LÍNEA */
.cpl-action-buttons-new {
      display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0;
}

.cpl-action-btn-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    background: var(--cpl-white);
    border: 1px solid #E6E6E6;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
    padding: 10px 0;
}

.cpl-action-btn-new i {
    font-size: 20px;
    color: var(--cpl-blue);
}

.cpl-action-btn-new span {
    font-size: 10px;
    font-weight: 500;
    color: var(--cpl-blue);
}

.cpl-action-btn-new:hover {
    background: var(--cpl-blue);
    border-color: var(--cpl-blue);
    transform: translateY(-2px);
}

.cpl-action-btn-new:hover i,
.cpl-action-btn-new:hover span {
    color: var(--cpl-white);
}

/* Sugerencia WhatsApp */
.cpl-whatsapp-suggestion {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    background: #f5f8fc;
    margin-top: 8px;
}



.cpl-whatsapp-content {
    flex: 1;
}

.cpl-whatsapp-content strong {
    display: block;
    font-size: 13px;
    color: var(--cpl-gray-dark);
    margin-bottom: 2px;
}

.cpl-whatsapp-content p {
    font-size: 11px;
    color: var(--cpl-gray-text);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.cpl-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 16px;
    border: 2px solid #25D366;
    border-radius: 8px;
    background: #fff;
    color: #25D366;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.25s ease;
}

.cpl-whatsapp-btn i {
    font-size: 14px;
}

.cpl-whatsapp-btn:hover {
    background: #25D366;
    color: #fff;
}

/* ============================================
   12. ALERTAS DE ÉXITO Y ERROR
   ============================================ */
.cpl-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.cpl-alert-success {
    background: #D4EDDA;
    border-left: 4px solid var(--cpl-success);
    color: #155724;
}

.cpl-alert-error {
    background: #FDEAEA;
    border-left: 4px solid var(--cpl-error);
    color: #721C24;
}

.cpl-alert i {
    font-size: 1.2rem;
}

/* ============================================
   13. RESPONSIVE - MÓVIL (≤768px)
   ============================================ */
@media (max-width: 768px) {
    /* Ajuste de margen superior para header móvil */
    .cpl-contact-page {
        margin-top: 40px;
        padding: 2rem 0.75rem 1rem;
    }
    
    /* Contenedor principal - 1 columna */
    .cpl-contact-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Tarjetas con menos padding */
    .cpl-contact-card,
    .cpl-info-card {
        padding: 20px;
    }
    
    /* Formulario - 1 columna */
    .cpl-form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Títulos más pequeños */
    .cpl-contact-title {
        font-size: 1.5rem;
    }
    
    /* Título Ubíquenos más pequeño */
    .cpl-info-title {
        font-size: 32px;
    }
    
    /* Fotografía */
    .cpl-info-image {
        height: 200px;
    }
    
    /* Horario responsive */
     .schedule-wrapper {
        flex-direction: row !important;  /* Forzar horizontal */
        flex-wrap: wrap;
    }
    
    .schedule-group {
        width: auto !important;
        flex: 1;
        border-right: 1px solid #e3e3e3 !important;
        border-bottom: none !important;
        padding: 0 10px !important;
    }
    
    .schedule-group:last-child {
        border-right: none !important;
    }
    
    .days {
        gap: 6px;
    }
    
    .days span {
        font-size: 11px;
    }
    
    .hours {
        font-size: 9px;
    }
    
    /* Botones de acción */
    .cpl-action-buttons-new {
        gap: 10px;
    }
    
    .cpl-action-btn-new {
        height: 70px;
    }
    
    .cpl-action-btn-new i {
        font-size: 24px;
    }
    
    .cpl-action-btn-new span {
        font-size: 11px;
    }
    
    /* Sugerencia WhatsApp */
    .cpl-whatsapp-suggestion {
        padding: 12px;
        gap: 10px;
    }
    
    .cpl-whatsapp-suggestion > i {
        font-size: 1.5rem;
    }
    
    .cpl-whatsapp-content strong {
        font-size: 12px;
    }
    
    .cpl-whatsapp-content p {
        font-size: 10px;
    }
}

/* ============================================
   14. RESPONSIVE - MÓVIL PEQUEÑO (≤480px)
   ============================================ */
@media (max-width: 480px) {
    /* Padding reducido */
    .cpl-contact-page {
        margin-top: 40px;
        padding: 1.5rem 0.75rem 1rem;
    }
    
    /* Botones de acción */
    .cpl-action-buttons-new {
        gap: 8px;
    }
    
    .cpl-action-btn-new {
        height: 60px;
        gap: 4px;
    }
    
    .cpl-action-btn-new i {
        font-size: 20px;
    }
    
    .cpl-action-btn-new span {
        font-size: 9px;
    }
    
    /* Sugerencia WhatsApp */
    .cpl-whatsapp-suggestion {
        padding: 10px;
        gap: 8px;
    }
    
    .cpl-whatsapp-suggestion > i {
        font-size: 1.3rem;
    }
    
    .cpl-whatsapp-content strong {
        font-size: 11px;
    }
    
    .cpl-whatsapp-content p {
        font-size: 9px;
    }
    
    .cpl-whatsapp-btn {
        padding: 6px 12px;
        font-size: 10px;
    }
    
    .cpl-whatsapp-btn i {
        font-size: 12px;
    }
    
    /* Título Ubíquenos */
    .cpl-info-title {
        font-size: 28px;
        margin-bottom: 16px;
    }
    
    /* Fotografía */
    .cpl-info-image {
        height: 200px;
    }
    
    /* Iconos grandes */
    .cpl-info-icon-large {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .cpl-info-item {
        gap: 10px;
        margin-bottom: 16px;
    }
    
    .cpl-info-text {
        font-size: 12px;
    }
}

/* ============================================
   15. reCAPTCHA
   ============================================ */
.grecaptcha-badge {
    left: 10px !important;
    right: auto !important;
}

/* ============================================
   MAPA - DEBAJO DE TODO
   ============================================ */
.cpl-contact-map {
   
 
    border-radius: 12px;
    overflow: hidden;
}

.cpl-contact-map iframe {
    width: 100%;
    height: 500px;
    display: block;
}



/* Textarea - ocupa todo el ancho */
.cpl-input-group.full-width {
    grid-column: span 2;
}

/* Ajustes específicos para textarea */
.cpl-textarea {
    padding-top: 18px !important;
    padding-bottom: 12px;
    resize: vertical;
    min-height: 100px;
    line-height: 1.4;
}

/* Label flotante para textarea - alineado al borde superior */
.cpl-input-group .cpl-textarea ~ label {
    position: absolute;
    left: 44px;
    top: 16px;  /* ← Posición inicial en el borde superior */
    transform: translateY(0);
    font-size: 0.85rem;
    color: var(--cpl-gray-text);
    transition: all 0.2s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 4px;
}

/* Label flotante activo (cuando hay texto o focus) - sube un poco */
.cpl-textarea:focus ~ label,
.cpl-textarea:not(:placeholder-shown) ~ label {
    top: -8px !important;  /* ← Sube por encima del borde */
    transform: translateY(0) !important;
    font-size: 0.7rem;
    background: var(--cpl-white);
    color: var(--cpl-blue);
}


/* Resaltar enlace de Política de Privacidad - estilo sutil */
.cpl-highlight-link {
    font-weight: 700;
    color: #0062ff;
    text-decoration: underline;
}


.cpl-highlight-link:hover {
    color: #B8963A;
}