/*
ClimaResp - Theme System CSS - Archivo Combinado
*/

/* Variables de tema */
:root {
    /* Tema Claro (por defecto) - Tonos Azules */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(96, 165, 250, 0.15);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(59, 130, 246, 0.2);
    --gradient-overlay: rgba(96, 165, 250, 0.1);
    --logo-filter: brightness(0) invert(0);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-text: #1e293b;
    --nav-text-hover: #3b82f6;
    --nav-border: rgba(59, 130, 246, 0.2);
    --footer-bg: rgba(248, 250, 252, 0.95);
    --footer-text: #64748b;
    --footer-text-hover: #1e293b;
    /* Colores principales - Azul ClimaResp */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #60a5fa;
    --accent-color: #1d4ed8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    /* Gradientes - Azul ClimaResp */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-secondary: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

[data-theme="light"] {
    /* Tema Claro */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-color: rgba(96, 165, 250, 0.15);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.1);
    --gradient-overlay: rgba(96, 165, 250, 0.1);
    --logo-filter: brightness(0) invert(0);
    --nav-bg: #ffffff;
    --nav-text: #1e293b;
    --nav-text-hover: #60a5fa;
    --nav-border: rgba(0, 0, 0, 0.1);
    --footer-bg: rgba(248, 250, 252, 0.9);
    --footer-text: #64748b;
    --footer-text-hover: #1e293b;
    /* Colores principales - Azul claro ClimaResp */
    --primary-color: #60a5fa;
    --primary-hover: #3b82f6;
    --secondary-color: #93c5fd;
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    /* Gradientes - Azul claro ClimaResp */
    --gradient-primary: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
    --gradient-accent: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}



