/* =========================================
   VARIABLES & FUENTES
   ========================================= */
@font-face { font-family: 'PavelT'; src: url('assets/PavelT.woff2') format('woff2'), url('assets/PavelT.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'SphereFez'; src: url('assets/SphereFez.woff2') format('woff2'), url('assets/SphereFez.woff') format('woff'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Proxon'; src: url('assets/Proxon.woff2') format('woff2'), url('assets/Proxon.woff') format('woff'); font-weight: 600; font-display: swap; }

:root {
    --bg: #000000;
    --text: #ffffff;
    --text-sub: #888888;
    --card-bg-light: rgba(255, 255, 255, 0.95);
    --card-bg-dark: rgba(25, 25, 25, 0.95);
    --border-light: rgba(0, 0, 0, 0.1);
    --border-dark: rgba(255, 255, 255, 0.15);
    --input-bg-light: #fafafa;
    --input-bg-dark: rgba(255, 255, 255, 0.1);
    /* COLORES NEÓN */
    --tron-blue: #00C2FF;
    --tron-purple: #BD00FF;
    --tron-cyan: #00FFD1;
    --tron-red: #FF3D00;
}

/* TEMA CLARO */
body[data-current-theme="light"] {
    --bg: #ffffff;
    --text: #000000;
    --text-sub: #555555;
    --card-bg: var(--card-bg-light);
    --border-color: var(--border-light);
    --input-bg: var(--input-bg-light);
    --input-text: #000;
}

/* Ocultar efectos espaciales en tema claro */
body[data-current-theme="light"] .fixed-background-effects,
body[data-current-theme="light"] .cyber-grid,
body[data-current-theme="light"] .stars-wrapper,
body[data-current-theme="light"] .scanlines,
body[data-current-theme="light"] .ambient-light {
    opacity: 0 !important;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

/* Forzar colores de texto en tema claro */
body[data-current-theme="light"] .text-contrast { color: #000000 !important; }
body[data-current-theme="light"] .text-contrast-sub { color: #444444 !important; }

/* Invertir patrón de fondo en Acerca */
body[data-current-theme="light"] .acerca-bg-pattern {
    opacity: 0.1;
    filter: invert(1);
}

/* TEMA OSCURO */
body[data-current-theme="dark"] {
    --bg: #000000;
    --text: #ffffff;
    --text-sub: #cccccc;
    --card-bg: var(--card-bg-dark);
    --border-color: var(--border-dark);
    --input-bg: var(--input-bg-dark);
    --input-text: #fff;
}

/* =========================================
   RESET & BASICS
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #8E54E9 var(--bg); }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    cursor: none;
    transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.6s ease;
    position: relative; 
}

section, main, .servicios, .portafolio, .acerca, #tecnologias, #conecta, .contacto-section {
    background: transparent !important;
    background-color: transparent !important;
}

/* =========================================
   BARRA DE PROGRESO SUPERIOR
   ========================================= */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px; /* Delgada */
    width: 100%;
    z-index: 10000;
    transform-origin: 0 50%;
    transform: scaleX(0); /* JS controla el ancho */
    border-radius: 0 4px 4px 0; /* Punta redonda */
    
    /* GAMA: Rosa -> Azul -> Morado -> Rosa */
    background: linear-gradient(
        90deg, 
        #FF00CC, 
        #3333FF, 
        #8E54E9, 
        #FF00CC
    );
    background-size: 300% 100%; 
    animation: gradientMove 3s linear infinite; /* Animación CSS eficiente */
    box-shadow: 0 0 15px rgba(255, 0, 204, 0.6);
    pointer-events: none;
    will-change: transform;
}

@keyframes gradientMove {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =========================================
   SCROLLBAR LATERAL
   ========================================= */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }

::-webkit-scrollbar-thumb { 
    background: linear-gradient(
        180deg, 
        #FF00CC, 
        #3333FF, 
        #8E54E9
    ); 
    border-radius: 10px; 
    border: 2px solid var(--bg);
}

/* =========================================
   DECORACIÓN JAPONESA (RESPONSIVE)
   ========================================= */
.jp-decor {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Inter', sans-serif;
    /* Tamaño dinámico basado en la altura de la pantalla (vh) */
    font-size: clamp(15px, 1.5vh, 14px);
    font-weight: 700;
    /* Espaciado dinámico */
    letter-spacing: clamp(4px, 1vh, 12px);
    writing-mode: vertical-rl;
    text-orientation: upright;
    color: var(--text);
    opacity: 0.3;
    z-index: 100;
    pointer-events: auto;
    transition: all 0.4s ease;
    cursor: default;
    user-select: none;
    /* Evita que el texto salte a otro renglón */
    white-space: nowrap;
}
.jp-left { left: 25px; }
.jp-right { right: 25px; }

.jp-decor:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1); 
    background: linear-gradient(to bottom, #2E86FB, #8E54E9, #2E86FB);
    background-size: 100% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradientShift 3s linear infinite;
}

/* Ocultar en móviles o pantallas muy bajitas */
@media (max-width: 768px), (max-height: 500px) {
    .jp-decor { display: none; }
}

/* =========================================
   FONDO Y EFECTOS FIJOS
   ========================================= */
.fixed-background-effects {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
    opacity: 0; transition: opacity 0.8s ease; 
}
body[data-current-theme="dark"] .fixed-background-effects { opacity: 1; }

#home { position: relative; } 
.cyber-grid { 
    position: absolute; width: 200%; height: 200%; top: -50%; left: -50%; 
    background-image: linear-gradient(rgba(46, 134, 251, 0.2) 1px, transparent 1px), linear-gradient(90deg, rgba(46, 134, 251, 0.2) 1px, transparent 1px); 
    background-size: 50px 50px; 
    transform: perspective(500px) rotateX(60deg); 
    animation: grid-move 20s linear infinite; 
    mask-image: linear-gradient(to bottom, transparent 5%, black 40%, transparent 90%); 
    -webkit-mask-image: linear-gradient(to bottom, transparent 5%, black 40%, transparent 90%); 
    z-index: 0; pointer-events: none; 
}
.scanlines { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1)); background-size: 100% 4px; z-index: 900; pointer-events: none; opacity: 0.3; mix-blend-mode: overlay; }

