/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}
h1, h2, h3, h4, h5, h6 {
    font-family: '"Source Sans 3"', sans-serif;
    letter-spacing: -0.02em;
}

/* Theme Transition */
.theme-transition {
    transition: background-color 0.8s ease-in-out, 
                color 0.8s ease-in-out, 
                background-image 0.8s ease-in-out,
                opacity 0.8s ease-in-out,
                backdrop-filter 0.8s ease-in-out;
}

/* Hardware acceleration to fix disappearing elements on fast scroll */
.hover-glow, .logo-card, .btn-conversemos {
    will-change: transform, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ── Theme Switch Toggle ── */
.theme-switch {
    position: relative;
    width: 56px;
    height: 28px;
    background: rgba(255,255,255,0.15);
    border-radius: 9999px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.25);
    transition: background 0.3s ease, border-color 0.3s ease;
    flex-shrink: 0;
}
.theme-switch:hover {
    background: rgba(255,255,255,0.25);
}
.theme-switch .switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #F38C22;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.theme-switch .switch-knob i {
    font-size: 12px;
    color: white;
}
.dark .theme-switch .switch-knob {
    transform: translateX(28px);
}

/* Carousel Animation */
.carousel-track {
    display: flex;
    align-items: center;
    width: calc(220px * 16);
    animation: scrollCarousel 45s linear infinite;
}
.carousel-track:hover {
    animation-play-state: paused;
}
.carousel-item {
    width: 220px;
    flex-shrink: 0;
    padding: 0 0.75rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
@keyframes scrollCarousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-220px * 8)); }
}

/* Premium Gradients & Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bg-mesh {
    background-color: #ffffff;
}
.dark .bg-mesh {
    background-color: #08074a;
}
.bg-mesh::before, .bg-mesh::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -10;
    transition: opacity 0.8s ease-in-out;
}
.bg-mesh::before {
    background-image: radial-gradient(at 40% 20%, hsla(28,100%,74%,0.15) 0px, transparent 50%),
                      radial-gradient(at 80% 0%, hsla(189,100%,56%,0.1) 0px, transparent 50%),
                      radial-gradient(at 0% 50%, hsla(355,100%,93%,0.1) 0px, transparent 50%);
    opacity: 1;
}
.dark .bg-mesh::before {
    opacity: 0;
}
.bg-mesh::after {
    background-image: radial-gradient(at 40% 20%, hsla(28,100%,50%,0.08) 0px, transparent 50%),
                      radial-gradient(at 80% 0%, hsla(230,80%,30%,0.15) 0px, transparent 50%),
                      radial-gradient(at 0% 50%, hsla(240,60%,25%,0.1) 0px, transparent 50%);
    opacity: 0;
}
.dark .bg-mesh::after {
    opacity: 1;
}

.hover-glow {
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.hover-glow:hover {
    box-shadow: 0 0 25px rgba(243, 140, 34, 0.25) !important;
    border-color: rgba(243, 140, 34, 0.5) !important;
    transform: translateY(-4px);
}
.dark .hover-glow:hover {
    box-shadow: 0 0 30px rgba(243, 140, 34, 0.35), 0 0 60px rgba(243, 140, 34, 0.1) !important;
}

/* Uniform Conversemos button glow */
.btn-conversemos {
    box-shadow: 0 4px 14px rgba(243, 140, 34, 0.30), 0 0 20px rgba(243, 140, 34, 0.10);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-conversemos:hover {
    background-color: #de7e1b !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 140, 34, 0.40), 0 0 30px rgba(243, 140, 34, 0.15);
}

/* Form input glow */
.form-glow {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.form-glow:hover {
    border-color: rgba(243, 140, 34, 0.4) !important;
    box-shadow: 0 0 12px rgba(243, 140, 34, 0.15);
}
.form-glow:focus {
    border-color: rgba(243, 140, 34, 0.6) !important;
    box-shadow: 0 0 20px rgba(243, 140, 34, 0.25);
}

/* ── Hero: fondo condicional por tema ── */
.hero-section {
    background-image: none !important; /* Deshabilitar la imagen en el contenedor principal */
}
.hero-section::before, .hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: top center;
    transition: opacity 0.8s ease-in-out;
    z-index: 0;
}
.hero-section::before {
    background-image: url('../assets/Background/Background_claro_1.png');
    opacity: 1;
}
.dark .hero-section::before {
    opacity: 0;
}
.hero-section::after {
    background-image: url('../assets/Background/Background_oscuro_1.png');
    opacity: 0;
}
.dark .hero-section::after {
    opacity: 1;
}

/* ── Logo cards en carrusel ── */
.logo-card {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(8, 7, 74, 0.25);
}
.logo-card:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(8, 7, 74, 0.45);
}
.dark .logo-card {
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.50);
}
.dark .logo-card:hover {
    background: rgba(255, 255, 255, 1);
}

/* ── Hero overlay adaptativo ── */
.hero-overlay {
    background-color: rgba(255, 255, 255, 0.20);
    z-index: 1;
    transition: background-color 0.8s ease-in-out;
}
.dark .hero-overlay {
    background-color: rgba(8, 7, 74, 0.50);
}
