:root {
    --accent: #00f2ff;
    /* Un cian más eléctrico */
    --accent-dark: #00d1e0;
    --accent-glow: rgba(0, 242, 255, 0.4);
    --bg: #090a0f;
    /* Un negro/azul abisal profundo */
    --surface: rgba(26, 32, 44, 0.6);
    /* Transparente para glassmorphism */
    --surface-light: rgba(43, 53, 73, 0.6);
    --surface-border: rgba(255, 255, 255, 0.08);
    /* Borde sutil cristal */
    --text-white: #ffffff;
    --text-gray: #a0aec0;
    /* Gris azulado limpio */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

body {
    background-color: var(--bg);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

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

ul {
    list-style: none;
}

/* --- NUEVO FONDO HERO DINÁMICO --- */
.hero-visual-engine {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    height: 100vh;
}

.glow-sphere {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    filter: blur(120px);
    animation: orbit 25s infinite alternate ease-in-out;
    opacity: 0.8;
}

.glow-sphere-2 {
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.15) 0%, transparent 60%);
    /* Purple/Blue undertone glow */
    filter: blur(100px);
    animation: orbit 30s infinite alternate-reverse ease-in-out;
}

.mesh-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--surface-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--surface-border) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at 50% 50%, black 10%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 10%, transparent 80%);
}

@keyframes orbit {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-5%, 8%) scale(1.1);
    }
}

.navbar {
    height: 90px;
    display: flex;
    align-items: center;
    background: rgba(9, 10, 15, 0.6);
    /* Transparente */
    backdrop-filter: blur(24px);
    /* Glassmorphism fuerte */
    -webkit-backdrop-filter: blur(24px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--surface-border);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(9, 10, 15, 0.85);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 90px;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links a {
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--accent);
}

.btn-nav {
    border: 1px solid var(--accent);
    color: var(--accent) !important;
    padding: 10px 24px;
    border-radius: 12px;
}

