#home p, #home li {
    font-size: clamp(1.125rem, 1.0047rem + 0.4648vw, 1.5625rem);
    padding: 10px 0;
}

#home h2,
#home h3 {
    margin: 0;
}

/* CABECERA */

#cabecera {
    padding-top: 150px;
    padding-bottom: clamp(30px, 3vw + 20px, 50px);
    background-color: var(--gris-esparta);
    position: relative;
    z-index: 5;
    overflow: hidden;
}

#cabecera .container-fluid {
    position: relative;
    overflow: visible;
}

#cabecera h1 {
    margin: 0;
    text-transform: uppercase;
    line-height: 1;
}

#cabecera p {
    font-weight: 300;
    font-size: clamp(1.875rem, 1.7032rem + 0.664vw, 2.5rem);
}

#cabecera .row {
    position: relative;
}

.cabecera-title-wrapper {
    position: relative;
    z-index: 5;
    margin-bottom: 0;
    padding-bottom: clamp(30px, 2.5vw + 20px, 47px);
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 1.5vw + 15px, 32px);
}

#cabecera .col-12.pt-4 {
    padding-top: 0 !important;
}

.cabecera-video-wrapper {
    position: relative;
    width: clamp(300px, 60%, 1100px);
    z-index: 10;
    display: block;
}

@media (max-width: 1600px) {
    #cabecera {
        padding-top: 110px !important; /* Ajustado para librar el header fijo */
        padding-bottom: 0px !important;
    }
    
    .cabecera-video-wrapper {
        width: 80% !important; /* Restauramos tamaño para no 'quitar el efecto' */
    }

    /* Reducir altura del contenido de texto para compactar el bloque pinned */
    .cabecera-title-wrapper {
        padding-bottom: 15px !important; 
        gap: 15px !important;
        margin-bottom: 0 !important;
    }

    #cabecera h1 {
        font-size: 100px !important;
    }

    #cabecera p {
        font-size: 2rem !important;
    }
}

@media (max-width: 1024px) {
    #banner-carrusel {
        margin-top: 50px;
    }
}

@media (max-width: 764px) {
    #cabecera {
        padding-top: 110px !important; /* Ajustado para librar el header fijo */
        padding-bottom: 0px !important;
    }
    
    .cabecera-video-wrapper {
        width: 80% !important; /* Restauramos tamaño para no 'quitar el efecto' */
    }

    /* Reducir altura del contenido de texto para compactar el bloque pinned */
    .cabecera-title-wrapper {
        padding-bottom: 15px !important; 
        gap: 15px !important;
        margin-bottom: 0 !important;
    }

    #cabecera h1 {
        font-size: clamp(2.5rem, 5vw, 4rem) !important;
    }

    #cabecera p {
        font-size: 1.1rem !important;
    }

    #seccion2, #seccion3, #esparta-digital, #gif-banner, .expertos-sticky-content, #casos-exito-destacados {
        padding: 3rem 0 !important;
    }

    .estrategia-item {
        padding-bottom: 3rem !important;
    }
}

@media (max-width: 1024px) {
    .cabecera-video-wrapper {
        width: 100% !important;
        max-width: none !important;
    }
    
    .video-container {
        border-radius: 12px !important;
        transform: none !important;
        box-shadow: none !important;
        /* Reducir altura en móviles si se siente muy "grande" */
        aspect-ratio: 16/9; 
    }

    #cabecera {
        padding-top: 100px; /* Reducido de 150px */
        padding-bottom: 30px;
    }
}

@media (max-width: 768px) {
    #cabecera {
        padding-top: 80px; 
    }
}

.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 16px;
}

/* Solo el video de cabecera es clickable */
.video-container.video-clickable {
    cursor: pointer;
}

.video-container.video-clickable::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 35px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.video-container.video-clickable:hover::after {
    opacity: 1;
}

.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    transition: opacity 0.5s ease-out;
}

.video-poster.hidden {
    opacity: 0;
    pointer-events: none;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.hero-video.loaded {
    opacity: 1;
}

.video-sound-toggle {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-sound-toggle:hover {
    background-color: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.video-sound-toggle svg {
    stroke: #ffffff;
    transition: opacity 0.2s ease;
}

.video-sound-toggle:active {
    transform: scale(0.95);
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    z-index: 50;
    color: #fff;
    padding: 0;
    pointer-events: auto;
    opacity: 0;
}

.video-container:hover .video-play-btn {
    opacity: 1;
}

.video-play-btn:hover {
    background-color: var(--naranja-esparta);
    border-color: var(--naranja-esparta);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-btn svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    margin-left: 4px; /* Slight offset for visual centering */
}

/* SECCION 2 */

#seccion2 {
    padding: clamp(50px, calc(31.818px + 5.682vh), 100px) 0;
    background-color: #ffffff;
}

#seccion2 h2 {
    margin: 0;
    text-transform: uppercase;
}

#seccion2 .container-fluid .row .col-12 {
    padding: 0;
}

