/* Variables globales */
:root {
    --color-bg: #000;
    --color-text: #fff;
    --color-text-muted: rgba(255, 255, 255, 0.8);
    --header-bg: rgba(0, 0, 0, 0.2);
    --header-border: rgba(255, 255, 255, 0.1);
    --header-blur: blur(15px);
    --transition-smooth: cubic-bezier(0.19, 1, 0.22, 1);
    --duration-fast: 0.3s;
    --duration-normal: 0.6s;
    --duration-slow: 0.8s;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Transición suave al cargar página - aplica solo al contenido principal */
#main-content {
    flex: 1;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

#main-content.page-reveal {
    animation: pageReveal 0.9s var(--transition-smooth) forwards;
}

@keyframes pageReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skip link para accesibilidad */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 8px 16px;
    z-index: 200;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 0 0 8px 0;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Header */
.main-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(20px, 10vw, 150px); /* Espacio dinámico que se adapta al ancho de pantalla */
    padding: 0.8rem 2rem;
    z-index: 100;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    opacity: 1;
    pointer-events: auto;
}

.menu-toggle {
    display: none;
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 102;
    background: none;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.menu-toggle:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 4px;
    border-radius: 4px;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: clamp(20px, 8vw, 100px); /* Espacio dinámico entre menú y redes sociales */
}

.logo a {
    display: flex;
    transition: opacity 0.3s;
    overflow: visible;
}

.logo img {
    height: 50px;
    width: auto;
}

/* Logo SVG inline */
.logo-svg {
    height: 50px;
    width: auto;
    color: #fff;
    transition: color 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    transform: scale(1.45);
    transform-origin: center;
}

.logo-svg--footer {
    height: 110px;
    width: auto;
}

.logo a:hover {
    opacity: 0.7;
}

nav ul {
    display: flex;
    list-style: none;
    gap: clamp(10px, 2vw, 30px); /* Los links también se ajustan para no amontonarse */
}

nav a {
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: opacity 0.3s ease;
    position: relative; /* Necesario para posicionar la línea */
    white-space: nowrap;
}

nav a:hover {
    opacity: 0.7;
}

nav a:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Línea animada bajo los textos */
nav a::after {
    content: '';
    position: absolute;
    bottom: -5px; /* Espaciado bajo el texto */
    left: 0;
    width: 0;
    height: 1px;
    background-color: white;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* ---- Dropdown Servicios ---- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: default;
}

.nav-dropdown-toggle .fa-chevron-down {
    font-size: 0.55rem;
    transition: transform 0.35s var(--transition-smooth);
}

.nav-dropdown:hover .nav-dropdown-toggle .fa-chevron-down,
.nav-dropdown.open .nav-dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    display: block;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.99);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.4rem 0;
    min-width: 200px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s var(--transition-smooth), visibility 0.3s var(--transition-smooth);
    z-index: 150;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown-menu li a {
    display: block;
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-dropdown-menu li a::after {
    display: none;
}

.nav-dropdown-menu li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* Animación de entrada para los elementos del header */
.animated-header-item {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1), 
                transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: opacity, transform;
}

.animated-header-item.show {
    opacity: 1;
    transform: translateY(0);
}

/* Escritorio: sin animación de entrada en el header */
@media (min-width: 1025px) {
    .animated-header-item {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }
}

/* Redes Sociales */
.social-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-links a {
    color: white;
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 0.7;
}

/* Banner Container */
.banner {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Imagen de fondo fija */
.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('recursos/bannerprincipal/fondo_galaxia_naranja.webp');
    background-size: cover;
    background-position: center;
    z-index: 1;
    filter: brightness(0.6) contrast(1.1); /* Ajustado para ver más los colores del banner */
    transform: scale(1.1); /* Sincronizado con el estado inicial del script para evitar saltos */
}

/* Contenedor de estrellas con máscara para el planeta (esquina superior derecha) */
#stars-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 3; /* Subido para estar sobre la nebulosa */
    /* Evitamos que las estrellas se dibujen sobre el planeta (aprox top-right) */
    mask-image: radial-gradient(circle at 85% 15%, transparent 0%, transparent 20%, black 40%);
    -webkit-mask-image: radial-gradient(circle at 85% 15%, transparent 0%, transparent 20%, black 40%);
}

/* Nebulosa animada */
.nebula {
    position: absolute;
    top: -108vh; /* Bajada un 10% más: ahora el 40% de los 180vh es visible */
    left: 75%; /* Movida aún más hacia la derecha */
    width: 180vh; /* Aumentado considerablemente el tamaño */
    height: 180vh;
    background: url('recursos/bannerprincipal/nebulosa.webp') no-repeat center;
    background-size: contain;
    z-index: 2; /* Detrás de las estrellas y textos, delante del fondo */
    opacity: 0.5;
    pointer-events: none;
    filter: blur(5px);
    animation: rotateNebula 1200s linear infinite; /* Rotación extremadamente lenta (20 minutos por vuelta) */
}

@supports (mix-blend-mode: screen) {
    .stars-bg-medium {
        mix-blend-mode: screen;
    }
}

@keyframes rotateNebula {
    from { transform: translateX(-50%) rotate(0deg); }
    to { transform: translateX(-50%) rotate(360deg); }
}

/* Estilos para los textos del Banner */
.banner-text {
    position: absolute;
    font-size: 3.645vw; /* Reducido un 10% */
    font-weight: 800;
    text-transform: uppercase;
    color: white;
    z-index: 5;
    pointer-events: none;
    width: 45%; /* Aumentado para que quepa la frase completa */
    line-height: 1.1;
    text-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.mobile-text {
    display: none;
}

/* Solo los contenedores directos (las 3 líneas) generan salto */
.banner-text > span {
    display: block;
}

/* Estilo para cada letra individual */
.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px) scale(1.05);
    transition: opacity 0.45s cubic-bezier(0.19, 1, 0.22, 1),
                transform 0.45s cubic-bezier(0.19, 1, 0.22, 1);
}

.char.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.left-text {
    left: 5%;
    top: 24%;
    text-align: left;
}

