/* Variables */
:root {
    --primary: #ffffff;
    /* Blanco puro para acciones y realces */
    --secondary: #252525;
    /* Gris oscuro SpaceX */
    --accent: #8b8b8b;
    /* Gris medio para textos secundarios */
    --dark: #000000;
    /* Negro absoluto de SpaceX */
    --darker: #000000;
    /* Negro absoluto para profundidad */
    --text: #ffffff;
    /* Texto blanco */
    --text-muted: #8b8b8b;
    /* Texto gris suave */
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Header */
header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: none;
    padding: 25px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

header.scrolled {
    padding: 15px 0;
    box-shadow: 0 5px 30px rgba(0, 255, 255, 0.2);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo {
    font-size: 28px;
    font-weight: 300;
    color: var(--text);
    letter-spacing: 8px;
    text-transform: uppercase;
    cursor: pointer;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 300;
    transition: all 0.3s;
    position: relative;
    padding: 5px 0;
}

nav a:hover {
    color: var(--primary);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--primary);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

/* Hamburguesa Menú */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Asegura que el centro de la acción se vea siempre */
    z-index: 0;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 40px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 72px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 3s ease-in-out infinite;
    font-weight: 900;
    letter-spacing: 5px;
}

@keyframes glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
    }
}

.hero p {
    font-size: 24px;
    margin-bottom: 400px;
    color: var(--text-muted);
}

.hero-service-text {
    display: none;
    /* Oculto en escritorio */
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    border: 2px solid var(--text);
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: var(--text);
    color: #000;
}

/* Partículas */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 20s infinite;
    box-shadow: 0 0 10px var(--primary);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) translateX(0);
    }

    25% {
        transform: translateY(-100px) translateX(50px);
    }

    50% {
        transform: translateY(-200px) translateX(-50px);
    }

    75% {
        transform: translateY(-100px) translateX(100px);
    }
}

/* Secciones */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-weight: 300;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text);
}

.section-subtitle {
    text-align: center;
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 60px;
}

/* Sobre Nosotros */
.about {
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.about-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    transition: all 0.3s;
    text-align: center;
}

.about-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary);
}

/* Servicios - Carrusel */
.services {
    background: var(--darker);
    padding: 100px 0 100px 0;
    /* Aumentado el padding superior e inferior para mayor visibilidad */
}

.carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-container {
    overflow: hidden;
    border-radius: 20px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.service-card {
    min-width: 100%;
    background: transparent;
    padding: 20px 20px 60px 20px;
    border-radius: 0;
    border: none;
    text-align: center;
}

.service-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.service-image {
    width: 100%;
    max-width: 900px;
    height: 320px;
    /* Aumentado para mostrar más de la imagen */
    object-fit: cover;
    object-position: top center;
    /* Ajusta el encuadre para ver más de la parte superior/manos */
    border-radius: 0;
    margin-bottom: 20px;
    transition: all 0.5s ease;
}


.service-card:hover .service-image {
    transform: scale(1.05);
    border-color: var(--primary);
}

.service-card h3 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary);
}

.service-card p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 0px;
    /* Reducido de 30px */
    line-height: 1.4;
    /* Reducido de 1.8 */
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    list-style: none;
}

.tech-list li {
    background: rgba(0, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    border: 1px solid var(--primary);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    /* Fondo más oscuro para mejor contraste */
    color: var(--primary);
    border: 2px solid var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
    z-index: 100;
    /* Asegura que esté por encima de todo */
}

.carousel-btn:hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: -70px;
}

.carousel-btn.next {
    right: -70px;
}

/* Contacto */
.contact {
    background: linear-gradient(180deg, var(--darker) 0%, var(--dark) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.submit-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.5);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.info-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
}

.info-item:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(0, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.1);
}

