/* ============================================================
   SECCIÓN: MAPA + SUCURSALES
   ============================================================ */

.contacto-mapa-section {
    background: #f8f9fa;
    padding: 0;
    min-height: 100vh;
}

.contacto-mapa-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: 100vh;
}

/* --- Panel Izquierdo: Sucursales --- */
.sucursales-panel {
    background: #ffffff;
    padding: 50px 35px;
    overflow-y: auto;
    max-height: 100vh;
    border-right: 1px solid #e9ecef;
    box-shadow: 4px 0 20px rgba(0,0,0,0.04);
    position: relative;
    z-index: 2;
}

.sucursales-header {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.sucursales-header .label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #0066cc;
    margin-bottom: 12px;
}

.sucursales-header h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.2;
    margin-bottom: 12px;
}

.sucursales-header h2 .highlight {
    color: #0066cc;
}

.sucursales-header p {
    font-size: 0.95rem;
    color: #777;
    line-height: 1.6;
}

/* Cards de sucursal */
.sucursales-lista {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sucursal-card {
    display: flex;
    gap: 18px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sucursal-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #0066cc;
    transform: scaleY(0);
    transition: transform 0.35s ease;
}

.sucursal-card:hover,
.sucursal-card.hover-activa {
    border-color: #0066cc;
    box-shadow: 0 10px 40px rgba(0, 102, 204, 0.12);
    transform: translateX(5px);
}

.sucursal-card:hover::before,
.sucursal-card.hover-activa::before {
    transform: scaleY(1);
}

.sucursal-card.principal {
    border-color: #0066cc;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.sucursal-card.principal::before {
    transform: scaleY(1);
}

/* Imagen de sucursal */
.sucursal-imagen {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sucursal-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sucursal-card:hover .sucursal-imagen img {
    transform: scale(1.1);
}

.badge-principal {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #0066cc;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Info de sucursal */
.sucursal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sucursal-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
    line-height: 1.3;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.info-row i {
    color: #0066cc;
    font-size: 0.9rem;
    margin-top: 2px;
    width: 16px;
    text-align: center;
}

.btn-ver-mapa {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid #0066cc;
    color: #0066cc;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.btn-ver-mapa:hover {
    background: #0066cc;
    color: #fff;
}

/* --- Panel Derecho: Mapa --- */
.mapa-panel {
    position: relative;
    background: #e9ecef;
}

#mapa-sucursales {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    z-index: 1;
}

.mapa-overlay {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.95);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    font-size: 0.85rem;
    color: #666;
    pointer-events: none;
    white-space: nowrap;
}

.mapa-overlay i {
    color: #0066cc;
    margin-right: 6px;
}

/* ============================================================
   MARCADORES PNG PERSONALIZADOS - LEAFLET
   ============================================================ */

/* Eliminamos los estilos antiguos de divIcon */
.leaflet-marker-icon {
    transition: all 0.3s ease !important;
}

/* Popup del mapa */
.map-popup h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    padding-right: 20px;
}

.map-popup p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-popup p i {
    color: #0066cc;
    width: 14px;
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    padding: 5px;
}

.leaflet-popup-content {
    margin: 12px 16px;
}

.leaflet-popup-tip {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Overlay informativo */
.mapa-overlay {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.95);
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    font-size: 0.85rem;
    color: #666;
    pointer-events: none;
    white-space: nowrap;
}

.mapa-overlay i {
    color: #0066cc;
    margin-right: 6px;
}

/* ============================================================
   SECCIÓN: FORMULARIO DE CONTACTO
   ============================================================ */

.contacto-form-section {
    padding: 100px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}

.formulario-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 80px;
    align-items: start;
}

/* Info lateral */
.form-info .label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #0066cc;
    margin-bottom: 12px;
}

.form-info h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #1a1a2e;
    line-height: 1.2;
    margin-bottom: 20px;
}

.form-info h2 .highlight {
    color: #0066cc;
}

.form-info > p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 40px;
}

.info-contacto-directo {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.info-item > i {
    width: 48px;
    height: 48px;
    background: #f0f7ff;
    color: #0066cc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-item div strong {
    display: block;
    font-size: 0.95rem;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.info-item div span {
    font-size: 0.9rem;
    color: #888;
}

/* Card del formulario */
.formulario-card {
    background: #ffffff;
    padding: 45px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label span {
    color: #dc3545;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #333;
    background: #fafbfc;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.08);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    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='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* reCAPTCHA */
.recaptcha-container {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.recaptcha-container small {
    display: block;
    margin-top: 10px;
    color: #999;
    font-size: 0.8rem;
}

/* Botón enviar */
.btn-submit {
    width: 100%;
    padding: 16px 30px;
    background: #1a1a2e;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover:not(:disabled) {
    background: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 102, 204, 0.3);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-submit i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.btn-submit:hover:not(:disabled) i {
    transform: translateX(4px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
    .contacto-mapa-grid {
        grid-template-columns: 380px 1fr;
    }
}

@media (max-width: 992px) {
    .contacto-mapa-grid {
        grid-template-columns: 1fr;
    }
    
    .sucursales-panel {
        max-height: none;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 40px 25px;
    }
    
    #mapa-sucursales {
        min-height: 500px;
    }
    
    .formulario-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .form-info h2 {
        font-size: 1.8rem;
    }
    
    .formulario-card {
        padding: 30px;
    }
}

@media (max-width: 576px) {
    .sucursal-card {
        flex-direction: column;
    }
    
    .sucursal-imagen {
        width: 100%;
        height: 180px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .formulario-card {
        padding: 25px 20px;
    }
    
    .mapa-overlay {
        font-size: 0.75rem;
        padding: 8px 14px;
    }
}