/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Dark Mode */
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-secondary: #06b6d4;
    --color-accent: #f59e0b;
    --color-dark: #0f172a;
    --color-dark-light: #1e293b;
    --color-gray: #94a3b8;
    --color-gray-light: #cbd5e1;
    --color-white: #ffffff;
    --color-bg: #0f172a;
    --color-card-bg: #1e293b;
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
}

.nav__logo {
    display: inline-block;
    cursor: pointer;
}

.nav__logo .logo {
    height: 60px;
    width: 60px;
    object-fit: contain;
    padding: 8px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-radius: 50%;
    border: 2px solid rgba(37, 99, 235, 0.2);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transition: all 0.3s ease;
}

.nav__logo:hover .logo {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    border-color: rgba(37, 99, 235, 0.4);
}

.nav__logo h1 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-dark);
}

.nav__logo .highlight {
    color: var(--color-primary);
}

.nav__menu {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    align-items: center;
}

.nav__menu a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: var(--spacing-xs) var(--spacing-sm);
}

.nav__menu a:hover {
    color: var(--color-primary);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white) !important;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.whatsapp-link {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: var(--color-white) !important;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-weight: 600;
    display: none;
}

.whatsapp-link:hover {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Botón CTA móvil en header */
.btn-cta-mobile {
    display: none;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-cta-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Mostrar WhatsApp solo en móvil */
@media (max-width: 768px) {
    .whatsapp-link {
        display: block !important;
    }

    .btn-cta-mobile {
        display: block !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1500;
        top: 50%;
        margin-top: -1rem;
    }
}

/* ===== MOBILE HAMBURGER ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(59, 130, 246, 0.5);
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    z-index: 2001;
    margin-left: auto;
    flex-shrink: 0;
    position: relative;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: #3b82f6;
    border-radius: 2px;
    transition: all 0.3s linear;
    transform-origin: center;
    display: block;
    pointer-events: none;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: calc(80px + var(--spacing-xl)) 0 var(--spacing-xl) 0;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-light) 100%);
    background-image:
        url('https://bminio.obti.cl/bucket-public-files/shared-assets/logos/background.jpg'),
        linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(30, 41, 59, 0.85) 50%, rgba(245, 158, 11, 0.15) 100%);
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    color: var(--color-white);
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero__content {
    animation: fadeInUp 1s ease-out;
    margin-top: 4rem;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    padding: 0 1rem;
}

.highlight {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    max-width: 800px;
    margin: 0 auto var(--spacing-md);
    color: var(--color-gray-light);
    font-weight: 300;
}

.hero__stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: calc(var(--spacing-lg) + 2rem);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat__number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat__label {
    font-size: 0.9rem;
    color: var(--color-gray-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-hero {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.btn-hero:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ===== SECTIONS ===== */
section {
    padding: var(--spacing-xl) 0;
}

.section__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.section__subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
}

/* ===== SERVICES SECTION ===== */
.services {
    background: var(--color-dark-light);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.service-card {
    background: var(--color-card-bg);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
    border-color: var(--color-primary);
    background: rgba(30, 41, 59, 0.8);
}

.service-card__icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.service-card p {
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* ===== EAS FRAMEWORK SECTION ===== */
.eas-framework {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-light) 100%);
    color: var(--color-white);
}

.eas__features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-secondary);
}

.feature ul {
    list-style: none;
    padding-left: 0;
}

.feature li {
    padding: var(--spacing-xs) 0;
    color: var(--color-gray-light);
    line-height: 1.8;
}

.feature li::before {
    content: "✓ ";
    color: var(--color-secondary);
    font-weight: bold;
    margin-right: var(--spacing-xs);
}

.feature strong {
    color: var(--color-white);
}

/* ===== TECHNOLOGIES SECTION ===== */
.technologies {
    background: var(--color-bg);
}

.tech__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.tech-category {
    background: var(--color-card-bg);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
}

.tech-category h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-text);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
}

.contact .section__title,
.contact .section__subtitle {
    color: var(--color-white);
}

.contact__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.contact-card h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.contact-card p {
    line-height: 1.4;
    margin: 0.3rem 0;
}

.contact-card a {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.contact-card a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-dark);
    color: var(--color-gray-light);
    padding: var(--spacing-md) 0;
    text-align: center;
}

