/* ==========================================
   VARIABLES Y CONFIGURACIÓN GENERAL
   ========================================== */
:root {
    --bg-dark: #0A0E28;
    --bg-card: rgba(16, 23, 62, 0.6);
    --primary-neon: #00F2FE;
    --secondary-green: #00F5A0;
    --accent-purple: #7B2CBF;
    --text-main: #E0E6ED;
    --text-muted: #94A3B8;
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

/* ==========================================
   TIPOGRAFÍA Y BOTONES
   ========================================== */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1rem;
}

.btn--primary {
    background: var(--primary-neon);
    color: var(--bg-dark);
}

.btn--primary:hover {
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
    transform: translateY(-2px);
}

.btn--secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(224, 230, 237, 0.2);
}

.btn--secondary:hover {
    border-color: var(--primary-neon);
    color: var(--primary-neon);
}

.btn--outline {
    background: transparent;
    border: 1px solid var(--primary-neon);
    color: var(--primary-neon);
}

.btn--outline:hover {
    background: var(--primary-neon);
    color: var(--bg-dark);
}

.btn--full {
    width: 100%;
}

/* ==========================================
   HEADER & NAVEGACIÓN MÓVIL (CORREGIDO)
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(10, 14, 40, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 1.15rem;
}

.logo__text strong {
    color: var(--primary-neon);
}

/* Botón Hamburguesa */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.nav-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--primary-neon);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Animación a 'X' cuando el menú está abierto */
.nav-toggle.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Menú Desplegable Móvil (Por defecto oculto fuera de pantalla) */
@media (max-width: 767px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #0A0E28;
        border-left: 1px solid rgba(0, 242, 254, 0.2);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
        padding: 6rem 2rem 2rem;
        transition: right 0.4s ease-in-out;
        z-index: 1000;
    }

    .nav.nav--open {
        right: 0;
    }

    .nav__list {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        list-style: none;
    }

    .nav__link {
        font-size: 1.1rem;
        font-weight: 500;
        color: var(--text-main);
        text-decoration: none;
    }

    .nav__link--btn {
        display: inline-block;
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
        background: var(--primary-neon);
        color: var(--bg-dark);
        border-radius: 8px;
        font-weight: 700;
    }
}

/* Menú Horizontal para Pantallas Escritorio (768px en adelante) */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
        /* Ocultar hamburguesa en PC */
    }

    .nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .nav__list {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1.75rem;
        list-style: none;
    }

    .nav__link--btn {
        padding: 0.5rem 1.2rem;
        border: 1px solid var(--primary-neon);
        border-radius: 6px;
        color: var(--primary-neon);
        background: transparent;
        transition: var(--transition);
    }

    .nav__link--btn:hover {
        background: var(--primary-neon);
        color: var(--bg-dark);
    }
}

/* ==========================================
   HERO
   ========================================== */
.hero {
    padding: 8rem 0 4rem;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    background: rgba(0, 245, 160, 0.1);
    border: 1px solid var(--secondary-green);
    border-radius: 20px;
    color: var(--secondary-green);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.badge__dot {
    width: 8px;
    height: 8px;
    background: var(--secondary-green);
    border-radius: 50%;
}

.hero__cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hero__microcopy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Code Visual Mockup */
.code-card {
    background: #060919;
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.code-card__header {
    background: #0E1438;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #FF5F56;
}

.dot.yellow {
    background: #FFBD2E;
}

.dot.green {
    background: #27C93F;
}

.code-card__title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

.code-card__body {
    padding: 1.25rem;
    font-family: monospace;
    font-size: 0.9rem;
}

.keyword {
    color: var(--accent-purple);
}

.title {
    color: var(--primary-neon);
}

.function {
    color: var(--secondary-green);
}

.string {
    color: #FFD166;
}

/* ==========================================
   SECCIONES GENERALES & COMPARATIVA
   ========================================== */
.section {
    padding: 5rem 0;
}

.section--dark {
    background: #070A1E;
}

.section-title {
    margin-bottom: 3rem;
}

.section-title h2 {
    color: #FFF;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
}

.card__title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.card__title--red {
    color: #FF5252;
}

.card__title--green {
    color: var(--secondary-green);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    margin-bottom: 0.85rem;
    padding-left: 1.5rem;
    position: relative;
}

.feature-list--red li::before {
    content: "✕";
    position: absolute;
    left: 0;
    color: #FF5252;
}

.feature-list--green li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-green);
}

