/* Importar Outfit de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #121216;
    --bg-card: #1c1c24;
    --text-main: #ffffff;
    --text-muted: #cbd5e1;
    --electric-blue: #0084ff;
    --electric-glow: #00d0ff;
    --electric-amber: #f5b041;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    overflow-x: hidden;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ============================================ */
/* HERO SECTION PREMIUM                         */
/* ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--bg-primary);
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(10, 10, 12, 0.6) 0%, 
        rgba(10, 10, 12, 0.3) 40%, 
        rgba(10, 10, 12, 0.8) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Logo Grande del Hero */
.hero-logo-symbol {
    width: 160px;
    height: 160px;
    filter: drop-shadow(0 0 30px rgba(0, 208, 255, 0.45));
    animation: floatLogo 4s ease-in-out infinite;
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Tagline animado */
.hero-tagline {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--electric-glow);
    text-shadow: 0 0 20px rgba(0, 208, 255, 0.3);
}

/* Título principal con glow */
.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

/* Stats del hero */
.hero-stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 132, 255, 0.15);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-stat-card:hover {
    border-color: rgba(0, 208, 255, 0.4);
    background: rgba(0, 132, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 132, 255, 0.1);
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* ============================================ */
/* EFECTOS DE CRISTAL / GLASSMORPHISM           */
/* ============================================ */
.glass-panel {
    background: rgba(28, 28, 36, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ============================================ */
/* ENCABEZADOS Y TEXTOS                         */
/* ============================================ */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 700;
}

.text-gradient {
    background: linear-gradient(135deg, var(--electric-blue) 0%, var(--electric-glow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-amber {
    background: linear-gradient(135deg, var(--electric-amber) 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Helper de contraste para texto sobre fondos oscuros */
.text-high-contrast {
    color: #f1f5f9 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ============================================ */
/* TARJETAS Y CONTENEDORES                      */
/* ============================================ */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 132, 255, 0.15) !important;
    border-color: rgba(0, 132, 255, 0.3) !important;
}

/* ============================================ */
/* BOTONES PREMIUM                              */
/* ============================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--electric-blue) 0%, #0056b3 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0095ff 0%, var(--electric-blue) 100%);
    box-shadow: 0 0 20px rgba(0, 132, 255, 0.5);
    transform: scale(1.03);
}

.btn-outline-primary {
    border-color: var(--electric-blue);
    color: var(--electric-glow);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--electric-blue);
    border-color: var(--electric-blue);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(0, 132, 255, 0.3);
}

/* ============================================ */
/* ELEMENTOS DE FORMULARIO                      */
/* ============================================ */
.form-control {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
    transition: all 0.2s ease;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--electric-blue) !important;
    box-shadow: 0 0 10px rgba(0, 132, 255, 0.2) !important;
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ============================================ */
/* LÍNEA DE ACENTO ELÉCTRICA                    */
/* ============================================ */
.electric-line {
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, var(--electric-blue), var(--electric-glow));
    border-radius: 2px;
}

/* ============================================ */
/* UTILIDADES DE ESPACIADO Y TIPOGRAFÍA         */
/* ============================================ */
.tracking-wider {
    letter-spacing: 0.05em;
}

.tracking-widest {
    letter-spacing: 0.12em;
}

.leading-relaxed {
    line-height: 1.75;
}

/* ============================================ */
/* MICRO-ANIMACIONES                            */
/* ============================================ */
@keyframes pulseGlow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-delay-1 { animation-delay: 0.15s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.45s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.6s; opacity: 0; }

/* Utilidad de Alineación Justificada */
.text-justify {
    text-align: justify !important;
}

/* Zoom en imágenes de tarjetas */
.card-zoom-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover:hover .card-zoom-img {
    transform: scale(1.06);
}

/* ============================================ */
/* FONDO CON DEGRADADO BRILLANTE PARA LOGIN     */
/* ============================================ */
.glowing-bg {
    background-color: var(--bg-primary) !important;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 132, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 208, 255, 0.12) 0%, transparent 40%);
    position: relative;
    min-height: 100vh;
    width: 100%;
}

/* ============================================ */
/* INDICADORES DE CARGA DE HTMX                 */
/* ============================================ */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in-out;
    display: none !important;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
    display: inline-block !important;
}

/* ============================================ */
/* CARUSEL DE PROYECTOS                         */
/* ============================================ */
.carousel-container {
    position: relative;
    width: 100%;
    padding: 1.5rem 2.5rem; /* Espacio lateral para las flechas flotantes */
    overflow: visible;      /* No cortar las flechas absolutas */
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.25rem 1.5rem 0.25rem;
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Ocultar barra de desplazamiento */
}

.carousel-card-wrapper {
    flex: 0 0 calc(33.333% - 1rem); /* 3 columnas en desktop */
    scroll-snap-align: start;
    transition: all 0.3s ease;
}

@media (max-width: 992px) {
    .carousel-card-wrapper {
        flex: 0 0 calc(50% - 0.75rem); /* 2 columnas en tablet */
    }
}

@media (max-width: 576px) {
    .carousel-card-wrapper {
        flex: 0 0 100%; /* 1 columna en móvil */
    }
}

.carousel-control-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(28, 28, 36, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--electric-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.carousel-control-btn:hover {
    background: var(--electric-blue);
    color: #ffffff;
    border-color: var(--electric-glow);
    box-shadow: 0 0 15px rgba(0, 132, 255, 0.6);
    transform: translateY(-50%) scale(1.08);
}

.carousel-control-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-control-btn.prev {
    left: 0;
}

.carousel-control-btn.next {
    right: 0;
}

@media (max-width: 1200px) {
    .carousel-control-btn.prev {
        left: 0;
    }
    .carousel-control-btn.next {
        right: 0;
    }
}

@media (max-width: 768px) {
    .carousel-control-btn {
        width: 40px;
        height: 40px;
    }
    .carousel-control-btn.prev {
        left: 0;
    }
    .carousel-control-btn.next {
        right: 0;
    }
}