.btn-nav:hover {
    background: var(--accent);
    color: #000 !important;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* --- HERO SECTION --- */
.hero {
    display: flex;
    align-items: center;
    min-height: 90vh;
    gap: 60px;
    padding: 60px 0;
}

.hero-text {
    flex: 1;
    z-index: 1;
}

.tagline {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-bottom: 15px;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

.highlight {
    color: var(--accent);
    text-shadow: 0 0 30px var(--accent-glow);
}

.hero-sub {
    color: var(--text-gray);
    font-size: 1.15rem;
    margin-bottom: 45px;
    max-width: 550px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* BOTONES OPTIMIZADOS */
.btn-primary,
.btn-secondary {
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #000;
    box-shadow: 0 10px 25px -5px var(--accent-glow), inset 0 2px 5px rgba(255, 255, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px -5px var(--accent-glow), 0 0 20px rgba(0, 242, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--surface-border);
    color: #fff;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* --- SECCIONES COMUNES --- */
.services,
.portfolio {
    padding: 100px 0;
}

.section-title {
    margin-bottom: 60px;
    font-size: 2.8rem;
    font-weight: 800;
}

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

.service-card {
    background: linear-gradient(145deg, var(--surface-light), var(--surface));
    padding: 50px;
    border-radius: 24px;
    border: 1px solid var(--surface-border);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-12px);
    background: linear-gradient(145deg, rgba(43, 53, 73, 0.8), rgba(26, 32, 44, 0.9));
    border-color: rgba(0, 242, 255, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px var(--accent-glow);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* --- PORTFOLIO --- */
.portfolio-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.work-item {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/10;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s ease;
}

.work-item:hover img {
    transform: scale(1.1);
}

.work-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    background: linear-gradient(to top, rgba(9, 10, 15, 0.95) 0%, rgba(9, 10, 15, 0.4) 50%, transparent 100%);
    opacity: 0;
    transition: var(--transition);
}

.work-item:hover .work-info {
    opacity: 1;
}

/* --- INLINE PROJECT PREVIEW MODAL --- */
.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.preview-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.preview-modal-content {
    width: 90vw;
    height: 90vh;
    max-width: 1400px;
    background: linear-gradient(145deg, rgba(26, 32, 44, 0.7), rgba(9, 10, 15, 0.9));
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 242, 255, 0.15);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.preview-modal-overlay.active .preview-modal-content {
    transform: scale(1) translateY(0);
}

.close-preview {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    font-size: 2rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.close-preview:hover {
    background: rgba(255, 50, 50, 0.2);
    border-color: rgba(255, 50, 50, 0.5);
    color: #ff5f56;
    transform: rotate(90deg);
}

.preview-iframe-container {
    flex: 1;
    width: 100%;
    position: relative;
    background: #000;
}

.preview-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: relative;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.preview-iframe-container iframe.loaded {
    opacity: 1;
}

.preview-loader {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
    color: var(--accent);
}

.pulse-loader {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 242, 255, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 15px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.preview-footer {
    padding: 15px 25px;
    background: rgba(9, 10, 15, 0.5);
    border-top: 1px solid var(--surface-border);
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .preview-modal-content {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .close-preview {
        top: 10px;
        right: 10px;
    }
}

/* --- FOOTER OPTIMIZADO --- */
.main-footer {
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: 100px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 20px;
}

.footer-grid h4 {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #fff;
}

.wa-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: #fff;
}

.wa-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent);
    display: grid;
    place-items: center;
    border-radius: 10px;
}

.mail-link {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 2px solid transparent;
}

.mail-link:hover {
    border-color: var(--accent);
}

.social-links {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.ig-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(26, 32, 44, 0.6);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-gray);
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.ig-link:hover {
    transform: translateY(-5px);
    border-color: rgba(225, 48, 108, 0.4);
    background: rgba(225, 48, 108, 0.05);
    color: #fff;
    box-shadow: 0 10px 20px rgba(225, 48, 108, 0.15);
}

.ig-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: var(--transition);
}

.ig-link:hover svg {
    fill: #E1306C;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    color: var(--text-gray);
    font-size: 0.85rem;
}

.dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
    margin-right: 5px;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 968px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-btns {
        justify-content: center;
    }

    .portfolio-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .wa-item {
        justify-content: center;
    }
}

/* Estilo para que el contenedor del proyecto sea un enlace */
.work-item {
    display: block;
    /* Para que todo el cuadro sea clickeable */
    text-decoration: none;
    color: inherit;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/10;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.work-info h4 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: var(--text-white);
}

.view-project {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    /* Tu color cian #00e5ff */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Efecto al pasar el mouse sobre la tarjeta completa */
.work-item:hover {
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.1);
}

/* --- CHAT FLOTANTE ESTILO APP --- */
.chat-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

/* Ventana de Chat */
.chat-window {
    width: 350px;
    background: rgba(19, 26, 34, 0.7);
    border: 1px solid var(--surface-border);
    border-radius: 25px;
    overflow: hidden;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 255, 0.1);
    margin-bottom: 20px;
    display: none;
    /* Se activa con JS */
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.chat-window.active {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Header del Chat */
.chat-header {
    background: linear-gradient(135deg, rgba(43, 53, 73, 0.5), rgba(9, 10, 15, 0.8));
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--surface-border);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
}

.header-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.header-status {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
}

/* Cuerpo del Chat */
.chat-body {
    padding: 20px;
}

.msg-received {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 15px 15px 15px 0;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.chat-instruction {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 15px;
    text-decoration: none;
    color: white;
    transition: var(--transition);
}

.chat-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--accent);
    transform: translateX(5px);
}

.chat-btn .icon {
    font-size: 1.2rem;
}

.chat-btn strong {
    display: block;
    font-size: 0.85rem;
    color: var(--accent);
}

.chat-btn small {
    font-size: 0.75rem;
    color: var(--text-gray);
}

/* Trigger (Burbuja) */
.chat-trigger {
    width: 65px;
    height: 65px;
    background: var(--accent);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    float: right;
    box-shadow: 0 10px 25px var(--accent-glow);
    position: relative;
}

.chat-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@media (max-width: 450px) {
    .chat-window {
        width: calc(100vw - 40px);
        bottom: 90px;
    }
}

/* --- MEJORA SECCIÓN SERVICIOS --- */
.section-header {
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: linear-gradient(145deg, rgba(31, 40, 51, 0.4), rgba(19, 26, 34, 0.8));
    padding: 40px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

/* El número de fondo sutil */
.card-number {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 4rem;
    font-weight: 800;
    color: rgb(78, 186, 198);
    /* Muy sutil */
    line-height: 1;
    transition: var(--transition);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 25px;
    display: inline-block;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--text-white);
}

.service-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.7;
}

/* Lista de características pequeñas */
.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
}

