/* ============================================================
   SERVEIS.css
   Diseño "servicio general": Dron España, Productora España
   y todas sus ciudades (comparten este mismo diseño).

   NO incluye: acordeón .desplegable_SS ni .heroSS (van en
   ServeisdelsServeis.css, diseño de los servicios-de-servicios).
   ============================================================ */


/* ─────────────────────────────────────────────
   CARRUSEL DE VÍDEOS
   ───────────────────────────────────────────── */

.carousel {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    margin-bottom: 6rem;
}

/* ── Slides ── */
.carousel .list .item {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

.carousel .list .item.active {
    opacity: 1;
    z-index: 3;
    pointer-events: auto;
}

.carousel .list .item.leaving {
    opacity: 1;
    z-index: 2;
    pointer-events: none;
    transition: none;
}

.carousel .list .item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.carousel .list .item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0,0,0,0.68) 0%,
        rgba(0,0,0,0.38) 42%,
        rgba(0,0,0,0.12) 72%
    );
    z-index: 1;
}

/* ── H1 fijo superior ── */
.carousel .hero-intro {
    position: absolute;
    top: 20%;
    left: 17%;
    width: 680px;
    max-width: 46%;
    color: #fff;
    z-index: 20;
    text-shadow: 0 5px 10px rgba(0,0,0,0.25);
    pointer-events: none;
}

.carousel .hero-intro h1 {
    margin: 0;
    font-size: clamp(2.8rem, 4.4vw, 5.2rem);
    font-weight: 800;
    line-height: 1.05;
    color: #fff;
}

.carousel .hero-intro p {
    display: none;
}

/* ── Contenido dinámico del servicio activo ── */
.carousel .list .item .content {
    position: absolute;
    top: 43%;
    left: 17%;
    width: 520px;
    max-width: 38%;
    padding-right: 0;
    box-sizing: border-box;
    color: #fff;
    text-shadow: 0 5px 10px rgba(0,0,0,0.25);
    z-index: 25;
}