.footer p {
    margin: var(--spacing-xs) 0;
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon {
    width: 45px;
    height: 45px;
    filter: brightness(0) invert(1);
}

.whatsapp-tooltip {
    position: absolute;
    right: 85px;
    background: var(--color-white);
    color: var(--color-dark);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: none;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid var(--color-white);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    right: 90px;
}

/* Animación de pulso */
@keyframes whatsappPulse {
    0% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.2);
    }
    100% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    }
}

.whatsapp-float {
    animation: whatsappPulse 2s infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Ajustar navegación para móvil */
    .nav {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Mostrar hamburguesa */
    .hamburger {
        display: flex !important;
        position: relative;
        margin-left: auto;
        order: 10;
    }

    /* Menú móvil */
    .nav__menu {
        position: fixed !important;
        top: 80px !important;
        right: -100% !important;
        width: 80% !important;
        height: calc(100vh - 80px) !important;
        background: #0f172a !important;
        flex-direction: column !important;
        padding: 2rem 1.5rem !important;
        gap: 1rem !important;
        transition: right 0.4s ease !important;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.8) !important;
        z-index: 999 !important;
        overflow-y: auto !important;
        border-left: 2px solid rgba(59, 130, 246, 0.3) !important;
        display: flex !important;
        align-items: flex-start !important;
    }

    .nav__menu.open {
        right: 0 !important;
    }

    .nav__menu li {
        width: 100%;
    }

    .nav__menu a {
        display: block;
        padding: 1rem;
        color: var(--color-text);
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav__menu a:hover {
        background: rgba(59, 130, 246, 0.1);
        border-radius: 8px;
    }

    .nav__menu .btn-primary {
        margin-top: 1rem;
        text-align: center;
    }

    .nav__menu .whatsapp-link {
        margin-top: 0.5rem;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .nav__menu .whatsapp-link::before {
        content: "💬";
        font-size: 1.2rem;
    }

    /* Logo más pequeño */
    .nav__logo .logo {
        height: 45px;
        width: 45px;
    }

    /* Hero background adjustments para tablet */
    .hero {
        background-size: cover;
        background-position: center center;
    }

    .hero__stats {
        gap: var(--spacing-md);
    }

    .stat__number {
        font-size: 2rem;
    }

    .services__grid,
    .eas__features,
    .tech__grid,
    .contact__info {
        grid-template-columns: 1fr;
    }

    /* WhatsApp responsive */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }

    .whatsapp-icon {
        width: 35px;
        height: 35px;
    }

    .whatsapp-tooltip {
        display: none; /* Ocultar tooltip en tablets */
    }

    /* Hero adjustments para tablet */
    .hero__title {
        font-size: clamp(2rem, 6vw, 3rem);
        padding: 0 2rem;
    }

    .hero__stats {
        margin-bottom: calc(var(--spacing-lg) + 3rem);
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }

    /* Hero adjustments para móvil */
    .hero {
        text-align: center;
        background-size: 150% auto;
        background-position: center bottom;
        background-repeat: no-repeat;
        padding: 80px 0 var(--spacing-lg) 0;
        min-height: 100vh;
        display: flex;
        align-items: flex-start;
    }

    .hero__content {
        text-align: center;
        width: 100%;
        margin-top: 0;
        padding-top: 1rem;
    }

    .hero__title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        padding: 0 1.5rem;
        word-wrap: break-word;
        text-align: center;
    }

    .hero__subtitle {
        padding: 0 1.5rem;
        font-size: 1rem;
        text-align: center;
    }

    .hero__stats {
        gap: 0.5rem;
        margin-bottom: var(--spacing-md);
        padding: 0 0.5rem;
        justify-content: space-around;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
    }

    .stat {
        flex: 1 1 33%;
        min-width: 0;
    }

    /* Reordenar estadísticas en móvil - mantener orden horizontal */
    .stat-automatizado {
        order: 2;
    }

    .stat-stacks {
        order: 1;
    }

    .stat-niveles {
        order: 3;
    }

    .stat__number {
        font-size: 1.2rem;
        line-height: 1.2;
    }

    .stat__label {
        font-size: 0.6rem;
        line-height: 1.2;
    }

    .btn-hero {
        display: none !important;
    }

    /* Asegurar que todas las secciones estén centradas */
    section {
        text-align: center;
    }

    .container {
        text-align: center;
    }

    /* Reducir interlineado de títulos de contacto en mobile */
    .contact-card h3 {
        line-height: 1;
        margin-bottom: 0.5rem;
    }

    .section__title {
        line-height: 1.1;
    }
}