/* Estilos para el Subtítulo Derecho */
.banner-subtitle {
    position: absolute;
    right: 5%;
    bottom: 15%; /* Subido un poco más */
    width: 38%; /* Aumentado para dar espacio al texto más grande */
    max-width: 600px;
    text-align: right;
    z-index: 5;
    pointer-events: none;
}

.banner-subtitle p {
    font-size: clamp(1.1rem, 1.45vw, 1.5rem); /* Aumentado un 20% adicional */
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    word-break: keep-all; /* Evita cortes arbitrarios de palabras */
    hyphens: none; /* Desactiva guiones de corte */
}

.banner-text .highlight {
    display: inline-block; /* Ahora fluye como parte del párrafo */
    margin-top: 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    color: white;
    text-transform: uppercase;
}

.left-text .highlight {
    transform: none; /* Eliminado el desplazamiento lateral */
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle var(--duration) infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

/* Contenedor del Astronauta */
.astronaut-wrapper {
    position: absolute;
    top: 100px; /* Offset para no tocar el header */
    left: 0;
    width: 100%;
    height: calc(100% - 100px); /* Ocupa el espacio restante */
    display: flex;
    justify-content: center;
    align-items: center; /* Centrado vertical */
    z-index: 10;
    pointer-events: none; /* No interfiere con el mouse */
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1); /* Movimiento mucho más suave e inercial */
}

.astronaut {
    max-width: 807px; /* Reducido un 5% adicional */
    width: 60.5vw;   /* Reducido un 5% adicional */
    will-change: transform;
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(0.5deg); } /* Movimiento de flotación más sutil */
}

/* Responsividad */
@media (max-width: 1024px) {
    .main-header {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        top: 20px;
        left: 20px;
        transform: translateY(0);
    }

    .logo, .nav-container { 
        display: none; 
    }

    .menu-toggle { 
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100%;
    }

    /* Menú abierto (Overlay) */
    .main-header.menu-open {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        top: 0;
        left: 0;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        align-items: center;
    }

    .main-header.menu-open .menu-toggle {
        position: absolute;
        top: 20px;
        left: 20px;
        width: 60px;
        height: 60px;
    }

    .main-header.menu-open .nav-container {
        display: flex;
        flex-direction: column;
        gap: 40px;
        animation: menuSlideDown 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    }

    @keyframes menuSlideDown {
        from {
            transform: translateY(-50px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .main-header.menu-open nav ul {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .main-header.menu-open .nav-dropdown-toggle {
        display: block;
        text-align: center;
    }

    .main-header.menu-open .nav-dropdown-menu {
        position: static;
        transform: none;
        background: transparent;
        backdrop-filter: none;
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        min-width: auto;
        text-align: center;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease;
    }

    .main-header.menu-open .nav-dropdown.open .nav-dropdown-menu {
        max-height: 500px;
        opacity: 1;
        padding-top: 0.5rem;
    }

    .main-header.menu-open .nav-dropdown-menu li a {
        font-size: 0.75rem;
        padding: 0.3rem 0;
        color: rgba(255, 255, 255, 0.6);
    }

    .main-header.menu-open .social-links {
        justify-content: center;
        width: 100%;
        gap: 30px;
    }

    .main-header.menu-open .social-links a {
        font-size: 1.5rem;
    }

    .left-text {
        display: none;
    }

    .mobile-text {
        display: block;
        width: 100%;
        max-width: 95%;
        top: 20%;
        left: 5%;
        transform: none;
        text-align: left;
        font-size: 6.5vw;
        z-index: 20;
    }

    .astronaut {
        width: 72.6vw;
        max-width: 484px;
        display: block;
        margin: 0 auto;
    }

    /* Banner principal responsive: astronauta arriba, texto debajo */
    .banner {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 90px 5% 2rem;
        height: auto;
        min-height: 100vh;
    }

    .astronaut-wrapper {
        position: relative;
        width: 100%;
        height: auto;
        top: auto;
        left: auto;
        order: 1;
        margin-top: 20px;
    }

    .mobile-text {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        text-align: center;
        order: 2;
        margin-top: 1.5rem;
    }

    .banner-subtitle {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        max-width: 100%;
        text-align: center;
        order: 3;
        margin-top: 1rem;
    }

    .banner-subtitle p {
        text-align: center;
    }

    .portfolio-header--full {
        min-height: 50vh;
        padding: 7rem 5%;
    }
}
/* Preferencias de reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .char {
        opacity: 1;
        transform: none;
    }

    .char.show {
        opacity: 1;
        transform: none;
    }

    .ship-scroll-message .tw-char {
        opacity: 1 !important;
        transform: none !important;
    }
    
    .animated-header-item {
        opacity: 1;
        transform: none;
    }
    
    .main-header {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
    
    .astronaut-wrapper {
        transition: none;
    }
    
    .banner-bg {
        transition: none;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .service-block,
    .cta-button,
    .service-gallery img,
    .footer-social-links a,
    .portfolio-item {
        transition: none;
    }

    .service-satellite,
    .service-asteroid-item,
    .service-satellite2,
    .whatsapp-toggle {
        animation: none;
    }

    .whatsapp-widget {
        opacity: 1;
        pointer-events: auto;
        transform: none;
        transition: none;
    }
}

/* ============================================================
   NUEVAS SECCIONES - INTRODUCCIÓN, SERVICIOS, CTA, FOOTER
   ============================================================ */

/* -------------------- REVEAL ON SCROLL -------------------- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.45s var(--transition-smooth), transform 0.45s var(--transition-smooth);
}

.reveal-on-scroll.is-visible,
.is-visible .reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
}

/* Variantes de dirección para reveal on scroll */
.reveal-on-scroll.reveal-left {
    transform: translateX(-60px);
}

.reveal-on-scroll.reveal-left.is-visible,
.is-visible .reveal-on-scroll.reveal-left {
    transform: translateX(0);
}

.reveal-on-scroll.reveal-right {
    transform: translateX(60px);
}

.reveal-on-scroll.reveal-right.is-visible,
.is-visible .reveal-on-scroll.reveal-right {
    transform: translateX(0);
}

.reveal-on-scroll.reveal-scale {
    transform: scale(0.92);
}

.reveal-on-scroll.reveal-scale.is-visible,
.is-visible .reveal-on-scroll.reveal-scale {
    transform: scale(1);
}

/* Stagger delays */
.reveal-delay-1,
.is-visible .reveal-delay-1 { transition-delay: 0.04s; }
.reveal-delay-2,
.is-visible .reveal-delay-2 { transition-delay: 0.08s; }
.reveal-delay-3,
.is-visible .reveal-delay-3 { transition-delay: 0.12s; }
.reveal-delay-4,
.is-visible .reveal-delay-4 { transition-delay: 0.16s; }
.reveal-delay-5,
.is-visible .reveal-delay-5 { transition-delay: 0.20s; }
.reveal-delay-6,
.is-visible .reveal-delay-6 { transition-delay: 0.20s; }

/* -------------------- INTRODUCCIÓN -------------------- */
.intro-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    padding: 14rem 5%;
    overflow: hidden;
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--header-border) 50%, transparent 100%);
    z-index: 3;
}

.intro-container {
    max-width: 900px;
    text-align: center;
    z-index: 2;
}

.intro-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    font-weight: 600;
}

