#cabecera-servicio {
    background-color: var(--gris-esparta);
    padding: 135px 0px 50px;
}

#cabecera-servicio h1 {
    font-size: clamp(2rem, 5vw, 8rem);
    text-transform: uppercase;
    margin: 0;
}

#cabecera-servicio h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    text-transform: uppercase;
    margin: 0;
    font-weight: 300;
    line-height: 1;
}

#cabecera-servicio .img-thumbnail img {
    width: 100%;
    border-radius: 8px;
}

#metodologia-servicio {
    padding: 50px 0px;
    background-color: var(--blanco-esparta);
}

#metodologia-servicio h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    margin: 0;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 20px;
}

#metodologia-servicio p {
    margin: 0;
}

.col-sticky {
    position: sticky;
    top: 140px;
    z-index: 2;
}

/* --- METODOLOGIA TIMELINE --- */

.metodologia-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.timeline-item {
    display: flex;
    gap: 30px;
    position: relative;
    padding-bottom: 40px;
    align-items: center;
}

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

.timeline-image-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    flex-shrink: 0;
    position: relative;
}

.timeline-image {
    width: 80px;
    height: 80px;
    border: 2px dotted var(--negro-esparta);
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    overflow: hidden;
    background: var(--blanco-esparta);
}

.timeline-step {
    font-family: neue-haas, sans-serif;
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--negro-esparta);
    line-height: 1;
}

.timeline-line {
    position: absolute;
    top: 80px;
    bottom: -40px;
    width: 1px;
    background-color: #000;
    z-index: 1;
    height: 100%;
}

.timeline-item:last-child .timeline-line {
    display: none;
}

.timeline-content {
    padding-top: 10px;
}

.timeline-number {
    font-size: 1rem;
    font-weight: 500;
    color: var(--negro-esparta);
    display: block;
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    text-transform: uppercase;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    color: var(--negro-esparta);
}

.timeline-text {
    font-size: 1rem;
    color: var(--negro-esparta);
    opacity: 0.8;
    line-height: 1.5;
}

.timeline-text p {
    margin: 0;
}

#servicio-especialidad {
    padding: 50px 0px;
    background-color: var(--gris-esparta);
}

#servicio-especialidad h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    margin: 0;
    font-weight: 500;
    line-height: 1;
    margin-bottom: 20px;
}

#servicio-especialidad .img-especialidad img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* --- SERVICIO ESPECIALIDADES GRID --- */

.servicios-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.servicio-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    min-height: 150px;
    position: relative;
    cursor: default;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    flex: 1 1 20%;
    max-width: 100%;
}

.servicios-grid:hover .servicio-item:not(:hover) {
    flex: 1 1 20%;
}

@media (max-width: 1630px) {
    .servicio-item {
        flex: 1 1 30%;
    }

    .servicios-grid:hover .servicio-item:not(:hover) {
        flex: 1 1 30%;
    }
}

@media (max-width: 675px) {
    .servicio-item {
        flex: 1 1 100%;
    }

    .servicios-grid:hover .servicio-item:not(:hover) {
        flex: 1 1 100%;
    }
}



.servicio-item:hover {
    flex: 2 1 35%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    z-index: 2;
    border-color: rgba(0, 0, 0, 0.1);
}

.servicio-header {
    display: flex;
    flex-direction: column;
    width: 100%;
    z-index: 10;
}

/* TÍTULO */
.servicio-header h3 {
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    text-transform: none;
    font-weight: 500;
    margin: 0;
    color: var(--negro-esparta);
    line-height: 1.2;
    text-transform: uppercase;
}

/* BOTÓN TOGGLE (+) - Posición Absoluta Fija */
.servicio-toggle-btn {
    width: 32px;
    height: 32px;
    background-color: var(--negro-esparta);
    border-radius: 4px;
    position: absolute;
    bottom: 25px;
    right: 25px;
    transition: all 0.3s ease;
    z-index: 20;
}

.servicio-toggle-btn::before,
.servicio-toggle-btn::after {
    content: '';
    position: absolute;
    background-color: var(--blanco-esparta);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.servicio-toggle-btn::before {
    width: 10px;
    height: 2px;
}

.servicio-toggle-btn::after {
    width: 2px;
    height: 10px;
}

/* CONTENIDO - Aparición Lateral */
.servicio-texto {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 70px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.4s ease 0.1s;
    pointer-events: none;

    display: flex;
    align-items: flex-end;
}

.servicio-texto-inner {
    max-height: 150px;
    overflow: hidden;
}

.servicio-texto p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--negro-esparta);
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* --- ESTADO HOVER --- */

