/**
 * Floating Contact Button & Modal
 */

/* ============================================
   BOTÓN FLOTANTE
   ============================================ */

.floating-contact-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse 2s ease-in-out infinite;
}

.floating-contact-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(22, 163, 74, 0.5);
}

.floating-contact-btn:active {
    transform: scale(0.95);
}

.floating-contact-icon {
    width: 28px;
    height: 28px;
    stroke: #ffffff;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4);
    }
    50% {
        box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4), 0 0 0 12px rgba(22, 163, 74, 0.1);
    }
}

/* ============================================
   MODAL DE CONTACTO
   ============================================ */

.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: auto;
}

.contact-modal.active {
    opacity: 1;
    visibility: visible;
}

.contact-modal * {
    cursor: auto;
}

.contact-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer !important;
    z-index: 1;
}

.contact-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    cursor: default !important;
}

.contact-modal.active .contact-modal-content {
    transform: scale(1);
}

/* Header */
.contact-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    cursor: default !important;
}

.contact-modal-title {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 900;
    color: #1f2937;
    margin: 0;
    text-transform: uppercase;
}

.contact-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer !important;
    transition: all 0.2s ease;
}

.contact-modal-close:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
}

.contact-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #6b7280;
    pointer-events: none;
}

/* Body */
.contact-modal-body {
    padding: 24px;
    cursor: default !important;
}

.contact-modal-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0 0 20px 0;
    text-align: center;
}

/* Métodos de Contacto */
.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer !important;
}

.contact-method:hover {
    background: #ffffff;
    border-color: #16a34a;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
}

.contact-method-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
    pointer-events: none;
}

.contact-method-icon svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.contact-method-icon--phone {
    background: #dbeafe;
}

.contact-method-icon--phone svg {
    stroke: #2563eb;
}

.contact-method-icon--email {
    background: #fef3c7;
}

.contact-method-icon--email svg {
    stroke: #d97706;
}

.contact-method-icon--whatsapp {
    background: #dcfce7;
}

.contact-method-icon--whatsapp svg {
    fill: #16a34a;
}

.contact-method-content {
    flex: 1;
}

.contact-method-title {
    font-family: var(--font-family-base);
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.contact-method-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.contact-method-arrow {
    width: 20px;
    height: 20px;
    stroke: #9ca3af;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.contact-method:hover .contact-method-arrow {
    transform: translateX(4px);
    stroke: #16a34a;
}

/* Footer */
.contact-modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.contact-service-area {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    margin-bottom: 16px;
}

.contact-service-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.contact-service-icon svg {
    width: 22px;
    height: 22px;
    stroke: #2563eb;
    pointer-events: none;
}

.contact-service-content {
    flex: 1;
}

.contact-service-title {
    font-family: var(--font-family-base);
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-service-text {
    font-size: 0.9375rem;
    color: #1f2937;
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

.contact-modal-hours {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #16a34a;
    font-weight: 600;
    margin: 0;
}

.contact-modal-hours-icon {
    width: 18px;
    height: 18px;
    stroke: #16a34a;
    pointer-events: none;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 768px) {
    .floating-contact-btn {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }
    
    .floating-contact-icon {
        width: 26px;
        height: 26px;
    }
    
    .contact-modal {
        padding: 16px;
    }
    
    .contact-modal-content {
        border-radius: 16px;
    }
    
    .contact-modal-header {
        padding: 20px;
    }
    
    .contact-modal-title {
        font-size: 1.25rem;
    }
    
    .contact-modal-body {
        padding: 20px;
    }
    
    .contact-method {
        padding: 14px;
    }
    
    .contact-method-icon {
        width: 44px;
        height: 44px;
    }
    
    .contact-method-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .contact-method-title {
        font-size: 0.9375rem;
    }
    
    .contact-method-text {
        font-size: 0.8125rem;
    }
    
    .contact-service-area {
        padding: 14px;
        gap: 10px;
    }
    
    .contact-service-icon {
        width: 36px;
        height: 36px;
    }
    
    .contact-service-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .contact-service-title {
        font-size: 0.8125rem;
    }
    
    .contact-service-text {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .floating-contact-btn {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }
    
    .contact-modal-title {
        font-size: 1.125rem;
    }
    
    .contact-method {
        gap: 12px;
        padding: 12px;
    }
    
    .contact-method-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-method-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .contact-service-area {
        padding: 12px;
    }
    
    .contact-service-icon {
        width: 34px;
        height: 34px;
    }
    
    .contact-service-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .contact-service-title {
        font-size: 0.75rem;
    }
    
    .contact-service-text {
        font-size: 0.8125rem;
    }
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .floating-contact-btn {
        animation: none;
    }
    
    .contact-modal-content,
    .contact-method,
    .contact-method-arrow {
        transition: none;
    }
}

.floating-contact-btn:focus-visible,
.contact-modal-close:focus-visible,
.contact-method:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}
