/**
 * Twingital Grid Pro - Main Styles
 * Version: 1.1.0 - Carousel Pro Styles
 * 
 * CAMBIOS EN ESTA VERSIÓN:
 * ✅ Agregado !important a estilos críticos de layout
 * ✅ Aumentada especificidad con selectores más específicos
 * ✅ Prevención de conflictos con temas de WordPress
 * ✅ Estilos para título del widget
 */

/* ============================================================================
   WIDGET TITLE (Título del Widget) - ✅ FORZADO CON !IMPORTANT
   ========================================================================= */

.tgp-widget-title-wrapper {
    margin-bottom: 30px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    position: relative !important;
}

.tgp-widget-title {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
}

/* Title Styles */
.tgp-widget-title.tgp-title-default {
    font-size: 32px !important;
    color: #1f2937 !important;
    border-bottom: 2px solid #e5e7eb !important;
    padding-bottom: 12px !important;
}

.tgp-widget-title.tgp-title-modern {
    font-size: 36px !important;
    color: #1f2937 !important;
    position: relative !important;
    padding-left: 20px !important;
}

.tgp-widget-title.tgp-title-modern::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 4px !important;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6) !important;
    border-radius: 2px !important;
}

.tgp-widget-title.tgp-title-minimal {
    font-size: 28px !important;
    color: #374151 !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.tgp-widget-title.tgp-title-bold {
    font-size: 42px !important;
    color: #111827 !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
}

.tgp-widget-title.tgp-title-elegant {
    font-size: 38px !important;
    color: #1f2937 !important;
    font-weight: 300 !important;
    font-family: Georgia, serif !important;
    font-style: italic !important;
}

.tgp-widget-title.tgp-title-gradient {
    font-size: 40px !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.tgp-widget-title.tgp-title-underline {
    font-size: 34px !important;
    color: #1f2937 !important;
    position: relative !important;
    display: inline-block !important;
    padding-bottom: 10px !important;
}

.tgp-widget-title.tgp-title-underline::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 60px !important;
    height: 3px !important;
    background: #3b82f6 !important;
    border-radius: 2px !important;
}

.tgp-widget-subtitle {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    color: #6b7280 !important;
    font-weight: 400 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Title Alignment */
.tgp-widget-title-wrapper.tgp-align-left {
    text-align: left !important;
}

.tgp-widget-title-wrapper.tgp-align-center {
    text-align: center !important;
}

.tgp-widget-title-wrapper.tgp-align-center .tgp-widget-title.tgp-title-underline::after {
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.tgp-widget-title-wrapper.tgp-align-right {
    text-align: right !important;
}

.tgp-widget-title-wrapper.tgp-align-right .tgp-widget-title.tgp-title-underline::after {
    left: auto !important;
    right: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .tgp-widget-title-wrapper {
        margin-bottom: 20px !important;
    }
    
    .tgp-widget-title.tgp-title-default,
    .tgp-widget-title.tgp-title-modern,
    .tgp-widget-title.tgp-title-minimal {
        font-size: 24px !important;
    }
    
    .tgp-widget-title.tgp-title-bold {
        font-size: 28px !important;
    }
    
    .tgp-widget-title.tgp-title-elegant,
    .tgp-widget-title.tgp-title-gradient {
        font-size: 26px !important;
    }
    
    .tgp-widget-title.tgp-title-underline {
        font-size: 24px !important;
    }
}

/* ============================================================================
   RESET Y BASE - Con !important para prevenir conflictos
   ========================================================================= */

.tgp-container,
.tgp-grid,
.tgp-masonry,
.tgp-list,
.tgp-carousel,
.tgp-layout-carousel,
.tgp-layout-coverflow,
.tgp-layout-grid,
.tgp-layout-masonry,
.tgp-layout-list {
    box-sizing: border-box !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.tgp-container *,
.tgp-grid *,
.tgp-masonry *,
.tgp-list *,
.tgp-carousel * {
    box-sizing: border-box;
}

/* ============================================================================
   GRID LAYOUT - Con !important en display
   ========================================================================= */

.tgp-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--tgp-columns, 3), 1fr) !important;
    gap: var(--tgp-gap, 30px) !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .tgp-grid {
        grid-template-columns: repeat(var(--tgp-columns-tablet, 2), 1fr) !important;
    }
}

@media (max-width: 768px) {
    .tgp-grid {
        grid-template-columns: repeat(var(--tgp-columns-mobile, 1), 1fr) !important;
    }
}

/* ============================================================================
   MASONRY LAYOUT
   ========================================================================= */

.tgp-masonry {
    display: block !important;
    width: 100% !important;
}

.tgp-masonry::after {
    content: '';
    display: block;
    clear: both;
}

.tgp-masonry .tgp-card {
    float: left;
    width: calc((100% - (var(--tgp-gap, 30px) * (var(--tgp-columns, 3) - 1))) / var(--tgp-columns, 3));
    margin-bottom: var(--tgp-gap, 30px);
}

/* ============================================================================
   LIST LAYOUT - ✅ CORREGIDO: Imágenes con tamaño fijo
   ========================================================================= */

.tgp-list {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--tgp-gap, 30px) !important;
    width: 100% !important;
}

.tgp-list .tgp-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start; /* ✅ Alinear arriba */
    min-height: 200px; /* ✅ Altura mínima */
}

.tgp-list .tgp-card-image {
    flex: 0 0 300px !important; /* ✅ Tamaño fijo */
    max-width: 300px !important;
    height: 200px !important; /* ✅ Altura fija */
    overflow: hidden !important;
}

/* ✅ CRÍTICO: Evitar que el ratio empuje contenido */
.tgp-list .tgp-card-image.tgp-ratio-16-9,
.tgp-list .tgp-card-image.tgp-ratio-4-3,
.tgp-list .tgp-card-image.tgp-ratio-1-1,
.tgp-list .tgp-card-image.tgp-ratio-21-9 {
    padding-bottom: 0 !important; /* ✅ Remover padding del ratio */
    height: 200px !important; /* ✅ Forzar altura fija */
}

