/* ==========================================================================
   Landings personalizadas - MegaBit
   Colores tomados de css/home_v2/styles.css
   ========================================================================== */

:root {
    --lp-verde: #4CAF50;
    --lp-verde-hover: #439543;
    --lp-verde-claro: #70A83B;
    --lp-oscuro: #353B47;
    --lp-oscuro-claro: #4a5163;
    --lp-whatsapp: #25D366;
    --lp-whatsapp-hover: #1eb747;
    --lp-gris-fondo: #f8f9fa;
    --lp-texto: #555;
    --lp-radio: 12px;
    --lp-sombra: 0 4px 20px rgba(53, 59, 71, 0.1);
    --lp-sombra-hover: 0 12px 32px rgba(53, 59, 71, 0.16);
}

.lp-aviso-borrador {
    background: #ffc107;
    color: #000;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
}

/* ── Secciones genéricas ─────────────────────────────────────────────── */
.lp-seccion {
    padding: 4.5rem 0;
}

/* Fondo alterno según la posición real, sin importar el orden elegido. */
.lp-landing > section.lp-seccion:nth-of-type(even) {
    background-color: var(--lp-gris-fondo);
}

.lp-encabezado {
    margin-bottom: 2.5rem;
}

.lp-titulo {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* Línea verde decorativa debajo de los títulos */
.lp-titulo::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin: 0.85rem auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, #5fb157, #c6f148);
}

.lp-subtitulo {
    font-size: 1.1rem;
    color: #666;
    max-width: 720px;
    margin: 0 auto;
}

.lp-texto {
    font-size: 1.08rem;
    line-height: 1.75;
    color: var(--lp-texto);
    max-width: 820px;
}

.lp-texto p:last-child {
    margin-bottom: 0;
}

.lp-texto a {
    color: var(--lp-verde);
}

/* ── 1. Slides ───────────────────────────────────────────────────────── */
.lp-slides {
    position: relative;
    background: #fff;
}

/* Como en el home: dentro de un contenedor (un poco más ancho) con fondo blanco a los lados */
.lp-slides-contenedor {
    max-width: 1656px;
}

.lp-slides .carousel {
    overflow: hidden;
}

.lp-slide-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1920 / 800;
    object-fit: cover;
}

@media (max-width: 767px) {
    .lp-slide-img { aspect-ratio: 900 / 600; }
}

/* Reinicia los estilos de flechas que define styles.css para la home */
.lp-slides .carousel-control-prev,
.lp-slides .carousel-control-next {
    top: 0;
    bottom: 0;
    left: auto;
    right: auto;
    transform: none;
    width: 8%;
    min-width: 64px;
    height: auto;
    border: none;
    border-radius: 0;
    background: none;
    text-shadow: none;
    opacity: 1;
}

.lp-slides .carousel-control-prev { left: 0; }
.lp-slides .carousel-control-next { right: 0; }

.lp-slides .carousel-control-prev:hover,
.lp-slides .carousel-control-next:hover {
    background: none;
}

.lp-flecha {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(53, 59, 71, 0.55);
    color: #fff;
    font-size: 1.4rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lp-slides .carousel-control-prev:hover .lp-flecha,
.lp-slides .carousel-control-next:hover .lp-flecha {
    background: var(--lp-verde);
    transform: scale(1.08);
}

.lp-slides .carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.6);
}

.lp-slides .carousel-indicators .active {
    background-color: var(--lp-verde);
}

/* ── 2. Descripción y botones ────────────────────────────────────────── */
.lp-descripcion-contenido .lp-texto {
    margin: 0 auto;
}

.lp-botones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.lp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    border-radius: 8px;
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.lp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(53, 59, 71, 0.18);
    text-decoration: none;
}

