/* SIDEBAR CONTAINER */
.sidebar-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.main-content {
    min-width: 0;
}

.sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

/* WIDGETS */
.widget-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e5e5;
}

.widget-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #122d86;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e30513;
}

/* WIDGET: SEARCH */
.widget_search form {
    display: flex;
    gap: 8px;
}

.widget_search input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.widget_search input[type="search"]:focus {
    outline: none;
    border-color: #122d86;
}

.widget_search button {
    padding: 12px 20px;
    background: #e30513;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.widget_search button:hover {
    background: #c00410;
}

/* WIDGET: CATEGORIES */
.widget_categories ul,
.widget_recent_entries ul,
.widget_archive ul,
.widget_pages ul,
.widget_meta ul,
.widget_nav_menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_categories li,
.widget_recent_entries li,
.widget_archive li,
.widget_pages li,
.widget_meta li,
.widget_nav_menu li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget_categories li:last-child,
.widget_recent_entries li:last-child,
.widget_archive li:last-child,
.widget_pages li:last-child,
.widget_meta li:last-child,
.widget_nav_menu li:last-child {
    border-bottom: none;
}

.widget_categories a,
.widget_recent_entries a,
.widget_archive a,
.widget_pages a,
.widget_meta a,
.widget_nav_menu a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.widget_categories a:hover,
.widget_recent_entries a:hover,
.widget_archive a:hover,
.widget_pages a:hover,
.widget_meta a:hover,
.widget_nav_menu a:hover {
    color: #122d86;
}

/* Contador de posts */
.widget_categories a::after,
.widget_archive a::after {
    content: attr(data-count);
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
}

/* WIDGET: RECENT POSTS */
.widget_recent_entries li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
}

.widget_recent_entries .post-date {
    display: block;
    font-size: 0.8rem;
    color: #999;
    margin-top: 4px;
}

/* WIDGET: TAG CLOUD */
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.widget_tag_cloud a {
    background: #f5f5f5;
    color: #333;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem !important;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.widget_tag_cloud a:hover {
    background: #122d86;
    color: white;
    border-color: #122d86;
}

/* WIDGET: TEXT */
.widget_text p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 12px;
}

/* WIDGET: CALENDAR */
.widget_calendar table {
    width: 100%;
    border-collapse: collapse;
}

.widget_calendar th,
.widget_calendar td {
    padding: 8px;
    text-align: center;
    border: 1px solid #f0f0f0;
}

.widget_calendar th {
    background: #122d86;
    color: white;
    font-weight: 600;
}

.widget_calendar a {
    color: #e30513;
    font-weight: 700;
    text-decoration: none;
}

/* WIDGET: RSS */
.widget_rss ul {
    list-style: none;
    padding: 0;
}

.widget_rss li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget_rss .rsswidget {
    color: #122d86;
    font-weight: 600;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.widget_rss .rss-date {
    font-size: 0.85rem;
    color: #999;
}

/* WIDGET PERSONALIZADO: POSTS POPULARES */
.popular-posts-widget .popular-post {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popular-posts-widget .popular-post:last-child {
    border-bottom: none;
}

.popular-posts-widget img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.popular-posts-widget .popular-info h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.popular-posts-widget .popular-info a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.popular-posts-widget .popular-info a:hover {
    color: #122d86;
}

.popular-posts-widget .popular-meta {
    font-size: 0.8rem;
    color: #999;
}

/* RESPONSIVE */
@media (max-width: 968px) {
    .sidebar-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        margin-top: 40px;
    }
    
    .widget-item {
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    .widget-item {
        padding: 20px 15px;
    }
    
    .widget-title {
        font-size: 1.15rem;
    }
}

/* WIDGET: INDICADORES ECONÓMICOS — ESTILO IGUAL A .widget-item */
#widget-indicadores-economicos-chile {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e5e5;
}

/* Simular .widget-title */
#widget-indicadores-economicos-chile h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #122d86;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e30513;
}

/* Fecha */
#widget-indicadores-economicos-chile .fecha-hoy {
    display: block;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 15px;
}

/* Lista */
#widget-indicadores-economicos-chile ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#widget-indicadores-economicos-chile li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: #333;
}

#widget-indicadores-economicos-chile li:last-child {
    border-bottom: none;
}

/* Nombre del indicador */
#widget-indicadores-economicos-chile .indicador {
    font-weight: 700;
    color: #122d86;
}