.intro-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.intro-title .highlight {
    color: #ee0000;
}

.intro-body {
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    line-height: 1.8;
    color: var(--color-text-muted);
    max-width: 750px;
    margin: 0 auto;
}

/* -------------------- SERVICIOS -------------------- */
.services-section {
    position: relative;
    width: 100%;
    background-color: #000;
    padding: 8rem 5%;
    overflow: hidden;
}

.services-section--banner {
    padding: 4.5rem 5% 0;
    height: 55vh;
    min-height: 420px;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .services-section--banner {
        height: 45vh;
        min-height: 360px;
        padding: 3.5rem 5% 0;
    }
}

@media (max-width: 768px) {
    .main-header {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(0, 0, 0, 0.9);
    }

    .services-section--banner {
        height: 65vh;
        min-height: 500px;
        padding: 3rem 5% 0;
    }
}

@media (max-width: 480px) {
    .services-section--banner {
        height: 60vh;
        min-height: 450px;
        padding: 2.5rem 5% 0;
    }
}

.services-section--banner .section-header {
    position: relative;
    z-index: 4;
    margin-bottom: 0;
}

.section-header + .services-section {
    margin-top: 0;
}

.services-section--banner .services-parallax-bg {
    filter: brightness(0.45);
    opacity: 1;
    background-attachment: scroll;
}

/* Fondo parallax de la sección de servicios */
.services-parallax-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    background-image: url('recursos/bannerprincipal/fondoparallax.webp');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    z-index: 0;
    opacity: 0.8;
    filter: blur(8px);
}

.services-section::before,
.services-section::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 180px;
    pointer-events: none;
    z-index: 1;
}

.services-section::before {
    top: 0;
    height: 300px;
    background: 
        linear-gradient(90deg, transparent 0%, var(--header-border) 50%, transparent 100%) 0 0 / 100% 1px no-repeat,
        linear-gradient(180deg, #000000 0%, rgba(0,0,0,0.8) 30%, transparent 100%);
}

.services-section::after {
    bottom: 0;
    height: 300px;
    background: linear-gradient(0deg, #000000 0%, rgba(0,0,0,0.8) 30%, transparent 100%);
}

/* Estrellas de la sección de servicios */
.services-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---- POPUP DE SERVICIOS (esquina inferior izquierda) ---- */
.service-popup {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    z-index: 10;
    max-width: 360px;
    width: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
    pointer-events: none;
}

.service-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.service-popup-inner {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.2rem 1.6rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.service-popup-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    margin: 0 0 0.5rem;
    line-height: 1.3;
    opacity: 0.85;
}

.service-popup-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.service-popup-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

@media (max-width: 768px) {
    .service-popup {
        bottom: 1rem;
        left: 1rem;
        max-width: 280px;
    }
    .service-popup-inner {
        padding: 1rem 1.2rem;
    }
    .service-popup-title {
        font-size: 0.7rem;
    }
    .service-popup-desc {
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .service-popup {
        bottom: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        max-width: none;
    }
    .service-popup-inner {
        padding: 0.8rem 1rem;
    }
}

.section-header {
    text-align: center;
    padding: 6rem 5% 0;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

.section-header::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--header-border) 50%, transparent 100%);
}

.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-title .highlight {
    color: #ee0000;
}

.services-list {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6rem;
    position: relative;
    z-index: 2;
}

/* Bloque de servicio */
.service-block {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--header-border);
    border-radius: 24px;
    transition: border-color var(--duration-fast) var(--transition-smooth), background var(--duration-fast) var(--transition-smooth);
}

.service-block:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.55);
}

.service-block--reverse {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

.service-block--reverse > * {
    direction: ltr;
}

.service-title {
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
}

.service-copy {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

/* Botón Ver más */
.service-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.5rem;
    background: transparent;
    border: 1px solid var(--header-border);
    border-radius: 100px;
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.3s var(--transition-smooth), border-color 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
    cursor: pointer;
}

.service-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.service-btn:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
}

/* Galería placeholder */
.service-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.service-gallery img {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform var(--duration-fast) var(--transition-smooth), opacity var(--duration-fast) var(--transition-smooth);
}

.service-gallery img:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

/* Variantes de service-block para Sobre Nosotros */
.service-block--about {
    align-items: stretch !important;
    min-height: 350px;
    padding: 2rem;
}

.service-block--about .service-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
}

.service-block--about .about-logos-stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    height: 100%;
}

.service-block--about .about-logos-stacked .about-logo-item {
    width: 220px;
    height: 220px;
}

.service-block--about .about-logos-stacked .about-logo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.8));
}