.card-features li {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(0, 229, 255, 0.05);
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* Efecto Hover Pro */
.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 229, 255, 0.1);
    background: rgba(31, 40, 51, 0.6);
}

.service-card:hover .card-number {
    color: rgba(0, 229, 255, 0.08);
    transform: scale(1.1);
}

.service-card:hover h3 {
    color: var(--accent);
}

/* --- SISTEMA DE REVELACIÓN GLOBAL --- */

/* Todos los elementos con .reveal estarán ocultos por defecto */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    filter: blur(10px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Cuando el JS les añada .active, se verán así */
.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Efectos de Delay para elementos en grupo (como las tarjetas) */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* Efecto especial para imágenes o logos: revelación lateral */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* --- SISTEMA DE DISEÑO LÍMPIO --- */

/* Cleaned duplicate service cards block */

/* --- NAVBAR MÁS CLARA --- */
.navbar {
    height: 90px;
    display: flex;
    align-items: center;
    background: rgba(15, 18, 24, 0.85);
    /* Un poco más sólida para que no se pierda */
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
    /* Línea cian sutil */
}

/* --- BOTONES CON MÁS VIDA --- */
.btn-primary {
    background: var(--accent);
    color: #0b0c10;
    box-shadow: 0 10px 30px -5px var(--accent-glow), 0 0 15px rgba(0, 242, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-white);
}

/* --- CHAT WINDOW MEJORADA --- */
.chat-window {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 242, 255, 0.05);
}

/* Estilos del Modal Step-by-Step */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    display: none;
    /* Se activa con JS */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #131a22;
    /* Tu color surface */
    padding: 50px;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.step-number {
    color: #00f2ff;
    font-weight: 800;
    font-size: 0.9rem;
}

.step h2 {
    margin: 15px 0 30px;
    font-size: 1.5rem;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.opt-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-size: 1rem;
}

.opt-btn:hover {
    border-color: #00f2ff;
    background: rgba(0, 242, 255, 0.05);
    transform: translateX(5px);
}

#finalStepForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#finalStepForm input {
    background: #0b0c10;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    color: white;
}

.btn-submit-final {
    background: #00f2ff;
    color: black;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-submit-final {
    background: #00f2ff;
    /* Tu cian eléctrico */
    color: #000;
    width: 100%;
    padding: 18px;
    border-radius: 12px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

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

.check-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* --- Code Superiority --- */
.code-superiority {
    padding: 100px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.split-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.comparison-text {
    color: #94a3b8;
    margin: 20px 0 40px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.vs-container {
    display: flex;
    gap: 20px;
}

.vs-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.vs-item h4 {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #fff;
}

.vs-item ul {
    list-style: none;
    padding: 0;
}

.vs-item li {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.highlight-vs {
    border-color: #00f2ff;
    background: rgba(0, 242, 255, 0.03);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.05);
}

.highlight-vs li {
    color: #fff;
}

/* Visual del Código */
.code-window {
    background: #0b0c10;
    border-radius: 12px;
    border: 1px solid #1f2833;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.window-header {
    background: #1f2833;
    padding: 10px 15px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.code-content {
    padding: 30px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.keyword {
    color: #c678dd;
}

.variable {
    color: #e06c75;
}

.string {
    color: #98c379;
}

.boolean {
    color: #d19a66;
}

.function {
    color: #61afef;
}

@media (max-width: 992px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .vs-container {
        flex-direction: column;
    }
}


/* --- Why Choose Us Section --- */
.why-choose-us {
    padding: 120px 0 80px;
    text-align: center;
}

.bridge-sub {
    max-width: 850px;
    margin: 25px auto 60px;
    color: #94a3b8;
    font-size: 1.15rem;
    line-height: 1.8;
}

.focus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 20px;
}

.focus-item {
    background: linear-gradient(180deg, rgba(26, 32, 44, 0.6) 0%, rgba(9, 10, 15, 0.4) 100%);
    padding: 50px 30px;
    border-radius: 30px;
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.focus-item:hover {
    border-color: rgba(0, 242, 255, 0.4);
    background: linear-gradient(180deg, rgba(43, 53, 73, 0.7) 0%, rgba(26, 32, 44, 0.8) 100%);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 242, 255, 0.1);
}

.focus-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.2));
}

.focus-item h4 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.focus-item p {
    color: #94a3b8;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 992px) {
    .focus-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .focus-item {
        padding: 40px 25px;
    }
}

/* --- Sección Ver Todos los Proyectos --- */
.view-all-projects {
    padding: 120px 0 100px;
}

.cta-projects-wrapper {
    background: linear-gradient(135deg, rgba(43, 53, 73, 0.4) 0%, rgba(9, 10, 15, 0.6) 100%);
    border: 1px solid var(--surface-border);
    padding: 60px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    gap: 40px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-projects-wrapper::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.cta-content {
    max-width: 600px;
}

.cta-content h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    text-align: left;
}

.cta-content p {
    color: #94a3b8;
    font-size: 1.1rem;
}

/* El botón de estilo FS Orbit */
.btn-main-orbit {
    background: #00f2ff;
    /* El color de inicio que configuramos */
    color: #000;
    padding: 20px 40px;
    border-radius: 15px;
    font-weight: 800;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
}

.btn-main-orbit:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.4);
}