#seccion2 .btn-negro {
    margin-top: 14px;
}

/* EXPERTOS EN */

#expertos-en {
    overflow: hidden;
    position: relative; 
}

#expertos-en .container-fluid {
    margin: 0;
}



.expertos-section {
    background-color: var(--negro-esparta);
    color: var(--blanco-esparta);
    overflow: hidden;
}

.expertos-sticky-content {
    padding: clamp(50px, calc(31.818px + 5.682vh), 100px) 0;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
}

.expertos-title {
    margin: 0;
}

.expertos-arc-wrapper {
    position: relative;
    height: 35vh;
    width: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.expertos-items-container {
    position: absolute;
    left: -400px;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 750px;
    z-index: 10;
    cursor: grab;
    overflow: visible;
}

.expertos-items-container:active {
    cursor: grabbing;
}

.experto-item {
    position: absolute;
    top: 0;
    left: 0; 
    transition: opacity 0.3s ease, color 0.3s ease;
    opacity: 0.3;
    white-space: nowrap;
    
    pointer-events: all;
    display: flex;
    align-items: center;
    
    /* Tipografía Base (Inactiva) */
    color: #fff; 
    text-transform: uppercase;
}

/* Estado Activo */
.experto-item.active {
    opacity: 1;
    font-weight: 700; 
    /* filter: drop-shadow(0 0 8px rgba(255,255,255,0.2)); */
}

.experto-item a {
    font-family: "Neue Haas Display", sans-serif;
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 10px;
    width: auto;
    font-weight: lighter;
    font-size: clamp(1.875rem, 1.5314rem + 1.328vw, 3.125rem);
}

.experto-item .item-text {
    position: relative;
    display: inline-block;
}

.experto-item.active a {
    font-weight: 500;
    color: var(--naranja-esparta);
}

/* Ocultar números */
.experto-item .item-num {
    display: none;
}

/* Active State Design */
.experto-item.active {
    opacity: 1;
    color: #fff;
    z-index: 10;
}

.experto-item.active .item-num {
    opacity: 1;
}

/* The Dot Indicator */
.experto-item.active .item-text::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--naranja-esparta);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

@media (max-width: 768px) {
    .expertos-items-container {
        left: -180px;
    }

    #seccion2 .btn-negro {
        width: auto;
    }

    .video-play-btn {
        width: 50px;
        height: 50px;
    }
}

.desplegables-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.desplegable-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
}

.desplegable-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--blanco-esparta);
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--negro-esparta);
}

.desplegable-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.desplegable-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.desplegable-title {
    flex: 1;
    text-align: left;
    text-transform: uppercase;
    font-weight: 600;
}

.desplegable-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.chevron-icon {
    display: inline-block;
    transition: transform 0.3s ease;
    color: #333;
}

.desplegable-header.active .chevron-icon {
    transform: rotate(180deg);
}

.desplegable-toggle i {
    display: inline-block;
    transition: transform 0.3s ease;
}

.desplegable-header.active .desplegable-toggle i {
    transform: rotate(180deg);
}

.desplegable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: var(--blanco-esparta);
}

.desplegable-content.active {
    max-height: 1000px;
}

.desplegable-body {
    padding: 0 20px 20px 20px;
    color: var(--negro-esparta);
    line-height: 1.6;
}

.desplegable-body p {
    margin: 0;
}

.desplegable-body p + p {
    margin-top: 1rem;
}

.cita-parrafo {
    border-left: 2px solid var(--naranja-esparta);
    padding-left: 1rem;
}

/* CAROUSEL CLIENTES */

#carrousel-clientes {
    padding: 4rem 0;
    background-color: var(--gris-esparta);
    overflow: hidden;
}

#carrousel-clientes .col-12 {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#carrousel-clientes h2 {
    text-align: center;
    text-transform: uppercase;
    margin: 0 auto 3rem;
    max-width: 90%;
    padding: 0 1rem;
}

.clientes-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.clientes-carousel {
    display: flex;
    width: fit-content;
    animation: scroll-clientes 40s linear infinite;
    will-change: transform;
}



.clientes-carousel-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.clientes-carousel-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    width: 100%;
    padding: 0 1rem;
}

.clientes-carousel-logo img {
    max-height: 80px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(1);
    transition: filter 0.4s ease, transform 0.4s ease;
}

