/**
 * Estilos para pins interactivos en el mapa
 */

/* Contenedor principal para popups */
.pin-popup-container {
    position: fixed;
    top: 70px; /* Debajo del header de navegación */
    left: 0;
    width: 100%;
    height: calc(100vh - 70px); /* Altura ajustada para el header */
    pointer-events: none;
    z-index: 1500; /* Debajo del header (2000) pero por encima del mapa */
}

/* Tooltip básico para hover */
.pin-tooltip {
    position: absolute;
    background: rgba(33, 37, 41, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    max-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 1501;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pin-tooltip::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 15px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(33, 37, 41, 0.95);
}

.tooltip-title {
    font-weight: 600;
    margin-bottom: 2px;
    color: #ffffff;
}

.tooltip-subtitle {
    font-size: 11px;
    color: #adb5bd;
    font-weight: 400;
}

/* Menú expandido para click */
.pin-expanded-menu {
    position: fixed;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    
    /* ========================================
     * CONFIGURACIÓN DE ANCHO DEL POPUP
     * ========================================
     * Desktop: 520px (ancho principal)
     * Tablet: calc(100vw - 40px) en @media (max-width: 768px)
     * Móvil: calc(100vw - 20px) en @media (max-width: 480px)
     * 
     * Para ajustar el ancho, modifica este valor:
     */
    width: 680px; /* ANCHO PRINCIPAL DEL POPUP EN DESKTOP */
    /* ======================================== */
    
    max-height: calc(100vh - 140px);
    min-height: 400px; /* Altura mínima */
    overflow: hidden;
    pointer-events: auto;
    z-index: 1502;
    border: 1px solid rgba(5, 150, 105, 0.2);
    backdrop-filter: blur(40px);
    animation: menuSlideInLeft 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    top: 90px !important;
    left: 30px !important;
    display: flex;
    flex-direction: column;
}

/* Variante que se ajusta al contenido */
.pin-expanded-menu.content-fitted {
    height: auto;
    min-height: 400px;
    max-height: calc(100vh - 140px);
}

/* Variante para contenido que necesita scroll - pantalla completa */
.pin-expanded-menu.full-screen {
    height: calc(100vh - 140px);
    min-height: calc(100vh - 140px);
}

@keyframes menuSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Header del menú */
.menu-header {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 20px 24px;
    position: relative;
    border-radius: 16px 16px 0 0;
}

.menu-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.2;
}

.menu-subtitle {
    font-size: 16px;
    opacity: 0.9;
    padding: 0px 3px 0px 10px;
    font-weight: 400;
}

.menu-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Contenido del menú */
.menu-content {
    padding: 12px; /* Padding optimizado */
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100vh - 250px); /* Altura máxima ajustada para la nueva posición más baja */
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
}

.menu-content::-webkit-scrollbar {
    width: 4px;
}

.menu-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.menu-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.menu-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.menu-description {
    font-size: 16px;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* Datos del pin */
.menu-data {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(5, 150, 105, 0.15);
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 15px;
}

.data-item:last-child {
    margin-bottom: 0;
}

.data-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 15px;
}

.data-value {
    font-weight: 600;
    color: #212529;
    text-align: right;
    font-size: 15px;
}

/* Acciones del menú */
.menu-actions {
    padding: 18px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0; /* No se comprimen */
    border-top: 1px solid rgba(5, 150, 105, 0.1);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0 0 20px 20px;
    justify-content: center;
}

.action-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    white-space: wrap;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    max-width: none;
    min-width: 140px;
    text-align: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.action-btn:active {
    transform: translateY(0);
}

/* Estilos específicos por tipo de pin */
.pin-expanded-menu[data-pin-type="hero"] .menu-header {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.pin-expanded-menu[data-pin-type="servicios"] .menu-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.pin-expanded-menu[data-pin-type="testimonios"] .menu-header {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.pin-expanded-menu[data-pin-type="accion"] .menu-header {
    background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
}

/* Botones de navegación específicos */
.action-btn[data-action="nextPin"], 
.action-btn[data-action="prevPin"] {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.25);
}

.action-btn[data-action="nextPin"]:hover, 
.action-btn[data-action="prevPin"]:hover {
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.35);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.action-btn[data-action="joinUs"] {
    background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.25);
    font-weight: 700;
    animation: callToActionPulse 2s infinite;
}