.service-block--about .about-extra {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.service-block--about .about-stats {
    text-align: center;
    width: 100%;
}

.service-block--about .about-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.service-block--about .about-stat-number {
    font-size: clamp(6rem, 12vw, 10rem);
    font-weight: 800;
    color: #ffffff;
    display: block;
    line-height: 1;
}

.service-block--about .about-stat-label {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 3px;
}

@media (max-width: 1024px) {
    .service-block--about {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-block--about .about-logos-stacked .about-logo-item {
        width: 180px;
        height: 180px;
    }

    .service-block--about .about-stat-number {
        font-size: clamp(4rem, 10vw, 6rem);
    }
}

@media (max-width: 768px) {
    .service-block--about .about-logos-stacked {
        flex-direction: row;
        gap: 2rem;
    }

    .service-block--about .about-logos-stacked .about-logo-item {
        width: 160px;
        height: 160px;
    }

    .service-block--about .about-stat-number {
        font-size: clamp(3rem, 15vw, 4rem);
    }

    .service-block--about .about-stat-label {
        font-size: 1rem;
    }
}

/* Satélite decorativo en card de Rotulación Vehicular */
.service-satellite-wrapper {
    position: absolute;
    top: -80px;
    left: -55px;
    width: 250px;
    height: 250px;
    z-index: 3;
    pointer-events: none;
}

.service-satellite {
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
    animation: floatSatellite 6s ease-in-out infinite;
}

@keyframes floatSatellite {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(15px, -4px) rotate(0.8deg); }
}

/* Grupo de asteroides decorativos en card de Fachadas Comerciales */
.service-asteroid-group {
    position: absolute;
    top: -90px;
    right: -60px;
    width: 280px;
    height: 280px;
    z-index: 3;
    pointer-events: none;
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.service-asteroid-item {
    position: absolute;
    object-fit: contain;
    pointer-events: none;
}

/* Asteroide principal (uno) */
.service-asteroid--main {
    width: 150px;
    height: 150px;
    top: 40px;
    left: 60px;
    animation: floatAsteroidGroup 4.2s ease-in-out infinite;
}

/* Asteroide dos */
.service-asteroid--two {
    width: 80px;
    height: 80px;
    top: 10px;
    right: 40px;
    animation: floatAsteroidGroup 3.8s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* Asteroide tres */
.service-asteroid--three {
    width: 65px;
    height: 65px;
    top: 0;
    left: 0;
    animation: floatAsteroidGroup 5s ease-in-out infinite;
    animation-delay: 0.8s;
}

/* Asteroide cuatro */
.service-asteroid--four {
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 50px;
    animation: floatAsteroidGroup 4.5s ease-in-out infinite;
    animation-delay: 1.2s;
}

@keyframes floatAsteroidGroup {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Asteroides decorativos en banner de Sobre Nosotros */
.about-banner-asteroid-wrapper {
    position: absolute;
    top: calc(100vh - 350px);
    left: 2%;
    z-index: 10;
    pointer-events: none;
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.about-banner-asteroid--uno {
    bottom: 10%;
    left: 5%;
    width: 500px;
    height: 500px;
}

.about-banner-asteroid--dos {
    bottom: 5%;
    left: 15%;
    width: 150px;
    height: 150px;
}

.about-banner-asteroid {
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
    animation: floatAsteroidGroup 5s ease-in-out infinite;
}

/* Segundo satélite decorativo en card de Impresión Digital y Corte */
.service-satellite2-wrapper {
    position: absolute;
    top: -80px;
    left: -55px;
    width: 250px;
    height: 250px;
    z-index: 3;
    pointer-events: none;
}

.service-satellite2 {
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
    animation: floatSatellite2 6s ease-in-out infinite;
}

@keyframes floatSatellite2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(15px, -4px) rotate(0.8deg); }
}

/* Asteroide decorativo en banner de Contacto */
.contact-banner-asteroid-wrapper {
    position: absolute;
    top: calc(100vh - 350px);
    left: 2%;
    z-index: 10;
    pointer-events: none;
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    width: 500px;
    height: 500px;
}

.contact-banner-asteroid {
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: transform;
    animation: floatAsteroidGroup 5.5s ease-in-out infinite;
    animation-delay: 1s;
}

/* -------------------- CTA FINAL -------------------- */
/* Sección scrolltrigger de la nave */
.ship-scroll-section {
    position: relative;
    height: 300vh;
    background: var(--color-bg);
    z-index: 1;
}

/* Difuminado a negro entre secciones grandes */
.section-fade {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, #000 0%, transparent 40%, transparent 60%, #000 100%);
}

.intro-section .section-fade {
    z-index: 1;
}

.ship-scroll-stage .section-fade {
    z-index: 2;
}

.cta-section .section-fade {
    z-index: 1;
    background: linear-gradient(
        180deg,
        #000 0%,
        rgba(0,0,0,0.7) 35%,
        rgba(0,0,0,0.7) 65%,
        #000 100%
    );
}

#solar .section-fade {
    z-index: 4;
}

.ship-scroll-stage {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--color-bg);
}

.ship-scroll-frame {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.ship-scroll-message {
    position: absolute;
    bottom: 6%;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 1000px;
    text-align: center;
    z-index: 3;
    pointer-events: none;
    font-size: clamp(1.6rem, 4vw, 3.4rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.ship-scroll-message .tw-word {
    display: inline-block;
    white-space: nowrap;
}

.ship-scroll-message .tw-char {
    display: inline-block;
    opacity: 0;
}

/* Responsividad */
@media (max-width: 768px) {
    .ship-scroll-section {
        height: 250vh;
    }

    .ship-scroll-message {
        bottom: 5%;
        font-size: clamp(1.35rem, 4.5vw, 1.9rem);
        letter-spacing: 1px;
    }
}

.cta-section {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12rem 5%;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    background: url('cta/fondocta.webp') no-repeat center;
    background-size: cover;
    z-index: 1;
    opacity: 0.5;
}

.cta-astronaut-wrapper {
    position: absolute;
    bottom: -7%;
    right: -8%;
    width: 50vw;
    max-width: 650px;
    z-index: 1;
    pointer-events: none;
}

.cta-astronaut {
    width: 100%;
    display: block;
    animation: float 8s ease-in-out infinite;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--header-border) 50%, transparent 100%);
    z-index: 2;
}

.cta-container {
    position: relative;
    max-width: 800px;
    text-align: center;
    z-index: 2;
}

.cta-title {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cta-title .highlight {
    color: #ee0000;
}

.cta-body {
    font-size: clamp(1rem, 1.3vw, 1.25rem);
    line-height: 1.7;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 2.5rem;
    background: var(--color-text);
    color: var(--color-bg);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 100px;
    transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.cta-button:hover {
    transform: translateY(-3px);
}

.cta-button-wrap {
    display: inline;
}

.cta-button:focus-visible {
    outline: 3px solid var(--color-text);
    outline-offset: 4px;
}

.cta-button i {
    font-size: 1.2rem;
}

/* -------------------- FOOTER -------------------- */
.main-footer {
    position: relative;
    width: 100%;
    background: #050505;
    border-top: 1px solid var(--header-border);
    padding: 5rem 5% 0.5rem;
    z-index: 5;
}

/* Fondo del banner en el footer */
.footer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('recursos/bannerprincipal/fondo banner.webp');
    background-size: cover;
    background-position: center;
    z-index: 0;
    filter: brightness(0.5);
    opacity: 0.4;
}

/* Nebulosa girando en el footer */
.footer-nebula {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.footer-nebula-img {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-20%, -50%);
    width: 60%;
    height: auto;
    opacity: 0.2;
    filter: blur(3px);
    animation: rotateNebulaImg 1200s linear infinite;
}

@keyframes rotateNebulaImg {
    from { transform: translate(-20%, -50%) rotate(0deg); }
    to { transform: translate(-20%, -50%) rotate(360deg); }
}

/* Nave espacial flotando en el footer */
.footer-spaceship-wrapper {
    position: absolute;
    top: -150px;
    right: 5%;
    width: 280px;
    height: 280px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
}

.footer-spaceship-wrapper.is-visible {
    opacity: 1;
    animation: shipSlideIn 1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes shipSlideIn {
    from { transform: translateX(200px); }
    to   { transform: translateX(0); }
}

.footer-spaceship {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(238, 0, 0, 0.4));
    will-change: transform;
    animation: floatSpaceship 6s ease-in-out infinite;
}

@keyframes floatSpaceship {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(18px, -4px) rotate(0.8deg); }
}

.footer-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 1.5rem;
    z-index: 2;
}

.footer-brand img {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-brand {
    text-align: center;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-logos img {
    height: 80px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

.footer-tagline {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.footer-contact h4,
.footer-links h4,
.footer-social h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    font-weight: 700;
}

.footer-contact ul,
.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact a,
.footer-links a,
.footer-contact span {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: color var(--duration-fast) ease;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--color-text);
    font-size: 1rem;
}

.footer-contact a:hover,
.footer-links a:hover {
    color: var(--color-text);
}

.footer-dropdown {
    position: relative;
}

.footer-dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 30;
    margin-bottom: 8px;
}

.footer-dropdown.open .footer-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.footer-dropdown.open .fa-chevron-down {
    transform: rotate(180deg);
}

.footer-dropdown-menu li a {
    display: block;
    padding: 0.4rem 1.2rem;
    font-size: 0.75rem !important;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.25s ease, background 0.25s ease;
}

.footer-dropdown-menu li a:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.06);
}

