            /* Reset y estilos base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0F4C81;
    --accent: #6B48FF;
    --accent-red: #FF3366;
    --accent-orange: #FF6B6B;
    --accent-teal: #4ECDC4;
    --dark: #000;
    --light: #fff;
    --gray: #999;
    --transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    font-family: "Roboto Mono", monospace, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1rem 5%;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 0.7rem 5%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    transition: var(--transition);
}

.logo:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--dark);
    transition: width 0.3s ease;
}

.logo:hover:after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.menu-toggle:hover,
.menu-toggle.active {
    transform: rotate(90deg);
}

.nav-menu {
    display: flex;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li {
    position: relative;
    transition: transform 0.3s ease;
}

nav ul li:hover {
    transform: translateY(-3px);
}

nav ul li a {
    font-size: 1.05rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--dark);
    transition: var(--transition);
    transform: translateX(-50%);
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--dark);
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(255, 255, 255);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero {
    padding: 8rem 5% 6rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 6.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    max-width: 700px;
    background-image: linear-gradient(
        90deg,
        var(--primary),
        var(--accent),
        var(--accent-red),
        var(--accent-orange),
        var(--accent-teal)
    );
    background-size: 400% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    transition: var(--transition);
    cursor: pointer;
}

.hero h1:hover {
    color: transparent;
    animation: gradient 5s linear infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero .buttons-container {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid var(--light);
    width: fit-content;
    white-space: nowrap;
    text-align: center;
}

.cta-button:hover {
    background: var(--light);
    border-color: var(--dark);
    color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* About Section */
.about {
    padding: 5rem 5%;
    text-align: center;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* Video Container */
.video-container {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Services Section */
.services {
    padding: 5rem 5%;
    background-color: var(--dark);
    color: var(--dark);
    position: relative;
    overflow: hidden;
}

.services h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--light);
}

/* Services Carousel - CORREGIDO */
.services-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    touch-action: pan-y pinch-zoom;
}

.services-carousel {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    gap: 30px;
    width: max-content;
    transform: translateX(0);
    will-change: transform;
}

.service-card.clone {
    pointer-events: auto;
}

.service-card {
    width: 300px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(184, 182, 182, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: rgb(0, 0, 0);
    flex-shrink: 0;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.service-video {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-info {
    padding: 20px;
    text-align: center;
}

.service-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--light);
    transition: color 0.3s ease;
}

.service-info p {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 15px;
    line-height: 1.5;
}

.service-button {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--light);
    color: var(--light);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid var(--light);
}

.service-button:hover {
    background-color: var(--dark);
    color: var(--light);
}

/* Carousel Navigation - CORREGIDO */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    color: rgb(0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.carousel-button:hover {
    background-color: var(--light);
}

.carousel-button.prev {
    left: 15px;
}

.carousel-button.next {
    right: 15px;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: var(--light);
    transform: scale(1.2);
}

/* Ver más button */
.center-button {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 40px;
}

.ver-mas {
    display: inline-block;
    text-align: center;
    padding: 1rem 2rem;
    color: var(--light);
    font-size: 1.2rem;
    border: 1px solid var(--light);
    border-radius: 2rem;
    transition: var(--transition);
    width: fit-content;
}

.ver-mas:hover {
    background: var(--light);
    color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.contact {
    padding: 5rem 5%;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.contact-info h3:first-child {
    margin-top: 0;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--gray);
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--dark);
}

.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-icons a {
    color: var(--gray);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--dark);
}

/* Contact Form */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--dark);
    color: var(--dark);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--light);
    background: var(--dark);
    color: var(--light);
}

.contact-form textarea {
    min-height: 100px;
    resize: vertical;
}

.submit-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--dark);
    color: var(--dark);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    border-radius: 2rem;
}

.submit-btn:hover {
    background: var(--dark);
    color: var(--light);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 5%;
    background-color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    color: var(--light);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    color: rgb(0, 0, 0);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    z-index: 999;
}

#back-to-top:hover {
    background: #3a3a3a;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#back-to-top.visible {
    display: flex !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation classes */