.info-icon {
    font-size: 24px;
    width: 60px;
    height: 60px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.info-item:hover .info-icon {
    background: var(--primary);
    transform: rotate(10deg);
}

.info-text h3 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-text p {
    color: var(--text);
    font-size: 16px;
    opacity: 0.8;
}

/* Footer */
footer {
    background: var(--darker);
    padding: 40px 0;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 30px;
}

.social-links a {
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
        /* Base para el resto de la página */
    }

    .services .container {
        padding: 0;
        /* Carrusel a ancho completo */
    }

    header {
        padding: 15px 0;
    }

    nav {
        padding: 0 20px;
        position: relative;
    }

    .hero {
        height: auto;
        display: flex;
        flex-direction: column;
        background: #000;
    }

    .video-container {
        position: relative;
        /* Clave: para que los videos no se apilen verticalmente */
        height: 45vh;
        /* Se reduce un poco más para que el video horizontal muestre más de los laterales (manos) */
        width: 100%;
        overflow: hidden;
    }

    /* Estos deben seguir siendo absolute dentro del container de 60vh */
    .hero-video,
    .hero-overlay,
    .particles {
        position: absolute;
        height: 100%;
        width: 100%;
        top: 0;
        left: 0;
    }

    .hero-content {
        position: relative;
        padding: 20px;
        width: 100%;
        background: #000;
        text-align: left;
    }

    .cta-group {
        display: flex;
        flex-direction: row;
        /* Uno al lado del otro */
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    .hero-service-text {
        display: block;
        /* Se muestra solo en móvil */
        color: var(--text);
        font-size: 11px;
        /* Reducido para que quepa mejor */
        font-weight: 500;
        text-transform: uppercase;
        line-height: 1.3;
        flex: 1;
        margin: 0;
    }

    .cta-button {
        width: auto;
        white-space: nowrap;
        padding: 10px 15px;
        /* Ajustado el padding */
        font-size: 11px;
        /* Reducido para que la letra no se salga del marco */
        margin-bottom: 0;
        margin-right: 0;
    }

    .logo {
        z-index: 1001;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    /* Animación hamburguesa */
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #000;
        /* Negro sólido como SpaceX */
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        /* Alineado a la izquierda */
        justify-content: flex-start;
        padding-top: 100px;
        /* Espacio para que no empiecen pegados arriba */
        padding-left: 40px;
        /* Margen izquierdo */
        gap: 25px;
        transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 1000;
        margin: 0;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        /* Sutil línea divisoria */
        padding-bottom: 15px;
    }

    .nav-links li a {
        text-transform: uppercase;
        /* Todo en mayúsculas */
        font-size: 18px;
        font-weight: 600;
        letter-spacing: 2px;
    }

    .nav-links.nav-active {
        right: 0;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 18px;
        margin-bottom: 5px;
        /* Reducido para acercar el botón aún más */
    }

    section {
        padding: 50px 0;
        /* Reducida la separación entre secciones */
    }

    .section-title {
        font-size: 26px;
        letter-spacing: 3px;
        padding: 0 20px;
        /* Recuperamos el margen para el título */
    }

    .section-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
        padding: 0 20px;
    }

    .carousel-container {
        border-radius: 0;
        /* Bordes rectos para ancho completo */
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 24px;
        background: rgba(0, 0, 0, 0.8);
        /* Casi sólido en móvil para visibilidad total */
    }

    .carousel-btn.prev {
        left: 5px;
    }

    .carousel-btn.next {
        right: 5px;
    }

    footer .container {
        flex-direction: column;
        gap: 20px;
    }

    .service-card {
        padding: 10px 0 40px 0;
        /* Eliminado el padding lateral para que la imagen sea más ancha */
    }

    .service-image {
        height: 250px;
        width: 100%;
        max-width: none;
        /* Quitamos el límite para que use todo el ancho disponible */
        /* Aumentado en móvil para ver mejor los detalles */
    }

    .service-card h3 {
        font-size: 24px;
        padding: 0 10px;
        /* Recuperamos el padding para el texto */
    }

    .service-card p {
        font-size: 16px;
        padding: 0 15px;
        /* Recuperamos el padding para el texto */
    }
}

/* WhatsApp Button Styles */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: #128c7e;
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.8);
}

.whatsapp-btn svg {
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.2));
}

/* Adaptación para móviles */
@media (max-width: 768px) {
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
}