/* Categories Show Post - Tema 4 - Estilos */

/* Solo aplicar estos estilos cuando el tema 4 esté activo */
.csp-theme-4 .csp-description {
    font-size: 0.8rem;
    line-height: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-color-secondary);
}

.csp-theme-4 .csp-cta {
    padding: 20px;
    text-align: center;
}

.csp-theme-4 .csp-cta a {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.csp-theme-4 .csp-cta a:hover {
    background-color: var(--accent-dark);
    color: var(--text-dark);
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Grid Layout - Tema 4 */
.csp-theme-4 .csp-grid {
    display: grid;
    gap: 25px;
}

.csp-theme-4 .csp-grid.csp-columns-1 {
    grid-template-columns: 1fr;
}

.csp-theme-4 .csp-grid.csp-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.csp-theme-4 .csp-grid.csp-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.csp-theme-4 .csp-grid.csp-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.csp-theme-4 .csp-grid-item {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 200px;
    border: 1px solid var(--border-color);
}

.csp-theme-4 .csp-grid-item:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

/* Layout horizontal - Imagen a la izquierda */
.csp-theme-4 .csp-post-image {
    width: 45%;
    min-width: 200px;
    height: 100%;
    min-height: 200px;
    overflow: hidden;
    background: var(--gray-light);
    flex-shrink: 0;
    position: relative;
    align-self: stretch;
}

.csp-theme-4 .csp-post-image img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.csp-theme-4 .csp-grid-item:hover .csp-post-image img {
    transform: scale(1.08);
}

.csp-theme-4 .csp-post-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Contenido a la derecha */
.csp-theme-4 .csp-post-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    justify-content: space-between;
}

.csp-theme-4 .csp-post-title {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: 600;
}

.csp-theme-4 .csp-post-title a {
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Barlow', sans-serif;
    transition: color 0.3s ease;
    display: block;
}

.csp-theme-4 .csp-post-title a:hover {
    color: var(--primary-color);
}

.csp-theme-4 .csp-post-duration {
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-lightest);
    border-radius: 4px;
}

.csp-theme-4 .csp-post-excerpt {
    color: var(--text-color-secondary);
    line-height: 1.7;
    font-size: 14px;
    flex: 1;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Línea divisoria entre contenido y footer */
.csp-theme-4 .csp-post-content::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: 15px 0;
}

/* Footer del post con enlace */
.csp-theme-4 .csp-post-footer {
    margin-top: auto;
    padding-top: 15px;
}

.csp-theme-4 .csp-post-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.csp-theme-4 .csp-post-footer a::after {
    content: '→';
    transition: transform 0.3s ease;
}

.csp-theme-4 .csp-post-footer a:hover {
    gap: 12px;
}

.csp-theme-4 .csp-post-footer a:hover::after {
    transform: translateX(4px);
}

/* Responsive Design - Tema 4 */
@media (max-width: 992px) {
    .csp-theme-4 .csp-grid.csp-columns-4,
    .csp-theme-4 .csp-grid.csp-columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .csp-theme-4 .csp-grid.csp-columns-4,
    .csp-theme-4 .csp-grid.csp-columns-3,
    .csp-theme-4 .csp-grid.csp-columns-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* En móviles, cambiar a diseño vertical */
    .csp-theme-4 .csp-grid-item {
        flex-direction: column;
        min-height: auto;
    }
    
    .csp-theme-4 .csp-post-image {
        width: 100%;
        min-width: auto;
        height: 200px;
        min-height: 200px;
    }
    
    .csp-theme-4 .csp-post-content {
        padding: 20px;
    }
    
    .csp-theme-4 .csp-post-title {
        font-size: 18px;
    }
    
    .csp-theme-4 .csp-post-excerpt {
        -webkit-line-clamp: 3;
    }
}

@media (max-width: 480px) {
    .csp-theme-4 .csp-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .csp-theme-4 .csp-post-content {
        padding: 18px;
    }
    
    .csp-theme-4 .csp-post-title {
        font-size: 17px;
    }
    
    .csp-theme-4 .csp-post-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .csp-theme-4 .csp-post-image {
        height: 180px;
    }
}

/* Ajustes específicos para columnas pequeñas */
@media (min-width: 769px) and (max-width: 1024px) {
    .csp-theme-4 .csp-post-image {
        width: 40%;
        min-width: 180px;
    }
    
    .csp-theme-4 .csp-post-content {
        padding: 20px;
    }
    
    .csp-theme-4 .csp-post-title {
        font-size: 18px;
    }
    
    .csp-theme-4 .csp-post-excerpt {
        -webkit-line-clamp: 3;
    }
}
