@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --font-primary: 'Space Grotesk', sans-serif;
    --font-secondary: 'Urbanist', sans-serif;
}

/* stylesServicios.css - Estilos para la página de servicios */

/* Prevenir overflow horizontal */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
    font-family: var(--font-secondary);
}

/* Fondo oscuro pero que permita ver el canvas */
body {
    background: #1a1a1a;
}

/* Canvas 3D Container - EN FRENTE del contenido */
#webgi-canvas-container-services {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 50;
    pointer-events: none;
    background: transparent;
}

#webgi-canvas-services {
    width: 100%;
    height: 100%;
}

/* Ocultar layer-blur en servicios */
.layer-blur {
    display: none;
}

/* Contenido principal */
.page-content {
    position: relative;
    z-index: 10;
    background: transparent;
}

/* Asegurar que las secciones tengan z-index */
.services-hero,
.services-section,
.services-cta {
    position: relative;
    z-index: 20;
    overflow: hidden;
}

/* === FONDOS ALTERNADOS === */

/* Secciones IMPARES (1, 3, 5, 7) - Fondo GRIS OSCURO, texto BLANCO */
[data-section="1"],
[data-section="3"],
[data-section="5"],
[data-section="7"] {
    background: #1a1a1a;
}

/* Secciones PARES (2, 4, 6) - Fondo GRIS CLARO, texto GRIS OSCURO */
[data-section="2"],
[data-section="4"],
[data-section="6"] {
    background: #2c2c2c;
}

/* Estilos de texto para secciones claras (pares) */
[data-section="2"] .service-description,
[data-section="4"] .service-description,
[data-section="6"] .service-description {
    color: rgba(255, 255, 255, 0.7);
}


/* Header encima de todo */
header {
    z-index: 100 !important;
}

/* Main container */
.services-main {
    position: relative;
    width: 100%;
}

/* Hero Section */
.services-hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Video de fondo del Hero */
.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.services-hero-content {
    text-align: center;
    position: relative;
    z-index: 10;
}

.services-main-title {
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(4rem, 12vw, 12rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.02em;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.9);
    text-stroke: 2px rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.services-subtitle {
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

/* Services Sections */
.services-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
    background-color: #1a1a1a;
}

/* Secciones impares (1, 3, 5 y 7) sin textura */
.services-section:nth-of-type(odd) {
    background-color: #1a1a1a;
    background-image: none;
}

/* Fondo de textura GrafittiTexture.png para las secciones pares (2, 4, 6 y 8) con 50% de opacidad */
.services-section:nth-of-type(even) {
    position: relative;
    background-color: #262626;
}

.services-section:nth-of-type(even)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/GrafittiTexture.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 30;
}

/* Service Layout (two-column: text left + image right) */
.service-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    width: 100%;
}

/* Imagen a la izquierda (secciones 2 y 4) */
.service-layout.image-left {
    flex-direction: row-reverse;
}

/* Service Content */
.service-content {
    max-width: 600px;
    position: relative;
    z-index: 30;
    flex: 1;
}

/* Service Image */
.service-image-wrapper {
    flex: 0 0 auto;
    width: clamp(380px, 52vw, 750px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 30;
}

.service-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 40px rgba(206, 152, 4, 0.18));
    transition: transform 0.5s ease, filter 0.5s ease;
    border-radius: 4px;
}

.service-image:hover {
    transform: scale(1.04) rotate(-1deg);
    filter: drop-shadow(0 0 60px rgba(206, 152, 4, 0.35));
}

/* Service Slider Component (Sección Video con 5 fotos apiladas) */
.service-slider-wrapper {
    position: relative;
}

.service-slider {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 35px rgba(206, 152, 4, 0.18);
    background-color: #121212;
}

.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.slide-img.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    z-index: 2;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.slider-btn:hover {
    background: #ce9804;
    color: #121212;
    border-color: #ce9804;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 0 20px rgba(206, 152, 4, 0.5);
}

.prev-btn {
    left: 14px;
}

.next-btn {
    right: 14px;
}

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 22px;
    border-radius: 10px;
    background: #ce9804;
}

/* Alternar posición del contenido */
.services-section:nth-child(odd) .service-content {
    margin-left: auto;
    text-align: right;
}

.services-section:nth-child(even) .service-content {
    margin-right: auto;
    text-align: left;
}

/* Service Number */
.service-number {
    display: block;
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(6rem, 15vw, 15rem);
    font-weight: 900;
    color: transparent;
    -webkit-text-stroke: 2px #ce9804;
    text-stroke: 2px #ce9804;
    line-height: 0.8;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: -1;
}

.services-section:nth-child(odd) .service-number {
    left: -5%;
}

.services-section:nth-child(even) .service-number {
    right: -5%;
}