.footer-social-links {
    display: flex;
    gap: 16px;
    align-items: center;
}

.footer-social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--header-bg);
    border: 1px solid var(--header-border);
    border-radius: 50%;
    color: var(--color-text);
    font-size: 1.1rem;
    text-decoration: none;
    transition: opacity 0.3s ease, background 0.3s ease;
    backdrop-filter: var(--header-blur);
    -webkit-backdrop-filter: var(--header-blur);
}

.footer-social-links a:hover {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--header-border);
    text-align: center;
    z-index: 2;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 1px;
}

/* ============================================================
   RESPONSIVIDAD - NUEVAS SECCIONES
   ============================================================ */

@media (max-width: 1024px) {
    .service-block,
    .service-block--reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 2.5rem;
        padding: 2rem;
    }

    .service-block--reverse > * {
        direction: ltr;
    }

    .service-content {
        order: 1;
    }

    .service-gallery {
        order: 2;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }

    .footer-spaceship-wrapper {
        width: 210px;
        height: 210px;
        top: -130px;
    }

    .service-satellite-wrapper {
        width: 200px;
        height: 200px;
        top: -90px;
    }

    .service-asteroid-group {
        width: 240px;
        height: 240px;
        top: -100px;
        right: -45px;
    }

    .service-asteroid--main {
        width: 130px;
        height: 130px;
        top: 35px;
        left: 50px;
    }

    .service-asteroid--two {
        width: 70px;
        height: 70px;
        top: 8px;
        right: 35px;
    }

    .service-asteroid--three {
        width: 55px;
        height: 55px;
    }

    .service-asteroid--four {
        width: 48px;
        height: 48px;
        bottom: 15px;
        right: 40px;
    }

    .service-satellite2-wrapper {
        width: 200px;
        height: 200px;
        top: -90px;
        left: -40px;
    }
}

@media (max-width: 768px) {
    .intro-section,
    .services-section,
.cta-section {
        padding: 5rem 5%;
    }

    .cta-astronaut-wrapper {
        width: 75vw;
        max-width: 380px;
        bottom: -3%;
        right: -28%;
    }

    .cta-astronaut {
        width: 100%;
    }

    .cta-bg {
        background-position: left center;
    }

    .cta-button {
        padding: 0.8rem 1.8rem;
        font-size: 0.85rem;
        white-space: normal;
        flex-direction: column;
        gap: 0.25rem;
    }

    .cta-button-wrap {
        display: block;
    }

    .services-parallax-bg,
    .parallax-bg {
        background-attachment: scroll;
    }

    .services-list {
        gap: 4rem;
    }

    .service-block {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .about-banner-asteroid--uno {
        width: 120px;
        height: 120px;
        bottom: 5%;
        left: 3%;
    }

    .about-banner-asteroid--dos {
        width: 90px;
        height: 90px;
        bottom: 2%;
        left: 12%;
    }

    .service-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-spaceship-wrapper {
        width: 150px;
        height: 150px;
        top: -95px;
        right: 3%;
    }

    .service-satellite-wrapper {
        width: 155px;
        height: 155px;
        top: -110px;
        left: -20px;
    }

    .service-asteroid-group {
        width: 200px;
        height: 200px;
        top: -85px;
        right: -30px;
    }

    .service-asteroid--main {
        width: 110px;
        height: 110px;
        top: 30px;
        left: 45px;
    }

    .service-asteroid--two {
        width: 60px;
        height: 60px;
        top: 5px;
        right: 30px;
    }

    .service-asteroid--three {
        width: 48px;
        height: 48px;
    }

    .service-asteroid--four {
        width: 42px;
        height: 42px;
        bottom: 12px;
        right: 35px;
    }

    .service-satellite2-wrapper {
        width: 155px;
        height: 155px;
        top: -110px;
        left: -20px;
    }

    .footer-nebula-img {
        width: 150%;
    }

    .footer-logos {
        justify-content: center;
    }

    .footer-contact ul,
    .footer-links ul {
        align-items: center;
    }

    .footer-social-links {
        justify-content: center;
    }

    .footer-contact a,
    .footer-links a,
    .footer-contact span {
        justify-content: center;
    }
}

/* ============================================================
   WIDGET WHATSAPP
   ============================================================ */

.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.whatsapp-widget.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.whatsapp-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s var(--transition-smooth), background 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
    outline: none;
    position: relative;
    text-decoration: none;
}