@keyframes callToActionPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.action-btn[data-action="joinUs"]:hover {
    box-shadow: 0 6px 20px rgba(6, 95, 70, 0.35);
    animation: none;
    background: linear-gradient(135deg, #064e3b 0%, #042f2e 100%);
}

/* Tour Indicator Styles */
.tour-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1003;
    min-width: 320px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
}

.tour-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 16px;
    text-align: center;
    background: linear-gradient(135deg, #6f42c1, #007bff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tour-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.tour-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 12%;
    right: 12%;
    height: 2px;
    background: #dee2e6;
    z-index: 1;
}

.tour-step {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 50px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
}

.tour-step.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-color: #007bff;
    color: white;
    transform: scale(1.1);
}

.tour-step.completed {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-color: #28a745;
    color: white;
}

.tour-controls {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.tour-btn {
    flex: 1;
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tour-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tour-btn.tour-close {
    background: linear-gradient(135deg, #dc3545, #b02a37);
}

/* Responsive Design */
@media (max-width: 768px) {
    .pin-expanded-menu {
        /* ========================================
         * ANCHO DEL POPUP EN TABLET
         * ========================================
         * Para ajustar en tablets, modifica estos valores:
         */
        width: calc(100vw - 40px) !important; /* ANCHO EN TABLET: pantalla completa menos márgenes */
        left: 20px !important;
        right: 20px !important;
        /* ======================================== */
        
        max-height: calc(100vh - 140px);
    }

    .menu-content {
        max-height: 220px;
        padding: 16px;
    }

    .tour-indicator {
        width: calc(100vw - 40px);
        left: 20px;
        right: 20px;
    }

    .tour-progress {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tour-step {
        min-width: 40px;
        font-size: 11px;
    }

    .tour-controls {
        margin-top: 12px;
    }
}

@media (max-width: 480px) {
    /* ========================================
     * OPTIMIZACIÓN COMPLETA PARA MÓVIL
     * ========================================
     */
    
    .pin-popup-container {
        top: 60px; /* Ajustar por la nueva altura del header con más espacio */
        height: calc(100vh - 60px);
    }
    
    .pin-expanded-menu {
        /* ========================================
         * ANCHO Y POSICIÓN DEL POPUP EN MÓVIL
         * ========================================
         * Para ajustar en móviles, modifica estos valores:
         */
        width: calc(100vw - 20px) !important; /* ANCHO EN MÓVIL: máximo aprovechamiento con mejor margen */
        left: 10px !important;
        right: 10px !important;
        top: 80px !important; /* INCREASED: Más espacio desde arriba para evitar solapamiento con pins */
        /* ======================================== */
        
        max-height: calc(100vh - 160px) !important; /* ADJUSTED: Altura ajustada por el nuevo top */
        min-height: 280px; /* Altura mínima más razonable */
        border-radius: 16px; /* Esquinas más elegantes */
        backdrop-filter: blur(40px); /* Blur elegante */
        background: rgba(255, 255, 255, 0.85) !important; /* INCREASED: Más opaco para mejor legibilidad */
        border: 1px solid rgba(255, 255, 255, 0.3); /* Borde elegante */
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); /* Sombra más prominente */
    }

    /* Eliminar el overlay negro en móvil */
    .pin-popup-container.has-active-menu::before {
        display: none; /* Sin overlay en móvil */
    }

    .menu-title {
        font-size: 18px;
        line-height: 1.2;
        margin-bottom: 4px;
    }

    .menu-subtitle {
        font-size: 14px;
        line-height: 1.3;
    }

    .menu-close {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }

    .menu-content {
        padding: 16px;
        max-height: calc(100vh - 240px); /* ADJUSTED: Más espacio para el contenido */
    }

    .menu-description {
        font-size: 15px; /* Adjusted for mobile */
        line-height: 1.5;
        margin-bottom: 18px;
    }

    .data-category {
        margin-bottom: 12px;
        padding: 12px;
    }

    .category-title {
        font-size: 16px; /* Adjusted for mobile */
        margin-bottom: 10px;
        letter-spacing: 0.3px;
        font-weight: 600;
    }

    .category-items {
        gap: 8px;
    }

    .data-item.enhanced .data-label,
    .data-item.enhanced .data-value {
        font-size: 14px; /* Mobile optimized size */
        line-height: 1.4;
    }

    .data-item {
        font-size: 14px; /* Mobile base size */
        margin-bottom: 8px;
    }

    .data-label,
    .data-value {
        font-size: 14px; /* Consistent mobile sizing */
    }

    .menu-actions {
        padding: 16px;
        gap: 8px;
    }

    .action-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
        min-width: 120px;
    }

    .menu-content::-webkit-scrollbar {
        width: 2px;
    }
}

/* Efectos adicionales */
.pin-hover-effect {
    animation: pinPulse 1.5s infinite;
}

@keyframes pinPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Estados de carga */
.menu-loading {
    position: relative;
    color: transparent;
}

.menu-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Overlay cuando hay menú activo */
.pin-popup-container.has-active-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05); /* Fondo muy sutil y elegante */
    backdrop-filter: blur(1px); /* Blur muy ligero */
    pointer-events: auto;
    z-index: 999;
}