.carousel .list .item .title {
    font-size: clamp(1.45rem, 2vw, 2.35rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
}

.carousel .list .item .topic {
    display: none;
}

.carousel .list .item .des {
    font-size: clamp(0.78rem, 0.9vw, 0.95rem);
    line-height: 1.55;
    margin-top: 0.8rem;
    color: #fff;
    max-width: 520px;
}

/* ── Animación de entrada del texto ── */
.carousel .list .item .title,
.carousel .list .item .des,
.carousel .list .item .buttons {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(8px);
}

.carousel .list .item.active .title {
    animation: slideContentIn 0.6s 0.5s ease forwards;
}

.carousel .list .item.active .des {
    animation: slideContentIn 0.6s 0.75s ease forwards;
}

.carousel .list .item.active .buttons {
    animation: slideContentIn 0.6s 0.95s ease forwards;
}

@keyframes slideContentIn {
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* ── Botones VER SERVICIO / CONTACTAR ── */
.carousel .list .item .buttons {
    display: grid;
    grid-template-columns: repeat(2, 170px);
    grid-template-rows: 40px;
    gap: 5px;
    margin-top: 20px;
}

.carousel .list .item .buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    letter-spacing: 3px;
    font-size: 0.75rem;
    transition: opacity 0.3s ease;
    text-decoration: none;
}

.carousel .list .item .buttons .btn.solid {
    background-color: #eee;
    color: #000;
}

.carousel .list .item .buttons .btn.outline {
    background-color: transparent;
    border: 1px solid #fff;
    color: #eee;
}

.carousel .list .item .buttons .btn:hover {
    opacity: 0.85;
}

/* ── Miniaturas (conveyor) ── */
.thumbnail-clip {
    position: absolute;
    bottom: 50px;
    right: 0;
    width: 56vw;
    height: 260px;
    overflow: hidden;
    z-index: 100;
    pointer-events: none;
}

.thumbnail {
    position: absolute;
    right: 2vw;
    bottom: 0;
    display: flex;
    gap: 20px;
    pointer-events: auto;
    transform: translateX(0);
}

.carousel.next .thumbnail {
    animation: conveyorNext 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.carousel.prev .thumbnail {
    animation: conveyorPrev 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes conveyorNext {
    from { transform: translateX(170px); }
    to   { transform: translateX(0); }
}

@keyframes conveyorPrev {
    from { transform: translateX(-170px); }
    to   { transform: translateX(0); }
}

.thumbnail .item {
    width: 150px;
    height: 220px;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnail .item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.thumbnail .item.hidden {
    display: none !important;
}

.thumbnail .item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    display: block;
}

.thumbnail .item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
    border-radius: 20px;
    z-index: 1;
}

.thumbnail .item .content {
    color: #fff;
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    z-index: 2;
}

.thumbnail .item .content .title {
    font-weight: 500;
    font-size: 0.75rem;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
}

/* ── Modo "explorar": clic en una miniatura abre todas.
   Solo entra en juego si algún día hay más de 5 servicios
   y las miniaturas no caben todas en el hueco visible. ── */
.thumbnail-clip.expanded {
    width: auto;
    max-width: 100%;
    overflow-x: auto;
}

.thumbnail-clip.expanded .thumbnail {
    position: relative;
    right: auto;
    transform: none !important;
}

/* ── Responsive del carrusel ── */
@media screen and (min-width: 1920px) {
    .carousel .hero-intro { left: 17%; top: 20%; width: 720px; max-width: 44%; }
    .carousel .list .item .content { left: 17%; top: 50%; width: 540px; max-width: 36%; }
    .thumbnail-clip { width: 52vw; bottom: 60px; height: 290px; }
    .thumbnail .item { width: 180px; height: 260px; }
    @keyframes conveyorNext { from { transform: translateX(200px); } to { transform: translateX(0); } }
    @keyframes conveyorPrev { from { transform: translateX(-200px); } to { transform: translateX(0); } }
}

@media screen and (min-width: 2560px) {
    .carousel .hero-intro { left: 18%; top: 20%; width: 780px; max-width: 42%; }
    .carousel .list .item .content { left: 18%; top: 45%; width: 560px; max-width: 34%; }
    .thumbnail-clip { width: 48vw; bottom: 80px; height: 320px; }
    .thumbnail .item { width: 200px; height: 290px; }
    @keyframes conveyorNext { from { transform: translateX(220px); } to { transform: translateX(0); } }
    @keyframes conveyorPrev { from { transform: translateX(-220px); } to { transform: translateX(0); } }
}

@media screen and (max-width: 1024px) {
    .carousel .hero-intro { left: 8%; top: 15%; max-width: 78%; width: 620px; }
    .carousel .hero-intro h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
    .carousel .list .item .content { left: 8%; top: 42%; max-width: 44%; width: 390px; }
    .thumbnail-clip { width: 60vw; height: 210px; }
    .thumbnail .item { width: 120px; height: 170px; }
    @keyframes conveyorNext { from { transform: translateX(140px); } to { transform: translateX(0); } }
    @keyframes conveyorPrev { from { transform: translateX(-140px); } to { transform: translateX(0); } }
}

@media screen and (max-width: 678px) {
    .carousel { height: 100vh; }
    .carousel .hero-intro {
        top: 16%; left: 50%; transform: translateX(-50%);
        width: 90%; max-width: 90%;
    }
    .carousel .hero-intro h1 { font-size: 2.3rem !important; line-height: 1.1 !important; }
    .carousel .list .item .content {
        top: 30%; left: 50%; bottom: auto; transform: translateX(-50%);
        width: 90%; max-width: 90%;
    }
    .carousel .list .item .title { font-size: 1.25rem; line-height: 1.2; }
    .carousel .list .item .des { font-size: 0.78rem; line-height: 1.4; }
    .carousel .list .item .buttons {
        grid-template-columns: 1fr; grid-template-rows: auto;
        width: 100%; margin-top: 14px;
    }
    .carousel .list .item .buttons a { height: 38px; font-size: 0.7rem; width: 100%; }
    .thumbnail-clip {
        width: 100%; right: 0; bottom: 20px; height: 170px;
        overflow-x: auto; overflow-y: hidden;
    }
    .thumbnail { right: auto; left: 20px; position: relative; width: max-content; }
    .thumbnail .item { width: 100px; height: 140px; flex-shrink: 0; }
    .thumbnail .item .content .title { font-size: 0.65rem; }
    @keyframes conveyorNext { from { transform: translateX(120px); } to { transform: translateX(0); } }
    @keyframes conveyorPrev { from { transform: translateX(-120px); } to { transform: translateX(0); } }
}


/* ─────────────────────────────────────────────
   BLOQUE INVERTIDO (vídeo + texto): "Operadora
   autorizada", "Quiénes somos", "Qué diferencia
   a TierraRoja"...
   ───────────────────────────────────────────── */

.heroSS_inv {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    margin-top: 8rem;
    margin-bottom: 5rem;
}

.heroSS_inv .img_bloctext_L_SS {
    flex: 1 !important;
    flex-basis: unset !important;
    margin-left: calc(-1 * (100vw - 100%) / 2) !important;
    overflow: hidden;
    padding: 0 !important;
    position: relative;
    min-height: 100%;
    align-self: stretch;
}

.heroSS_inv .img_bloctext_L_SS .wp-block-video {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.heroSS_inv .img_bloctext_L_SS .wp-block-video video {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: unset !important;
    object-fit: cover;
    object-position: center;
    display: block !important;
}

.heroSS_inv .img_bloctext_L_SS .wp-block-video figcaption {
    display: none;
}

.heroSS_inv .bloctext_R_SS {
    flex: 0 0 50% !important;
    padding: 3rem 8vw 3rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.heroSS_inv .leermas {
    display: inline-block;
    position: relative;
}

.heroSS_inv .cont-leermas {
    align-self: flex-start;
    margin-left: 3rem;
}


/* ─────────────────────────────────────────────
   VÍDEOS HOVER (sección "Algunos trabajos...")
   ───────────────────────────────────────────── */

.hover-overlay video {
    pointer-events: none;
}


/* ─────────────────────────────────────────────
   ENCUADRE COLUMNAS GUTENBERG
   ───────────────────────────────────────────── */

@media (min-width: 782px) {
    .wp-block-columns:not(.is-not-stacked-on-mobile):not(:has(.dji_carousel)) > .wp-block-column {
        display: grid;
        flex-basis: 0;
        flex-grow: 1;
    }
    .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column[style*=flex-basis] {
        flex-grow: 0;
    }
}


/* ─────────────────────────────────────────────
   BOTONES CÍRCULO (variante negra / centrada)
   ───────────────────────────────────────────── */

.cont-leermas.negre {
    display: block;
    text-align: left;
}

.cont-leermas.negre .leermas {
    display: inline-block !important;
    position: relative;
}

.cont-leermas.centrat {
    display: block;
    text-align: center;
}

.cont-leermas.centrat .leermas {
    display: inline-block !important;
    position: relative;
}

/* Corregido: faltaban los puntos entre clases (no aplicaba nunca) */
.cont-leermas.animated-button.negre.centrat {
    width: 80%;
}


/* ─────────────────────────────────────────────
   ESTADÍSTICAS (contador +1500 horas de vuelo...)
   ───────────────────────────────────────────── */

.stats-dron {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    width: 100%;
    max-width: 980px;
    margin: 45px auto;
    padding: 0 20px;
}

.stats-dron .stat-item {
    text-align: center;
    padding: 0;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.stats-dron .stat-number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    font-size: clamp(2.8rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1;
    color: #1e1e1e;
}

.stats-dron .stat-plus {
    color: #ed1e26;
}

.stats-dron .stat-counter {
    color: #1e1e1e;
}

.stats-dron p {
    margin: 14px 0 0;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    line-height: 1.35;
    color: #1e1e1e;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

@media screen and (max-width: 768px) {
    .stats-dron {
        grid-template-columns: 1fr;
        gap: 28px;
        margin: 35px auto;
    }
    .stats-dron .stat-number {
        font-size: 3.2rem;
    }
}


/* ─────────────────────────────────────────────
   PROCESO EN 4 (O MÁS) PASOS
   "Cómo trabajamos en..."
   ───────────────────────────────────────────── */

.proceso-ptr {
    background: transparent !important;
    padding: 20px 24px !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 25px !important;
    font-weight: 700 !important;
    color: #141414 !important;
    letter-spacing: -.02em !important;
    line-height: 1.08 !important;
    max-width: 1380px !important;
    margin: 0 auto 56px !important;
    text-align: left !important;
}

.proceso-ptr__row {
    max-width: 1380px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    column-gap: 48px !important;
    row-gap: 40px !important;
    align-items: start !important;
}

.proceso-ptr__col {
    flex: 0 0 auto !important;
    width: calc((100% - (var(--proceso-cols, 4) - 1) * 48px) / var(--proceso-cols, 4)) !important;
    margin: 0 !important;
}

.proceso-ptr__num {
    font-family: 'Poppins', sans-serif !important;
    font-size: 2.4rem !important;
    font-weight: 700 !important;
    color: #ED1E27 !important;
    line-height: 1 !important;
    letter-spacing: -.04em !important;
    margin: 0 0 6px !important;
}

.proceso-ptr__step-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1.12rem !important;
    font-weight: 700 !important;
    color: #141414 !important;
    line-height: 1.3 !important;
    margin: 0 0 14px !important;
    text-align: left !important;
    min-height: 2.9rem !important; /* reserva sitio para 2 líneas, así los párrafos empiezan siempre a la misma altura */
}

.proceso-ptr__text {
    font-family: 'Poppins', sans-serif !important;
    color: #4a4a4a !important;
    line-height: 1.7 !important;
    font-weight: 400 !important;
    margin: 0 !important;
    text-align: left !important;
}

@media (max-width: 768px) {
    .proceso-ptr__title {
        font-size: 1.3rem !important;
        margin-bottom: 40px !important;
    }
    .proceso-ptr {
        padding: 72px 24px !important;
    }
    .proceso-ptr__row {
        column-gap: 32px !important;
    }
    .proceso-ptr__col {
        width: calc(50% - 16px) !important;
    }
}

@media (max-width: 480px) {
    .proceso-ptr__col {
        width: 100% !important;
    }
}


/* ─────────────────────────────────────────────
   RESPONSIVE TABLET / MÓVIL — bloque invertido y botones
   (extraído del bloque general de la página; se ha quitado
   todo lo que era de .heroSS / acordeón, que vive en
   ServeisdelsServeis.css)
   ───────────────────────────────────────────── */

@media screen and (max-width: 1024px) {
    .heroSS_inv { flex-direction: column-reverse; }
    .heroSS_inv .img_bloctext_L_SS {
        flex: unset !important;
        width: 100%;
        margin-left: 0 !important;
        position: relative;
        min-height: unset;
        aspect-ratio: 16 / 9;
    }
    .heroSS_inv .img_bloctext_L_SS .wp-block-video {
        position: relative;
        inset: unset;
        aspect-ratio: 16 / 9;
    }
    .heroSS_inv .img_bloctext_L_SS .wp-block-video video {
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
    }
    .heroSS_inv .bloctext_R_SS {
        flex: unset !important;
        width: 100%;
        padding: 2rem 6vw;
    }
}

@media screen and (max-width: 768px) {
    h1 { font-size: 1.6rem !important; margin-top: 0.3rem !important; margin-bottom: 0.5rem !important; }
    h2 { font-size: 1.3rem !important; margin-top: 0.3rem !important; margin-bottom: 0.5rem !important; }
    p  { margin-bottom: 0.6rem !important; }

    .heroSS_inv { margin-bottom: 0.5rem; margin-top: 0.5rem; }
    .heroSS_inv .bloctext_R_SS { padding: 1.2rem 5vw !important; }
    .heroSS_inv .cont-leermas { margin-left: 0; }

    /* Bloque centrado → izquierda en móvil (afecta a toda la página) */
    .blocubic_y_enlz { text-align: left !important; }
    .blocubic_y_enlz h2, .blocubic_y_enlz p { text-align: left !important; }
    .has-text-align-center { text-align: left !important; }

    .cont-leermas.cont-leermas {
        position: relative !important;
        display: block !important;
        min-height: 70px;
        margin-top: 1.5rem;
    }
    .cont-leermas.cont-leermas .leermas {
        display: inline-block !important;
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        white-space: nowrap;
    }
    .cont-leermas.cont-leermas .circle-overlay {
        min-width: 140px !important; /* solo evita que sea ridículamente pequeño con 1 palabra corta */
    }
    .cont-leermas path {
        opacity: 1 !important;
        stroke-dashoffset: 0 !important;
        transition: none !important;
    }

    /* Márgenes laterales para los bloques de texto con columnas
       vacías de relleno (25%/50%/25%, 10%/80%/10%...), que en
       móvil se apilan y dejan el texto pegado al borde */
    .wp-block-columns.has-custom-css {
        padding-left: 6vw !important;
        padding-right: 6vw !important;
    }

    /* Anula el margen que trae el tema para CUALQUIER h2/h3 de
       contenido (.the-content h2/h3, más específico que una
       simple clase). Se escala aquí con el propio elemento
       (h2../h3..) para igualar esa especificidad y ganar por
       cargarse después. */
    .wp-block-columns.has-custom-css h2 {
        margin-top: 0 !important;
        margin-bottom: 0.6rem !important;
    }

    /* Estadísticas: 3 en una fila también en móvil, más compactas */
    .stats-dron {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
        margin: 28px auto !important;
        padding: 0 4vw !important;
    }
    .stats-dron .stat-number {
        font-size: 1.7rem !important;
        gap: 2px !important;
    }
    .stats-dron p {
        font-size: 0.62rem !important;
        margin-top: 6px !important;
    }

    /* "Cómo trabajamos": nada de aire interno, el tema forzaba
       márgenes en h3 que aquí se anulan igualando especificidad */
    .proceso-ptr {
        padding: 0 24px !important;
        margin: 0 auto !important;
    }
    .proceso-ptr__row {
        row-gap: 0 !important;
    }
    .proceso-ptr__num {
        margin: 0 0 2px !important;
    }
    h3.proceso-ptr__step-title.proceso-ptr__step-title {
        min-height: 0 !important;
        margin: 0 0 6px !important;
    }
    .proceso-ptr__text {
        padding-bottom: 2rem;
    }

    /* Proyectos apilados sin separación entre ellos */
    .videos1, .videos2 {
        row-gap: 0 !important;
    }
    .videos1 > .wp-block-column,
    .videos2 > .wp-block-column {
        margin: 0 !important;
        padding: 0 !important;
    }
    .videos1 .hover-overlay,
    .videos2 .hover-overlay,
    .videos1 .hover-overlay-link,
    .videos2 .hover-overlay-link {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* "Algunos trabajos..." — título pegado al borde en el
       bloque de proyectos, le damos aire sin tocar los vídeos
       (que sí deben ir a borde a borde) */
    .bloc_porfolio_SS > h2 {
        padding-left: 6vw !important;
        padding-right: 6vw !important;
    }

    /* "Dónde trabajamos" pegado justo debajo de los proyectos.
       Usamos :has()+~ porque la caja de proyectos y la de
       "Dónde trabajamos" no son hermanas directas, sino que
       los vídeos están anidados un par de niveles más adentro */
    .wp-block-columns:has(.videos1) ~ [class*="wp-custom-css-"],
    .wp-block-columns:has(.videos2) ~ [class*="wp-custom-css-"],
    .wp-block-columns.videos1 + .wp-block-columns.has-custom-css,
    .wp-block-columns.videos2 + .wp-block-columns.has-custom-css,
    .wp-block-columns.videos1 + [class*="wp-custom-css-"],
    .wp-block-columns.videos2 + [class*="wp-custom-css-"] {
        margin-top: 3 !important;
    }

    /* FAQ: título con clase propia añadida a mano en el editor,
       para no depender de ninguna pelea de especificidad */
    .faq-titulo {
        text-align: center !important;
    }
}