/**
 * Homepage Sections Styles - Monitor Latino
 */

/* 1. DESTACADOS DE LA SEMANA */
.ml-top5-section {
    position: relative;
    background: #000;
    padding: 50px 24px;
    margin: 0;
    overflow: hidden;
}
.ml-top5-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(120% 90% at 50% -10%, #1f1f26 0%, rgba(10,10,13,0) 55%),
        linear-gradient(180deg, #0e0e12 0%, #08080b 100%);
    opacity: 1;
    z-index: 0;
}
.ml-top5-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}
.ml-top5-title {
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 24px 0;
}
.ml-top5-btn-wrap {
    text-align: center;
    margin-top: 30px;
}
.ml-top5-btn {
    display: inline-block;
    background: #FFC508;
    color: #000;
    padding: 12px 36px;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}
.ml-top5-btn:hover {
    background: #fff;
    transform: translateY(-2px);
}

/* 1.b DIGITAL LATINO VIDEOS (shortcode [digital_latino_videos]) */
.ml-top5-section {
    --dl-accent: #0981FB; /* azul de marca Digital Latino — no está en paleta global */
}
.dl-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.dl-country-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dl-country-flag {
    width: 40px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.dl-country-name {
    font-size: 16px;
    font-weight: var(--ml-font-weight-semibold);
    color: var(--dl-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.dl-cierre-info {
    font-size: 18px;
    font-weight: 300;
    color: var(--dl-accent);
    letter-spacing: 0.5px;
}
.dl-videos-grid-sc {
    display: grid;
    /* Desktop: TODOS los videos en una sola fila, sean 4 o 5, repartidos por
       igual y centrados en el contenedor.
       Antes habia 5 columnas fijas: con 4 videos la quinta quedaba vacia y la
       fila se recostaba a la izquierda dejando un hueco a la derecha.
       El shortcode inyecta --dl-cols con el numero real que quedo despues de
       filtrar los links muertos; el 5 es solo el respaldo si no llega.
       En pantallas mas chicas los media queries de abajo reducen columnas / pasan a carrusel. */
    grid-template-columns: repeat(var(--dl-cols, 5), minmax(0, 1fr));
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}
.dl-video-card-sc {
    background: transparent;
    border: 1.5px solid rgba(255, 197, 8, 0.55);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
}
.dl-video-card-sc:hover {
    border-color: var(--ml-primary-start);
    transform: translateY(-8px);
    box-shadow: var(--ml-shadow-glow);
}
.dl-video-wrapper-sc {
    position: relative;
    aspect-ratio: 9/16;
    background: #000;
}
.dl-video-wrapper-sc video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Dots del carrusel (sólo visibles en mobile) */
.dl-carousel-dots { display: none; }
.dl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}
.dl-dot.is-active {
    background: var(--ml-primary);
    transform: scale(1.25);
}

.dl-error,
.dl-empty {
    text-align: center;
    color: var(--ml-gray);
    padding: 24px;
}
.dl-error {
    color: #ff6b6b;
}
@media (max-width: 1024px) {
    .dl-videos-grid-sc { grid-template-columns: repeat(auto-fit, minmax(170px, 230px)); }
}
@media (max-width: 768px) {
    /* Carrusel horizontal con scroll-snap */
    .dl-videos-grid-sc {
        display: flex;
        grid-template-columns: none;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Padding lateral = mitad del hueco sobrante ((100% - ancho tarjeta) / 2).
           Sin esto, el 1er y ultimo video NO pueden centrarse y quedan cortados. */
        padding: 4px 16% 6px;
        scroll-padding: 0 16%;
    }
    .dl-videos-grid-sc::-webkit-scrollbar { display: none; }
    .dl-video-card-sc {
        /* 68% + 16% de padding a cada lado => el 1ro/ultimo centran perfecto.
           Sin max-width: en px romperia el centrado calculado en %. */
        flex: 0 0 68%;
        scroll-snap-align: center;
    }
    .dl-carousel-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 18px;
    }
    .dl-header-row {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* 3. SOLUCIONES PARA */
.ml-soluciones-section {
    background: #0d0d1a;
    padding: 50px 24px;
}
.ml-soluciones-container {
    max-width: 1260px;
    margin: 0 auto;
}
.ml-soluciones-title {
    font-family: var(--wp--preset--font-family--funnel-display, "Funnel Display", sans-serif);
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 30px 0;
    line-height: 1.2;
}
.ml-soluciones-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.ml-solucion-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    aspect-ratio: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    background: #1a1a2e;
}
.ml-solucion-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(255, 197, 8, 0.25);
    border-color: #FFC508;
}
.ml-solucion-card:hover .ml-solucion-img {
    filter: none;
    transform: scale(1.05);
}
.ml-solucion-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(30%) brightness(0.7);
    transition: filter 0.3s ease, transform 0.3s ease;
}
.ml-solucion-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    text-align: center;
}
.ml-solucion-name {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
}
@media (max-width: 1024px) {
    .ml-soluciones-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .ml-soluciones-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 4. PRODUCTOS — 3-col grid + featured card + CTA hover */
.ml-productos-section {
    background: #12121f;
    padding: 80px 24px;
}
.ml-productos-container {
    max-width: 1260px;
    margin: 0 auto;
}
.ml-productos-header {
    text-align: center;
    margin-bottom: 56px;
}
.ml-productos-title {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 14px 0;
    letter-spacing: -0.5px;
    line-height: 1.15;
}
.ml-productos-subtitle {
    font-size: 17px;
    color: rgba(255,255,255,0.65);
    margin: 0;
}
.ml-productos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.ml-productos-grid > .ml-producto-card {
    flex: 0 0 calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
}
/* Card base */
.ml-producto-card {
    position: relative;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 32px 28px 28px;
    text-decoration: none !important;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    overflow: hidden;
}
.ml-producto-card,
.ml-producto-card * {
    text-decoration: none !important;
}
.ml-producto-card:hover {
    background: rgba(255, 197, 8, 0.05);
    border-color: rgba(255, 197, 8, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3), 0 0 24px rgba(255,197,8,0.1);
}
/* Icon */
.ml-producto-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 197, 8, 0.12);
    border: 1px solid rgba(255, 197, 8, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 20px;
    color: #FFC508;
    transition: all 0.3s ease;
}
.ml-producto-icon svg {
    width: 26px !important;
    height: 26px !important;
}
.ml-producto-card:hover .ml-producto-icon {
    background: #FFC508;
    color: #0a0a0a;
    transform: scale(1.05);
}
/* Title (was h4 with uppercase tiny) */
.ml-producto-name {
    font-size: 19px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.25;
}
/* Description */
.ml-producto-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    margin: 0 0 20px;
    line-height: 1.55;
    flex: 1;
}
/* CTA inline (Ver más →) */
.ml-producto-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #FFC508;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: gap 0.3s ease;
    margin-top: auto;
}
.ml-producto-card:hover .ml-producto-cta {
    gap: 10px;
}
.ml-producto-cta svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}
.ml-producto-card:hover .ml-producto-cta svg {
    transform: translateX(2px);
}

