/* Estilos personalizados para SALA 58 - VERSIÓN PREMIUM MEJORADA */
:root {
    --primary-color: #4a5568;
    --secondary-color: #718096;
    --accent-color: #2D3748;
    --hover-color: #2c5282;
    --gold-color: #D4AF37;
    --premium-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* WhatsApp flotante */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.05);
}

/* Ajustes para el video de fondo */
video {
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Estilos para las imágenes de servicios */
.service-image {
    background-color: #e5e7eb;
    background-size: cover;
    background-position: center;
    transition: all 0.4s ease;
}

/* Transición suave para el header al hacer scroll */
header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Ajustes de espaciado para secciones */
section {
    scroll-margin-top: 80px;
}

/* Mejoras de animación para hover en servicios */
.service-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Estilos para formularios */
input, textarea {
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #4a5568;
}

/* Estilos para la galería de servicios */
.gallery-thumbnail {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-thumbnail::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 3rem;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.gallery-thumbnail:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.gallery-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-thumbnail:hover::before {
    opacity: 1;
}

.service-item:hover .service-image {
    transform: scale(1.05);
}

/* Modal de galería */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background: black;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.gallery-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide.active {
    opacity: 1;
    z-index: 1;
}

.gallery-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.5s ease;
}

.gallery-slide.active img {
    transform: scale(1);
}

/* Controles de navegación */
.gallery-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.gallery-control:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Indicadores */
.gallery-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-indicator.active {
    background: white;
    transform: scale(1.2);
}

/* Contador */
.gallery-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 0.9rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 10px;
    border-radius: 12px;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.gallery-modal.active .gallery-modal-content {
    animation: zoomIn 0.4s ease forwards;
}

/* Mejoras de diseño generales */
body {
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Efectos de hover mejorados */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ===== NUEVOS ESTILOS PARA MEJORAS ===== */

/* Estilos mejorados para el menú de navegación */
.nav-link {
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mejoras para el menú móvil */
#mobile-menu {
    transition: transform 0.3s ease-in-out;
}

#mobile-menu.active {
    transform: translateX(0);
}

#menu-overlay.active {
    display: block;
}

/* ===== SECCIÓN CLIENTES PREMIUM - DISEÑO EXCLUSIVO MEJORADO ===== */

/* Tarjetas de clientes premium - VERSIÓN EXCLUSIVA */
.client-card-premium {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    position: relative;
    opacity: 1;
    animation: fadeInUp 0.6s ease forwards;
    border-top: 4px solid transparent;
}

.client-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--premium-gradient);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.client-card-premium:hover::before {
    transform: scaleX(1);
}

.client-card-premium:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.client-card-inner {
    padding: 2.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.client-logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

/* Estilos para logos reales de clientes - MEJORADO */
.brand-logo-real {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.client-card-premium:hover .brand-logo-real {
    transform: scale(1.15) rotate(2deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: var(--gold-color);
}

.logo-wrapper {
    margin-right: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-wrapper::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: var(--premium-gradient);
    border-radius: 28px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.client-card-premium:hover .logo-wrapper::after {
    opacity: 0.1;
}

.client-info {
    flex: 1;
}

.client-info h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #1a202c;
    background: linear-gradient(135deg, #2D3748 0%, #4A5568 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.client-info p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 0;
    font-weight: 500;
}

/* Badge de cliente exclusivo */
.exclusive-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--premium-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.client-description {
    margin-top: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.client-description p {
    color: #4A5568;
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.client-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: linear-gradient(135deg, #EDF2F7 0%, #E2E8F0 100%);
    color: #4A5568;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.client-card-premium:hover .tag {
    background: var(--premium-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Animaciones para las tarjetas - MEJORADO */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.client-card-premium.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Delays para animaciones */
.client-card-premium:nth-child(1) { animation-delay: 0.1s; }
.client-card-premium:nth-child(2) { animation-delay: 0.2s; }
.client-card-premium:nth-child(3) { animation-delay: 0.3s; }
.client-card-premium:nth-child(4) { animation-delay: 0.4s; }
.client-card-premium:nth-child(5) { animation-delay: 0.5s; }
.client-card-premium:nth-child(6) { animation-delay: 0.6s; }

/* Elementos decorativos de fondo para sección clientes */
.clients-bg-decoration {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}

.bg-orb-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    background: var(--premium-gradient);
    animation: float 8s ease-in-out infinite;
}

.bg-orb-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: 8%;
    background: linear-gradient(135deg, #D4AF37 0%, #F7EF8A 100%);
    animation: float 6s ease-in-out infinite reverse;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .client-card-inner {
        padding: 2rem;
    }
    
    .brand-logo-real {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 768px) {
    .gallery-modal-content {
        width: 95%;
        height: 70vh;
    }
    
    .gallery-control {
        width: 40px;
        height: 40px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-close {
        top: 10px;
        right: 10px;
    }
    
    .service-item {
        margin-bottom: 1.5rem;
    }
    
    /* Ajustes para la sección de clientes premium en móviles */
    .client-logo-container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-wrapper {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    
    .client-card-inner {
        padding: 1.75rem;
    }
    
    .brand-logo-real {
        width: 80px;
        height: 80px;
        padding: 12px;
    }
    
    .client-info h3 {
        font-size: 1.5rem;
    }
    
    .exclusive-badge {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 1rem;
        align-self: center;
    }
}

@media (max-width: 480px) {
    #mobile-menu {
        width: 100%;
    }
    
    .client-card-premium {
        margin-bottom: 1.5rem;
    }
    
    .client-tags {
        justify-content: center;
    }
    
    .client-card-inner {
        padding: 1.5rem;
    }
    
    .client-info h3 {
        font-size: 1.35rem;
    }
}

/* Utilidades adicionales */
.text-balance {
    text-wrap: balance;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Asegurar que las imágenes sean responsivas */
img {
    max-width: 100%;
    height: auto;
}

/* Mejorar el contraste para accesibilidad */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000;
        --secondary-color: #333;
        --accent-color: #000;
    }
}

/* Estilos de respaldo para imágenes faltantes */
.brand-logo-real[src=""],
.brand-logo-real:not([src]) {
    background: var(--premium-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    text-align: center;
}

.brand-logo-real[src=""]::before,
.brand-logo-real:not([src])::before {
    content: "Logo";
}