/* Indicadores de estado */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.active {
    background: #28a745;
    animation: statusBlink 2s infinite;
}

.status-indicator.warning {
    background: #ffc107;
}

.status-indicator.error {
    background: #dc3545;
}

.status-indicator.offline {
    background: #6c757d;
}

@keyframes statusBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* ===== MODALES DE ACCIONES ===== */

/* Overlay base para todos los modales */
.service-modal-overlay,
.testimonials-modal-overlay,
.quote-modal-overlay,
.call-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modales base */
.service-modal,
.testimonials-modal,
.quote-modal,
.call-modal {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 120vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.quote-modal,
.call-modal {
    max-width: 550px;
}

.testimonials-modal {
    max-width: 700px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Headers de modales */
.service-modal-header,
.testimonials-modal-header,
.quote-modal-header,
.call-modal-header {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-modal-header h3,
.testimonials-modal-header h3,
.quote-modal-header h3,
.call-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.close-modal-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Contenido de modales */
.service-modal-content,
.testimonials-modal-content,
.quote-modal-content,
.call-modal-content {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* Modal de servicios */
.service-modal-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 24px;
}

.service-modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Modal de testimonios */
.testimonial-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.testimonial-rating {
    font-size: 18px;
    margin-bottom: 12px;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 16px;
    font-style: italic;
}

.testimonial-author {
    font-size: 14px;
    color: #6b7280;
}

.testimonial-author strong {
    color: #1e40af;
    font-size: 16px;
}

.testimonials-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Formularios */
.quote-form,
.call-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-actions,
.call-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Beneficios de llamada */
.call-benefits {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #3b82f6;
}

.call-benefits h4 {
    margin: 0 0 16px 0;
    color: #1e40af;
    font-size: 16px;
    font-weight: 600;
}

.call-benefits ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.call-benefits li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}


.action-btn.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: 2px solid transparent;
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.action-btn.secondary {
    background: white;
    color: #374151;
    border: 2px solid #d1d5db;
}

.action-btn.secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

/* Responsivo para modales */
@media (max-width: 768px) {
    .service-modal,
    .testimonials-modal,
    .quote-modal,
    .call-modal {
        width: 95vw;
        max-height: 95vh;
        margin: 10px;
    }

    .service-modal-header,
    .testimonials-modal-header,
    .quote-modal-header,
    .call-modal-header {
        padding: 16px 20px;
    }

    .service-modal-content,
    .testimonials-modal-content,
    .quote-modal-content,
    .call-modal-content {
        padding: 20px;
        max-height: calc(95vh - 70px);
    }

    .service-modal-header h3,
    .testimonials-modal-header h3,
    .quote-modal-header h3,
    .call-modal-header h3 {
        font-size: 18px;
    }

    .form-actions,
    .call-actions,
    .service-modal-actions,
    .testimonials-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .testimonial-card {
        padding: 16px;
    }

    .call-benefits {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .service-modal,
    .testimonials-modal,
    .quote-modal,
    .call-modal {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .service-modal-content,
    .testimonials-modal-content,
    .quote-modal-content,
    .call-modal-content {
        max-height: calc(100vh - 70px);
        padding: 16px;
    }

    .service-modal-header,
    .testimonials-modal-header,
    .quote-modal-header,
    .call-modal-header {
        padding: 12px 16px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 16px; /* Evitar zoom en iOS */
    }
}

/* ==========================================
 * ESTILOS MEJORADOS PARA DATOS CATEGÓRICOS
 * ========================================== */

/* Contenedor de categoría */
.data-category {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    margin-bottom: 14px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.data-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.data-category:last-child {
    margin-bottom: 0;
}

/* Título de categoría */
.category-title {
    font-size: 18px; /* Increased for better visibility */
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.category-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: linear-gradient(135deg, #6f42c1, #5a2d91);
    border-radius: 2px;
    margin-right: 8px;
}

/* Contenedor de items */
.category-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Item de dato mejorado */
.data-item.enhanced {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(5, 150, 105, 0.1);
    transition: all 0.2s ease;
    min-height: 44px;
}

.data-item.enhanced:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(5, 150, 105, 0.2);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.1);
}

/* Icono del item */
.item-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

/* Contenido del item */
.item-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-width: 0;
    gap: 8px;
}

.data-item.enhanced .data-label {
    font-size: 15px; /* Slightly smaller on mobile for space optimization */
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
    letter-spacing: -0.025em;
    margin-bottom: 2px;
    text-transform: none;
    word-wrap: break-word;
    max-width: 60%;
}

.data-item.enhanced .data-value {
    font-size: 15px; /* Slightly smaller on mobile for space optimization */
    font-weight: 700;
    color: #059669;
    text-align: right;
    letter-spacing: -0.025em;
    text-shadow: 0 1px 2px rgba(5, 150, 105, 0.1);
    word-wrap: break-word;
    max-width: 40%;
}

/* Estilos específicos por tipo de pin */
.pin-expanded-menu[data-pin-type="hero"] .data-category {
    border-left: 4px solid #059669;
}

.pin-expanded-menu[data-pin-type="hero"] .category-title::before {
    background: linear-gradient(135deg, #059669, #047857);
}

.pin-expanded-menu[data-pin-type="servicios"] .data-category {
    border-left: 4px solid #10b981;
}

.pin-expanded-menu[data-pin-type="servicios"] .category-title::before {
    background: linear-gradient(135deg, #10b981, #059669);
}

.pin-expanded-menu[data-pin-type="testimonios"] .data-category {
    border-left: 4px solid #34d399;
}

.pin-expanded-menu[data-pin-type="testimonios"] .category-title::before {
    background: linear-gradient(135deg, #34d399, #10b981);
}

.pin-expanded-menu[data-pin-type="accion"] .data-category {
    border-left: 4px solid #065f46;
}

.pin-expanded-menu[data-pin-type="accion"] .category-title::before {
    background: linear-gradient(135deg, #065f46, #064e3b);
}

/* Animaciones para revelado de categorías */
.data-category {
    opacity: 0;
    transform: translateY(20px);
    animation: categoryReveal 0.5s ease forwards;
}

.data-category:nth-child(1) { animation-delay: 0.1s; }
.data-category:nth-child(2) { animation-delay: 0.2s; }
.data-category:nth-child(3) { animation-delay: 0.3s; }

@keyframes categoryReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Items mejorados con animación escalonada */
.data-item.enhanced {
    opacity: 0;
    transform: translateX(-20px);
    animation: itemSlideIn 0.4s ease forwards;
}

.data-item.enhanced:nth-child(1) { animation-delay: 0.1s; }
.data-item.enhanced:nth-child(2) { animation-delay: 0.15s; }
.data-item.enhanced:nth-child(3) { animation-delay: 0.2s; }
.data-item.enhanced:nth-child(4) { animation-delay: 0.25s; }

@keyframes itemSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Estados especiales para valores importantes */
.data-value.highlight {
    color: #059669;
    font-weight: 700;
}

.data-value.warning {
    color: #f59e0b;
    font-weight: 700;
}

.data-value.success {
    color: #059669;
    font-weight: 700;
    position: relative;
}

.data-value.success::after {
    content: '✓';
    margin-left: 4px;
    color: #10b981;
}

/* Responsive para categorías */
@media (max-width: 768px) {
    .data-category {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .category-title {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .item-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
        margin-right: 10px;
        flex-shrink: 0;
    }
    
    .data-item.enhanced {
        padding: 8px 10px;
        align-items: flex-start;
    }
    
    .data-item.enhanced .data-label,
    .data-item.enhanced .data-value {
        font-size: 15px; /* Slightly smaller on mobile for space optimization */
    }
    
    .data-item.enhanced .data-label {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .data-item.enhanced .data-value {
        max-width: 55%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

@media (max-width: 480px) {
    .data-category {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .category-title {
        font-size: 12px;
        margin-bottom: 8px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.3;
    }
    
    .category-items {
        gap: 6px;
    }
    
    .item-icon {
        width: 24px;
        height: 24px;
        font-size: 14px;
        margin-right: 8px;
        flex-shrink: 0;
    }
    
    .item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .data-item.enhanced .data-label {
        text-align: left;
        font-size: 11px;
        margin-bottom: 2px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.3;
        width: 100%;
    }
    
    .data-item.enhanced .data-value {
        text-align: left;
        font-size: 11px;
        max-width: 100%;
        font-weight: 700;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.3;
        width: 100%;
    }
}

/* ==========================================
 * ESTILOS PARA MODALES DE SERVICIOS MEJORADOS
 * ========================================== */

/* Grid de servicios */
.servicios-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px 0;
}

/* Categoría de servicios */
.categoria-servicios {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.categoria-titulo {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.categoria-icono {
    font-size: 20px;
    margin-right: 8px;
}

/* Lista de servicios */
.servicios-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Card de servicio individual */
.servicio-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.servicio-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(111, 66, 193, 0.2);
}

/* Header del servicio */
.servicio-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.servicio-icono {
    font-size: 22px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #f1f3f4, #e8eaed);
    border-radius: 50%;
    flex-shrink: 0;
}

.servicio-nombre {
    font-size: 16px; /* Increased for better readability */
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.3;
}

/* Descripción del servicio */
.servicio-descripcion {
    font-size: 15px; /* Increased from smaller size */
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Detalles del servicio */
.servicio-detalles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detalle-item {
    background: linear-gradient(135deg, #e3f2fd, #f1f8e9);
    color: #2c5282;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(44, 82, 130, 0.1);
}

/* Garantía de cumplimiento */
.garantia-cumplimiento {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #b8dabd;
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
}

.garantia-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.garantia-icono {
    font-size: 20px;
    margin-right: 8px;
}

.garantia-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #155724;
    margin: 0;
}

.garantia-cumplimiento p {
    font-size: 14px;
    color: #155724;
    margin: 0;
    line-height: 1.4;
}

/* Intro del modal */
.modal-intro {
    font-size: 16px; /* Increased from smaller size */
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: left;
}

/* Responsive para servicios */
@media (max-width: 768px) {
    .servicios-grid {
        gap: 16px;
    }
    
    .categoria-servicios {
        padding: 12px;
    }
    
    .categoria-titulo {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .servicios-lista {
        gap: 10px;
    }
    
    .servicio-card {
        padding: 12px;
    }
    
    .servicio-icono {
        width: 32px;
        height: 32px;
        font-size: 18px;
        margin-right: 8px;
    }
    
    .servicio-nombre {
        font-size: 14px;
    }
    
    .servicio-descripcion {
        font-size: 13px;
    }
    
    .detalle-item {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .garantia-cumplimiento {
        padding: 12px;
    }
    
    .garantia-header h4 {
        font-size: 14px;
    }
    
    .garantia-cumplimiento p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .servicios-grid {
        gap: 12px;
    }
    
    .categoria-servicios {
        padding: 10px;
    }
    
    .categoria-titulo {
        font-size: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .categoria-icono {
        margin-right: 0;
    }
    
    .servicio-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .servicio-icono {
        margin-right: 0;
        align-self: center;
    }
    
    .servicio-nombre {
        text-align: center;
        width: 100%;
    }
    
    .servicio-detalles {
        justify-content: center;
    }
    
    .detalle-item {
        font-size: 10px;
        padding: 2px 4px;
    }
}

/* Optimizaciones adicionales para móvil */

/* Prevenir zoom accidental en inputs y botones */
.action-btn, .menu-close {
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

/* Mejorar el handling de scroll en iOS */
.menu-content {
    -webkit-overflow-scrolling: touch;
    -webkit-transform: translateZ(0); /* Force hardware acceleration */
}

/* Asegurar que el header del menú sea siempre visible */
.menu-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Estados focus mejorados para dispositivos táctiles */
.action-btn:focus,
.menu-close:focus {
    outline: 3px solid rgba(16, 185, 129, 0.4);
    outline-offset: 2px;
}

/* Evitar que el texto se seleccione accidentalmente */
.menu-title,
.menu-subtitle,
.category-title,
.data-label,
.data-value {
    user-select: none;
    -webkit-user-select: none;
}

/* Asegurar que los modales sean accesibles */
.service-modal-overlay,
.testimonials-modal-overlay,
.quote-modal-overlay,
.call-modal-overlay {
    -webkit-overflow-scrolling: touch;
}

/* Mejorar performance de scroll */
.pin-expanded-menu {
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.data-item {
    font-size: 14px; /* Adjusted for mobile */
}

.data-label,
.data-value {
    font-size: 14px; /* Consistent mobile sizing */
} 