/* services.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

body.services-page {
    background-color: #e5e5e5;
    color: #1a1a1a;
    overflow: hidden !important;
    height: 100vh !important;
    margin: 0;
    padding: 0;
}

body.services-page .navbar {
    background: rgba(0, 0, 0, 0.9);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.services-wrapper {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    display: block;
    width: 100%;
}

.services-intro {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    scroll-snap-align: start;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    background: #000;
}

.services-intro.services-webgl-fallback {
    background-image: url('Assets/Servicios.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#services-intro-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

#services-intro-canvas canvas {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.services-intro-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.3) 45%, rgba(0, 0, 0, 0.52) 100%);
}

.services-intro-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.services-intro-fallback {
    display: none;
}

.services-intro.services-webgl-fallback .services-intro-fallback {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.services-intro.services-webgl-fallback #services-intro-canvas {
    display: none;
}

.services-top-logo {
    max-width: 250px;
    /* Invert colors to make a mostly white logo into red */
    filter: invert(29%) sepia(85%) saturate(2250%) hue-rotate(345deg) brightness(85%) contrast(98%);
}

.services-orientation-permission-btn {
    margin-top: 0.85rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    z-index: 4;
}

.services-orientation-permission-btn:hover {
    background: rgba(0, 0, 0, 0.5);
}

.service-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.service-item {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    overflow: hidden;
    scroll-snap-align: start;
    box-sizing: border-box;
}

/* The red stylized brush stroke behind */
.red-stroke {
    display: none;
}

.service-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.52) 45%, rgba(0, 0, 0, 0.68) 100%);
    z-index: 1;
}

.service-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 120px min(8vw, 120px) 60px;
    box-sizing: border-box;
}


/* Alterna el bloque de texto por sección en desktop */
.service-list>.service-item:nth-child(odd) .service-content {
    justify-content: flex-end;
}

.service-list>.service-item:nth-child(even) .service-content {
    justify-content: flex-start;
}

.service-image {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
}

.service-image img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    mix-blend-mode: normal;
    filter: none;
    transition: transform 0.8s ease;
}

.service-item:hover .service-image img {
    transform: scale(1.04);
}

.service-text {
    position: relative;
    z-index: 2;
    width: min(740px, 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: clamp(20px, 3vw, 34px);
    background: rgba(12, 12, 12, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

.service-text h2 {
    font-family: 'Playfair Display', serif;
    color: #ffffff;
    font-size: clamp(2.45rem, 3.4vw, 3.3rem);
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.1;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.service-text h3 {
    font-family: 'Playfair Display', serif;
    color: #ffdede;
    font-size: clamp(1.2rem, 1.7vw, 1.62rem);
    font-style: italic;
    font-weight: 600;
    margin: 0 0 20px;
    line-height: 1.35;
    letter-spacing: 0.01em;
    opacity: 1;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.48);
}

.service-text p {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.06rem, 1.06vw, 1.22rem);
    line-height: 1.78;
    color: #f6f6f6;
    font-weight: 400;
    margin: 0;
    max-width: 62ch;
    text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.service-examples {
    list-style: none;
    padding: 0;
    margin: 14px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.service-examples li {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1rem, 1vw, 1.14rem);
    line-height: 1.55;
    color: #f6f6f6;
    font-weight: 400;
    padding-left: 20px;
    position: relative;
    text-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.service-examples li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c73737;
}

@media (max-width: 900px) {

    .service-content,
    .service-list>.service-item:nth-child(odd) .service-content,
    .service-list>.service-item:nth-child(even) .service-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 110px 24px 40px;
    }

    .service-text {
        text-align: center;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding: 20px;
        background: rgba(12, 12, 12, 0.36);
        backdrop-filter: none;
    }

    .service-text h2 {
        font-size: clamp(2rem, 7vw, 2.45rem);
    }

    .service-text h3 {
        font-size: clamp(1.06rem, 4vw, 1.3rem);
        margin-bottom: 16px;
    }

    .service-text p {
        font-size: clamp(0.98rem, 3.4vw, 1.08rem);
        line-height: 1.65;
        max-width: none;
    }

    .service-examples {
        gap: 5px;
        text-align: left;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    .service-examples li {
        font-size: clamp(0.92rem, 3.2vw, 1.02rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .services-intro {
        background-attachment: scroll;
    }
}

/* Animación para el indicador de scroll */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-15px);
    }
    60% {
        transform: translateX(-50%) translateY(-7px);
    }
}
