/* =========================================
   LAVALLE FIX - PREMIUM DESIGN SYSTEM
   ========================================= */

/* 1. VARIABLES & THEME SETUP */
:root {
    /* Palette: Deep Space & Neon Cyan */
    --bg-dark: #0a0a0f;       /* Fondo principal muy oscuro */
    --bg-panel: #13131f;      /* Fondo de paneles */
    --primary: #00f2ff;       /* Cyan Neón Vibrante */
    --primary-glow: rgba(0, 242, 255, 0.4);
    --secondary: #7000ff;     /* Violeta Eléctrico para gradientes */
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 12px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 30px;
    
    /* Transitions */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* 2. RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(112, 0, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 242, 255, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

/* 3. UTILITIES & ANIMATIONS */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 4. HEADER & NAVIGATION */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: padding 0.3s ease;
}

header.scrolled { padding: 15px 5%; }

.logo-img { height: 40px; width: auto; }

nav { display: flex; align-items: center; gap: 30px; }

nav a:not(.btn-primary) {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

nav a:not(.btn-primary):hover { color: var(--primary); }

nav a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

nav a:not(.btn-primary):hover::after { width: 100%; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-top: 15px;
}
.dropdown:hover .dropdown-content { display: block; animation: fadeInUp 0.3s ease; }
.dropdown-content a {
    display: block;
    padding: 10px 15px;
    border-radius: 4px;
    color: var(--text-muted);
}
.dropdown-content a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--primary);
}

/* 5. BUTTONS */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #00c3ff 100%);
    color: #000;
    padding: 12px 28px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border: none;
    box-shadow: 0 4px 15px var(--primary-glow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #00c3ff 0%, var(--primary) 100%);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}
.btn-primary:hover::before { opacity: 1; }

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 12px 28px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-secondary:hover {
    background: rgba(0, 242, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2);
}

/* 6. HERO SECTION */
.hero-slider {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.slider-item {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
}

.slider-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(10,10,15,0.3), rgba(10,10,15,0.9));
    z-index: 1;
}

.slider-item.active { opacity: 1; }

.slider-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.slogan {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #a0a0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideUp 1s var(--ease-out);
}

.subtitulo {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 300;
    animation: slideUp 1s var(--ease-out) 0.2s backwards;
}

.slider-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 15px;
}

.dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* 7. SERVICES GRID */
.servicios {
    padding: 100px 5%;
    position: relative;
}

.servicios h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
}

.servicio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.servicio-item {
    background: var(--bg-panel);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.servicio-item:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 242, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.servicio-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.servicio-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.btn-more {
    align-self: flex-start;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-more::after { content: '→'; transition: transform 0.3s ease; }
.btn-more:hover::after { transform: translateX(5px); }

/* 8. FORMS (Login/Register/Calculator) */
.calculadora-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 5%;
}

.calculadora-form {
    width: 100%;
    max-width: 500px;
    padding: 40px;
    border-radius: var(--radius-md);
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.calculadora-form h2 { text-align: center; margin-bottom: 10px; font-size: 2rem; }
.calculadora-form p { text-align: center; color: var(--text-muted); margin-bottom: 30px; }

input, select {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
    background: rgba(0,0,0,0.5);
}

button[type="submit"], #calcularBtn {
    width: 100%;
    background: var(--primary);
    color: #000;
    padding: 15px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

button[type="submit"]:hover, #calcularBtn:hover {
    background: #fff;
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.cta-calculadora { display: block; text-align: center; margin-top: 15px; color: var(--primary); font-size: 0.9rem; }

/* 9. FOOTER */
.main-footer {
    background: #050508;
    padding: 80px 5% 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: #fff;
    position: relative;
    display: inline-block;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0;
    width: 30px; height: 2px;
    background: var(--primary);
}

.footer-col p, .servicios-lista a {
    color: var(--text-muted);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.servicios-lista a:hover { color: var(--primary); padding-left: 5px; }

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
}

/* 10. KEYFRAMES */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* 11. RESPONSIVE */
@media (max-width: 768px) {
    .slogan { font-size: 2.5rem; }
    .menu-toggle { display: flex; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1002; }
    .bar { width: 30px; height: 2px; background: #fff; transition: 0.3s; }
    
    #main-nav {
        position: fixed;
        top: 0; right: 0;
        width: 80%; height: 100vh;
        background: #0a0a0f;
        flex-direction: column;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out);
        border-left: 1px solid rgba(255,255,255,0.1);
    }
    
    #main-nav.open { transform: translateX(0); }
    
    .dropdown-content {
        position: static;
        transform: none;
        background: transparent;
        border: none;
        padding-left: 20px;
        box-shadow: none;
    }
}