/* Featured card (first card / .is-featured) */
.ml-producto-card.is-featured {
    background:
        linear-gradient(135deg, rgba(255,197,8,0.10) 0%, rgba(255,138,0,0.06) 100%),
        rgba(255,255,255,0.03);
    border: 1px solid rgba(255, 197, 8, 0.35);
}
.ml-producto-card.is-featured::before {
    content: 'Producto estrella';
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 10px;
    font-weight: 700;
    color: #FFC508;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 10px;
    background: rgba(255, 197, 8, 0.12);
    border: 1px solid rgba(255, 197, 8, 0.3);
    border-radius: 60px;
}
.ml-producto-card.is-featured .ml-producto-icon {
    background: linear-gradient(135deg, #FFC508 0%, #FF8A00 100%);
    color: #000;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(255, 197, 8, 0.25);
}
.ml-producto-card.is-featured:hover .ml-producto-icon {
    transform: scale(1.05) rotate(-3deg);
}

/* Responsive */
@media (max-width: 1024px) {
    .ml-productos-grid > .ml-producto-card {
        flex-basis: calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
    }
    .ml-productos-title { font-size: 36px; }
}
@media (max-width: 768px) {
    .ml-productos-section { padding: 60px 20px; }
    .ml-productos-title { font-size: 28px; }
    .ml-productos-subtitle { font-size: 15px; }
    .ml-soluciones-title { font-size: 24px; }
    .ml-cta-title { font-size: 24px; }
    .ml-top5-title { font-size: 24px; }
    .ml-producto-card { padding: 28px 22px 24px; }
    .ml-producto-name { font-size: 17px; }
}
@media (max-width: 480px) {
    .ml-productos-grid { gap: 14px; }
    .ml-productos-grid > .ml-producto-card { flex-basis: 100%; max-width: 100%; }
    .ml-soluciones-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .ml-top5-section { padding: 32px 16px; }
    .ml-soluciones-section { padding: 32px 16px; }
    .ml-productos-section { padding: 40px 16px; }
    .ml-cta-section { padding: 40px 16px; }
    .ml-producto-card.is-featured::before {
        font-size: 9px;
        padding: 4px 8px;
    }
}

/* 5. LOGOS */
.ml-logos-section {
    background: rgba(255,255,255,0.02);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding: 30px 24px;
    text-align: center;
}
.ml-logos-title {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 24px;
}
.ml-logos-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}
.ml-logo-item {
    font-size: 1rem;
    font-weight: 700;
    color: #555;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}
.ml-logo-item:hover {
    color: #FFC508;
}

/* 6. CTA FINAL */
.ml-cta-section {
    background: #0d0d1a;
    padding: 60px 24px;
    text-align: center;
}
.ml-cta-container {
    max-width: 700px;
    margin: 0 auto;
}
.ml-cta-title {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px 0;
    line-height: 1.2;
}
.ml-cta-text {
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    margin: 0 0 24px 0;
}
.ml-cta-btn {
    display: inline-block;
    background: #FFC508;
    color: #000;
    padding: 14px 36px;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}
.ml-cta-btn:hover {
    background: #fff;
    transform: translateY(-2px);
}

/* ============================================================
   DIGITAL LATINO — refuerzo de marca en el home
   ============================================================ */

/* Badge morado de Digital Latino (carrusel + banda) */
.ml-dl-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.4);
    padding: 6px 14px;
    border-radius: 60px;
    margin-bottom: 16px;
}
.ml-dl-badge--solid {
    color: #fff;
    background: linear-gradient(135deg, rgba(124,58,237,0.95) 0%, rgba(168,85,247,0.95) 100%);
    border-color: transparent;
}