.arrow-icon {
    font-size: 1.4rem;
    transition: transform 0.3s;
}

.btn-main-orbit:hover .arrow-icon {
    transform: translateX(8px);
}

/* Responsive */
@media (max-width: 992px) {
    .cta-projects-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 40px 30px;
    }

    .cta-content h2 {
        text-align: center;
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 40px 0;
        gap: 30px;
    }

    .service-card {
        padding: 30px 20px;
    }

    .focus-item {
        padding: 30px 20px;
    }

    .work-info {
        padding: 20px;
    }

    .cta-projects-wrapper {
        padding: 30px 20px;
    }

    .cta-content h2 {
        font-size: 1.6rem;
    }

    .btn-primary,
    .btn-secondary,
    .btn-main-orbit {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}

/* --- FIX RESPONSIVE FS ORBIT (COPYS & PASTE) --- */

@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 40px;
        min-height: auto;
    }

    .hero-text {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-sub {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
    }

    .split-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .wa-item {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    /* Navbar móvil */
    .navbar {
        height: 75px;
    }
    .logo img {
        height: 65px;
    }
    .nav-links {
        display: none; /* Esconde links para evitar amontonamiento */
    }

    /* Tipografía */
    h1 {
        font-size: 2.2rem !important;
        letter-spacing: -1px;
    }

    .section-title {
        font-size: 2rem;
        text-align: center;
    }

    /* Grillas a una columna */
    .services-grid, 
    .portfolio-list, 
    .focus-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Portfolio: Info siempre visible en móvil (no hay hover) */
    .work-info {
        opacity: 1;
        background: linear-gradient(to top, rgba(9, 10, 15, 0.95) 10%, transparent 100%);
    }

    /* Botones Pro */
    .btn-primary, .btn-secondary, .btn-main-orbit {
        width: 100%;
        justify-content: center;
        padding: 16px;
        font-size: 0.95rem;
    }

    /* CTA Proyectos */
    .cta-projects-wrapper {
        flex-direction: column;
        padding: 40px 20px;
        text-align: center;
    }

    .cta-content h2 {
        text-align: center;
        font-size: 1.6rem;
    }

    /* Chat móvil */
    .chat-window {
        width: calc(100vw - 40px);
        bottom: 85px;
        right: 20px;
    }
    
    .chat-trigger {
        width: 58px;
        height: 58px;
    }
}

/* Evitar scroll horizontal por desbordamiento */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}


/* --- LÓGICA NAVBAR RESPONSIVE --- */