@keyframes scroll-clientes {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* BANNER CARROUSEL */

#banner-carrusel {
    padding: clamp(20px, calc(12.727px + 2.273vh), 40px) 0;
    background-color: var(--naranja-esparta);
    overflow: hidden;
    position: relative;
    z-index: 1; /* Bajo para que la cabecera pin quede por encima */
}

.ticker-wrapper {
    display: flex;
    overflow: hidden;
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: ticker 60s linear infinite;
    will-change: transform;
}

#banner-carrusel p {
    font-size: clamp(3.75rem, 2.3755rem + 5.3121vw, 8.75rem);
    margin: 0;
    line-height: normal;
    display: inline-block;
    padding-right: 2rem;
    font-weight: 100;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* SECCION 3 */

#seccion3 {
    padding: clamp(50px, calc(31.818px + 5.682vh), 100px) 0;
    background-color: var(--negro-esparta);
}

#seccion3 h2 {
    color: var(--blanco-esparta);
    margin-bottom: 2rem;
    text-align: center;
    text-transform: uppercase;
}

.resenas-carousel-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 6rem;
}

.resenas-carousel-container {
    flex: 1;
    overflow: hidden;
}

.resenas-carousel {
    display: flex;
    transition: transform 0.5s ease;
}

.resenas-carousel-item {
    flex: 0 0 100%;
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resenas-item-content {
    display: flex;
    gap: 5rem;
    align-items: center;
    max-width: 100%;
    width: 100%;
}

.resenas-logo {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 300px;
    border-radius: 12px;
    padding: 2rem;
}

.resenas-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.resenas-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    color: var(--blanco-esparta);
    position: relative;
}

.resenas-content::before {
    content: '';
    width: 75px;
    height: 75px;
    background-image: url(../img/comillas.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
}

.resenas-content p {
    text-wrap: balance;
    z-index: 2;
    margin: 0;
}

.resenas-cliente-info {
    padding-top: 20px;
}

.resenas-cliente-info p {
    font-size: clamp(0.9375rem, 0.8516rem + 0.332vw, 1.25rem) !important;
    padding: 0 !important;
}

.resenas-nombre {
    font-weight: 600;
    margin: 0;
    color: var(--blanco-esparta);
}

.resenas-empresa {
    margin: 0;
    color: rgba(244, 244, 244, 0.7);
}

.resenas-control-btn {
    background-color: transparent;
    border: 2px solid var(--blanco-esparta);
    color: var(--blanco-esparta);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.resenas-control-btn:hover {
    background-color: var(--naranja-esparta);
    border-color: var(--naranja-esparta);
}

#esparta-digital {
    padding: clamp(50px, calc(31.818px + 5.682vh), 100px) 0;
}

#esparta-digital h2 {
    text-transform: uppercase;
    text-wrap: balance;
    margin: 0 0 1rem;
}

#esparta-digital p {
    margin: 0;
}

/* Video estático de esparta digital */
#esparta-digital .video-container {
    border-radius: 12px;
    aspect-ratio: 4/3;
    max-height: 500px;
}

#esparta-digital .video-poster,
#esparta-digital .hero-video {
    border-radius: 12px;
}

/* Estrategias List */
.estrategias-list {
    display: flex;
    flex-direction: column;
}

.estrategia-item {
    display: flex;
    gap: 0;
    position: relative;
}

.cabecera-esparta {
    padding: 0 0 clamp(75px, calc(51px + 7.5vh), 141px);
}

.estrategias-list {
    position: relative;
}

.estrategia-item {
    position: relative;
    padding: 0 0 clamp(75px, calc(51px + 7.5vh), 141px);
}

.estrategia-item:last-child {
    padding-bottom: 0;
}

/* Vertical line connecting the circles */
.estrategia-item::after {
    content: '';
    position: absolute;
    left: 28px; /* Half of circle diameter (40px) */
    top: 40px;
    bottom: 0;
    width: 1px;
    background-color: var(--negro-esparta);
    opacity: 0.15;
    height: 100%;
}

.estrategia-item:last-child::after {
    display: none;
}

.estrategia-text {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}



.estrategia-number {
flex-shrink: 0;
    width: 55px;
    height: 55px;
    border: 1px solid var(--negro-esparta);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--blanco-esparta);
    z-index: 1;
    color: var(--negro-esparta);
    font-size: clamp(1.25rem, 1.0782rem + 0.664vw, 1.875rem);
    font-weight: 300;
}

.estrategia-text h3 {
    font-weight: 500;
    text-transform: uppercase;
    margin: 0;
    color: var(--negro-esparta);
    line-height: 1.1;
}