.whatsapp-toggle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease;
}

.whatsapp-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.whatsapp-toggle:hover::after {
    border-color: rgba(255, 255, 255, 0.15);
}

.whatsapp-toggle:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 4px;
}

/* Animación de pulso sutil */
@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(255, 255, 255, 0.1); }
    50% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 12px rgba(255, 255, 255, 0); }
}

.whatsapp-toggle {
    animation: whatsappPulse 3s ease-in-out infinite;
}

/* Responsividad widget */
@media (max-width: 480px) {
    .whatsapp-widget {
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-toggle {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }
}

/* ============================================================
   PORTAFOLIO / GALERÍA
   ============================================================ */

/* Header del portafolio */
.portfolio-header {
    position: relative;
    width: 100%;
    min-height: 35vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    padding: 10rem 5% 4rem;
    text-align: center;
    overflow: hidden;
}

section[aria-label="Contacto"] {
    overflow: hidden;
}

.portfolio-header--full {
    min-height: 50vh;
    padding: 8rem 5%;
}

.scroll-down-arrow {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--color-text);
    font-size: 1.5rem;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    animation: bounceDown 2s ease-in-out infinite;
}

.scroll-down-arrow:hover {
    opacity: 1;
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(12px);
    }
    60% {
        transform: translateX(-50%) translateY(6px);
    }
}

.portfolio-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('recursos/bannerprincipal/fondo banner.webp');
    background-size: cover;
    background-position: center;
    z-index: 0;
    filter: brightness(0.6);
    transform: scale(1.1);
}

.portfolio-header-nebula {
    position: absolute;
    top: 50%;
    left: -0vh;
    transform: translateY(-50%);
    width: min(52vh, 70vw);
    height: min(52vh, 70vw);
    z-index: 0;
    opacity: 1;
    pointer-events: none;
    animation: rotateNebula 1200s linear infinite;
}

/* Disco flotante de contacto (fade-in + desplazamiento por scroll) */
.contact-disc {
    position: fixed;
    --disc: min(52vh, 70vw, 600px);
    width: var(--disc);
    height: var(--disc);
    left: calc(var(--disc) * -0.75);
    top: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s ease 0.3s, visibility 0s 0.3s;
    will-change: transform;
}

.contact-disc-float {
    width: 100%;
    height: 100%;
    animation: floatDisc 8s ease-in-out infinite;
}

@keyframes floatDisc {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-35px) rotate(0.5deg); }
}

.contact-disc.is-visible {
    opacity: 1;
    visibility: visible;
}

.contact-disc-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    animation: rotateDisc 60s linear infinite;
}

@keyframes rotateDisc {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

section[aria-label="Sobre Nosotros"] .portfolio-header-nebula {
    top: -90vh;
    left: 65%;
    transform: none;
    width: 220vh;
    height: 220vh;
    background: url('recursos/bannerprincipal/nebulosa.webp') no-repeat center;
    background-size: contain;
    opacity: 0.6;
    filter: blur(2px);
}

/* mix-blend solo en pantallas pequeñas (donde el área es menor y no pesa) */
@media (max-width: 1024px) {
    @supports (mix-blend-mode: screen) {
        section[aria-label="Sobre Nosotros"] .portfolio-header-nebula {
            mix-blend-mode: screen;
        }
    }
}

section[aria-label="Sobre Nosotros"] .portfolio-header-container,
section[aria-label="Sobre Nosotros"] .scroll-down-arrow {
    z-index: 3;
}

section[aria-label="Sobre Nosotros"] .about-asteroids {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

section[aria-label="Sobre Nosotros"] .ast {
    position: absolute;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

section[aria-label="Sobre Nosotros"] .ast--1 {
    width: 100px;
    height: 100px;
    left: 15%;
    z-index: 2;
    animation-name: astFloat1, astSpin;
    animation-duration: 50s, 30s;
}

section[aria-label="Sobre Nosotros"] .ast--2 {
    width: 75px;
    height: 75px;
    top: 30%;
    z-index: 2;
    animation-name: astFloat2, astSpin;
    animation-duration: 55s, 35s;
}

section[aria-label="Sobre Nosotros"] .ast--3 {
    width: 110px;
    height: 110px;
    top: 10%;
    z-index: 2;
    animation-name: astFloat3, astSpin;
    animation-duration: 60s, 28s;
}

section[aria-label="Sobre Nosotros"] .ast--4 {
    width: 85px;
    height: 85px;
    top: 50%;
    z-index: 2;
    animation-name: astFloat4, astSpin;
    animation-duration: 52s, 32s;
}

@keyframes astFloat1 {
    0% { left: -100px; top: 15%; }
    30% { left: 25%; top: 20%; }
    60% { left: 60%; top: 10%; }
    100% { left: 110%; top: 15%; }
}

@keyframes astFloat2 {
    0% { left: 110%; top: 30%; }
    30% { left: 70%; top: 40%; }
    60% { left: 35%; top: 25%; }
    100% { left: -80px; top: 30%; }
}

@keyframes astFloat3 {
    0% { top: -90px; left: 25%; }
    30% { top: 30%; left: 30%; }
    60% { top: 65%; left: 20%; }
    100% { top: 110%; left: 25%; }
}

@keyframes astFloat4 {
    0% { top: 110%; left: 60%; }
    30% { top: 65%; left: 70%; }
    60% { top: 30%; left: 55%; }
    100% { top: -90px; left: 60%; }
}

@keyframes astSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.05); }
    100% { transform: rotate(360deg) scale(1); }
}