/* ==========================================
   SERVICIOS & PRECIOS
   ========================================== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

.price-card--featured {
    border-color: var(--primary-neon);
    background: rgba(0, 242, 254, 0.03);
}

.price-card__badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary-neon);
    color: var(--bg-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: 10px;
    text-transform: uppercase;
}

.price-card__amount {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--secondary-green);
    margin: 0.5rem 0 1rem;
}

.price-card__features {
    list-style: none;
    margin: 1.5rem 0;
    flex-grow: 1;
}

.price-card__features li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.price-disclaimer {
    margin-top: 2rem;
    font-size: 0.85rem;
}

/* ==========================================
   PORTAFOLIO
   ========================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.portfolio-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
}

.portfolio-card__tag {
    color: var(--primary-neon);
    font-size: 0.8rem;
    text-transform: uppercase;
}

.portfolio-card__title {
    margin: 0.5rem 0 1rem;
}

.portfolio-card__tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.portfolio-card__tech span {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ==========================================
   FOOTER & WHATSAPP FLOAT
   ========================================== */
.footer {
    background: #040612;
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer__bottom {
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: #FFF;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* ==========================================
   RESPONSIVE (DESKTOP MEDIA QUERIES)
   ========================================== */
@media (min-width: 768px) {
    h1 {
        font-size: 3.2rem;
    }

    .hero__grid {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .comparison-grid {
        grid-template-columns: 1fr 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* ==========================================
   RESET DE ENLACES Y NAVEGACIÓN (CORREGIDO)
   ========================================== */
a {
    color: inherit;
    text-decoration: none;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(10, 14, 40, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 1.15rem;
}

.logo__text strong {
    color: var(--primary-neon);
}

/* Enlaces del Nav en Escritorio */
.nav__list {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav__link {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--primary-neon);
}

.nav__link--btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--primary-neon);
    border-radius: 6px;
    color: var(--primary-neon);
    background: transparent;
    transition: var(--transition);
}

.nav__link--btn:hover {
    background: var(--primary-neon);
    color: var(--bg-dark);
}

/* Botón Hamburguesa */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.nav-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--primary-neon);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.nav-toggle.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ==========================================
   VERSION MÓVIL (MENÚ DESPLEGABLE)
   ========================================== */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
        /* Mostrar hamburguesa solo en teléfono */
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #0A0E28;
        border-left: 1px solid rgba(0, 242, 254, 0.2);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
        padding: 6rem 2rem 2rem;
        transition: right 0.4s ease-in-out;
        z-index: 1000;
    }

    .nav.nav--open {
        right: 0;
        /* Desplaza el menú hacia adentro cuando se activa */
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .nav__link {
        font-size: 1.1rem;
    }

    .nav__link--btn {
        width: 100%;
        text-align: center;
        background: var(--primary-neon);
        color: var(--bg-dark);
        font-weight: 700;
        padding: 0.75rem 1rem;
    }
}

/* ==========================================
   PORTAFOLIO - ACCIÓN VER MÁS
   ========================================== */
.portfolio-actions {
    margin-top: 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.portfolio-actions .btn--secondary {
    border-color: rgba(0, 242, 254, 0.4);
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
}

.portfolio-actions .btn--secondary:hover {
    background: rgba(0, 242, 254, 0.1);
    border-color: var(--primary-neon);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.portfolio-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 500px;
}