/* Botón Hamburguesa */
.nav-toggle {
    display: none; /* Escondido en PC */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1100;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--accent); /* Tu color cian #00f2ff */
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex; /* Aparece en móviles */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Menú fuera de pantalla */
        width: 80%;
        height: 100vh;
        background: rgba(9, 10, 15, 0.95); /* Color --bg con transparencia */
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1050;
        border-left: 1px solid var(--surface-border);
        list-style: none;
    }

    .nav-links.active {
        right: 0; /* Entra el menú */
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.4rem;
        display: block;
        width: 100%;
    }

    /* Animación del icono a X */
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex !important; /* Forzamos que se vea */
        z-index: 9999; /* Por encima de todo */
        position: relative;
    }

    .nav-links {
        display: flex !important; /* Para que no lo oculte el display:none anterior */
        position: fixed;
        top: 0;
        right: -100%; /* Escondido */
        width: 100%; /* Ocupa todo el ancho en móvil */
        height: 100vh;
        background: #090a0f; /* Color de fondo sólido para pruebas */
        z-index: 9998;
        transition: right 0.4s ease-in-out;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .nav-links.active {
        right: 0; /* Aparece */
    }
}

.navbar {
    height: 90px;
    display: flex;
    align-items: center;
    background: rgba(9, 10, 15, 0.8); /* Fondo con transparencia */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* ESTO ANCLA LA BARRA ARRIBA */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000; /* Prioridad máxima */
    
    border-bottom: 1px solid var(--surface-border);
    transition: var(--transition);
}

/* Evita que el contenido se meta debajo de la barra anclada */
body {
    padding-top: 90px; 
}

@media (max-width: 768px) {
    .navbar {
        height: 75px;
    }
    body {
        padding-top: 75px;
    }
}

.hero {
    /* Usa dvh para evitar el salto de la barra de navegación móvil */
    height: 100dvh; 
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    
    /* Asegúrate de que el padding superior coincida con la altura de tu navbar 
       para que el contenido quede perfectamente centrado visualmente */
    padding-top: 80px; 
}

@media (max-width: 768px) {
    .hero {
        padding: 0 20px; /* Margen lateral para que el texto no toque los bordes */
        padding-top: 70px; 
        text-align: center;
        flex-direction: column; /* Por si tienes imagen y texto */
    }
}

.hero-content {
    max-width: 100%;
    z-index: 2;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem; /* Tamaño optimizado para celular */
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
}

.engine-bg, .glow-sphere {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none; /* Para que no bloquee los clics en los botones */
}

/* --- SECCIÓN DE PRECIOS FS ORBIT (COMPLETO) --- */

.pricing {
    padding: 100px 0;
    position: relative;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 60px;
    align-items: stretch;
}

.price-card {
    background: rgba(15, 17, 26, 0.5); /* Fondo oscuro translúcido */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

/* Efecto Hover General */
.price-card:hover {
    transform: translateY(-12px);
    border-color: rgba(0, 242, 255, 0.3);
    background: rgba(15, 17, 26, 0.8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Plan Popular (Orbit Commerce) */
.price-card.popular {
    border: 1px solid #00f2ff;
    background: rgba(0, 242, 255, 0.03);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.1);
}

.popular-tag {
    position: absolute;
    top: 20px;
    right: -35px;
    background: #00f2ff;
    color: #090a0f;
    padding: 8px 40px;
    font-size: 0.75rem;
    font-weight: 800;
    transform: rotate(45deg);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cabecera de la Card */
.price-header {
    margin-bottom: 30px;
}

.plan-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
}

.price-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 15px;
}

.amount {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
}

.amount .period {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    margin-left: 5px;
}

.price-header p {
    margin-top: 15px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

/* Lista de Características */
.price-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
    flex-grow: 1;
}

.price-features li {
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.price-features li:last-child {
    border-bottom: none;
}

/* Botones con el color específico de FS Orbit */
.price-card .btn-primary, 
.price-card .btn-secondary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 18px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #00f2ff; /* Tu color específico */
    color: #090a0f;
    box-shadow: 0 4px 15px rgba(0, 242, 255, 0.3);
}

.btn-primary:hover {
    background: #fff;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 242, 255, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #00f2ff;
    color: #00f2ff;
}

/* Responsivo */
@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .price-card.popular {
        transform: scale(1);
    }
}