.portfolio-header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--header-border) 50%, transparent 100%);
    z-index: 1;
}

.portfolio-header-container {
    position: relative;
    max-width: 800px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.portfolio-intro {
    font-size: clamp(1rem, 1.3vw, 1.25rem);
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Controles */
.portfolio-controls {
    width: 100%;
    background: var(--color-bg);
    padding: 2rem 5%;
    border-bottom: 1px solid var(--header-border);
}

.portfolio-controls-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Toggle Grid / Carrusel */
.portfolio-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--header-border);
    border-radius: 100px;
    padding: 0.4rem;
}

.toggle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s var(--transition-smooth), background 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
    outline: none;
}

.toggle-btn:hover {
    color: var(--color-text);
    transform: scale(1.1);
}

.toggle-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.toggle-btn:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* Filtros */
.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    border: 1px solid var(--header-border);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s var(--transition-smooth), color 0.3s var(--transition-smooth), border-color 0.3s var(--transition-smooth);
    outline: none;
    font-family: 'Montserrat', sans-serif;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.25);
}

.filter-btn.active {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

.filter-btn:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* Subcategorías */
.portfolio-subfilters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--header-border);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.portfolio-subfilters[hidden] {
    display: none;
}

.subfilter-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.subfilter-btn {
    padding: 0.4rem 1rem;
    border-radius: 100px;
    border: 1px dashed var(--header-border);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s var(--transition-smooth);
    outline: none;
    font-family: 'Montserrat', sans-serif;
}

.subfilter-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text);
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.3);
}

.subfilter-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.subfilter-btn:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* Grid Section */
.portfolio-grid-section {
    width: 100%;
    background: var(--color-bg);
    padding: 4rem 5% 6rem;
}

.portfolio-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    align-items: start;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--header-border);
    transition: transform 0.3s var(--transition-smooth), border-color 0.3s var(--transition-smooth);
    will-change: transform, opacity;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--transition-smooth), opacity 0.5s var(--transition-smooth);
    opacity: 0;
}

.portfolio-item img.loaded {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.08);
}

.portfolio-item-overlay {
    display: none;
}

.portfolio-item-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text);
}

/* Botón Cargar más */
.portfolio-load-more {
    display: block;
    margin: 3rem auto 0;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    border: 1px solid var(--header-border);
    background: transparent;
    color: var(--color-text);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background 0.3s var(--transition-smooth), border-color 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
    outline: none;
    font-family: 'Montserrat', sans-serif;
}

.portfolio-load-more:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.portfolio-load-more.hidden {
    display: none;
}

/* Carrusel Section */
.portfolio-carousel-section {
    width: 100%;
    background: var(--color-bg);
    padding: 4rem 5% 6rem;
}

.portfolio-carousel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.carousel-track-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid var(--header-border);
    aspect-ratio: 4 / 3;
    background: rgba(255, 255, 255, 0.02);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s var(--transition-smooth);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide {
    cursor: zoom-in;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-prev,
.carousel-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--header-border);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-text);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth), border-color 0.3s var(--transition-smooth);
    outline: none;
    flex-shrink: 0;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.carousel-prev:focus-visible,
.carousel-next:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

.carousel-dots {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.carousel-counter {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--color-text);
    text-transform: uppercase;
}

.carousel-counter .current {
    color: var(--color-text);
}

.carousel-counter .total {
    color: var(--color-text-muted);
}

.carousel-progress-track {
    width: 120px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.carousel-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
    border-radius: 2px;
    transition: width 0.5s var(--transition-smooth);
}

/* Dots individuales (fallback si se necesitan) */
.carousel-dot {
    display: none;
}

/* Responsive Portafolio */
@media (max-width: 1200px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-header {
        padding: 8rem 5% 3rem;
        min-height: 30vh;
    }

    .portfolio-header--full {
        min-height: 100vh;
        padding: 6rem 5%;
    }

    .scroll-down-arrow {
        font-size: 1.25rem;
        bottom: 1.5rem;
    }

    .portfolio-header-nebula {
        top: 50%;
        left: -4vw;
        transform: translateY(-50%);
        width: min(45vh, 72vw);
        height: min(45vh, 72vw);
    }

    section[aria-label="Sobre Nosotros"] .portfolio-header-nebula {
        top: -60vh;
        left: 65%;
        transform: none;
        width: 160vh;
        height: 160vh;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .portfolio-carousel {
        gap: 0.75rem;
    }

    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .portfolio-controls-container {
        gap: 1rem;
    }

    .carousel-track-wrapper {
        aspect-ratio: 4 / 3;
    }
}

/* ==========================================
   LIGHTBOX / MODAL PORTAFOLIO
   ========================================== */

.portfolio-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.96);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.portfolio-lightbox.is-visible {
    opacity: 1;
}

.portfolio-lightbox[hidden] {
    display: none;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: zoom-in;
    transform: scale(0.95);
    transition: transform 0.35s var(--transition-smooth), border-radius 0.35s var(--transition-smooth);
    will-change: transform;
}

.lightbox-img.is-zoomed {
    cursor: grab;
    border-radius: 0;
}

.lightbox-img.is-dragging {
    cursor: grabbing;
}

.portfolio-lightbox.is-visible .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--header-border);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-text);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
    outline: none;
    z-index: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.lightbox-close:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--header-border);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--color-text);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
    outline: none;
    z-index: 1;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .portfolio-lightbox {
        padding: 1rem;
    }

    .lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }
}

/* ============================================================
   SOBRE NOSOTROS
   ============================================================ */

/* Fondo parallax reutilizable (services, about, contact) */
/* Capa fixed: se ancla al viewport y se compone por GPU, sin re-rasterizar
   en cada scroll (evita el jank de background-attachment: fixed). */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('recursos/bannerprincipal/fondoparallax.webp');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    z-index: 0;
    opacity: 0.8;
    filter: blur(8px);
}

/* Botón CTA (alias de .cta-button) */
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 2.5rem;
    background: var(--color-text);
    color: var(--color-bg);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 100px;
    transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
    border: none;
    cursor: pointer;
    margin-top: 2rem;
    width: fit-content;
    align-self: center;
}

.cta-btn:hover {
    transform: translateY(-3px);
}