#gif-banner {
    padding: clamp(100px, calc(81.818px + 5.682vw), 150px) 0;
    position: relative;
    overflow: hidden;
}

#gif-banner .video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 0 !important;
}

#gif-banner video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#gif-banner .container-fluid {
    position: relative;
    z-index: 3;
}

#gif-banner h2 {
    text-align: center;
    text-transform: uppercase;
    text-wrap: wrap;
    font-weight: lighter;
    font-size: clamp(2rem, 5vw, 5rem);
    margin: 0;
    color: var(--negro-esparta);
    font-weight: 400;
}

@media (max-width: 991px) { 
    .resenas-item-content {
        flex-direction: column;
    }

    .cabecera-esparta {
        padding: 0;
        padding-bottom: 25px;
    }

    #esparta-digital .video-container {
        margin-bottom: 50px;
    }

    .expertos-items-container {
        left: -150px;
    }
}

@media (max-width: 768px) {
    .cabecera-esparta {
        padding-bottom: 50px;
    }

    #cabecera {
        padding-bottom: 30px;
        height: auto;
        padding: clamp(50px, calc(31.818px + 5.682vh), 100px) 0;
        padding-top: 170px;
    }

    #banner-carrusel {
        margin-top: 50px;
        padding: 10px 0;
    }

    #banner-carrusel p {
        font-size: 3rem;
    }

    #cabecera .row {
        gap: 0 !important;
    }

    #seccion3 h2 {
        margin-bottom: 0;
    }

    .resenas-carousel {
        align-items: flex-start;
    }

    .resenas-carousel-wrapper {
        margin: 0;
    }

    .resenas-control-btn {
        width: 30px;
        height: 30px;
        margin: 0 10px;
    }

    .cabecera-title-wrapper {
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    #cabecera .col-lg-3 {
        justify-content: flex-start !important;
    }

    #cabecera .btn-ver-todas {
        margin-top: 0 !important;
        width: 100%;
        max-width: 300px;
        margin: 0 !important;
    }

    .video-container {
        border-radius: 8px;
        min-height: 200px;
        aspect-ratio: 16/9;
    }

    .video-sound-toggle {
        width: 40px;
        height: 40px;
        bottom: 12px;
        right: 12px;
    }

    .video-sound-toggle svg {
        width: 20px;
        height: 20px;
    }

    .resenas-item-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .resenas-logo {
        padding: 0;
    }

    .resenas-logo img {
        height: 250px;
        width: 95%;
    }
    
    .resenas-content {
        flex: 1;
    }

    #carrousel-clientes h2 {
        margin-bottom: 2rem;
        max-width: 95%;
    }

    .clientes-carousel {
        gap: 2rem;
        animation-duration: 30s;
    }

    .clientes-carousel-item {
        min-width: 150px;
    }

    .clientes-carousel-logo {
        height: 60px;
    }

    .clientes-carousel-logo img {
        max-height: 60px;
        max-width: 140px;
    }

    #esparta-digital .video-container {
        max-height: 250px;
    }

    .caso-exito-expanded-content {
        height: 300px;
    }

    .estrategia-content {
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .estrategia-image {
        width: 100%;
        height: 200px;
    }

    .timeline-line {
        display: none;
    }

    .resenas-carousel-item {
        padding: 0.1rem;
        flex: 0 0 99%;
        width: 90%;
        min-width: 90%;
    }
    
    /* Botones más pequeños en móvil */
    .resenas-control-btn {
        width: 32px;
        height: 32px;
    }
    
    .resenas-control-btn svg {
        width: 18px;
        height: 18px;
    }

    .resenas-content::before {
        top: -20px;
        left: 5px;
        width: 50px;
        height: 50px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #cabecera {
        height: auto;
    }

    .cabecera-title-wrapper {
        padding-bottom: 1.5rem;
    }

    .video-container {
        border-radius: 10px;
        aspect-ratio: 16/9;
    }

    .video-sound-toggle {
        width: 44px;
        height: 44px;
        bottom: 16px;
        right: 16px;
    }

    #carrousel-clientes h2 {
        max-width: 80%;
    }

    .clientes-carousel {
        animation-duration: 35s;
    }

    .estrategia-content {
        gap: 1.5rem;
    }

    .estrategia-image {
        width: 250px;
        height: 150px;
    }

    .timeline-line {
        left: 125px;
        height: calc(100% + 2rem);
    }

    #esparta-digital .video-container {
        max-height: 300px;
    }
}

    .pin-spacer {
        background: var(--gris-esparta);
    }

@media (max-width: 400px) {
    #cabecera p {
        font-size: 25px;
    } 
}