/* ساختار سه ستونه اصلی */
.three-column-container {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 70vh;
}

/* موقعیت ستون‌ها */
.left-sidebar {
    grid-column: 1;
}

.main-content {
    grid-column: 2;
    min-width: 0; /* جلوگیری از overflow */
}

.right-sidebar {
    grid-column: 3;
}

/* استایل‌های عمومی سایدبار */
.sidebar-column {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3498db;
}

.widget-title i {
    color: #3498db;
    font-size: 1.3rem;
}

.widget-content {
    font-size: 0.95rem;
}

/* استایل‌های سایدبار چپ */
.breaking-news-widget .news-item {
    padding: 12px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.breaking-news-widget .news-item:last-child {
    border-bottom: none;
}

.breaking-news-widget .news-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.breaking-news-widget .news-link:hover {
    color: #e74c3c;
    transform: translateX(5px);
}

.breaking-news-widget .news-badge {
    background: #e74c3c;
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.breaking-news-widget .news-title {
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 600;
}

.left-ads-widget .ad-item {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    transition: transform 0.3s;
}

.left-ads-widget .ad-item:hover {
    transform: translateY(-3px);
}

.left-ads-widget .ad-item:last-child {
    margin-bottom: 0;
}

.left-ads-widget .ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.left-ads-widget .ad-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.left-ads-widget .ad-content {
    padding: 15px;
    background: #f8f9fa;
}

.left-ads-widget .ad-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
}

.left-ads-widget .ad-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}

.app-promo-widget .app-info {
    text-align: center;
    padding: 15px 0;
}

.app-promo-widget .app-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 1.8rem;
}

.app-promo-widget h4 {
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.app-promo-widget p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
    color: white;
}

/* استایل‌های سایدبار راست */
.popular-news-widget .news-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popular-news-widget .news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-news-widget .news-rank {
    width: 28px;
    height: 28px;
    background: #ecf0f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #7f8c8d;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.popular-news-widget .news-item:nth-child(1) .news-rank {
    background: #e74c3c;
    color: white;
}

.popular-news-widget .news-item:nth-child(2) .news-rank {
    background: #f39c12;
    color: white;
}

.popular-news-widget .news-item:nth-child(3) .news-rank {
    background: #3498db;
    color: white;
}

.popular-news-widget .news-content {
    flex: 1;
    min-width: 0;
}

.popular-news-widget .news-title {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 5px;
}

.popular-news-widget .news-title a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.popular-news-widget .news-title a:hover {
    color: #3498db;
}

.popular-news-widget .news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #95a5a6;
    font-size: 0.85rem;
}

.categories-widget .category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    text-decoration: none;
}

.categories-widget .category-item:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.categories-widget .category-item:last-child {
    margin-bottom: 0;
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    margin-bottom: 3px;
    display: block;
}

.category-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.right-ads-widget .ad-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.right-ads-widget .ad-item:hover {
    transform: translateY(-3px);
}

.right-ads-widget .ad-item:last-child {
    margin-bottom: 0;
}

.right-ads-widget .ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.right-ads-widget .ad-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.right-ads-widget .ad-overlay {
    padding: 15px;
    background: white;
}

.right-ads-widget .ad-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1rem;
}

.right-ads-widget .ad-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.right-ads-widget .ad-cta {
    color: #3498db;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.right-ads-widget .ad-cta:hover {
    gap: 8px;
}

.social-widget .social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
    text-align: center;
}

.social-link i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.social-link.telegram {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.social-link.instagram {
    background: linear-gradient(135deg, #e4405f, #c13584);
}

.social-link.twitter {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.social-link.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .three-column-container {
        grid-template-columns: 250px 1fr 250px;
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .three-column-container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: 
            "left main"
            "right right";
    }
    
    .left-sidebar {
        grid-area: left;
        grid-column: unset;
    }
    
    .main-content {
        grid-area: main;
        grid-column: unset;
    }
    
    .right-sidebar {
        grid-area: right;
        grid-column: unset;
        margin-top: 30px;
    }
    
    .sidebar-column {
        position: static;
    }
}

@media (max-width: 768px) {
    .three-column-container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "main"
            "left"
            "right";
        gap: 30px;
        padding: 15px;
    }
    
    .left-sidebar,
    .main-content,
    .right-sidebar {
        grid-column: unset;
    }
}

@media (max-width: 576px) {
    .three-column-container {
        padding: 10px;
    }
    
    .sidebar-widget {
        padding: 15px;
    }
    
    .social-links {
        grid-template-columns: 1fr !important;
    }
}