.cta-btn .fa-whatsapp {
    color: #25D366;
    font-size: 1.8rem;
}

/* Columna de logos */
.about-logos-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.about-logos-inline {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 0.5rem;
}

.about-logos-inline .about-logo-item {
    max-width: 160px;
}

.about-logo-item {
    width: 100%;
    max-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-logo-item img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.about-logo-item img:hover {
    opacity: 1;
}

/* ============================================================
   CONTACTO
   ============================================================ */

.contact-section {
    position: relative;
    width: 100%;
    background-color: #000;
    padding: 10rem 5%;
    overflow: hidden;
}

.contact-section::before,
.contact-section::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 180px;
    pointer-events: none;
    z-index: 1;
}

.contact-section::before {
    top: 0;
    background:
        linear-gradient(90deg, transparent 0%, var(--header-border) 50%, transparent 100%) 0 0 / 100% 1px no-repeat,
        linear-gradient(180deg, #000000 0%, transparent 100%);
}

.contact-section::after {
    bottom: 0;
    background: linear-gradient(0deg, #000000 0%, transparent 100%);
}

.contact-card {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--header-border);
    border-radius: 24px;
    padding: 3rem;
    transition: border-color var(--duration-fast) var(--transition-smooth), background var(--duration-fast) var(--transition-smooth);
}

.contact-card:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.80);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-heading {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
}

.contact-lead {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    color: var(--color-text-muted);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.contact-detail-item a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-detail-item a:hover {
    color: var(--color-text);
}

.contact-detail-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--header-bg);
    border: 1px solid var(--header-border);
    border-radius: 50%;
    color: var(--color-text);
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* Honeypot anti-spam */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Honeypot anti-bot links */
.hp-link {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Formulario */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-muted);
}

.form-group input,
.form-group textarea {
    padding: 0.9rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--header-border);
    border-radius: 12px;
    color: var(--color-text);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    border-radius: 100px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
}

.contact-submit-btn:hover {
    transform: translateY(-2px);
}

.contact-submit-btn i {
    font-size: 1rem;
}

/* Popup de feedback del formulario (debajo del form, estilo glass) */
.form-popup {
    z-index: 2;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    color: var(--color-text);
    max-height: 0;
    padding: 0 2.5rem;
    margin: 0;
    border: 0 solid transparent;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95);
    transition: max-height 0.4s var(--transition-smooth), padding 0.4s var(--transition-smooth), margin 0.4s var(--transition-smooth), border 0.4s var(--transition-smooth), opacity 0.3s var(--transition-smooth), transform 0.3s var(--transition-smooth);
}

.form-popup.is-visible {
    max-height: 120px;
    padding: 1.25rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 1;
    transform: scale(1);
}

.form-popup--success {
    border-color: rgba(255, 255, 255, 0.2);
}

.form-popup--error {
    border-color: rgba(238, 0, 0, 0.35);
    color: #ee0000;
}

/* Responsive Contacto */
@media (max-width: 1024px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info {
        text-align: center;
    }

    .contact-details {
        align-items: center;
    }

    .contact-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 6rem 5%;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .cta-btn {
        align-self: center;
    }

    .about-logos-col {
        flex-direction: row;
        gap: 2rem;
        order: -1;
    }

    .about-logo-item {
        max-width: 140px;
    }

    .about-logos-inline {
        justify-content: center;
        gap: 1.5rem;
    }

    .about-logos-inline .about-logo-item {
        max-width: 120px;
    }

    .about-banner-asteroid--uno {
        width: 140px;
        height: 140px;
        top: calc(100vh - 100px);
    }

    .contact-banner-asteroid-wrapper {
        width: 140px;
        height: 140px;
        top: calc(100vh - 100px);
    }
}

/* ============================================================
   OPTIMIZACIONES DE RENDIMIENTO
   ============================================================ */

/* Reducir blur en móvil para mejorar FPS */
@media (max-width: 1024px) {
    .main-header {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .service-block {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    .portfolio-subfilters {
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .lightbox-content {
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

/* Desactivar efectos pesados en dispositivos de gama baja */
@media (prefers-reduced-motion: reduce) {
    .nebula,
    .portfolio-header-nebula {
        animation: none !important;
    }
}

/* Reproductor de audio */
.audio-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.audio-widget.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.audio-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s var(--transition-smooth), background 0.3s var(--transition-smooth), box-shadow 0.3s var(--transition-smooth);
    outline: none;
    position: relative;
    text-decoration: none;
    cursor: pointer;
}

.audio-toggle::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease;
}

.audio-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.audio-toggle:hover::after {
    border-color: rgba(255, 255, 255, 0.15);
}

.audio-toggle:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 4px;
}

.audio-toggle {
    animation: whatsappPulse 3s ease-in-out infinite;
}

@media (max-width: 480px) {
    .audio-widget {
        bottom: 90px;
        right: 20px;
    }

    .audio-toggle {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }
}

/* ===== PRELOADER ===== */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preloader-logo {
    width: clamp(140px, 22vw, 240px);
    height: auto;
    animation: preloaderPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.15));
}

.preloader-ring {
    position: absolute;
    width: clamp(170px, 26vw, 280px);
    height: clamp(170px, 26vw, 280px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(238, 0, 0, 0.6);
    border-radius: 50%;
    animation: preloaderSpin 3s linear infinite;
}

.preloader-ring--inner {
    width: clamp(140px, 22vw, 240px);
    height: clamp(140px, 22vw, 240px);
    border-top-color: rgba(255, 255, 255, 0.2);
    animation-direction: reverse;
    animation-duration: 4s;
}

.preloader-text {
    margin-top: clamp(14px, 3vw, 24px);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.55rem, 0.8vw, 0.7rem);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    animation: preloaderTextFade 2s ease-in-out infinite;
}

@keyframes preloaderPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.03); opacity: 1; }
}

@keyframes preloaderSpin {
    to { transform: rotate(360deg); }
}

@keyframes preloaderTextFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

body.preloader-active {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .preloader-logo,
    .preloader-ring,
    .preloader-ring--inner,
    .preloader-text {
        animation: none;
    }
    .preloader-logo { opacity: 1; }
    .preloader-text { opacity: 0.6; }
}