.lp-btn-principal { background: var(--lp-verde); color: #fff; }
.lp-btn-principal:hover { background: var(--lp-verde-hover); color: #fff; }

.lp-btn-secundario { background: var(--lp-oscuro); color: #fff; }
.lp-btn-secundario:hover { background: var(--lp-oscuro-claro); color: #fff; }

.lp-btn-contorno { background: transparent; color: var(--lp-verde); border-color: var(--lp-verde); }
.lp-btn-contorno:hover { background: var(--lp-verde); color: #fff; }

.lp-btn-whatsapp { background: var(--lp-whatsapp); color: #fff; }
.lp-btn-whatsapp:hover { background: var(--lp-whatsapp-hover); color: #fff; }

.lp-btn-enlace { background: transparent; color: var(--lp-verde); padding-left: 0.5rem; padding-right: 0.5rem; }
.lp-btn-enlace:hover { color: var(--lp-verde-hover); box-shadow: none; text-decoration: underline; }

/* ── 3. Servicios ────────────────────────────────────────────────────── */
.lp-card-servicio {
    height: 100%;
    background: #fff;
    border-radius: var(--lp-radio);
    overflow: hidden;
    box-shadow: var(--lp-sombra);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lp-card-servicio:hover {
    transform: translateY(-6px);
    box-shadow: var(--lp-sombra-hover);
}

.lp-card-servicio img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.lp-card-cuerpo {
    padding: 1.4rem 1.5rem 1.6rem;
    border-top: 4px solid var(--lp-verde);
}

.lp-card-cuerpo h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--lp-oscuro);
    margin-bottom: 0.6rem;
}

.lp-card-texto p {
    margin: 0 0 0.5rem;
    color: var(--lp-texto);
    line-height: 1.6;
}

.lp-card-texto p:last-child {
    margin-bottom: 0;
}

.lp-lista-check {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lp-lista-check li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    color: #444;
}

.lp-lista-check li:last-child {
    border-bottom: none;
}

.lp-lista-check li i {
    color: var(--lp-verde);
    margin-top: 3px;
    flex-shrink: 0;
}

/* ── Carrusel horizontal (trabajos y testimonios) ────────────────────── */
.lp-carrusel {
    position: relative;
    padding: 0 3.25rem;
}

.lp-carrusel-pista {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0.5rem 0.25rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.lp-carrusel-pista::-webkit-scrollbar {
    display: none;
}

.lp-carrusel-item {
    flex: 0 0 calc((100% - 2 * 1.25rem) / 3);
    scroll-snap-align: start;
    margin: 0;
}

.lp-carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--lp-oscuro);
    color: #fff;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s ease;
}

.lp-carrusel-btn:hover {
    background: var(--lp-verde);
}

.lp-carrusel-prev { left: 0; }
.lp-carrusel-next { right: 0; }

/* Si todos los items caben, no se muestran flechas */
.lp-carrusel.lp-sin-desplazamiento .lp-carrusel-btn {
    display: none;
}

.lp-carrusel.lp-sin-desplazamiento .lp-carrusel-pista {
    justify-content: center;
}

/* Trabajos */
.lp-trabajo {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    box-shadow: var(--lp-sombra);
}

.lp-trabajo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.lp-trabajo:hover img {
    transform: scale(1.06);
}

.lp-trabajo figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.5rem 1rem 0.9rem;
    background: linear-gradient(transparent, rgba(53, 59, 71, 0.9));
    color: #fff;
    font-weight: 500;
}

/* Trabajos: 2 fotos por vista (1 en móvil), más anchas y altas */
.lp-trabajos-contenedor {
    max-width: 2153px; /* 1656 + 30% */
}

/* Las flechas van encima de las fotos para aprovechar todo el ancho */
.lp-carrusel.lp-carrusel-trabajos {
    padding: 0;
}

.lp-carrusel-trabajos .lp-carrusel-btn {
    background: rgba(53, 59, 71, 0.7);
}

.lp-carrusel-trabajos .lp-carrusel-prev { left: 12px; }
.lp-carrusel-trabajos .lp-carrusel-next { right: 12px; }

.lp-carrusel-trabajos .lp-carrusel-item {
    flex: 0 0 calc((100% - 1.25rem) / 2);
}

.lp-carrusel-trabajos .lp-trabajo {
    aspect-ratio: 4 / 3;
}

/* La foto se ve completa; lo que sobra se rellena con la misma foto desenfocada */
.lp-carrusel-trabajos .lp-trabajo {
    background: var(--lp-oscuro);
}

.lp-carrusel-trabajos .lp-trabajo img {
    position: absolute;
    inset: 0;
}

.lp-carrusel-trabajos .lp-trabajo-fondo {
    object-fit: cover;
    filter: blur(22px) brightness(0.8);
    transform: scale(1.15);
}

.lp-carrusel-trabajos .lp-trabajo-foto {
    object-fit: contain;
}

.lp-carrusel-trabajos .lp-trabajo:hover .lp-trabajo-fondo {
    transform: scale(1.15);
}

.lp-carrusel-trabajos .lp-trabajo:hover .lp-trabajo-foto {
    transform: scale(1.03);
}

.lp-carrusel-trabajos .lp-trabajo figcaption {
    z-index: 1;
}

/* Testimonios */
.lp-card-testimonio {
    background: #fff;
    border-radius: var(--lp-radio);
    overflow: hidden;
    box-shadow: var(--lp-sombra);
    text-align: center;
}

.lp-card-testimonio img {
    display: block;
    width: 100%;
    height: auto; /* como en el home: la captura se ve completa, en su tamaño real */
}

/* Cada card con la altura de su captura, alineadas arriba */
.lp-carrusel-testimonios .lp-carrusel-pista {
    align-items: flex-start;
}

.lp-card-testimonio h3 {
    margin: 0;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--lp-verde);
}

/* ── 5. Contacto ─────────────────────────────────────────────────────── */
.lp-contacto-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 2rem 1.5rem;
    background: #fff;
    border-radius: var(--lp-radio);
    box-shadow: var(--lp-sombra);
    color: var(--lp-oscuro);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.lp-contacto-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--lp-sombra-hover);
    color: var(--lp-oscuro);
    text-decoration: none;
}

.lp-contacto-icono {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    font-size: 1.75rem;
    color: var(--lp-verde);
    background: rgba(76, 175, 80, 0.12);
}

.lp-icono-whatsapp {
    color: #fff;
    background: var(--lp-whatsapp);
}

.lp-contacto-etiqueta {
    font-weight: 700;
    font-size: 1.05rem;
}

.lp-contacto-dato {
    color: var(--lp-texto);
    word-break: break-word;
}

/* ── Secciones libres ────────────────────────────────────────────────── */
.lp-libre img {
    max-width: 100%;
    height: auto;
}

/* Componentes reutilizables para secciones libres (usar estas clases en el HTML
   de CKEditor). Ver ejemplos en la landing "servicios-infraestructura". */

/* Frase destacada sobre fondo oscuro */
.lp-frase {
    background: linear-gradient(135deg, var(--lp-oscuro) 0%, var(--lp-oscuro-claro) 100%);
    color: #fff;
    border-radius: var(--lp-radio);
    padding: 2rem 2.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: center;
}

.lp-frase .bi-quote {
    display: block;
    font-size: 2rem;
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

/* Etiqueta / insignia verde */
.lp-insignia {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--lp-verde);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
}

/* Grid de beneficios con icono */
.lp-beneficios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.lp-beneficio {
    text-align: center;
    padding: 1.75rem 1.25rem;
    border-radius: var(--lp-radio);
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.lp-beneficio:hover {
    transform: translateY(-4px);
}

.lp-beneficio .bi {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(76, 175, 80, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    color: var(--lp-verde);
}

.lp-beneficio p {
    margin: 0;
    font-weight: 500;
    color: var(--lp-oscuro);
}

/* Cifras (con contador animado opcional: data-lp-contador="150" data-sufijo="+") */
.lp-cifras {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    background: linear-gradient(135deg, var(--lp-oscuro) 0%, #2a2f38 100%);
    color: #fff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
}

.lp-cifra {
    text-align: center;
    padding: 0.75rem;
}

.lp-cifra-numero {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--lp-verde);
    line-height: 1;
}

.lp-cifra-texto {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
}

/* Llamado a la acción con imagen de fondo.
   La imagen se define con style="background-image:url("landings")" en el bloque. */
.lp-cta {
    position: relative;
    min-height: 380px;
    padding: 4rem 1.5rem;
    background-color: var(--lp-oscuro);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.lp-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(53, 59, 71, 0.9) 0%, rgba(76, 175, 80, 0.5) 100%);
}

.lp-cta > * {
    position: relative;
    z-index: 1;
    max-width: 720px;
}

.lp-cta h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.lp-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Sección libre de ancho completo sin relleno (ej. un .lp-cta de borde a borde) */
.lp-libre.lp-sin-relleno {
    padding: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .lp-carrusel-item {
        flex-basis: calc((100% - 1.25rem) / 2);
    }
}

@media (max-width: 575px) {
    .lp-seccion {
        padding: 3rem 0;
    }

    .lp-carrusel {
        padding: 0;
    }

    .lp-carrusel-item {
        flex-basis: 85%;
    }

    .lp-carrusel-btn {
        display: none;
    }

    .lp-carrusel-trabajos .lp-carrusel-item {
        flex-basis: 100%;
    }

    /* En móvil sí se muestran flechas en trabajos, encima de la foto */
    .lp-carrusel-trabajos .lp-carrusel-btn {
        display: inline-flex;
        width: 38px;
        height: 38px;
        background: rgba(53, 59, 71, 0.7);
    }

    .lp-carrusel-trabajos .lp-carrusel-prev { left: 8px; }
    .lp-carrusel-trabajos .lp-carrusel-next { right: 8px; }

    .lp-carrusel.lp-carrusel-trabajos.lp-sin-desplazamiento .lp-carrusel-btn {
        display: none;
    }

    .lp-btn {
        width: 100%;
        justify-content: center;
    }
}