.tgp-list .tgp-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.tgp-list .tgp-card-content {
    flex: 1 !important;
    padding: 0 0 0 24px !important; /* ✅ Padding solo izquierda */
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

@media (max-width: 768px) {
    .tgp-list .tgp-card {
        flex-direction: column !important;
        min-height: auto;
    }
    
    .tgp-list .tgp-card-image {
        flex: 0 0 auto !important;
        max-width: 100% !important;
        width: 100% !important;
        height: 250px !important;
    }
    
    .tgp-list .tgp-card-content {
        padding: 20px !important;
    }
}

/* ============================================================================
   CARD STYLES - Con !important en display y visibilidad
   ========================================================================= */

.tgp-card {
    display: block !important;
    position: relative;
    background: var(--tgp-card-bg, #ffffff) !important;
    /* ✅ FIX: nombre correcto --tgp-card-radius (coincide con lo que genera render_styles()) */
    border-radius: var(--tgp-card-radius, 8px) !important;
    box-shadow: var(--tgp-shadow, none);
    border: var(--tgp-border-width, 0px) solid var(--tgp-border-color, #e5e7eb);
    overflow: hidden !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 1 !important;
    visibility: visible !important;
}

/* ============================================================================
   CARD STYLES PREDEFINIDOS
   ✅ FIX: Selectores via contenedor padre (la clase está en .tgp-container,
   no en .tgp-card directamente). Ambas variantes cubiertas por si acaso.
   ========================================================================= */

/* --- CLASSIC: borde sutil, fondo blanco, sombra small --- */
.tgp-style-classic .tgp-card,
.tgp-card.tgp-style-classic {
    background: var(--tgp-card-bg, #ffffff) !important;
    border: 1px solid var(--tgp-border-color, #e5e7eb) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}
.tgp-style-classic .tgp-card:hover,
.tgp-card.tgp-style-classic:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10) !important;
}

/* --- MODERN: sin borde, sombra media, fondo blanco puro --- */
.tgp-style-modern .tgp-card,
.tgp-card.tgp-style-modern {
    background: var(--tgp-card-bg, #ffffff) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04) !important;
}
.tgp-style-modern .tgp-card:hover,
.tgp-card.tgp-style-modern:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.13) !important;
}

/* --- MINIMAL: sin borde, sin sombra, fondo transparente --- */
.tgp-style-minimal .tgp-card,
.tgp-card.tgp-style-minimal {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.tgp-style-minimal .tgp-card .tgp-card-content,
.tgp-card.tgp-style-minimal .tgp-card-content {
    padding: 16px 0 !important;
}
.tgp-style-minimal .tgp-card-image {
    border-radius: var(--tgp-card-radius, 8px) !important;
    overflow: hidden;
}

/* --- OVERLAY: imagen de fondo, texto superpuesto con gradiente --- */
.tgp-style-overlay .tgp-card,
.tgp-card.tgp-style-overlay {
    border: none !important;
    box-shadow: var(--tgp-shadow, 0 4px 20px rgba(0,0,0,0.2)) !important;
}
.tgp-style-overlay .tgp-card .tgp-card-inner,
.tgp-card.tgp-style-overlay .tgp-card-inner {
    position: relative;
    overflow: hidden;
}
.tgp-style-overlay .tgp-card .tgp-card-content,
.tgp-card.tgp-style-overlay .tgp-card-content {
    position: absolute !important;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%) !important;
    color: #ffffff !important;
    padding: 28px 22px 22px !important;
}
.tgp-style-overlay .tgp-card .tgp-card-title,
.tgp-style-overlay .tgp-card .tgp-card-title a,
.tgp-style-overlay .tgp-card .tgp-card-excerpt,
.tgp-style-overlay .tgp-card .tgp-card-meta,
.tgp-card.tgp-style-overlay .tgp-card-title,
.tgp-card.tgp-style-overlay .tgp-card-title a,
.tgp-card.tgp-style-overlay .tgp-card-excerpt,
.tgp-card.tgp-style-overlay .tgp-card-meta {
    color: #ffffff !important;
}
.tgp-style-overlay .tgp-card .tgp-category-badge,
.tgp-card.tgp-style-overlay .tgp-category-badge {
    background: rgba(255,255,255,0.18) !important;
    color: #ffffff !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
}
/* Imagen ocupa todo el card en overlay */
.tgp-style-overlay .tgp-card .tgp-card-image,
.tgp-card.tgp-style-overlay .tgp-card-image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding-bottom: 0 !important;
}
.tgp-style-overlay .tgp-card .tgp-card-image img,
.tgp-card.tgp-style-overlay .tgp-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
/* El card overlay necesita altura mínima para verse */
.tgp-style-overlay .tgp-card,
.tgp-card.tgp-style-overlay {
    min-height: 320px;
}

/* --- ELEVATED: sin borde, sombra grande prominente --- */
.tgp-style-elevated .tgp-card,
.tgp-card.tgp-style-elevated {
    background: var(--tgp-card-bg, #ffffff) !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.06) !important;
}
.tgp-style-elevated .tgp-card:hover,
.tgp-card.tgp-style-elevated:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.17), 0 2px 8px rgba(0,0,0,0.08) !important;
    transform: translateY(-4px);
}

/* --- BORDERED: borde visible más grueso, sin sombra --- */
.tgp-style-bordered .tgp-card,
.tgp-card.tgp-style-bordered {
    background: var(--tgp-card-bg, #ffffff) !important;
    border: 2px solid var(--tgp-border-color, #e5e7eb) !important;
    box-shadow: none !important;
}
.tgp-style-bordered .tgp-card:hover,
.tgp-card.tgp-style-bordered:hover {
    border-color: var(--tgp-button-bg, #3b82f6) !important;
}

/* --- SHADOWED: solo sombra pronunciada, fondo blanco --- */
.tgp-style-shadowed .tgp-card,
.tgp-card.tgp-style-shadowed {
    background: var(--tgp-card-bg, #ffffff) !important;
    border: none !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05) !important;
}
.tgp-style-shadowed .tgp-card:hover,
.tgp-card.tgp-style-shadowed:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.14), 0 2px 6px rgba(0,0,0,0.06) !important;
}

/* Equal Height */
.tgp-equal-height .tgp-card {
    height: 100%;
    display: flex !important;
    flex-direction: column !important;
}

.tgp-equal-height .tgp-card-inner {
    flex: 1;
    display: flex !important;
    flex-direction: column !important;
}

.tgp-equal-height .tgp-card-content {
    flex: 1;
}

/* ============================================================================
   CARD INNER
   ========================================================================= */

.tgp-card-inner {
    display: block !important;
    width: 100% !important;
    height: 100%;
}

/* Image Positions */
.tgp-card-inner.tgp-image-top {
    display: flex !important;
    flex-direction: column !important;
}

.tgp-card-inner.tgp-image-left {
    display: flex !important;
    flex-direction: row !important;
}

.tgp-card-inner.tgp-image-right {
    display: flex !important;
    flex-direction: row-reverse !important;
}

.tgp-card-inner.tgp-image-left .tgp-card-image,
.tgp-card-inner.tgp-image-right .tgp-card-image {
    flex: 0 0 40%;
    max-width: 40%;
}

.tgp-card-inner.tgp-image-left .tgp-card-content,
.tgp-card-inner.tgp-image-right .tgp-card-content {
    flex: 1;
}

/* ============================================================================
   CARD IMAGE
   ========================================================================= */

.tgp-card-image {
    position: relative;
    overflow: hidden;
    width: 100% !important;
    display: block !important;
}

.tgp-card-image a {
    display: block !important;
    width: 100%;
    height: 100%;
}

.tgp-card-image img {
    width: 100% !important;
    height: 100%;
    object-fit: cover;
    display: block !important;
    transition: transform 0.3s ease;
}

/* Image Ratios */
.tgp-ratio-16-9 {
    padding-bottom: 56.25%;
}

.tgp-ratio-4-3 {
    padding-bottom: 75%;
}

.tgp-ratio-1-1 {
    padding-bottom: 100%;
}

.tgp-ratio-21-9 {
    padding-bottom: 42.857%;
}

.tgp-card-image.tgp-ratio-16-9,
.tgp-card-image.tgp-ratio-4-3,
.tgp-card-image.tgp-ratio-1-1,
.tgp-card-image.tgp-ratio-21-9 {
    position: relative;
    height: 0;
}

.tgp-card-image.tgp-ratio-16-9 a,
.tgp-card-image.tgp-ratio-4-3 a,
.tgp-card-image.tgp-ratio-1-1 a,
.tgp-card-image.tgp-ratio-21-9 a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================================================
   CARD CONTENT
   ========================================================================= */

.tgp-card-content {
    padding: var(--tgp-card-padding, 20px) !important;
    display: block !important;
}

/* ✅ CORREGIR: Reducir margen superior si hay imagen arriba */
.tgp-card-inner.tgp-image-top .tgp-card-content {
    padding-top: 16px !important;
}

/* Category */
.tgp-card-category {
    margin-bottom: 8px; /* ✅ Reducido de 10px */
}

.tgp-category-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--tgp-category-bg, #f3f4f6);
    color: var(--tgp-category-color, #6b7280);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tgp-category-badge:hover {
    background: var(--tgp-category-hover-bg, #e5e7eb);
}

/* Title */
.tgp-card-title {
    margin: 0 0 8px 0 !important; /* ✅ Reducido de 10px */
    font-size: var(--tgp-title-size, 20px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--tgp-title-color, #1f2937);
}

.tgp-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tgp-card-title a:hover {
    color: var(--tgp-title-hover-color, #3b82f6);
}

/* Meta */
.tgp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px; /* ✅ Reducido de 12px */
    font-size: 14px;
    color: var(--tgp-meta-color, #6b7280);
}

.tgp-meta-author,
.tgp-meta-date,
.tgp-meta-comments {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tgp-meta-author a {
    color: inherit;
    text-decoration: none;
}

.tgp-meta-author a:hover {
    color: var(--tgp-title-hover-color, #3b82f6);
}

/* Excerpt */
.tgp-card-excerpt {
    margin: 0 0 12px 0; /* ✅ Reducido de 15px */
    font-size: 15px;
    line-height: 1.6;
    color: var(--tgp-excerpt-color, #6b7280);
}

/* Button */
.tgp-card-button {
    margin-top: auto;
}

.tgp-button {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.tgp-button-solid {
    background: var(--tgp-button-bg, #3b82f6);
    color: var(--tgp-button-text, #ffffff);
}

.tgp-button-solid:hover {
    background: var(--tgp-button-hover-bg, #2563eb);
    transform: translateY(-1px);
}

.tgp-button-outline {
    background: transparent;
    color: var(--tgp-button-bg, #3b82f6);
    border: 2px solid var(--tgp-button-bg, #3b82f6);
}

.tgp-button-outline:hover {
    background: var(--tgp-button-bg, #3b82f6);
    color: #ffffff;
}

.tgp-button-ghost {
    background: transparent;
    color: var(--tgp-button-bg, #3b82f6);
}

.tgp-button-ghost:hover {
    background: rgba(59, 130, 246, 0.1);
}

/* ============================================================================
   HOVER ANIMATIONS
   ========================================================================= */

.tgp-card.tgp-hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.tgp-card.tgp-hover-scale:hover {
    transform: scale(1.02);
}

.tgp-card.tgp-hover-shadow:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.tgp-card.tgp-hover-zoom:hover .tgp-card-image img {
    transform: scale(1.1);
}

.tgp-card.tgp-hover-rotate:hover {
    transform: rotate(2deg);
}

/* ============================================================================
   CAROUSEL LAYOUT
   ========================================================================= */

.tgp-layout-carousel,
.tgp-layout-coverflow {
    position: relative;
    width: 100% !important;
    overflow: hidden;
}

.tgp-layout-carousel .swiper,
.tgp-layout-coverflow .swiper {
    width: 100%;
    padding: 10px 0;
}

.tgp-layout-carousel .swiper-slide,
.tgp-layout-coverflow .swiper-slide {
    height: auto;
}

/* ✅ EQUAL HEIGHTS para carousel - VERSIÓN ULTRA FORZADA */

/* Wrapper del swiper */
.tgp-equal-height.tgp-layout-carousel .swiper-wrapper,
.tgp-equal-height.tgp-layout-coverflow .swiper-wrapper {
    display: flex !important;
    align-items: stretch !important;
}

/* Slides */
.tgp-equal-height.tgp-layout-carousel .swiper-slide,
.tgp-equal-height.tgp-layout-coverflow .swiper-slide {
    height: auto !important;
    display: flex !important;
    align-items: stretch !important;
    flex-direction: column !important;
}

/* Cards dentro de slides */
.tgp-equal-height.tgp-layout-carousel .swiper-slide .tgp-card,
.tgp-equal-height.tgp-layout-coverflow .swiper-slide .tgp-card,
.tgp-equal-height.tgp-layout-carousel .tgp-card,
.tgp-equal-height.tgp-layout-coverflow .tgp-card {
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    min-height: 400px !important; /* Altura mínima */
}

/* Card inner */
.tgp-equal-height.tgp-layout-carousel .swiper-slide .tgp-card-inner,
.tgp-equal-height.tgp-layout-coverflow .swiper-slide .tgp-card-inner,
.tgp-equal-height.tgp-layout-carousel .tgp-card-inner,
.tgp-equal-height.tgp-layout-coverflow .tgp-card-inner {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Imagen no crece */
.tgp-equal-height.tgp-layout-carousel .swiper-slide .tgp-card-image,
.tgp-equal-height.tgp-layout-coverflow .swiper-slide .tgp-card-image,
.tgp-equal-height.tgp-layout-carousel .tgp-card-image,
.tgp-equal-height.tgp-layout-coverflow .tgp-card-image {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* Card content crece para llenar espacio */
.tgp-equal-height.tgp-layout-carousel .swiper-slide .tgp-card-content,
.tgp-equal-height.tgp-layout-coverflow .swiper-slide .tgp-card-content,
.tgp-equal-height.tgp-layout-carousel .tgp-card-content,
.tgp-equal-height.tgp-layout-coverflow .tgp-card-content {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* Título, categoría y meta no crecen */
.tgp-equal-height.tgp-layout-carousel .tgp-card-title,
.tgp-equal-height.tgp-layout-coverflow .tgp-card-title,
.tgp-equal-height.tgp-layout-carousel .tgp-card-category,
.tgp-equal-height.tgp-layout-coverflow .tgp-card-category,
.tgp-equal-height.tgp-layout-carousel .tgp-card-meta,
.tgp-equal-height.tgp-layout-coverflow .tgp-card-meta {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* Excerpt crece para ocupar espacio disponible */
.tgp-equal-height.tgp-layout-carousel .tgp-card-excerpt,
.tgp-equal-height.tgp-layout-coverflow .tgp-card-excerpt {
    flex: 1 1 auto !important;
}

/* ✅ CRÍTICO: Botón SIEMPRE al fondo */
.tgp-equal-height.tgp-layout-carousel .tgp-card-button,
.tgp-equal-height.tgp-layout-coverflow .tgp-card-button {
    margin-top: auto !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    align-self: flex-start !important;
}

/* ✅ TAMBIÉN para Grid con equal height */
.tgp-equal-height.tgp-layout-grid .tgp-grid {
    display: grid !important;
    align-items: stretch !important;
}

.tgp-equal-height.tgp-layout-grid .tgp-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.tgp-equal-height.tgp-layout-grid .tgp-card-inner {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

.tgp-equal-height.tgp-layout-grid .tgp-card-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
}

.tgp-equal-height.tgp-layout-grid .tgp-card-excerpt {
    flex: 1 1 auto !important;
}

.tgp-equal-height.tgp-layout-grid .tgp-card-button {
    margin-top: auto !important;
    flex-shrink: 0 !important;
    align-self: flex-start !important;
}

/* Swiper Navigation - ✅ MODERNIZADO con !important para evitar sobrescritura */
.tgp-layout-carousel .swiper-button-next,
.tgp-layout-carousel .swiper-button-prev,
.tgp-layout-coverflow .swiper-button-next,
.tgp-layout-coverflow .swiper-button-prev {
    width: 48px !important;
    height: 48px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.tgp-layout-carousel .swiper-button-next:hover,
.tgp-layout-carousel .swiper-button-prev:hover,
.tgp-layout-coverflow .swiper-button-next:hover,
.tgp-layout-coverflow .swiper-button-prev:hover {
    background: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
    transform: scale(1.1) !important;
}

/* ✅ Iconos modernos de las flechas */
.tgp-layout-carousel .swiper-button-next:after,
.tgp-layout-carousel .swiper-button-prev:after,
.tgp-layout-coverflow .swiper-button-next:after,
.tgp-layout-coverflow .swiper-button-prev:after {
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #3b82f6 !important;
}

/* ✅ Posicionamiento mejorado */
.tgp-layout-carousel .swiper-button-next,
.tgp-layout-coverflow .swiper-button-next {
    right: 10px;
}

.tgp-layout-carousel .swiper-button-prev,
.tgp-layout-coverflow .swiper-button-prev {
    left: 10px;
}

/* ✅ Responsive - ajustar en mobile */
@media (max-width: 768px) {
    .tgp-layout-carousel .swiper-button-next,
    .tgp-layout-carousel .swiper-button-prev,
    .tgp-layout-coverflow .swiper-button-next,
    .tgp-layout-coverflow .swiper-button-prev {
        width: 40px !important;
        height: 40px !important;
    }
    
    .tgp-layout-carousel .swiper-button-next:after,
    .tgp-layout-carousel .swiper-button-prev:after,
    .tgp-layout-coverflow .swiper-button-next:after,
    .tgp-layout-coverflow .swiper-button-prev:after {
        font-size: 16px !important;
    }
}

/* ✅ Estados deshabilitados */
.tgp-layout-carousel .swiper-button-next.swiper-button-disabled,
.tgp-layout-carousel .swiper-button-prev.swiper-button-disabled,
.tgp-layout-coverflow .swiper-button-next.swiper-button-disabled,
.tgp-layout-coverflow .swiper-button-prev.swiper-button-disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}

.tgp-layout-carousel .swiper-button-next.swiper-button-disabled:hover,
.tgp-layout-carousel .swiper-button-prev.swiper-button-disabled:hover,
.tgp-layout-coverflow .swiper-button-next.swiper-button-disabled:hover,
.tgp-layout-coverflow .swiper-button-prev.swiper-button-disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Swiper Pagination - ✅ MODERNIZADO */
.swiper-pagination {
    bottom: 0 !important;
    padding: 10px 0;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #d1d5db;
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet:hover {
    background: #9ca3af;
    transform: scale(1.2);
}

.swiper-pagination-bullet-active {
    background: #3b82f6;
    width: 28px; /* ✅ Se alarga cuando está activo */
    border-radius: 5px;
}

/* ✅ Paginación dinámica */
.swiper-pagination-bullets-dynamic {
    overflow: visible;
}

.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
    transform: scale(0.75);
}

.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
    transform: scale(1);
}

.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
    transform: scale(1);
}

.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev,
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
    transform: scale(0.9);
}

.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev,
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
    transform: scale(0.8);
}

/* ============================================================================
   CAROUSEL WRAPPER & NAVIGATION SYSTEM
   Flechas posicionadas de forma absoluta sobre el wrapper
   ========================================================================= */

.tgp-carousel-wrapper {
    position: relative;
    width: 100%;
}

/* Padding lateral para que los botones no tapen el contenido */
.tgp-carousel-wrapper .swiper {
    padding-bottom: 40px; /* espacio para paginación */
}

/* --- Botones base --- */
.tgp-carousel-wrapper .tgp-swiper-prev,
.tgp-carousel-wrapper .tgp-swiper-next {
    position: absolute;
    top: 50%;
    transform: translateY(-60%); /* -60% compensa el padding-bottom del paginador */
    z-index: 10;
    cursor: pointer;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    line-height: 1;
}

.tgp-carousel-wrapper .tgp-swiper-prev { left: -16px; }
.tgp-carousel-wrapper .tgp-swiper-next { right: -16px; }

.tgp-carousel-wrapper .tgp-swiper-prev svg,
.tgp-carousel-wrapper .tgp-swiper-next svg {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
}

/* Deshabilitado */
.tgp-carousel-wrapper .tgp-swiper-prev.swiper-button-disabled,
.tgp-carousel-wrapper .tgp-swiper-next.swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- NAV: Circle (classic) --- */
.tgp-nav-circle {
    width: 46px;
    height: 46px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0,0,0,0.14);
    color: #374151;
}
.tgp-nav-circle:hover {
    background: var(--tgp-button-bg, #3b82f6);
    color: #fff;
    box-shadow: 0 4px 20px rgba(59,130,246,0.35);
}
.tgp-nav-circle:hover svg { stroke: #fff; }

/* --- NAV: Pill (modern / cards) --- */
.tgp-nav-pill {
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #374151;
}
.tgp-nav-pill:hover {
    background: var(--tgp-button-bg, #3b82f6);
    color: #fff;
    transform: translateY(-60%) scale(1.08);
}
.tgp-nav-pill:hover svg { stroke: #fff; }

/* --- NAV: Minimal --- */
.tgp-nav-minimal {
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: 0;
    color: #6b7280;
    border-bottom: 2px solid currentColor;
}
.tgp-nav-minimal:hover { color: var(--tgp-button-bg, #3b82f6); }

/* --- NAV: Overlay (overlay / fade) --- */
.tgp-nav-overlay {
    width: 52px;
    height: 52px;
    background: rgba(0,0,0,0.35);
    border-radius: 50%;
    backdrop-filter: blur(6px);
    color: #fff;
}
.tgp-nav-overlay:hover { background: rgba(0,0,0,0.6); }

/* --- NAV: Magazine (agrupados arriba-derecha) --- */
.tgp-nav-magazine {
    position: absolute;
    top: -48px;
    right: 0;
    display: flex;
    gap: 8px;
    z-index: 10;
}
.tgp-nav-magazine .tgp-swiper-prev,
.tgp-nav-magazine .tgp-swiper-next {
    position: static;
    transform: none;
    width: 38px;
    height: 38px;
    background: #f3f4f6;
    border-radius: 8px;
    color: #374151;
}
.tgp-nav-magazine .tgp-swiper-prev:hover,
.tgp-nav-magazine .tgp-swiper-next:hover {
    background: var(--tgp-button-bg, #3b82f6);
    color: #fff;
}
.tgp-nav-magazine .tgp-swiper-prev:hover svg,
.tgp-nav-magazine .tgp-swiper-next:hover svg { stroke: #fff; }

/* Paginación base para el nuevo sistema */
.tgp-carousel-wrapper .tgp-swiper-pagination {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    text-align: center;
}

@media (max-width: 768px) {
    .tgp-carousel-wrapper .tgp-swiper-prev { left: 0; }
    .tgp-carousel-wrapper .tgp-swiper-next { right: 0; }
}

/* ============================================================================
   CAROUSEL STYLE: CLASSIC
   Tarjeta estándar — hereda tgp-card base
   ========================================================================= */
/* No requiere estilos extra, usa los de tgp-card */

/* ============================================================================
   CAROUSEL STYLE: MODERN
   Imagen con gradiente tenue, badge de categoría pill, meta inline, CTA con flecha
   ========================================================================= */

.tgp-carousel-style-modern .tgp-card-modern {
    background: var(--tgp-card-bg, #fff);
    border-radius: var(--tgp-card-radius, 16px);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 24px rgba(0,0,0,0.07);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tgp-carousel-style-modern .tgp-card-modern:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.06), 0 16px 40px rgba(0,0,0,0.12);
}
.tgp-carousel-style-modern .tgp-card-modern.tgp-hover-lift:hover { transform: translateY(-6px); }
.tgp-carousel-style-modern .tgp-card-modern.tgp-hover-zoom:hover .tgp-card-modern__image img { transform: scale(1.07); }

.tgp-card-modern__image-link { display: block; overflow: hidden; }
.tgp-card-modern__image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.tgp-card-modern__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.tgp-card-modern__image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.08) 100%);
    pointer-events: none;
}
.tgp-card-modern__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--tgp-button-bg, #3b82f6);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 20px;
    pointer-events: none;
}
.tgp-card-modern__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.tgp-card-modern__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--tgp-meta-color, #9ca3af);
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.tgp-card-modern__meta span { display: inline-flex; align-items: center; gap: 4px; }
.tgp-card-modern__meta svg { width: 13px; height: 13px; flex-shrink: 0; }
.tgp-card-modern__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--tgp-title-color, #111827);
    margin: 0 0 10px 0;
    flex-shrink: 0;
}
.tgp-card-modern__title a { color: inherit; text-decoration: none; }
.tgp-card-modern__title a:hover { color: var(--tgp-button-bg, #3b82f6); }
.tgp-card-modern__excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--tgp-excerpt-color, #6b7280);
    margin: 0 0 16px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tgp-card-modern__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tgp-button-bg, #3b82f6);
    text-decoration: none;
    margin-top: auto;
    align-self: flex-start;
    transition: gap 0.2s ease;
}
.tgp-card-modern__btn:hover { gap: 10px; }
.tgp-card-modern__btn svg { width: 14px; height: 14px; }

/* ============================================================================
   CAROUSEL STYLE: MINIMAL
   Sin sombra, tipografía grande, categoría como texto + fecha alineados
   ========================================================================= */

.tgp-carousel-style-minimal .tgp-card-minimal {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 24px;
}
.tgp-card-minimal__image-link { display: block; overflow: hidden; border-radius: 8px; }
.tgp-card-minimal__image {
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
}
.tgp-card-minimal__image img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.4s ease;
}
.tgp-card-minimal__image-link:hover img { transform: scale(1.04); }
.tgp-card-minimal__body { padding: 18px 0 0; flex: 1; display: flex; flex-direction: column; }
.tgp-card-minimal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.tgp-card-minimal__cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tgp-button-bg, #3b82f6);
}
.tgp-card-minimal__date {
    font-size: 12px;
    color: var(--tgp-meta-color, #9ca3af);
}
.tgp-card-minimal__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--tgp-title-color, #111827);
    margin: 0 0 10px;
    flex-shrink: 0;
}
.tgp-card-minimal__title a { color: inherit; text-decoration: none; }
.tgp-card-minimal__title a:hover { color: var(--tgp-button-bg, #3b82f6); }
.tgp-card-minimal__excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: var(--tgp-excerpt-color, #6b7280);
    margin: 0 0 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tgp-card-minimal__link {
    font-size: 13px;
    font-weight: 600;
    color: var(--tgp-title-color, #111827);
    text-decoration: none;
    margin-top: auto;
    align-self: flex-start;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    transition: color 0.2s;
}
.tgp-card-minimal__link:hover { color: var(--tgp-button-bg, #3b82f6); }

/* ============================================================================
   CAROUSEL STYLE: OVERLAY
   Imagen full-card, gradiente oscuro desde abajo, texto en blanco
   ========================================================================= */

.tgp-carousel-style-overlay .tgp-card-overlay {
    border-radius: var(--tgp-card-radius, 16px);
    overflow: hidden;
    display: block;
    aspect-ratio: 4/5;
}
.tgp-carousel-style-overlay .tgp-card-overlay.tgp-hover-lift:hover { transform: translateY(-5px); }
.tgp-carousel-style-overlay .tgp-card-overlay.tgp-hover-zoom:hover .tgp-card-overlay__img { transform: scale(1.06); }

.tgp-card-overlay__inner {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    overflow: hidden;
    border-radius: var(--tgp-card-radius, 16px);
}
.tgp-card-overlay__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.tgp-card-overlay__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.35) 55%, transparent 100%);
    pointer-events: none;
}
.tgp-card-overlay__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 22px 22px;
}
.tgp-card-overlay__cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.75);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 3px 9px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.tgp-card-overlay__title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    margin: 0 0 10px;
}
.tgp-card-overlay__excerpt {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255,255,255,0.75);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================================
   CAROUSEL STYLE: MAGAZINE
   Layout editorial: imagen arriba proporcionada + texto con categoría + CTA minimal
   ========================================================================= */

.tgp-carousel-style-magazine .tgp-card-magazine {
    background: var(--tgp-card-bg, #fff);
    border-radius: var(--tgp-card-radius, 12px);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s;
}
.tgp-carousel-style-magazine .tgp-card-magazine:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.13);
}
.tgp-card-magazine__image-link { display: block; }
.tgp-card-magazine__image {
    aspect-ratio: 16/9;
    overflow: hidden;
}
.tgp-card-magazine__image img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.45s ease;
}
.tgp-card-magazine__image-link:hover img { transform: scale(1.05); }
.tgp-card-magazine__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.tgp-card-magazine__header { margin-bottom: 8px; }
.tgp-card-magazine__cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tgp-button-bg, #3b82f6);
    border-left: 3px solid currentColor;
    padding-left: 8px;
}
.tgp-card-magazine__title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--tgp-title-color, #0f172a);
    margin: 0 0 12px;
}
.tgp-card-magazine__title a { color: inherit; text-decoration: none; }
.tgp-card-magazine__title a:hover { color: var(--tgp-button-bg, #3b82f6); }
.tgp-card-magazine__excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: var(--tgp-excerpt-color, #64748b);
    margin: 0 0 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tgp-card-magazine__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}
.tgp-card-magazine__author,
.tgp-card-magazine__date {
    font-size: 12px;
    color: var(--tgp-meta-color, #94a3b8);
}
.tgp-card-magazine__btn {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tgp-button-bg, #3b82f6);
    text-decoration: none;
    transition: opacity 0.2s;
}
.tgp-card-magazine__btn:hover { opacity: 0.75; }

/* ============================================================================
   CAROUSEL STYLE: CARDS
   Tarjeta elevada con fuerte sombra, imagen con overlay reveal en hover
   ========================================================================= */

.tgp-carousel-style-cards .tgp-card-cards {
    background: var(--tgp-card-bg, #fff);
    border-radius: var(--tgp-card-radius, 16px);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tgp-carousel-style-cards .tgp-card-cards:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.06), 0 24px 48px rgba(0,0,0,0.16);
}
.tgp-card-cards__image-link { display: block; }
.tgp-card-cards__image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.tgp-card-cards__image img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.45s ease;
}
.tgp-card-cards__image:hover img { transform: scale(1.08); }
.tgp-card-cards__hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.tgp-card-cards__image:hover .tgp-card-cards__hover-overlay { opacity: 1; }
.tgp-card-cards__hover-overlay span {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.8);
    padding: 8px 20px;
    border-radius: 30px;
}
.tgp-card-cards__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.tgp-card-cards__cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--tgp-button-bg, #3b82f6);
    background: color-mix(in srgb, var(--tgp-button-bg, #3b82f6) 10%, transparent);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.tgp-card-cards__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--tgp-title-color, #111827);
    margin: 0 0 10px;
    flex-shrink: 0;
}
.tgp-card-cards__title a { color: inherit; text-decoration: none; }
.tgp-card-cards__title a:hover { color: var(--tgp-button-bg, #3b82f6); }
.tgp-card-cards__excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--tgp-excerpt-color, #6b7280);
    margin: 0 0 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tgp-card-cards__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}
.tgp-card-cards__date { font-size: 12px; color: var(--tgp-meta-color, #9ca3af); }
.tgp-card-cards__btn {
    display: inline-block;
    padding: 7px 18px;
    background: var(--tgp-button-bg, #3b82f6);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--tgp-button-radius, 8px);
    text-decoration: none;
    transition: opacity 0.2s;
}
.tgp-card-cards__btn:hover { opacity: 0.85; }

/* ============================================================================
   CAROUSEL STYLE: FADE
   Un slide full-width a la vez, imagen de fondo con texto centrado
   ========================================================================= */

.tgp-carousel-style-fade .swiper {
    padding-bottom: 50px;
}
.tgp-carousel-style-fade .tgp-card-fade {
    border-radius: var(--tgp-card-radius, 16px);
    overflow: hidden;
    display: block;
}
.tgp-card-fade__inner {
    position: relative;
    aspect-ratio: 16/7;
    min-height: 360px;
    overflow: hidden;
    border-radius: var(--tgp-card-radius, 16px);
}
.tgp-card-fade__image-wrap {
    position: absolute;
    inset: 0;
}
.tgp-card-fade__image-wrap img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.tgp-card-fade__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 60%, transparent 100%);
}
.tgp-card-fade__content {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
    max-width: 520px;
    color: #fff;
}
.tgp-card-fade__cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--tgp-button-bg, #3b82f6);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}
.tgp-card-fade__title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 14px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.tgp-card-fade__title a { color: inherit; text-decoration: none; }
.tgp-card-fade__excerpt {
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255,255,255,0.85);
    margin: 0 0 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tgp-card-fade__footer {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.tgp-card-fade__date { font-size: 13px; color: rgba(255,255,255,0.7); }
.tgp-card-fade__btn {
    display: inline-block;
    padding: 10px 26px;
    background: #fff;
    color: var(--tgp-button-bg, #3b82f6);
    font-size: 13px;
    font-weight: 700;
    border-radius: var(--tgp-button-radius, 30px);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.tgp-card-fade__btn:hover {
    background: var(--tgp-button-bg, #3b82f6);
    color: #fff;
}

/* Responsive fade */
@media (max-width: 768px) {
    .tgp-card-fade__inner { aspect-ratio: 4/3; min-height: 280px; }
    .tgp-card-fade__content { left: 6%; right: 6%; max-width: none; }
    .tgp-card-fade__title { font-size: 22px; }
    .tgp-card-fade__excerpt { display: none; }
}

/* ============================================================================
   FLIP CARDS
   ========================================================================= */

.tgp-layout-flip-cards .tgp-card {
    perspective: 1000px;
    min-height: 400px;
}

.tgp-flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.tgp-card:hover .tgp-flip-card-inner {
    transform: rotateY(180deg);
}

.tgp-flip-card-front,
.tgp-flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
}

.tgp-flip-card-back {
    transform: rotateY(180deg);
    background: var(--tgp-card-bg, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

/* ============================================================================
   ROTATE BOX
   ========================================================================= */

.tgp-layout-rotate-box .tgp-card {
    perspective: 1000px;
    min-height: 350px;
}

.tgp-rotate-box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.tgp-card:hover .tgp-rotate-box-inner {
    transform: rotateX(180deg);
}

.tgp-rotate-box-front,
.tgp-rotate-box-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
}

.tgp-rotate-box-back {
    transform: rotateX(180deg);
    background: var(--tgp-card-bg, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

/* ============================================================================
   TIMELINE
   ========================================================================= */

.tgp-layout-timeline {
    position: relative;
    padding: 40px 0;
}

.tgp-layout-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.tgp-timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.tgp-timeline-item:nth-child(odd) {
    padding-right: calc(50% + 30px);
}

.tgp-timeline-item:nth-child(even) {
    padding-left: calc(50% + 30px);
}

.tgp-timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    border: 3px solid #ffffff;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 0 4px #e5e7eb;
}

@media (max-width: 768px) {
    .tgp-layout-timeline::before {
        left: 20px;
    }
    
    .tgp-timeline-item:nth-child(odd),
    .tgp-timeline-item:nth-child(even) {
        padding-left: 50px;
        padding-right: 0;
    }
    
    .tgp-timeline-dot {
        left: 20px;
    }
}

/* ============================================================================
   ZIGZAG
   ========================================================================= */

.tgp-layout-zigzag .tgp-card {
    display: flex !important;
    gap: 30px;
    margin-bottom: 40px;
}

.tgp-layout-zigzag .tgp-card:nth-child(even) {
    flex-direction: row-reverse;
}

.tgp-layout-zigzag .tgp-card-image {
    flex: 0 0 50%;
}

.tgp-layout-zigzag .tgp-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .tgp-layout-zigzag .tgp-card,
    .tgp-layout-zigzag .tgp-card:nth-child(even) {
        flex-direction: column !important;
    }
    
    .tgp-layout-zigzag .tgp-card-image {
        flex: 0 0 auto;
    }
}

/* ============================================================================
   PAGINATION
   ========================================================================= */

.tgp-pagination {
    margin-top: 40px;
    text-align: center;
}

.tgp-pagination ul {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tgp-pagination li {
    margin: 0;
}

.tgp-pagination a,
.tgp-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tgp-pagination a:hover {
    color: #3b82f6;
    border-color: #3b82f6;
}

.tgp-pagination .current {
    color: #ffffff;
    background: #3b82f6;
    border-color: #3b82f6;
}

/* Load More */
.tgp-load-more-wrapper {
    text-align: center;
    margin-top: 40px;
}

.tgp-load-more {
    padding: 12px 32px;
    font-size: 16px;
}

/* Loader */
.tgp-loader {
    margin: 20px auto;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: tgp-spin 1s linear infinite;
}

@keyframes tgp-spin {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   NO POSTS MESSAGE
   ========================================================================= */

.tgp-no-posts {
    padding: 60px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

/* ============================================================================
   ANIMATIONS
   ========================================================================= */

.tgp-fade-in {
    animation: tgp-fadeIn 0.6s ease-out;
}

@keyframes tgp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tgp-slide-up {
    animation: tgp-slideUp 0.6s ease-out;
}

@keyframes tgp-slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tgp-zoom-in {
    animation: tgp-zoomIn 0.6s ease-out;
}

@keyframes tgp-zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================================================
   UTILITY CLASSES
   ========================================================================= */

.tgp-hidden {
    display: none !important;
}

.tgp-text-center {
    text-align: center;
}

.tgp-text-left {
    text-align: left;
}

.tgp-text-right {
    text-align: right;
}

/* ============================================================================
   ICONS (Simple CSS icons)
   ========================================================================= */

.tgp-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
}

.tgp-icon-calendar::before {
    content: "📅";
}

.tgp-icon-user::before {
    content: "👤";
}

.tgp-icon-comment::before {
    content: "💬";
}/**
 * Twingital Grid Pro - Cube 3D Layout (4 Caras Horizontal)
 * Version: 2.0.0 - Simplificado
 */

/* ===========================================================================
   CUBE 3D CONTAINER - 4 CARAS HORIZONTAL
   =========================================================================== */

.tgp-cube-3d-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    perspective: 1500px;
    perspective-origin: 50% 50%;
}

.tgp-cube-3d {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 500px;
    margin: 0 auto;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    transition: transform 0.8s ease-in-out;
}

/* Animación automática horizontal */
.tgp-cube-3d.auto-rotate {
    animation: tgp-cube-rotate-horizontal 20s infinite linear;
}

/* Pausar rotación al hacer hover */
.tgp-cube-3d:hover {
    animation-play-state: paused;
}

/* ===========================================================================
   CUBE FACES - 4 CARAS
   =========================================================================== */

.tgp-cube-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: white;
}

/* Cara 1 - Frontal */
.tgp-cube-face-front {
    transform: rotateY(0deg) translateZ(200px);
}

/* Cara 2 - Derecha */
.tgp-cube-face-right {
    transform: rotateY(90deg) translateZ(200px);
}

/* Cara 3 - Trasera */
.tgp-cube-face-back {
    transform: rotateY(180deg) translateZ(200px);
}

/* Cara 4 - Izquierda */
.tgp-cube-face-left {
    transform: rotateY(270deg) translateZ(200px);
}

/* ===========================================================================
   CUBE CARD CONTENT
   =========================================================================== */

.tgp-cube-face .tgp-card {
    width: 100%;
    height: 100%;
    display: flex !important;
    flex-direction: column;
    background: white;
    margin: 0;
    border: none;
}

.tgp-cube-face .tgp-card-image {
    flex: 0 0 250px;
    height: 250px;
    width: 100%;
    overflow: hidden;
}

.tgp-cube-face .tgp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tgp-cube-face .tgp-card-content {
    flex: 1;
    padding: 20px !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.tgp-cube-face .tgp-card-title {
    font-size: 20px !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.3;
}

.tgp-cube-face .tgp-card-excerpt {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tgp-cube-face .tgp-card-meta,
.tgp-cube-face .tgp-card-category {
    display: none;
}

.tgp-cube-face .tgp-card-button {
    margin-top: auto;
}

/* ===========================================================================
   CUBE CONTROLS
   =========================================================================== */

.tgp-cube-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.tgp-cube-control {
    width: 60px;
    height: 60px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    color: #6b7280;
    font-weight: bold;
}

.tgp-cube-control:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.tgp-cube-control:active {
    transform: scale(0.95);
}

.tgp-cube-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===========================================================================
   ANIMATIONS
   =========================================================================== */

@keyframes tgp-cube-rotate-horizontal {
    0% {
        transform: rotateY(0deg);
    }
    25% {
        transform: rotateY(90deg);
    }
    50% {
        transform: rotateY(180deg);
    }
    75% {
        transform: rotateY(270deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */

@media (max-width: 768px) {
    .tgp-cube-3d-wrapper {
        padding: 30px 15px;
    }
    
    .tgp-cube-3d {
        max-width: 320px;
        height: 480px;
    }
    
    .tgp-cube-face-front {
        transform: rotateY(0deg) translateZ(160px);
    }
    
    .tgp-cube-face-right {
        transform: rotateY(90deg) translateZ(160px);
    }
    
    .tgp-cube-face-back {
        transform: rotateY(180deg) translateZ(160px);
    }
    
    .tgp-cube-face-left {
        transform: rotateY(270deg) translateZ(160px);
    }
    
    .tgp-cube-face .tgp-card-image {
        flex: 0 0 200px;
        height: 200px;
    }
    
    .tgp-cube-face .tgp-card-title {
        font-size: 18px !important;
    }
    
    .tgp-cube-face .tgp-card-excerpt {
        font-size: 13px;
    }
    
    .tgp-cube-control {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .tgp-cube-3d {
        max-width: 280px;
        height: 450px;
    }
    
    .tgp-cube-face-front {
        transform: rotateY(0deg) translateZ(140px);
    }
    
    .tgp-cube-face-right {
        transform: rotateY(90deg) translateZ(140px);
    }
    
    .tgp-cube-face-back {
        transform: rotateY(180deg) translateZ(140px);
    }
    
    .tgp-cube-face-left {
        transform: rotateY(270deg) translateZ(140px);
    }
    
    .tgp-cube-face .tgp-card-image {
        flex: 0 0 180px;
        height: 180px;
    }
}

/* ===========================================================================
   AGREGADO: Cube 3D CSS integrado directamente
   =========================================================================== */