.reveal-section {
    opacity: 0;
    transform: translateY(100px);
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-section.active {
    opacity: 1;
    transform: translateY(0);
}

.services.reveal-section {
    transform: translateX(-100%);
}

.services.reveal-section.active {
    transform: translateX(0);
}

.service-item {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.service-item.active {
    opacity: 1;
    transform: scale(1);
}

.contact-form {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.contact-form.active,
.contact-info.active {
    opacity: 1;
    transform: translateX(0);
}

.contact-info {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

/* Utility Classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Media Queries - CORREGIDAS */
@media (max-width: 1200px) {
    .contact-container {
        gap: 2rem;
    }
    
    .service-card {
        width: 280px;
    }
    
    .hero h1 {
        font-size: clamp(2.5rem, 6vw, 5rem);
    }
}

@media (max-width: 992px) {
    .service-card {
        width: 260px;
    }
    
    .carousel-button {
        width: 45px;
        height: 45px;
    }
    
    .hero h1 {
        font-size: clamp(2.2rem, 6vw, 4rem);
    }
    
    .contact h2, 
    .services h2 {
        font-size: 2.2rem;
    }
    
    .hero {
        padding-top: 7rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    nav ul li {
        transform: translateX(50px);
        opacity: 0;
        transition: all 0.5s ease;
    }

    nav ul li.visible {
        transform: translateX(0);
        opacity: 1;
    }

    nav ul li:nth-child(1) { transition-delay: 0.1s; }
    nav ul li:nth-child(2) { transition-delay: 0.2s; }
    nav ul li:nth-child(3) { transition-delay: 0.3s; }
    nav ul li:nth-child(4) { transition-delay: 0.4s; }
    nav ul li:nth-child(5) { transition-delay: 0.5s; }

    nav ul li a {
        font-size: 1.5rem;
        display: block;
        padding: 0.5rem 2rem;
    }
    
    .service-card {
        width: 250px;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about p {
        font-size: 1.1rem;
    }
    
    .hero {
        padding-top: 6rem;
        padding-bottom: 4rem;
        min-height: 90vh;
    }

    .carousel-button {
        width: 40px;
        height: 40px;
    }
    
    .services-container {
        padding: 10px 0;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: clamp(2rem, 5vw, 3rem);
        margin-bottom: 1.5rem;
    }
    
    .service-card {
        width: calc(100% - 30px);
        max-width: 320px;
        margin: 0 auto;
    }
    
    .carousel-button.prev {
        left: 5px;
    }
    
    .carousel-button.next {
        right: 5px;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    #back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .cta-button, 
    .ver-mas, 
    .submit-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }
    
    .services h2, 
    .contact h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .contact-form input, 
    .contact-form textarea {
        padding: 0.7rem;
        margin-bottom: 1.2rem;
    }
    
    .contact-info h3 {
        font-size: 1.5rem;
    }
    
    .about p {
        font-size: 1rem;
    }
    
    .about, 
    .services, 
    .contact {
        padding: 4rem 5% 3rem;
    }

    .hero .buttons-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0.8rem;
    }

    .hero .cta-button {
        width: 100%;
        text-align: center;
        white-space: normal;
        display: block;
    }
    
    .services-carousel {
        gap: 15px;
    }

    .carousel-indicators {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem;
    }
    
    header {
        padding: 0.8rem 5%;
    }
    
    .menu-toggle {
        font-size: 1.8rem;
    }
    
    .service-video {
        height: 180px;
    }
    
    .service-info h3 {
        font-size: 1.3rem;
    }
    
    .service-info p {
        font-size: 0.85rem;
    }
    
    .carousel-indicators {
        margin-top: 15px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
    
    .social-icons a {
        font-size: 1.3rem;
    }
    
    .hero h1 {
        margin-bottom: 1rem;
    }

    .hero .cta-button {
        font-size: 0.85rem;
        padding: 0.7rem 1.3rem;
    }
    
    .hero {
        padding-top: 5rem;
        min-height: 80vh;
    }
    
    .contact-container {
        gap: 2rem;
    }
    
    .contact-info h3 {
        margin-top: 1.5rem;
    }
    
    .submit-btn {
        width: 100%;
    }
    
    .menu-overlay.active {
        z-index: 999;
    }
    
    /* Ajuste específico para carrusel en móviles pequeños */
    .center-button {
        margin-top: 25px;
    }
}

/* Correcciones para pantallas medianas */
@media (min-width: 577px) and (max-width: 768px) {
    .hero .buttons-container {
        flex-wrap: wrap;
    }
    
    .hero .cta-button {
        flex: 0 0 auto;
    }
}

/* Correcciones para el carrusel */
@media (max-width: 576px) {
    .services-carousel {
        justify-content: center;
    }
    
    .service-card {
        flex: 0 0 90%;
    }
}

/* Correcciones para pantallas extremadamente pequeñas */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .service-video {
        height: 160px;
    }
    
    .service-info h3 {
        font-size: 1.2rem;
    }
}
