/* DGNB Posts Shortcode Styles */

.dgnb-posts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Selector de categorías */
.dgnb-category-selector {
    margin-bottom: 30px;
    text-align: center;
}

.dgnb-category-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.dgnb-category-select {
    padding: 12px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background-color: #fff;
    font-size: 16px;
    min-width: 250px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dgnb-category-select:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
}

.dgnb-category-select:hover {
    border-color: var(--blue-primary);
}

/* Separadores de semana */
.dgnb-week-container {
    background: rgba(0,0,0,0.02);
}
.dgnb-week-separator {
    margin: 0;
    padding: 10px;
    border-radius: 0;
    border-left: 4px solid var(--blue-primary);
    transition: all 0.3s ease;
    animation: dgnb-slideInLeft 0.6s ease-out;
    background: rgba(0,0,0,0.02);
    font-size: 90%;
}

.dgnb-week-separator:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.dgnb-week-hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.dgnb-week-header {
    text-align: left;
}

.dgnb-week-title {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--blue-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dgnb-week-date-range {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* Grid de posts */
.dgnb-posts-wrapper {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
    padding: 30px;
}

/* Tarjetas de posts */
.dgnb-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.dgnb-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.dgnb-card-hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Imagen del post */
.dgnb-post-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.dgnb-post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dgnb-post-card:hover .dgnb-post-thumbnail {
    transform: scale(1.05);
}

.dgnb-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #666;
    font-size: 14px;
}

/* Contenido del post */
.dgnb-post-content {
    padding: 20px;
}

/* Categorías */
.dgnb-post-categories {
    margin-bottom: 12px;
}

.dgnb-category-tag {
    display: inline-block;
    background: var(--blue-primary);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Título del post */
.dgnb-post-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.dgnb-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.dgnb-post-title a:hover {
    color: var(--blue-primary);
}

/* Meta información */
.dgnb-post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.dgnb-post-date,
.dgnb-post-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dgnb-post-date i,
.dgnb-post-author i {
    color: var(--blue-primary);
    font-size: 12px;
}

/* Extracto */
.dgnb-post-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Botón leer más */
.dgnb-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blue-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.dgnb-read-more:hover {
    color: #005a87;
    gap: 12px;
}

.dgnb-read-more i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dgnb-read-more:hover i {
    transform: translateX(4px);
}

/* Paginación */
.dgnb-pagination-wrapper {
    text-align: center;
    margin-top: 40px;
}

.dgnb-pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.dgnb-pagination-list li {
    margin: 0;
}

.dgnb-pagination-list a,
.dgnb-pagination-list span {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.dgnb-pagination-list a {
    background: #fff;
    color: #333;
    border: 2px solid #e1e5e9;
}

.dgnb-pagination-list a:hover {
    background: var(--blue-primary);
    color: #fff;
    border-color: var(--blue-primary);
    transform: translateY(-2px);
}

.dgnb-current-page {
    background: var(--blue-primary) !important;
    color: #fff !important;
    border: 2px solid var(--blue-primary) !important;
}

.dgnb-pagination-dots {
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    padding: 10px 5px !important;
}

/* Loading */
.dgnb-loading {
    text-align: center;
    padding: 40px 20px;
}

.dgnb-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--blue-primary);
    border-radius: 50%;
    animation: dgnb-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes dgnb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dgnb-loading p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Mensajes de error y no posts */
.dgnb-error,
.dgnb-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.dgnb-error p,
.dgnb-no-posts p {
    font-size: 18px;
    margin: 0;
}

/* Animaciones */
.dgnb-post-card {
    animation: dgnb-fadeInUp 0.6s ease-out;
}

@keyframes dgnb-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dgnb-slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Estados de carga */
.dgnb-posts-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mejoras de accesibilidad */
.dgnb-category-select:focus-visible,
.dgnb-read-more:focus-visible,
.dgnb-pagination-list a:focus-visible {
    outline: 2px solid var(--blue-primary);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dgnb-posts-container {
        padding: 15px;
    }
    
    .dgnb-week-separator {
        margin: 30px 0 20px 0;
        padding: 15px;
    }
    
    .dgnb-week-title {
        font-size: 20px;
    }
    
    .dgnb-week-date-range {
        font-size: 14px;
    }
    
    .dgnb-posts-wrapper {
        gap: 20px;
    }
    
    .dgnb-post-content {
        padding: 15px;
    }
    
    .dgnb-post-title {
        font-size: 16px;
    }
    
    .dgnb-post-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .dgnb-category-select {
        min-width: 200px;
        font-size: 14px;
    }
    
    .dgnb-pagination-list {
        gap: 5px;
    }
    
    .dgnb-pagination-list a,
    .dgnb-pagination-list span {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 35px;
    }
}

@media (max-width: 480px) {
    .dgnb-posts-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .dgnb-post-image {
        height: 180px;
    }
    
    .dgnb-week-separator {
        margin: 25px 0 15px 0;
        padding: 12px;
    }
    
    .dgnb-week-title {
        font-size: 18px;
    }
    
    .dgnb-week-date-range {
        font-size: 13px;
    }
    
    .dgnb-category-select {
        min-width: 100%;
        max-width: 300px;
    }
    
    .dgnb-pagination-list {
        justify-content: center;
    }
    
    .dgnb-pagination-list a,
    .dgnb-pagination-list span {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 30px;
    }
}