/* WIDGET CATEGORÍAS MÓVIL - VERSIÓN LIMPIA SIN EFECTOS */
.cat-mobile-widget {
    width: 100%;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    background: white;
}

/* PESTAÑAS */
.cat-tabs-container {
    width: 100%;
    padding: 15px 0;
    overflow: hidden;
    background: transparent;
    position: relative;
    z-index: 10;
}

.cat-tabs-scroll {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 0 15px;
}

.cat-tabs-scroll::-webkit-scrollbar {
    display: none;
}

.cat-tabs-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cat-tab {
    padding: 10px 18px;
    border: 1px solid rgba(0,0,0,0.15);
    background: transparent;
    color: #000;
    border-radius: 2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    margin: 0;
    text-transform: uppercase;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cat-tab.cat-tab-active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.cat-tab:hover {
    background: #f5f5f5;
}

.cat-tab.cat-tab-active:hover {
    background: #000;
}

/* CONTENEDOR PRINCIPAL - SIN FONDO GRIS */
.cat-content-container {
    width: 100%;
    padding: 20px 0 10px;
    background: transparent;
    position: relative;
}

.cat-posts-container {
    display: none;
    width: 100%;
}

.cat-posts-container.cat-content-active {
    display: block;
}

/* CONTENEDOR DE POSTS - SIN EFECTOS VISUALES */
.cat-posts-slider {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 10px 0;
    position: relative;
}

.cat-posts-slider::-webkit-scrollbar {
    height: 3px;
}

.cat-posts-slider::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.cat-posts-slider::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.cat-posts-slider::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* CONTENEDOR DE POSTS EN FILA HORIZONTAL */
.cat-posts-wrapper {
    display: flex;
    gap: 16px;
    padding: 0 16px;
}

/* SLIDE INDIVIDUAL */
.cat-post-slide {
    flex: 0 0 calc(85% - 8px);
    width: calc(85% - 8px);
    display: block;
    text-decoration: none !important;
    color: inherit;
}

/* TARJETA DE POST - SIN SOMBRA, SIN FONDO GRIS */
.cat-post-item {
    width: 100%;
    background: #fff;
    border-radius: 8px; /* Redondeado reducido */
    overflow: hidden;
    border: 1px solid #eee; /* Borde sutil en lugar de sombra */
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cat-post-slide:hover .cat-post-item {
    transform: translateY(-2px);
    border-color: #ddd; /* Solo cambio de borde en hover */
}

/* IMAGEN DESTACADA - TRANSPARENTE */
.cat-post-image {
    width: 100%;
    min-height: 220px;
    max-height: 280px;
    overflow: hidden;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

/* IMAGEN - COMPLETA SIN RECORTAR */
.cat-post-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
    background: transparent;
}

/* Para imágenes verticales */
.cat-post-image.vertical img {
    height: 100%;
    width: auto;
}

/* Para imágenes horizontales */
.cat-post-image.horizontal img {
    width: 100%;
    height: auto;
}

.cat-post-slide:hover .cat-post-image img {
    transform: scale(1.03);
}

/* CONTENIDO DEL POST - ESTILO VOGUE */
.cat-post-content {
    padding: 20px 20px 15px 20px; /* Reducido padding inferior */
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 140px;
}

/* Título del post - EN MAYÚSCULAS COMO VOGUE */
.post-title {
    margin: 0 0 12px 0; /* Reducido espacio inferior */
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700; /* Bold como Vogue */
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    max-height: 4.2em;
    transition: color 0.2s ease;
    text-transform: uppercase; /* Todo en mayúsculas */
    letter-spacing: 0.8px; /* Más espaciado para estilo revista */
    flex: 1;
    min-height: 4.2em;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cat-post-slide:hover .post-title {
    color: #333;
}

/* METADATOS - ESTILO VOGUE */
.post-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 11px;
    color: #666;
    text-transform: uppercase; /* Todo en mayúsculas */
    letter-spacing: 0.3px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Fila superior: POR | autor | fecha - ESTILO VOGUE */
.post-meta-top {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    line-height: 1.3;
}

/* Texto "POR" */
.post-by {
    font-weight: 400; /* Regular */
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
}

/* Nombre del autor */
.post-author {
    font-weight: 700; /* Bold */
    font-size: 10px;
    color: #000; /* Negro para destacar */
    text-transform: capitalize; /* Nombre en formato normal */
    margin-right: 5px;
}

/* Separador */
.post-separator {
    font-weight: 400;
    font-size: 10px;
    color: #666;
    margin: 0 5px;
}

/* Fecha */
.post-date {
    font-weight: 400; /* Regular */
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
}

/* Fila inferior: categoría */
.post-category {
    background: #f8f8f8;
    color: #555;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    align-self: flex-start;
    font-size: 9px;
    border: 1px solid #eee;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

/* INDICADOR DE SCROLL */
.cat-slider-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 16px 5px;
    position: relative;
}

.cat-scroll-hint {
    color: #aaa;
    font-size: 10px; /* REDUCIDO DE 11px */
    font-style: italic;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.4px; /* REDUCIDO DE 0.5px */
    text-align: center;
    padding: 8px 0;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== IMPORTANTE: QUITAR LOS EFECTOS DE GRADIENTE/LÍNEA BLANCA ===== */
/* Estas líneas eliminaban los gradientes que causaban la "línea blanca" */
.cat-posts-slider::before,
.cat-posts-slider::after {
    display: none !important; /* COMPLETAMENTE ELIMINADO */
}

/* Mensajes */
.cat-no-posts {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
    background: #fafafa;
    border-radius: 8px;
    margin: 0 15px;
    border: 1px dashed #eee;
    text-transform: uppercase;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cat-widget-alert {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Estilo especial para pestaña Latest */
.cat-tab[data-cat-id="latest"] {
    font-weight: 700;
}

/* SOLO MÓVIL - OCULTAR EN ESCRITORIO */
@media (min-width: 768px) {
    .cat-mobile-widget {
        display: none !important;
    }
}

/* RESPONSIVE */
@media (max-width: 767px) {
    .cat-post-slide {
        flex: 0 0 calc(85% - 8px);
        width: calc(85% - 8px);
    }
    
    .cat-post-image {
        min-height: 200px;
        max-height: 260px;
    }
    
    .cat-posts-wrapper {
        gap: 14px;
        padding: 0 14px;
    }
    
    .post-title {
        font-size: 15px;
        min-height: 4.2em;
    }
    
    .cat-post-content {
        min-height: 135px;
        padding: 18px 18px 13px 18px;
    }
    
    .cat-tab {
        padding: 9px 16px;
        font-size: 13px;
    }
    
    .cat-tabs-scroll {
        gap: 5px;
    }
    
    .cat-slider-nav {
        padding: 10px 14px 5px;
    }
    
    /* METADATOS MÁS PEQUEÑOS EN MÓVIL - ESTILO VOGUE */
    .post-meta {
        font-size: 10px;
    }
    
    .post-by, .post-author, .post-separator, .post-date {
        font-size: 9px;
    }
    
    .post-category {
        font-size: 8px;
        padding: 3px 8px;
    }
    
    .cat-scroll-hint {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .cat-post-slide {
        flex: 0 0 calc(85% - 6px);
        width: calc(85% - 6px);
    }
    
    .cat-post-image {
        min-height: 180px;
        max-height: 240px;
    }
    
    .cat-tab {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .cat-tabs-scroll {
        gap: 4px;
        padding: 0 12px;
    }
    
    .cat-post-content {
        min-height: 130px;
        padding: 16px 16px 12px 16px;
    }
    
    .post-title {
        font-size: 14px;
        min-height: 4.2em;
        letter-spacing: 0.6px;
    }
    
    .post-meta {
        font-size: 9px;
    }
    
    .post-by, .post-author, .post-separator, .post-date {
        font-size: 8px;
    }
    
    .post-category {
        font-size: 7px;
        padding: 2px 6px;
    }
    
    .cat-posts-wrapper {
        gap: 12px;
        padding: 0 10px;
    }
    
    .cat-scroll-hint {
        font-size: 8px;
    }
}

@media (max-width: 360px) {
    .cat-post-slide {
        flex: 0 0 calc(85% - 4px);
        width: calc(85% - 4px);
    }
    
    .cat-post-image {
        min-height: 170px;
        max-height: 220px;
    }
    
    .post-title {
        font-size: 13px;
        min-height: 4.2em;
        letter-spacing: 0.5px;
    }
    
    .cat-tab {
        padding: 7px 12px;
        font-size: 11px;
    }
    
    .cat-posts-wrapper {
        gap: 10px;
        padding: 0 8px;
    }
    
    /* METADATOS AÚN MÁS PEQUEÑOS - ESTILO VOGUE */
    .post-meta {
        font-size: 8px;
    }
    
    .post-by, .post-author, .post-separator, .post-date {
        font-size: 7px;
    }
    
    .post-category {
        font-size: 6px;
    }
    
    .cat-scroll-hint {
        font-size: 7px;
    }
}

/* Clase para cuando no hay imagen */
.cat-post-no-image {
    min-height: 220px;
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* FIX PARA ELEMENTOR EDITOR */
.elementor-editor-active .cat-mobile-widget,
.elementor-edit-mode .cat-mobile-widget {
    max-width: 100% !important;
    overflow: visible !important;
}

.elementor-editor-active .cat-posts-slider,
.elementor-edit-mode .cat-posts-slider {
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* IMPORTAR LA FUENTE PUBLIC SANS */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&display=swap');