/* ==========================================================================
   RESET & VARIABLES GLOBALES
   ========================================================================== */
:root {
    --bg-primary: #0b111e;
    --bg-secondary: #131c2e;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-hover: rgba(255, 255, 255, 0.07);

    --color-primary: #38bdf8;
    /* Cian tecnológico */
    --color-primary-hover: #0ea5e9;
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;

    --gradient-accent: linear-gradient(135deg, #38bdf8 0%, #6366f1 100%);
    --gradient-card: linear-gradient(180deg, rgba(19, 28, 46, 0.6) 0%, rgba(11, 17, 30, 0.8) 100%);

    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;

    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

/* Clases de Utilidad */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   COMPONENTES: BOTONES Y BADGES
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(56, 189, 248, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.05rem;
    border-radius: var(--border-radius-md);
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--color-primary);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Encabezados de Sección */
.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 50px auto;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* ==========================================================================
   HEADER / NAVBAR STICKY
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
    border-bottom: 1px solid transparent;
}

.header.sticky {
    background: rgba(11, 17, 30, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    padding-bottom: 20px;
    transition: var(--transition-smooth);
}

.header.sticky .navbar {
    padding-top: 8px;
    padding-bottom: 8px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

.logo span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-list {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

.btn-nav-mobile {
    display: none;
}

/* Menú Hamburguesa */
.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
}

.bar {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    transition: var(--transition-smooth);
    background-color: var(--color-text-main);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    padding-top: 160px;
    padding-bottom: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 90% 10%, rgba(56, 189, 248, 0.08) 0%, transparent 45%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}

.hero-content h1 span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.image-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--glass-border);
}

.image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(t-top, var(--bg-primary), transparent);
    opacity: 0.4;
}

/* ==========================================================================
   SERVICIOS
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 20px 30px -10px rgba(14, 165, 233, 0.15);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 24px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.service-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   BENEFICIOS
   ========================================================================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.benefit-item {
    display: flex;
    gap: 20px;
    background: var(--bg-surface);
    padding: 24px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--glass-border);
}

.benefit-item i {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-top: 4px;
    flex-shrink: 0;
}

.benefit-item h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.benefit-item p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   PORTAFOLIO (GALERÍA)
   ========================================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.portfolio-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.portfolio-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.portfolio-img {
    height: 220px;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.portfolio-card:hover .portfolio-img img {
    transform: scale(1.06);
}

.portfolio-info {
    padding: 24px;
}

.portfolio-info h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.portfolio-info p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.btn-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-link:hover {
    color: var(--color-text-main);
}

/* ==========================================================================
   NOSOTROS
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-content h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 24px;
}

.about-content>p {
    color: var(--color-text-muted);
    margin-bottom: 32px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.about-box h4 {
    color: var(--color-primary);
    font-size: 1.05rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.about-box p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.about-quote {
    border-left: 3px solid var(--color-primary);
    padding-left: 16px;
    font-style: italic;
    color: var(--color-text-main);
}

.about-image img {
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
}

/* ==========================================================================
   TESTIMONIOS
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    padding: 32px;
    border-radius: var(--border-radius-md);
}

.stars {
    color: #fbbf24;
    /* Dorado de estrellas */
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.testimonial-card p {
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.client-info h5 {
    font-size: 1rem;
    font-weight: 600;
}

.client-info span {
    font-size: 0.8rem;
    color: var(--color-primary);
}

/* ==========================================================================
   CTA FINAL
   ========================================================================== */
.cta-box {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 60px 40px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    max-width: 900px;
}

.cta-box h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-box p {
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 32px auto;
    font-size: 1.1rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-section {
    background: #060a12;
    padding: 70px 0 20px 0;
    border-top: 1px solid var(--glass-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    display: inline-block;
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.social-links a:hover {
    background: var(--color-primary);
    color: var(--bg-primary);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.05rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-links ul a:hover {
    color: var(--color-primary);
    padding-left: 4px;
}

.footer-contact ul li {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   BOTÓN FLOTANTE WHATSAPP & ANIMACIONES SCROLL
   ========================================================================== */
.whatsapp-floating {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background-color: #25d366;
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
    z-index: 999;
    transition: var(--transition-smooth);
}

.whatsapp-floating:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.5);
}

/* Framework de Animación de Entrada Sutil (Scroll) */
.reveal {
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES - MOBILE FIRST)
   ========================================================================== */

/* Tablets e inferiores */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }

    .hero-grid,
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content p,
    .hero-cta {
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }

    .about-image {
        order: -1;
        /* Pone la imagen arriba en móviles */
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Menú móvil colapsable */
    .hamburger {
        display: block;
    }

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

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--bg-primary);
        border-bottom: 1px solid var(--glass-border);
        width: 100%;
        text-align: center;
        transition: 0.4s ease;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        padding: 24px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 24px;
    }

    .btn-nav {
        display: none;
    }

    .btn-nav-mobile {
        display: inline-block;
        background: var(--gradient-accent);
        color: #fff !important;
        padding: 10px 24px;
        border-radius: var(--border-radius-sm);
    }
}

/* Smartphones pequeños */
@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2.6rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .cta-box h2 {
        font-size: 1.8rem;
    }

    .hero-cta .btn {
        width: 100%;
    }
}