/* Service Title */
.service-title {
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* Service Description */
.service-description {
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    max-width: 450px;
}

.services-section:nth-child(odd) .service-description {
    margin-left: auto;
}

.services-section:nth-child(even) .service-description {
    margin-right: auto;
}

/* CTA Section */
.services-cta {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Video de fondo del CTA */
.cta-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.cta-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 10;
}

.cta-title {
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 900;
    line-height: 0.9;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.cta-subtitle {
    font-family: 'League Spartan', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

.btn-contacto-large {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    padding: 1.5rem 4rem;
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-contacto-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #ffffff;
    transition: left 0.4s ease;
    z-index: -1;
}

.btn-contacto-large:hover {
    color: #000000;
    transform: scale(1.05);
}

.btn-contacto-large:hover::before {
    left: 0;
}

/* Scroll indicator animation */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .service-image-wrapper {
        width: clamp(280px, 85vw, 600px);
    }

    .service-slider {
        height: 380px;
    }

    .service-content {
        max-width: 100%;
    }

    .services-section:nth-child(odd) .service-content,
    .services-section:nth-child(even) .service-content {
        margin: 0 auto;
        text-align: center;
    }

    .services-section:nth-child(odd) .service-description,
    .services-section:nth-child(even) .service-description {
        margin: 0 auto;
    }

    .service-number {
        position: relative;
        top: auto;
        transform: none;
        margin-bottom: -3rem;
    }

    .services-section:nth-child(odd) .service-number,
    .services-section:nth-child(even) .service-number {
        left: auto;
        right: auto;
    }

    /* Ocultar canvas 3D en tablet para mejor rendimiento */
    #webgi-canvas-container-services {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .services-hero {
        padding: 2rem;
        height: auto;
        min-height: 70vh;
    }

    .services-main-title {
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.9);
        text-stroke: 1px rgba(255, 255, 255, 0.9);
        margin-bottom: 1.5rem;
    }

    .services-subtitle {
        letter-spacing: 0.15em;
    }

    .container {
        padding: 0 1.5rem;
    }

    .service-number {
        font-size: 6rem;
        margin-bottom: -2rem;
    }

    .service-title {
        font-size: clamp(2rem, 7vw, 3.5rem);
    }

    .service-description {
        font-size: 1rem;
        max-width: 100%;
        padding: 0 1rem;
    }

    .services-section {
        min-height: auto;
        padding: 3rem 0;
    }

    .services-cta {
        min-height: 70vh;
        padding: 3rem 0;
    }

    .btn-contacto-large {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }

    /* Video hero responsive */
    .hero-video-container {
        height: 100%;
    }
}

@media (max-width: 480px) {
    .services-hero {
        padding: 1rem;
        min-height: 60vh;
    }

    .services-main-title {
        font-size: clamp(2.5rem, 14vw, 8rem);
        -webkit-text-stroke: 1px rgba(255, 255, 255, 0.9);
        text-stroke: 1px rgba(255, 255, 255, 0.9);
    }

    .services-subtitle {
        letter-spacing: 0.1em;
        font-size: 0.75rem;
    }

    .services-section {
        min-height: auto;
        padding: 2.5rem 0;
    }

    .service-number {
        font-size: 4rem;
        -webkit-text-stroke: 1.5px #ce9804;
        text-stroke: 1.5px #ce9804;
        margin-bottom: -1.5rem;
    }

    .service-title {
        font-size: clamp(1.6rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .service-description {
        font-size: 0.9rem;
        line-height: 1.6;
        padding: 0 0.5rem;
    }

    .services-cta {
        min-height: 60vh;
        padding: 2rem 0;
    }

    .cta-title {
        font-size: clamp(1.8rem, 10vw, 4rem);
    }

    .cta-subtitle {
        letter-spacing: 0.1em;
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .btn-contacto-large {
        padding: 0.9rem 1.8rem;
        font-size: 0.8rem;
        letter-spacing: 0.1em;
    }

    .container {
        padding: 0 1rem;
    }
}

/* Tablet landscape (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .services-hero {
        height: 80vh;
    }

    .services-main-title {
        font-size: clamp(3.5rem, 10vw, 9rem);
    }

    .services-section {
        padding: 5rem 0;
    }

    .service-number {
        font-size: 10rem;
    }

    .service-title {
        font-size: clamp(2.2rem, 5vw, 4rem);
    }

    .service-description {
        font-size: 1.1rem;
        max-width: 80%;
    }
}

/* ------------------------------------------- */
/* EXTRA SMALL MOBILE (360px and below) */
/* ------------------------------------------- */
@media (max-width: 360px) {
    .services-hero {
        min-height: 55vh;
        padding: 0.8rem;
    }

    .services-main-title {
        font-size: clamp(2rem, 16vw, 3rem);
    }

    .services-subtitle {
        font-size: 0.65rem;
        letter-spacing: 0.08em;
    }

    .services-section {
        padding: 2rem 0;
    }

    .service-number {
        font-size: 3rem;
        margin-bottom: -1rem;
    }

    .service-title {
        font-size: clamp(1.4rem, 9vw, 2rem);
        margin-bottom: 0.8rem;
    }

    .service-description {
        font-size: 0.85rem;
        line-height: 1.5;
        padding: 0 0.3rem;
    }

    .container {
        padding: 0 0.8rem;
    }

    .services-cta {
        min-height: 55vh;
        padding: 1.5rem 0;
    }

    .cta-title {
        font-size: clamp(1.5rem, 12vw, 3rem);
    }

    .cta-subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.08em;
        margin-bottom: 1.2rem;
    }

    .btn-contacto-large {
        padding: 0.8rem 1.5rem;
        font-size: 0.75rem;
        letter-spacing: 0.08em;
    }
}

/* ------------------------------------------- */
/* TOUCH DEVICE OPTIMIZATIONS */
/* ------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
    .btn-contacto-large {
        min-height: 48px;
    }

    .btn-contacto-large:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.1);
    }

    /* Disable hover effects */
    .btn-contacto-large:hover {
        transform: none;
    }

    .btn-contacto-large:hover::before {
        left: -100%;
    }
}