.servicio-item:hover .servicio-texto {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.servicio-item:hover .servicio-toggle-btn {
    background-color: var(--negro-esparta);
    transform: rotate(90deg);
    opacity: 0.5;
}

.servicio-item:hover .servicio-toggle-btn::before {
    background-color: #fff;
}

.servicio-item:hover .servicio-toggle-btn::after {
    background-color: #fff;
}

/* --- HERRAMIENTAS INFINITE SLIDER --- */

#herramientas-servicio {
    padding: 50px 0px;
    background-color: var(--blanco-esparta);
    overflow: hidden;
}

#herramientas-servicio h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    margin: 0 0 20px 0;
    font-weight: 600;
    line-height: 1;
}

#herramientas-servicio p {
    margin: 0 0 40px 0;
    font-size: 1.1rem;
    opacity: 0.8;
}

.herramientas-slider-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.herramientas-slider {
    width: 100%;
    overflow: hidden;
}

.herramientas-track {
    display: flex;
    gap: 40px;
    animation: scroll-infinite 50s linear infinite;
    width: fit-content;
}

.herramienta-item {
    flex-shrink: 0;
    width: 180px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: all 0.3s ease;
}

.herramienta-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .herramienta-item {
        width: 140px;
        padding: 15px;
    }

    .herramientas-track {
        gap: 25px;
        animation-duration: 20s;
    }
}

@media (max-width: 576px) {
    .herramienta-item {
        width: 120px;
        padding: 12px;
    }

    .herramientas-track {
        gap: 20px;
        animation-duration: 15s;
    }
}

#destacado-servicio {
    padding: 50px 0px;
    background-color: var(--negro-esparta);
}

#destacado-servicio h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    margin: 0;
    font-weight: 600;
    line-height: 1;
    color: var(--blanco-esparta);
}

#destacado-servicio h3 {
    font-size: clamp(1.5rem, 2vw, 2rem);
    text-transform: uppercase;
    margin: 0 0 20px 0;
    font-weight: 600;
    line-height: 1;
    color: var(--blanco-esparta);
}

#destacado-servicio p {
    color: var(--blanco-esparta);
}

#destacado-servicio .img-destacado img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: -100px;
}

#preguntas-frecuentes-servicio {
    padding: 50px 0px;
    background-color: var(--blanco-esparta);
}

#preguntas-frecuentes-servicio img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

#preguntas-frecuentes-servicio h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    text-transform: uppercase;
    margin: 0 0 40px 0;
    font-weight: 600;
    line-height: 1;
}

/* --- FAQ ACCORDION --- */

.preguntas-frecuentes {
    display: flex;
    flex-direction: column;
}

.pregunta-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    padding: 0;
}

.pregunta-header {
    width: 100%;
    background: none;
    border: none;
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.pregunta-header h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    text-transform: uppercase;
    font-weight: 500;
    margin: 0;
    color: var(--negro-esparta);
    line-height: 1.3;
    flex: 1;
    padding-right: 20px;
}

.pregunta-toggle-btn {
    width: 30px;
    height: 30px;
    position: relative;
    flex-shrink: 0;
}

.toggle-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
}

.toggle-icon::before,
.toggle-icon::after {
    content: '';
    position: absolute;
    background-color: var(--negro-esparta);
    transition: all 0.3s ease;
}

/* Horizontal line (always visible) */
.toggle-icon::before {
    width: 20px;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

/* Vertical line (hidden when open) */
.toggle-icon::after {
    width: 2px;
    height: 20px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

/* When accordion is open */
.pregunta-header[aria-expanded="true"] .toggle-icon::after {
    opacity: 0;
    transform: translateX(-50%) rotate(90deg);
}

.pregunta-respuesta {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pregunta-respuesta[aria-hidden="false"] {
    max-height: 1000px;
}

.pregunta-respuesta-inner {
    padding: 0 0 30px 0;
}

.pregunta-respuesta-inner p {
    margin: 0 0 15px 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--negro-esparta);
    opacity: 0.8;
}

.pregunta-respuesta-inner p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .pregunta-header {
        padding: 20px 0;
    }

    .pregunta-header h3 {
        font-size: 1.1rem;
    }

    .pregunta-respuesta-inner {
        padding: 0 0 20px 0;
    }

    #cabecera-servicio {
        padding: 100px 0px 50px;
    }
}

#otros-servicios {
    background-color: var(--blanco-esparta);
    padding: 4rem 0;
}

#otros-servicios h2 {
    font-size: clamp(2rem, 3.5vw, 4rem);
    text-transform: uppercase;
    margin: 0;
}

#otros-servicios .blog-card-title a {
    text-transform: uppercase;
}

#bloque-formulario {
    background-color: var(--blanco-esparta) !important;
}