/* Botón de hamburguesa */
.hamburger-button {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-button.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-button.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-button.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Estilos globales del tema */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navegación con tema */
.navbar-themed {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(66, 153, 225, 0.3);
    box-shadow: 0 4px 20px rgba(66, 153, 225, 0.1), 0 1px 3px rgba(66, 153, 225, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* Forzar fondo blanco elegante en ambos modos */
:root .navbar-themed {
    background: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="light"] .navbar-themed {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(66, 153, 225, 0.3);
}

[data-theme="dark"] .navbar-themed {
    background: rgba(15, 23, 42, 0.95) !important;
    border-bottom: 1px solid rgba(66, 153, 225, 0.3);
    box-shadow: 0 4px 20px rgba(66, 153, 225, 0.15), 0 1px 3px rgba(66, 153, 225, 0.1);
}

[data-theme="dark"] {
    /* Tema Oscuro */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(96, 165, 250, 0.25);
    --card-bg: rgba(30, 41, 59, 0.8);
    --card-border: rgba(96, 165, 250, 0.2);
    --gradient-overlay: rgba(96, 165, 250, 0.1);
    --logo-filter: brightness(0) invert(1);
    --nav-bg: rgba(15, 23, 42, 0.95);
    --nav-text: #f8fafc;
    --nav-text-hover: #4299e1;
    --nav-border: rgba(66, 153, 225, 0.2);
    --footer-bg: rgba(30, 41, 59, 0.95);
    --footer-text: #94a3b8;
    --footer-text-hover: #f8fafc;
    /* Colores principales - Azul oscuro ClimaResp */
    --primary-color: #4299e1;
    --primary-hover: #63b3ed;
    --secondary-color: #3182ce;
    --accent-color: #2b6cb0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    /* Gradientes - Azul oscuro ClimaResp */
    --gradient-primary: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    --gradient-secondary: linear-gradient(135deg, #63b3ed 0%, #4299e1 100%);
    --gradient-accent: linear-gradient(135deg, #2b6cb0 0%, #1e4e8c 100%);
}

/* Estilos para los enlaces de navegación */
.nav-link {
    color: var(--nav-text) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--nav-text-hover) !important;
    transform: translateY(-1px);
}

/* Logo sin fondo ni bordes - altura completa */
.brand-logo {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
    height: 100% !important;
    max-height: 64px;
    width: auto;
    object-fit: contain;
}

.brand-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Gradiente dinámico más colorido */
.text-gradient-dynamic {
    background: linear-gradient(45deg, #4299e1, #3182ce, #2b6cb0, #1e4e8c, #60a5fa, #93c5fd, #0ea5e9);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Contenedor de texto rotativo */
.rotating-text-container {
    position: relative;
    display: inline-block;
    height: 1.5em;
    min-width: 180px;
    overflow: hidden;
    vertical-align: top;
}

/* Estilos para texto rotativo */
.rotating-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease-in-out;
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    font-weight: bold;
}

.rotating-text.active {
    opacity: 1;
    transform: translateY(0);
    animation: gradientShift 3s ease-in-out infinite;
}

.rotating-text.exiting {
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.4s ease-in-out;
}

.rotating-text:nth-child(1) {
    background: linear-gradient(45deg, #4299e1, #3182ce);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rotating-text:nth-child(2) {
    background: linear-gradient(45deg, #63b3ed, #4299e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rotating-text:nth-child(3) {
    background: linear-gradient(45deg, #2b6cb0, #1e4e8c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rotating-text:nth-child(4) {
    background: linear-gradient(45deg, #90cdf4, #4299e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Footer con tema */
.footer-themed {
    background: var(--footer-bg) !important;
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color) !important;
}

.footer-text {
    color: var(--footer-text) !important;
}

.footer-text-hover:hover {
    color: var(--footer-text-hover) !important;
}

.footer-heading {
    color: var(--text-primary) !important;
}

/* Fondo animado con tema */
.animated-bg {
    background: var(--bg-primary);
    transition: background 0.3s ease;
}

.gradient-overlay {
    background: linear-gradient(135deg, var(--gradient-overlay), transparent);
    transition: background 0.3s ease;
}

/* ===============================================
   Client Carousel Styles - Updated for Themes
   =============================================== */
.client-carousel-container {
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.client-carousel {
    display: flex;
    animation: scroll-left 30s linear infinite;
    width: calc(200% + 40px);
}

.client-logo-item {
    margin-right: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 100px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 20px;
}

.client-logo-item:hover {
    background: var(--bg-tertiary);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.client-logo-img {
    max-width: 120px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: var(--logo-filter);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.client-logo-item:hover .client-logo-img {
    opacity: 1;
    transform: scale(1.1);
}

/* Animación del carrusel */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.client-carousel-container:hover .client-carousel {
    animation-play-state: paused;
}

/* Clases de utilidad para temas */
.text-themed {
    color: var(--text-primary) !important;
}

.text-themed-primary {
    color: var(--text-primary);
}

.text-themed-secondary {
    color: var(--text-secondary) !important;
}

.text-themed-muted {
    color: var(--text-muted) !important;
}

.bg-themed {
    background-color: var(--bg-primary) !important;
}

.bg-themed-secondary {
    background-color: var(--bg-secondary) !important;
}

.bg-themed-tertiary {
    background-color: var(--bg-tertiary);
}

.border-themed {
    border-color: var(--border-color) !important;
}

/* Card Theme Styles */
.card-themed {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 768px) {

    
    .client-logo-item {
        min-width: 140px;
        height: 80px;
        margin-right: 20px;
    }
    
    .client-logo-img {
        max-width: 100px;
        max-height: 50px;
    }
    
    .client-carousel {
        animation-duration: 25s;
    }
}

@media (max-width: 480px) {
    .client-logo-item {
        min-width: 120px;
        height: 70px;
        margin-right: 15px;
    }
    
    .client-logo-img {
        max-width: 80px;
        max-height: 40px;
    }
    
    .client-carousel {
        animation-duration: 20s;
    }
}

/* Estilos específicos para modo claro */
[data-theme="light"] body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
}

[data-theme="light"] .bg-gray-950 {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
}

[data-theme="light"] .bg-gray-950\/90 {
    background: var(--nav-bg) !important;
}

[data-theme="light"] .bg-gray-900\/50 {
    background: var(--footer-bg) !important;
}

[data-theme="light"] .text-white {
    color: #1e293b !important;
}

[data-theme="light"] .text-white\/70 {
    color: #475569 !important;
}

[data-theme="light"] .text-gray-300 {
    color: #64748b !important;
}

[data-theme="light"] .text-gray-400 {
    color: var(--footer-text) !important;
}

[data-theme="light"] .text-gray-400:hover {
    color: var(--footer-text-hover) !important;
}

[data-theme="light"] .border-white\/10 {
    border-color: var(--border-color) !important;
}

[data-theme="light"] .bg-gradient-to-br {
    background: linear-gradient(to bottom right, rgba(59, 130, 246, 0.05), rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05)) !important;
}

/* Correcciones adicionales para modo claro */
[data-theme="light"] .text-gray-700 {
    color: #374151 !important;
}

[data-theme="light"] .text-gray-600 {
    color: #4b5563 !important;
}

[data-theme="light"] .bg-white\/90 {
    background: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="light"] .border-blue-400\/30 {
    border-color: rgba(59, 130, 246, 0.2) !important;
}

[data-theme="light"] .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Iconos en modo claro */
[data-theme="light"] .bg-gradient-to-r.from-blue-500.to-blue-700 {
    background: linear-gradient(to right, #3b82f6, #1d4ed8) !important;
}

[data-theme="light"] .bg-gradient-to-r.from-green-500.to-green-700 {
    background: linear-gradient(to right, #10b981, #047857) !important;
}

[data-theme="light"] .bg-gradient-to-r.from-purple-500.to-purple-700 {
    background: linear-gradient(to right, #8b5cf6, #6d28d9) !important;
}

[data-theme="light"] .bg-gradient-to-r.from-orange-500.to-orange-700 {
    background: linear-gradient(to right, #f97316, #c2410c) !important;
}

/* Botones en modo claro */
[data-theme="light"] .bg-gradient-to-r.from-blue-500.to-purple-600 {
    background: linear-gradient(to right, #3b82f6, #7c3aed) !important;
}

/* Fondos de gradiente en modo claro */
[data-theme="light"] .bg-gradient-to-r.from-blue-50.to-purple-50 {
    background: linear-gradient(to right, #eff6ff, #faf5ff) !important;
}

/* Texto en elementos específicos */
[data-theme="light"] .text-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Corrección para elementos con fondo oscuro que necesitan texto claro */
[data-theme="light"] .bg-gradient-to-r .text-white {
    color: #ffffff !important;
}

[data-theme="light"] .rounded-xl .text-white,
[data-theme="light"] .rounded-full .text-white {
    color: #ffffff !important;
}

/* Mejoras de responsividad para evitar texto cortado */
@media (max-width: 640px) {
    /* Títulos principales más pequeños en móvil */
    .text-4xl {
        font-size: 1.875rem !important; /* 30px */
        line-height: 2.25rem !important;
    }
    
    .text-5xl {
        font-size: 2.25rem !important; /* 36px */
        line-height: 2.5rem !important;
    }
    
    .text-6xl {
        font-size: 2.5rem !important; /* 40px */
        line-height: 2.75rem !important;
    }
    
    /* Texto de párrafos más legible */
    .text-xl {
        font-size: 1.125rem !important; /* 18px */
        line-height: 1.75rem !important;
    }
    
    .text-lg {
        font-size: 1rem !important; /* 16px */
        line-height: 1.5rem !important;
    }
    
    /* Contenedores con mejor padding */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Evitar overflow horizontal */
    .max-w-3xl,
    .max-w-2xl,
    .max-w-4xl {
        max-width: 100% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Mejorar espaciado en tarjetas */
    .p-8 {
        padding: 1.5rem !important;
    }
    
    .p-6 {
        padding: 1rem !important;
    }
    
    /* Texto en botones más pequeño */
    .px-8 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    .py-4 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    
    /* Evitar que el texto se salga de los contenedores */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    p {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
}

/* Mejoras para tablets */
@media (min-width: 641px) and (max-width: 1024px) {
    .text-5xl {
        font-size: 2.5rem !important;
        line-height: 3rem !important;
    }
    
    .text-4xl {
        font-size: 2rem !important;
        line-height: 2.5rem !important;
    }
    
    .max-w-3xl,
    .max-w-2xl {
        max-width: 90% !important;
    }
}

/* Mejoras generales para evitar texto cortado */
.leading-tight {
    line-height: 1.25 !important;
}

.leading-relaxed {
    line-height: 1.625 !important;
}

/* Asegurar que los elementos flex no se desborden */
.flex {
    flex-wrap: wrap !important;
}

/* Mejorar la legibilidad en general */
body {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Evitar desbordamiento horizontal */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}