.ambient-light { 
    position: fixed; width: 600px; height: 600px; border-radius: 50%; filter: blur(100px); z-index: -1; opacity: 0.25; pointer-events: none; animation: float-orb 20s infinite ease-in-out; 
    mix-blend-mode: normal; 
}
.blue-orb { background: radial-gradient(circle, #2E86FB 0%, transparent 70%); top: -20%; left: -10%; animation-delay: 0s; }
.purple-orb { background: radial-gradient(circle, #8E54E9 0%, transparent 70%); bottom: -10%; right: -10%; animation-delay: -5s; }
@keyframes float-orb { 0% { transform: translate(0, 0) scale(1); } 33% { transform: translate(50px, 80px) scale(1.1); } 66% { transform: translate(-30px, -50px) scale(0.9); } 100% { transform: translate(0, 0) scale(1); } }

.particles-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; overflow: hidden; }
.particle { position: absolute; bottom: -20px; width: 3px; height: 3px; background: rgba(255, 255, 255, 0.4); box-shadow: 0 0 6px rgba(255, 255, 255, 0.6); border-radius: 50%; opacity: 0; animation: floatUp linear infinite; }
.particle:nth-child(1) { left: 10%; animation-duration: 15s; width: 4px; height: 4px; }
.particle:nth-child(2) { left: 25%; animation-duration: 25s; animation-delay: 2s; opacity: 0.2; }
.particle:nth-child(3) { left: 50%; animation-duration: 18s; animation-delay: 0s; }
.particle:nth-child(4) { left: 75%; animation-duration: 22s; opacity: 0.3; }
.particle:nth-child(5) { left: 90%; animation-duration: 30s; width: 2px; height: 2px; }
.particle:nth-child(6) { left: 15%; animation-duration: 20s; animation-delay: 8s; }
@keyframes floatUp { 0% { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: 0.5; } 90% { opacity: 0.5; } 100% { transform: translateY(-120vh) translateX(30px); opacity: 0; } }

/* =========================================
   PRELOADER
   ========================================= */
#preloader { position: fixed; inset: 0; z-index: 99999; background: radial-gradient(circle at center, #1a1a1a 0%, #000000 80%); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.5s; }
#preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { position: relative; z-index: 10; text-align: center; transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 1s ease; }
#preloader.loaded .loader-content { transform: scale(0.85); opacity: 0; }
.loader-grid { position: absolute; width: 200%; height: 200%; bottom: -50%; left: -50%; background-image: linear-gradient(rgba(46, 134, 251, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(46, 134, 251, 0.1) 1px, transparent 1px); background-size: 60px 60px; transform: perspective(300px) rotateX(60deg); animation: grid-scroll 3s linear infinite; mask-image: linear-gradient(to top, black 0%, transparent 80%); pointer-events: none; z-index: 1; transition: opacity 1.5s ease; }
#preloader.loaded .loader-grid { opacity: 0; }
@keyframes grid-scroll { 0% { transform: perspective(300px) rotateX(60deg) translateY(0); } 100% { transform: perspective(300px) rotateX(60deg) translateY(60px); } }
.decoder-text { font-family: 'PavelT', monospace; font-size: 45px; color: #fff; letter-spacing: 8px; font-weight: bold; text-transform: uppercase; text-shadow: 0 0 20px rgba(46, 134, 251, 0.5); }
.loader-corner { position: absolute; font-family: monospace; font-size: 11px; color: rgba(255,255,255,0.3); z-index: 10; letter-spacing: 1px; transition: opacity 1s ease; }
#preloader.loaded .loader-corner { opacity: 0; }
.top-left { top: 40px; left: 40px; border-left: 2px solid #2E86FB; padding-left: 15px; border-top: 1px solid rgba(46, 134, 251, 0.3); padding-top: 10px; }
.bottom-right { bottom: 40px; right: 40px; border-right: 2px solid #8E54E9; padding-right: 15px; border-bottom: 1px solid rgba(142, 84, 233, 0.3); padding-bottom: 10px; }

/* =========================================
   SCROLLBAR & CURSOR
   ========================================= */
@media (hover: none) { body { cursor: auto; } .cursor-dot, .cursor-outline { display: none; } }
.cursor-dot { width: 5px; height: 5px; background: var(--text); position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); border-radius: 50%; z-index: 9999; pointer-events: none; transition: background 0.3s; }
.cursor-outline { width: 30px; height: 30px; border: 1px solid var(--text); opacity: 0.5; position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); border-radius: 50%; z-index: 9998; pointer-events: none; transition: all 0.2s; }
.cursor-outline.cursor-hover { background: rgba(255, 255, 255, 0.1); border-color: transparent; backdrop-filter: invert(1); mix-blend-mode: difference; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.cursor-dot.cursor-hover { opacity: 0; }
.click-ripple { position: fixed; border-radius: 50%; transform: translate(-50%, -50%); border: 1px solid rgba(46, 134, 251, 0.8); background: radial-gradient(circle, rgba(46, 134, 251, 0.2) 0%, transparent 70%); pointer-events: none; z-index: 9999; width: 0; height: 0; animation: ripple-anim 0.6s ease-out forwards; }
@keyframes ripple-anim { 0% { width: 0px; height: 0px; opacity: 1; border-width: 3px; } 100% { width: 150px; height: 150px; opacity: 0; border-width: 0px; } }

/* =========================================
   NAVBAR & HERO
   ========================================= */
.smart-navbar { position: fixed; top: 0; width: 100%; z-index: 1000; display: flex; justify-content: space-between; align-items: center; padding: 20px 60px; background: transparent; backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.1); transition: transform 0.4s ease, border-bottom 1s ease, padding 0.4s ease; }
/* Nueva clase para ocultar la barra al bajar */
.nav-hidden { transform: translateY(-100%); }

.logo { font-family: 'SphereFez', sans-serif; font-size: 24px; letter-spacing: 2px; font-weight: 700; text-transform: uppercase; color: var(--text); transition: color 0.8s; }
.menu { display: flex; gap: 40px; }
.menu a { font-family: 'Proxon', sans-serif; text-decoration: none; color: var(--text); font-size: 14px; letter-spacing: 1px; position: relative; transition: color 0.8s; }
.menu a::after { content: ''; position: absolute; width: 0; height: 1px; background: currentColor; left: 0; bottom: -5px; transition: 0.3s; }
.menu a:hover::after { width: 100%; }
.contacto { font-family: 'SphereFez', sans-serif; text-decoration: none; font-size: 13px; letter-spacing: 2px; padding: 8px 16px; border: 1px solid currentColor; border-radius: 4px; transition: 0.3s, color 0.8s; color: var(--text); }
.hero { min-height: 100vh; display: flex; align-items: center; background: transparent !important; position: relative; z-index: 2; overflow: hidden; color: #ffffff; padding-top: 0; }

.hero-inner { width: 100%; padding: 0 60px; z-index: 2; position: relative; pointer-events: none; }
.hero-copy { pointer-events: auto; max-width: 100%; margin: 0; position: relative; z-index: 20; }

.hero-title { font-family: 'PavelT', sans-serif; font-size: clamp(60px, 10vw, 150px); font-weight: 700; line-height: 0.9; letter-spacing: 2px; text-transform: uppercase; position: relative; z-index: 5; background: linear-gradient(135deg, #2E86FB 0%, #8E54E9 20%, #FF5252 40%, #FFD700 60%, #2E86FB 80%, #8E54E9 100%); background-size: 300% 300%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: gradientFlow 8s ease infinite; }
.hero-title .accent { background: none !important; -webkit-text-fill-color: #ffffff !important; color: #ffffff !important; text-shadow: none !important; transition: all 0.8s ease; }
body[data-current-theme="light"] .hero-title .accent { background: linear-gradient(135deg, #2a2a2a 0%, #000000 50%, #434343 100%) !important; -webkit-background-clip: text !important; background-clip: text !important; -webkit-text-fill-color: transparent !important; color: transparent !important; }
@keyframes gradientFlow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.hero-sub { font-family: 'PavelT', sans-serif; font-size: 18px; letter-spacing: 4px; margin-top: 24px; opacity: 0.8; padding-left: 5px; color: #888888; }
.word-wrapper { display: inline-block; overflow: hidden; vertical-align: bottom; margin-right: 0.3em; padding-bottom: 0.1em; }
.word { display: inline-block; transform: translateY(110%); transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.word.visible { transform: translateY(0); }

/* =========================================
   SERVICIOS
   ========================================= */
.servicios { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px 20px 40px 20px; margin-top: -20px; position: relative; z-index: 1; color: var(--text); transition: color 0.6s ease; overflow: hidden; }

/* MARCAS DE AGUA SERVICIOS */
.cf-s1 { font-size: 8rem; top: 15%; left: 10%; transform: rotate(-25deg); opacity: 0.05; }
.cf-s2 { font-size: 12rem; bottom: 10%; right: 5%; transform: rotate(15deg); opacity: 0.05; }
.cf-s3 { font-size: 6rem; top: 50%; left: 5%; transform: rotate(10deg); opacity: 0.05; }

.servicios h2, .section-title, .section-title-gradient, .portfolio-title, .subsection-title { font-family: 'PavelT', sans-serif; text-transform: uppercase; letter-spacing: 12px; color: var(--text); transition: color 0.8s; width: 100%; margin-bottom: 30px; text-align: center; font-size: 70px; }
.servicios-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; width: 100%; max-width: 1200px; margin: 0 auto; position: relative; z-index: 11; perspective: 2000px; }
.servicio-feature:nth-child(1) { --tron-c: #00C2FF; } .servicio-feature:nth-child(2) { --tron-c: #BD00FF; } .servicio-feature:nth-child(3) { --tron-c: #00FFD1; } .servicio-feature:nth-child(4) { --tron-c: #FF3D00; }
.servicio-feature { position: relative; background: #F4F4F4; border-radius: 24px; padding: 0; border: none; overflow: hidden; opacity: 0; box-shadow: none; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease; }
.servicio-feature.visible { opacity: 1; }
.servicio-feature:hover { transform: translateY(-10px); background: #FFFFFF; box-shadow: 0 20px 50px rgba(0,0,0,0.08); z-index: 10; }
.sf-content { padding: 25px 30px 5px 30px; display: flex; flex-direction: column; align-items: flex-start; }
.sf-action { padding: 0 30px 25px 30px; display: flex; justify-content: flex-start; }
.sf-content h3 { font-family: 'PavelT', sans-serif; font-size: 24px; margin-bottom: 0; font-weight: 700; color: #000000 !important; transition: none; letter-spacing: 1px; }
.sf-content .sub { display: none; }
.icon { font-size: 36px; margin-bottom: 10px; display: inline-block; color: inherit; filter: none; transform: none; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.servicio-feature:hover .icon { transform: scale(1.1); }
.sf-action button { position: relative; overflow: hidden; font-size: 11px; padding: 10px 20px; background: #000000; color: #ffffff; border: none; border-radius: 8px; cursor: pointer; text-transform: uppercase; font-weight: 800; letter-spacing: 1px; transition: all 0.3s ease; box-shadow: none; z-index: 5; }
.sf-action button:hover { background: #222222; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.15); }

/* =========================================
   PORTAFOLIO
   ========================================= */
.portfolio { padding: 50px 40px 100px 40px; text-align: center; position: relative; z-index: 2; margin-top: -20px; }
.portfolio-title { margin-bottom: 30px; }
.portfolio-container { max-width: 1200px; margin: 0 auto; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; perspective: 2000px; }
.project-card { background: var(--card-bg); backdrop-filter: blur(10px); border: 1px solid var(--border-color); box-shadow: 0 15px 40px rgba(0,0,0,0.05); border-radius: 12px; overflow: hidden; padding: 0; opacity: 0; transform: scale(0.9) translateY(50px); filter: grayscale(100%); will-change: transform, opacity; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease, box-shadow 0.3s, background 0.8s; position: relative; height: 450px; display: flex; flex-direction: column; }
.project-card::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent); transform: skewX(-25deg); pointer-events: none; transition: 0s; z-index: 20; }
.project-card.visible { opacity: 1; transform: scale(1) translateY(0); filter: grayscale(0%); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease, filter 0.5s ease; }
.project-card:hover { transform: translateY(-10px) scale(1.02) !important; z-index: 30; box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.project-card:hover::after { left: 150%; transition: 0.7s; }
.project-thumb { height: 200px; flex-shrink: 0; background-size: cover; background-position: center; transition: transform 0.5s ease; position: relative; z-index: 1; }
.project-card:hover .project-thumb { transform: scale(1.05); }
.thumb-a { background: linear-gradient(135deg,#ff9a9e,#fecfef); } .thumb-b { background: linear-gradient(135deg,#a18cd1,#fbc2eb); } .thumb-c { background: linear-gradient(135deg,#84fab0,#8fd3f4); } .thumb-d { background: linear-gradient(135deg,#e0c3fc,#8ec5fc); } .thumb-e { background: linear-gradient(135deg,#43e97b,#38f9d7); } .thumb-f { background: linear-gradient(135deg,#fa709a,#fee140); }
.project-body { padding: 22px; text-align: left; display: flex; flex-direction: column; justify-content: space-between; background: var(--card-bg); position: relative; z-index: 2; flex-grow: 1; transition: background 0.8s; }
.project-meta { font-size: 11px; font-weight: 700; color: var(--tron-blue); text-transform: uppercase; margin-bottom: 6px; letter-spacing: 1px; }
.project-title { font-size: 18px; margin-bottom: 6px; color: var(--text); text-shadow: 0 0 10px rgba(0,0,0,0.5); transition: color 0.8s; }
.project-desc { font-size: 13px; color: var(--text-sub); margin-bottom: 15px; transition: color 0.8s; }
.project-open { margin-top: auto; padding: 12px 15px; background: transparent; border: 1px solid var(--tron-blue); color: var(--text); border-radius: 4px; cursor: pointer; transition: 0.2s all ease; text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-align: center; }
.project-open:hover { background: var(--tron-blue); box-shadow: 0 0 15px var(--tron-blue); color: #000; }

/* =========================================
   ACERCA DE
   ========================================= */
.acerca { position: relative; min-height: auto; padding: 20px 40px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; z-index: 2; }
.watermark-huge { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: 'PavelT', sans-serif; font-size: 20vw; color: var(--text); opacity: 0.03; z-index: 0; pointer-events: none; white-space: nowrap; user-select: none; }
.code-float { position: absolute; font-family: 'Proxon', monospace; color: var(--text); opacity: 0.04; z-index: 0; pointer-events: none; user-select: none; }
.cf-1 { font-size: 6rem; top: 10%; left: 5%; transform: rotate(-15deg); } .cf-2 { font-size: 8rem; top: 40%; right: 5%; transform: rotate(10deg); } .cf-3 { font-size: 12rem; bottom: 15%; left: 10%; transform: rotate(-20deg); }
.acerca-intro { max-width: 800px; margin: 0 auto 60px auto; text-align: center !important; position: relative; z-index: 2; }
.text-gradient { background: linear-gradient(to right, #2E86FB, #8E54E9, #FF3D00, #00FFD1, #2E86FB); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: gradientShift 4s linear infinite; display: inline-block; font-weight: 800; }
@keyframes gradientShift { 0% { background-position: 0% center; } 100% { background-position: -200% center; } }
.section-title-gradient { font-family: 'PavelT', sans-serif; text-transform: uppercase; letter-spacing: 12px; color: var(--text); font-size: 70px; line-height: 1.3; margin-bottom: 40px; }
.acerca-text p { margin-bottom: 20px; font-size: 16px; line-height: 1.8; color: var(--text-sub); font-weight: 300; text-align: center !important; display: block; width: 100%; }
.acerca-bg-pattern { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: radial-gradient(#ccc 1px, transparent 1px); background-size: 40px 40px; opacity: 0.4; z-index: 0; pointer-events: none; transition: opacity 0.5s; }

/* =========================================
   TECNOLOGÍAS + EXPERTOS
   ========================================= */
#tecnologias { padding: 100px 40px; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 2; gap: 80px; }
#tecnologias .text-contrast { color: #ffffff !important; }
#tecnologias .text-contrast-sub { color: #aaaaaa !important; }
.tech-section { width: 100%; max-width: 1000px; margin: 0 auto; }
.tech-grid-premium { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; margin-top: 40px; perspective: 1000px; }

/* Tarjetas base */
.tech-card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 25px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; position: relative; overflow: visible; opacity: 0; transform: rotateY(90deg) scale(0.8); transition: all 0.4s ease-out; cursor: pointer; }
.tech-card.visible { opacity: 1; transform: rotateY(0deg) scale(1); }
.tech-card i { font-size: 32px; color: var(--item-color); opacity: 1; filter: drop-shadow(0 0 8px var(--item-color)); transition: 0.4s; z-index: 2; }
.tech-card span { font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 700; color: #ffffff !important; transition: 0.4s; z-index: 2; }

/* Efecto cuando se toca (Móvil & JS) */
.tech-card.touch-active { transform: translateY(-10px) !important; background: #000 !important; border-color: var(--item-color); box-shadow: 0 0 20px var(--item-color), inset 0 0 10px rgba(255,255,255,0.05); z-index: 10; }
.tech-card.touch-active i { transform: scale(1.2); filter: drop-shadow(0 0 15px var(--item-color)); }
.tech-card.touch-active span { letter-spacing: 1px; text-shadow: 0 0 5px rgba(255,255,255,0.5); }

/* Efecto Hover Puro (SOLO si el dispositivo soporta mouse, para evitar que se pegue en celular) */
@media (hover: hover) {
    .tech-card:hover { transform: translateY(-10px) !important; background: #000 !important; border-color: var(--item-color); box-shadow: 0 0 20px var(--item-color), inset 0 0 10px rgba(255,255,255,0.05); z-index: 10; }
    .tech-card:hover i { transform: scale(1.2); filter: drop-shadow(0 0 15px var(--item-color)); }
    .tech-card:hover span { letter-spacing: 1px; text-shadow: 0 0 5px rgba(255,255,255,0.5); }
}

.impacto-card { margin: 0 auto !important; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); padding: 40px; border-radius: 24px; display: flex; gap: 50px; align-items: center; width: 100%; max-width: 1000px; text-align: left; transition: background 0.8s, border-color 0.8s, box-shadow 0.3s; }
.impacto-card:hover { box-shadow: 0 0 30px rgba(46, 134, 251, 0.1); border-color: rgba(255,255,255,0.3); }
.impacto-left { flex: 1; }
.impacto-left h3 { font-size: 30px; font-family: 'PavelT', sans-serif; margin-bottom: 15px; color: #ffffff !important; }

/* ANIMACIÓN DE TEXTO "DESARROLLO DIGITAL" */
.impact-accent { background: linear-gradient(to right, #2E86FB, #8E54E9, #FF3D00, #00FFD1, #2E86FB); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: gradientShift 4s linear infinite; text-shadow: none; text-transform: uppercase; }
.impact-desc { color: #aaaaaa !important; }
.impacto-right { flex: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.stat-module { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 20px 10px; text-align: center; transition: all 0.3s ease; opacity: 1; transform: translateY(0); }
.stat-module.visible { animation: none; opacity: 1; transform: translateY(0); }
.stat-module:hover { background: rgba(255,255,255,0.1); border-color: var(--tron-blue); transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.stat-num { font-size: 32px; font-weight: 800; color: #ffffff !important; display: block; margin-bottom: 5px; }
.stat-label { color: #888888 !important; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-family: 'Inter', sans-serif; }
@media (max-width: 900px) { .impacto-card { flex-direction: column; gap: 30px; text-align: center; } .impacto-right { grid-template-columns: repeat(2, 1fr); width: 100%; } }

/* =========================================
   CONECTA
   ========================================= */
#conecta { padding: 100px 40px 250px 40px; min-height: auto; position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.watermark-conecta { font-size: 18vw; opacity: 0.04; }
.cf-c1 { font-size: 6rem; top: 20%; right: 10%; transform: rotate(25deg); }
.cf-c2 { font-size: 10rem; bottom: 15%; left: 5%; transform: rotate(-15deg); }
.cf-c3 { font-size: 5rem; top: 60%; right: 20%; transform: rotate(10deg); }

.redes-sociales { margin-top: 50px; width: 100%; display: flex; flex-direction: column; align-items: center; }
.redes-grid-3d { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; width: 100%; max-width: 1000px; perspective: 1500px; }
.social-3d-card { position: relative; height: 300px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--card-bg); border: 1px solid var(--border-color); backdrop-filter: blur(10px); text-decoration: none; transform-style: preserve-3d; opacity: 0; transform: translateY(50px) scale(0.9); transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.8s; }
.social-3d-card.visible { opacity: 1; transform: translateY(0) scale(1); }
.card-3d-content { display: flex; flex-direction: column; align-items: center; transform: translateZ(20px); pointer-events: none; }
.icon-layer { font-size: 50px; margin-bottom: 20px; color: var(--text); transition: 0.4s; }
.text-layer { font-family: 'Proxon', sans-serif; font-size: 16px; letter-spacing: 2px; color: var(--text); opacity: 0.8; transition: 0.4s; }
.card-x { --card-color: #000000; } .card-tiktok { --card-color: #fe2c55; } .card-instagram { --card-color: #FD1D1D; } .card-facebook { --card-color: #1877F2; }

.card-x:hover, .card-x.hover-trigger { background: #000000 !important; border-color: transparent !important; box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important; transform: translateY(-10px) scale(1.03) !important; }
.card-tiktok:hover, .card-tiktok.hover-trigger { background: #FE2C55 !important; border-color: transparent !important; box-shadow: 0 10px 40px rgba(254, 44, 85, 0.3) !important; transform: translateY(-10px) scale(1.03) !important; }
.card-instagram:hover, .card-instagram.hover-trigger { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important; border-color: transparent !important; box-shadow: 0 10px 30px rgba(214, 36, 159, 0.3) !important; transform: translateY(-10px) scale(1.03) !important; }
.card-facebook:hover, .card-facebook.hover-trigger { background: #1877F2 !important; border-color: transparent !important; box-shadow: 0 10px 30px rgba(24, 119, 242, 0.3) !important; transform: translateY(-10px) scale(1.03) !important; }

.social-3d-card:hover .icon-layer, .social-3d-card.hover-trigger .icon-layer { color: #fff !important; transform: scale(1.2); }
.social-3d-card:hover .text-layer, .social-3d-card.hover-trigger .text-layer { opacity: 1; color: #fff !important; }

/* =========================================
   CONTACTO
   ========================================= */
.contacto-section { padding: 0px 20px 40px 20px; position: relative; z-index: 2; transition: background 0.8s; }
.contacto-section .section-title { margin-bottom: 15px; }
.contact-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; align-items: stretch; }
.contact-form-container { background: var(--card-bg); backdrop-filter: blur(15px); padding: 25px; border-radius: 20px; border: 1px solid var(--border-color); box-shadow: 0 20px 40px rgba(0,0,0,0.05); position: relative; z-index: 2; transition: background 0.8s; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 8px; color: var(--text-sub); text-transform: uppercase; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 8px; font-family: 'Inter', sans-serif; font-size: 14px; color: var(--input-text); transition: 0.3s; }
.form-group textarea { height: 80px; }
.form-group select option { background: #000; color: #fff; }
.contact-info-container { display: flex; flex-direction: column; justify-content: space-between; gap: 15px; height: 100%; }
.info-card { background: var(--card-bg); padding: 15px; border-radius: 16px; border: 1px solid var(--border-color); display: flex; align-items: center; gap: 20px; transition: 0.8s; flex: 1; margin-bottom: 0; }
.contact-form .btn-primary { background: linear-gradient(135deg, #2E86FB, #8E54E9); border: none; border-radius: 50px; color: #ffffff; padding: 15px 30px; font-family: 'Proxon', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 15px rgba(46, 134, 251, 0.3); transition: all 0.3s ease; width: 100%; margin-top: 10px; }
.contact-form .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(46, 134, 251, 0.5), 0 0 30px rgba(142, 84, 233, 0.3); filter: brightness(1.1); }

/* =========================================
   FOOTER & FINAL HERO
   ========================================= */
.final-hero { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; background: transparent !important; color: #fff; padding-bottom: 100px; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%); mask-image: linear-gradient(to bottom, transparent 0%, black 15%); }
.final-hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, #000000 0%, rgba(0,0,0,0.5) 50%, transparent 100%); pointer-events: none; z-index: -1; }
.final-content { z-index: 2; text-align: center; padding: 0 20px; margin-bottom: 0px; margin-top: 80px; }
.final-title { font-family: 'PavelT', sans-serif; font-size: clamp(40px, 8vw, 90px); line-height: 1.1; color: #fff; text-transform: uppercase; }
.accent-gray { background: linear-gradient(90deg, #FFD700, #FF4500, #FF69B4, #800080, #0000FF); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; animation: gradientText 5s ease infinite; }
@keyframes gradientText { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.final-footer { position: absolute; bottom: 0; left: 0; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 60px; z-index: 10; font-family: 'Inter', sans-serif; color: rgba(255, 255, 255, 0.6); border-top: 1px solid rgba(255,255,255,0.05); background: transparent; backdrop-filter: blur(5px); }

/* =========================================
   SCROLL INDICATOR HERO
   ========================================= */
.hero-scroll-indicator { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0; pointer-events: none; transition: opacity 0.5s ease; z-index: 20; }
.hero-scroll-indicator span { font-family: 'Proxon', sans-serif; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); text-shadow: 0 0 10px rgba(0,0,0,0.5); }
.mouse-icon { width: 20px; height: 30px; border: 2px solid #fff; border-radius: 12px; position: relative; }
.mouse-icon::before { content: ''; position: absolute; top: 5px; left: 50%; transform: translateX(-50%); width: 2px; height: 6px; background: #fff; border-radius: 2px; animation: scrollWheel 2s infinite; }
@keyframes scrollWheel { 0% { top: 5px; opacity: 1; } 100% { top: 15px; opacity: 0; } }
.hero-sub::after { content: '|'; animation: blinkCursor 0.8s infinite; }
@keyframes blinkCursor { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* =========================================
   MODAL STYLES
   ========================================= */
.modal { display: none; position: fixed; z-index: 3000; inset: 0; background-color: rgba(0, 0, 0, 0.9); backdrop-filter: blur(20px); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.4s ease; }
.modal.active { display: flex; opacity: 1; }

.modal-content { 
    width: 90%; 
    max-width: 900px; 
    min-height: 550px; 
    max-height: 90vh; 
    border-radius: 24px; 
    padding: 40px; 
    position: relative; display: flex; flex-direction: column; 
    justify-content: center; align-items: center; 
    transform: translateY(30px) scale(0.95); 
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1); 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); 
    overflow: hidden; 
    background: #111; color: #fff;
}
.modal.active .modal-content { transform: translateY(0) scale(1); }
.close-modal { position: absolute; top: 25px; right: 30px; font-size: 24px; cursor: pointer; color: rgba(255,255,255,0.8); transition: 0.3s; z-index: 20; }
.close-modal:hover { color: #fff; transform: rotate(90deg); }

/* TEMAS PARA SERVICIOS */
.theme-web { background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%) !important; border: 1px solid rgba(46, 134, 251, 0.3) !important; }
.theme-ia { background: linear-gradient(135deg, #240b36, #c31432) !important; border: 1px solid rgba(142, 84, 233, 0.3) !important; }
.theme-apps { background: linear-gradient(135deg, #1a2980 0%, #26d0ce 100%) !important; border: 1px solid rgba(0, 255, 255, 0.3) !important; }
.theme-software { background: linear-gradient(135deg, #FF416C 0%, #FF4B2B 100%) !important; border: 1px solid rgba(255, 69, 0, 0.3) !important; }

.slide-indicators { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 20; }
.indicator-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.2); cursor: pointer; transition: 0.3s; }
.indicator-dot.active { background: #fff; transform: scale(1.4); box-shadow: 0 0 10px rgba(255,255,255,0.5); }
.scroll-hint { position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; opacity: 0.6; animation: blink 3s infinite; z-index: 20; }

.single-slide-container { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.slide-main-title { font-family: 'SphereFez', sans-serif; font-size: 14px; letter-spacing: 4px; color: rgba(255,255,255,0.6); text-transform: uppercase; margin-bottom: 20px; }

.slide-number { 
    font-family: 'Proxon', sans-serif; 
    font-size: clamp(100px, 20vh, 160px); 
    color: rgba(255,255,255,0.05); 
    position: absolute; z-index: 0; pointer-events: none; 
    top: 50%; left: 50%; transform: translate(-50%, -50%); 
}

.slide-title { 
    font-family: 'PavelT', sans-serif; 
    font-size: clamp(35px, 5vw, 60px); 
    line-height: 1.1; color: #fff; 
    margin-bottom: 25px; text-transform: uppercase; z-index: 2; 
    position: relative; text-shadow: 0 10px 30px rgba(0,0,0,0.3); 
}

.slide-desc { font-family: 'Inter', sans-serif; font-size: 18px; line-height: 1.6; color: rgba(255,255,255,0.9); max-width: 650px; margin: 0 auto; z-index: 2; position: relative; }

/* PROYECTOS */
.project-modal-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; width: 100%; height: 100%; color: #fff; }
.project-modal-img { width: 100%; height: 100%; min-height: 300px; background-size: cover; background-position: center; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.4); }
.project-modal-info { display: flex; flex-direction: column; justify-content: center; text-align: left; }
.project-modal-info h2 { font-size: 40px; font-family: 'PavelT', sans-serif; margin-bottom: 20px; color: #fff; text-shadow: none; }
.project-modal-info p { font-size: 16px; color: #ccc; line-height: 1.6; margin-bottom: 30px; font-family: 'Inter', sans-serif; }
.tech-stack-label { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 15px; display: block; text-transform: uppercase; letter-spacing: 1px; }
.tech-stack-row { display: flex; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }

/* BADGES BASE */
.tech-badge { width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; transition: 0.3s ease; cursor: pointer; }
.tech-badge i { font-size: 24px; color: #fff; transition: 0.3s; }

/* EFECTO TOUCH ACTIVO POR JS (SOLO PARA MÓVILES) */
.tech-badge.touch-active { background: rgba(255, 255, 255, 0.15); border-color: #fff; transform: translateY(-5px); }

/* EFECTO HOVER PURO (SOLO PC) */
@media (hover: hover) {
    .tech-badge:hover { background: rgba(255, 255, 255, 0.15); border-color: #fff; transform: translateY(-5px); }
}

.project-modal-info .btn-primary { background: linear-gradient(135deg, #2E86FB, #8E54E9); border: none; border-radius: 50px; color: #ffffff; padding: 15px 30px; font-family: 'Proxon', sans-serif; font-size: 14px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 15px rgba(46, 134, 251, 0.3); transition: all 0.3s ease; width: fit-content; text-decoration: none; display: inline-block; }
.project-modal-info .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(46, 134, 251, 0.5); filter: brightness(1.1); }
@media (max-width: 900px) { .project-modal-layout { grid-template-columns: 1fr; } .project-modal-img { height: 250px; min-height: 250px; } }

.project-modal-info::-webkit-scrollbar { width: 4px; }
.project-modal-info::-webkit-scrollbar-thumb { background: rgba(46, 134, 251, 0.6); border-radius: 4px; }

/* =========================================
   LOGO FINAL
   ========================================= */
.final-hero { -webkit-mask-image: none !important; mask-image: none !important; position: relative; z-index: 10; }
.gradient-logo { width: 500px; height: 300px; margin: -90px auto 0 auto; background: linear-gradient(90deg, #FFD700, #FF4500, #FF69B4, #800080, #0000FF); background-size: 300% 100%; animation: gradientText 5s ease infinite; -webkit-mask: url('ReCodePlusLOGOb.png') no-repeat center / contain; mask: url('ReCodePlusLOGOb.png') no-repeat center / contain; position: relative; z-index: 99999 !important; display: block; }

/* =================================================================
   RESPONSIVE MEDIA QUERIES (TABLET Y MÓVIL)
   ================================================================= */
.indicator-mobile { display: none; }
.indicator-desktop { display: flex; flex-direction: column; align-items: center; gap: 10px; }

@keyframes swipeUp {
    0% { transform: translateY(10px); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(-30px); opacity: 0; }
}

/* --- TABLETS --- */
@media screen and (max-width: 1024px) {
    .indicator-desktop { display: none !important; }
    .indicator-mobile { display: flex !important; flex-direction: column; align-items: center; gap: 10px; }
    .indicator-mobile .hand-icon { font-size: 28px; color: #fff; text-shadow: 0 0 15px rgba(255,255,255,0.5); animation: swipeUp 2s infinite ease-in-out; }
    .indicator-mobile span { font-family: 'Proxon', sans-serif; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); animation: blink 2s infinite; }

    .servicios-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .code-float, .watermark-huge, .jp-decor { transform: rotate(0deg) !important; opacity: 0.02 !important; }
    .cf-s1, .cf-s2, .cf-s3, .cf-1, .cf-2, .cf-3, .cf-c1, .cf-c2, .cf-c3 { left: 5% !important; right: auto !important; }
    .redes-grid-3d { grid-template-columns: repeat(2, 1fr) !important; gap: 30px; }
    .hero-title { font-size: 80px; } 
    .gradient-logo { width: 400px; height: 240px; margin-top: 40px; }
}

/* --- TODOS LOS MÓVILES (Verticales y Horizontales) --- */
@media screen and (max-width: 768px), screen and (max-height: 500px) {
    
    body[data-current-theme="light"] .smart-navbar {
        background: rgba(255, 255, 255, 0.6) !important;
    }

    button, .btn, a, .magnetic-btn, .btn-explorar, .project-open, input, textarea, select {
        pointer-events: auto !important;
        cursor: pointer !important;
        z-index: 200 !important;
        touch-action: manipulation !important;
        position: relative; 
    }
    .sf-action, .project-footer, .sf-content {
        z-index: 10;
        position: relative;
    }

    body { cursor: auto; }
    .cursor-dot, .cursor-outline { display: none; }
    section { padding-left: 20px !important; padding-right: 20px !important; overflow: hidden; }

    /* EL EFECTO DE CRISTAL PARA NAVBAR */
    .smart-navbar { 
        padding: 15px 20px; 
        flex-direction: column; 
        gap: 15px; 
        background: rgba(0, 0, 0, 0.3) !important; /* Más transparente */
        backdrop-filter: blur(20px) !important; /* Efecto cristal */
        -webkit-backdrop-filter: blur(20px) !important; /* Para iOS */
    }
    .menu { gap: 20px; flex-wrap: wrap; justify-content: center; }
    .menu a { font-size: 13px; }

    .hero-inner { padding: 0 20px; text-align: center; }
    .hero-title { font-size: 48px; line-height: 1; margin-bottom: 20px; }
    .hero-sub { font-size: 14px; text-align: center; display: block; margin: 0 auto; }

    .servicios-grid { grid-template-columns: 1fr; gap: 25px; }
    .servicio-feature { padding-bottom: 20px; }
    .sf-content { padding: 25px 25px 10px 25px; align-items: center; text-align: center; }
    .sf-action { padding: 0 25px 25px 25px; width: 100%; display: flex; justify-content: center; }

    .sf-action .btn-explorar {
        width: 100%;
        padding: 16px 0;
        font-size: 13px;
        background: #000;
        border: 1px solid rgba(255,255,255,0.2);
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    }
    .sf-action .btn-explorar:active { transform: scale(0.98); background: #222; }

    .projects-grid, .impacto-right { grid-template-columns: 1fr; gap: 20px; }
    .redes-grid-3d { grid-template-columns: 1fr !important; gap: 20px; }
    
    .servicios h2, .section-title, .section-title-gradient, .portfolio-title, .subsection-title {
        font-size: 38px; letter-spacing: 2px; word-wrap: break-word;
    }

    .impacto-card { flex-direction: column; padding: 25px; text-align: center; }
    .impacto-right { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .contact-wrap { grid-template-columns: 1fr; gap: 30px; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    
    /* MODAL BASE MÓVIL (Con scroll vertical permitido y lateral bloqueado para el swipe) */
    .modal-content { 
        width: 95%; 
        height: auto; 
        max-height: 85vh; 
        overflow-y: auto; 
        padding: 20px; 
        padding-top: 50px !important; 
        touch-action: pan-y !important; /* CLAVE PARA EL SWIPE: Permite scroll vertical pero deja el horizontal a JS */
    }
    
    .close-modal { 
        position: absolute !important; 
        top: 15px !important; 
        right: 15px !important; 
        font-size: 30px !important;
        margin: 0 !important;
        transform: none !important;
        z-index: 5000 !important;
        background: transparent !important;
        border: none !important;
        display: block !important;
    }

    .slide-number { font-size: 80px; top: 10%; opacity: 0.1; }
    .slide-title { font-size: 30px; margin-top: 10px; }
    .slide-desc { font-size: 14px; }
    .slide-indicators { bottom: 20px; }
    
    /* Mostrar pista de deslizar */
    .scroll-hint { display: flex !important; }
    
    .project-modal-layout { grid-template-columns: 1fr !important; gap: 15px !important; }
    .project-modal-img { height: 180px !important; min-height: 180px !important; border-radius: 15px !important; }
    .project-modal-info > span { font-size: 11px !important; margin-bottom: 8px !important; display: block; }
    .project-modal-info h2 { font-size: 26px !important; margin-bottom: 10px !important; }
    .project-modal-info p { font-size: 13px !important; line-height: 1.5 !important; margin-bottom: 15px !important; }
    .tech-stack-label { font-size: 11px !important; margin-bottom: 10px !important; }
    .tech-stack-row { margin-bottom: 20px !important; gap: 10px !important; }
    .tech-badge { width: 40px !important; height: 40px !important; border-radius: 10px !important; }
    .tech-badge i { font-size: 18px !important; }
    .project-modal-info .btn-primary { width: 100% !important; text-align: center !important; }

    .final-footer { flex-direction: column; gap: 15px; padding: 30px 20px; text-align: center; }
    .final-content { margin-top: 100px; margin-bottom: 0; }
    .gradient-logo { width: 260px; height: 160px; margin-top: 20px; }

    .final-title {
        font-size: clamp(20px, 8vw, 40px) !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        letter-spacing: 0px !important;
        line-height: 1.1 !important;
        white-space: normal !important; 
        word-break: normal !important;
    }
    .accent-gray { display: inline-block; padding-right: 5px !important; margin-right: -5px !important; width: 100%; }
    .final-content { padding: 0 10px !important; width: 100%; overflow: visible !important; }
}

@keyframes swipe-anim {
    0% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(-15px); opacity: 1; }
    100% { transform: translateX(0); opacity: 0.5; }
}
.swipe-hand { font-size: 24px; color: #fff; animation: swipe-anim 1.5s infinite ease-in-out; }

/* --- ARREGLO ESTRICTO MÓVIL HORIZONTAL (LANDSCAPE) --- */
@media screen and (max-height: 500px) and (orientation: landscape) {
    
    .smart-navbar {
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 10px 30px !important; /* Menos padding para no robar altura */
    }
    
    .smart-navbar .logo {
        font-size: 18px !important; /* Logo un poco más pequeño para que quepa bien */
    }
    
    .smart-navbar .menu {
        gap: 20px !important;
        flex-wrap: nowrap !important;
    }
    
    .smart-navbar .contacto {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }

    .final-footer {
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 15px 40px !important; /* Ajusta el relleno para que no quite espacio */
    }
    
    .footer-right {
        text-align: right !important; /* Asegura que la hora quede a la derecha */
    }

    #tecnologias {
        padding: 40px 75px !important; /* Reducimos el espacio a los lados de la pantalla */
        gap: 20px !important;
    }
    .tech-grid-premium {
        grid-template-columns: repeat(4, 1fr) !important; 
        gap: 20px !important; /* Reducimos ligeramente el espacio entre cards */
        width: 100%;
    }
    .tech-card { 
        padding: 10px 5px !important; 
        aspect-ratio: 1.2 / 1 !important; /* Esto las hace ver más cuadradas */
        gap: 8px !important;
        justify-content: center !important;
    }
    .tech-card i { font-size: 40px !important; }
    .tech-card span { font-size: 15px !important; }

    .redes-grid-3d { 
        grid-template-columns: repeat(2, 1fr) !important; /* Mantiene las 2 columnas */
        gap: 20px !important; 
    }
    .social-3d-card {
        height: 250px !important; /* Las hacemos mucho más altas para que ocupe casi toda la pantalla y tengas que bajar */
    }
    .icon-layer {
        font-size: 45px !important; /* Recuperamos el tamaño del icono original */
        margin-bottom: 15px !important;
    }
    .text-layer {
        font-size: 14px !important; /* Recuperamos el tamaño del texto */
    }

    .servicios-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; }
    .servicio-feature { padding-bottom: 10px !important; }
    .sf-content { padding: 15px 15px 5px 15px !important; }
    .sf-action { padding: 0 15px 15px 15px !important; }
    .sf-content h3 { font-size: 16px !important; } 
    .sf-action .btn-explorar { padding: 10px 0 !important; font-size: 11px !important; }

    .projects-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; }
    .project-card { height: auto !important; min-height: 250px !important; }
    .project-thumb { height: 120px !important; }
    .project-body { padding: 15px !important; }
    .project-title { font-size: 16px !important; margin-bottom: 5px !important; }
    .project-desc { font-size: 11px !important; margin-bottom: 10px !important; }

    .modal { padding: 0 !important; align-items: center !important; justify-content: center !important; }
    .modal.active { display: flex !important; }

    .modal-content {
        min-height: 0 !important; height: 85vh !important; width: 90vw !important; max-width: 800px !important;
        border-radius: 20px !important; border: 2px solid rgba(255, 255, 255, 0.3) !important; box-shadow: 0 0 50px rgba(0,0,0,0.9) !important;
        margin: auto !important; padding: 0 30px !important; padding-top: 45px !important; padding-bottom: 20px !important;
        display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important;
        overflow: hidden !important; position: relative !important;
    }

    .close-modal {
        position: absolute !important; top: 10px !important; right: 20px !important; background: transparent !important;
        border: none !important; font-size: 30px !important; color: #fff !important; opacity: 0.9 !important;
        z-index: 5000 !important; display: block !important; width: auto !important; height: auto !important;
    }

    .project-modal-layout {
        grid-template-columns: 1fr 1.2fr !important; gap: 20px !important; height: 100% !important; width: 100% !important; align-items: stretch !important;
    }
    
    .project-modal-img { height: auto !important; min-height: 100% !important; border-radius: 12px !important; }
    
    .project-modal-info { justify-content: flex-start !important; overflow-y: auto !important; padding-right: 10px !important; }
    .project-modal-info > span { font-size: 10px !important; margin-bottom: 5px !important; display: block; }
    .project-modal-info h2 { font-size: 22px !important; margin-bottom: 8px !important; line-height: 1.1 !important; }
    .project-modal-info p { font-size: 12px !important; margin-bottom: 12px !important; line-height: 1.4 !important; }
    .tech-stack-label { margin-bottom: 5px !important; font-size: 10px !important; }
    .tech-stack-row { margin-bottom: 15px !important; gap: 8px !important; }
    .tech-badge { width: 35px !important; height: 35px !important; border-radius: 8px !important; }
    .tech-badge i { font-size: 16px !important; }
    .project-modal-info .btn-primary { padding: 10px 15px !important; font-size: 10px !important; margin-bottom: 10px !important; width: 100%; text-align: center; }

    .single-slide-container { width: 100%; margin-top: 5px !important; padding-bottom: 0; }
    .slide-main-title { font-size: 10px !important; margin-bottom: 5px !important; opacity: 0.6; }
    .slide-title { font-size: 20px !important; margin-bottom: 5px !important; line-height: 1.1 !important; }
    .slide-desc { font-size: 12px !important; line-height: 1.3 !important; max-width: 90% !important; color: #ddd !important; }
    .slide-number { font-size: 50px !important; top: 50% !important; right: 15px !important; left: auto !important; transform: translateY(-50%) !important; opacity: 0.1 !important; }
    .slide-indicators { bottom: 10px !important; position: absolute !important; }
    
    .scroll-hint { display: none !important; }
}