/**
 * Sidebar Widget Styles
 *
 * @package Maharashtra_Today
 */

/* ===== General Widget Styles ===== */
.widget-area {
    background: #fff;
}

.widget {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.widget:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #d32f2f;
    color: #1a1a1a;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #d32f2f;
}

/* ===== Trending Now Widget ===== */
.trending-posts-widget {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trending-post-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    position: relative;
    padding: 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.trending-post-item:hover {
    background: #f8f8f8;
    transform: translateX(4px);
}

.trending-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.trending-post-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 6px;
}

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

.trending-post-item:hover .trending-post-thumbnail img {
    transform: scale(1.1);
}

.trending-post-content {
    flex: 1;
    min-width: 0;
}

.trending-post-title {
    margin: 0 0 8px 0;
    font-size: 0.938rem;
    line-height: 1.4;
    font-weight: 600;
}

.trending-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.trending-post-title a:hover {
    color: #d32f2f;
}

.trending-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.75rem;
}

.trending-category {
    background: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 500;
}

.trending-date {
    color: #999;
}

/* ===== Cities/Categories Widget ===== */
.cities-widget {
    margin: 0;
}

.cities-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.city-item {
    margin: 0;
}

.city-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f8f8;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.city-item a:hover {
    background: #fff;
    border-color: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.15);
}

.city-name {
    color: #333;
    font-weight: 600;
    font-size: 0.875rem;
}

.city-count {
    background: #d32f2f;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.city-item a:hover .city-name {
    color: #d32f2f;
}

/* ===== Editor's Pick Widget ===== */
.editors-pick-widget {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.editors-pick-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #d32f2f;
    background: #fafafa;
    transition: all 0.3s ease;
}

.editors-pick-item:hover {
    background: #f5f5f5;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.editors-pick-thumbnail {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    overflow: hidden;
    border-radius: 6px;
}

.editors-pick-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.editors-pick-item:hover .editors-pick-thumbnail img {
    transform: scale(1.1);
}

.editors-pick-content {
    flex: 1;
    min-width: 0;
}

.editors-pick-title {
    margin: 0 0 8px 0;
    font-size: 0.938rem;
    line-height: 1.4;
    font-weight: 600;
}

.editors-pick-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.editors-pick-title a:hover {
    color: #d32f2f;
}

.editors-pick-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.editors-category {
    background: #d32f2f;
    color: #fff;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== Latest Updates Widget ===== */
.latest-updates-widget {
    margin: 0;
}

.latest-updates-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.latest-update-item {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: padding-left 0.3s ease;
}

.latest-update-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.latest-update-item:first-child {
    padding-top: 0;
}

.latest-update-item:hover {
    padding-left: 8px;
}

.latest-update-title {
    margin: 0 0 8px 0;
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 600;
}

.latest-update-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-update-title a:hover {
    color: #d32f2f;
}

.latest-update-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.latest-category {
    background: rgba(211, 47, 47, 0.1);
    color: #d32f2f;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
}

.latest-time {
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

.latest-time::before {
    content: '•';
    color: #ddd;
}

/* ===== Responsive Design ===== */
@media screen and (max-width: 1200px) {
    .cities-list {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .widget {
        padding: 20px;
        margin-bottom: 24px;
    }

    .widget-title {
        font-size: 1.125rem;
    }

    .trending-post-thumbnail,
    .editors-pick-thumbnail {
        width: 70px;
        height: 70px;
    }

    .cities-list {
        grid-template-columns: 1fr;
    }
}

/* ===== Sticky Sidebar (Optional Enhancement) ===== */
@media screen and (min-width: 1024px) {
    .sidebar {
        position: sticky;
        top: 20px;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #d32f2f;
        border-radius: 3px;
    }

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: #c62828;
    }
}