/* Encabezado del carrusel (Movimiento 1) */
.ml-top5-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 32px;
}
.ml-top5-subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255,255,255,0.62);
    margin: 12px 0 0;
}
.ml-top5-btn-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}
.ml-top5-link {
    color: #c4b5fd;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease;
}
.ml-top5-link:hover { color: #fff; }

/* Banda Digital Latino (Movimiento 2) */
.ml-dl-section {
    position: relative;
    padding: 72px 24px;
    overflow: hidden;
    background:
        radial-gradient(90% 120% at 50% 0%, rgba(124,58,237,0.22) 0%, rgba(10,10,20,0) 60%),
        linear-gradient(180deg, #0d0b1a 0%, #08070f 100%);
}
.ml-dl-container {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.ml-dl-head { max-width: 760px; margin: 0 auto 44px; }
.ml-dl-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 16px;
}
.ml-dl-title span {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ml-dl-sub {
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
    margin: 0;
}
.ml-dl-ejes {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 32px;
    text-align: left;
}
.ml-dl-eje {
    flex: 1 1 0;
    max-width: 480px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(168,85,247,0.22);
    border-radius: 18px;
    padding: 30px 28px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.ml-dl-eje:hover {
    transform: translateY(-4px);
    border-color: rgba(168,85,247,0.55);
    box-shadow: 0 16px 40px rgba(0,0,0,0.35), 0 0 28px rgba(124,58,237,0.18);
}
.ml-dl-eje-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    box-shadow: 0 6px 20px rgba(124,58,237,0.35);
}
.ml-dl-eje-icon svg { width: 26px; height: 26px; }
.ml-dl-eje-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}
.ml-dl-eje-desc {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255,255,255,0.62);
    margin: 0;
}
.ml-dl-proof {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 36px;
}
.ml-dl-chip {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 8px 16px;
    border-radius: 60px;
}
.ml-dl-cta-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}
.ml-dl-btn {
    display: inline-block;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    padding: 14px 40px;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 8px 24px rgba(124,58,237,0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ml-dl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(124,58,237,0.5);
}
.ml-dl-link {
    color: #c4b5fd;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease;
}
.ml-dl-link:hover { color: #fff; }

/* Responsive Digital Latino */
@media (max-width: 768px) {
    .ml-dl-section { padding: 56px 20px; }
    .ml-dl-title { font-size: 30px; }
    .ml-dl-sub { font-size: 15px; }
    .ml-dl-ejes { flex-direction: column; align-items: stretch; }
    .ml-dl-eje { max-width: none; }
    .ml-top5-subtitle { font-size: 15px; }
}
@media (max-width: 480px) {
    .ml-dl-section { padding: 44px 16px; }
    .ml-dl-title { font-size: 25px; }
    .ml-dl-btn { padding: 13px 32px; }
}
