/* Saffron Color Palette */
    :root {
        --saffron-gold: #FFC107; /* طلایی زعفرانی */
        --saffron-red: #C62828; /* قرمز پررنگ */
        --saffron-purple: #8E44AD; /* بنفش گل زعفران */
        --neutral-light: #FDF8F0; /* کرم روشن */
        --neutral-dark: #333333; /* خاکستری تیره */
        --text-color: #4A4A4A; /* رنگ متن */
    }

    html, body {
        background-color: var(--neutral-light);
        color: var(--text-color);
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100%;
        margin: 0;
        padding: 0;
    }
/* --- Hero Slider Optimized --- */
.slider-container {
    position: relative;
    width: 100%;
    height: 260px; /* ارتفاع متناسب موبایل */
    overflow: hidden;
}

@media (min-width: 640px) {
    .slider-container { height: 340px; }
}
@media (min-width: 768px) {
    .slider-container { height: 500px; }
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

.slide.active {
    display: block;
    animation: fadeIn 1s ease-in-out;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 15px;
    right: 15px;
    left: 15px;
    z-index: 10;
    color: white;
    background: rgba(0, 0, 0, 0.65);
    padding: 15px;
    border-radius: 14px;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .slide-content {
        bottom: 10%;
        right: 5%;
        left: auto;
        max-width: 50%;
        padding: 25px;
        background: rgba(0, 0, 0, 0.55);
    }
}

/* --- Magazine Section Title --- */
.section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.section-title h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--neutral-dark);
    white-space: nowrap;
}

@media (min-width: 768px) {
    .section-title h2 { font-size: 2rem; }
}

.section-title::after {
    content: '';
    flex-grow: 1;
    height: 2px;
    background: url('data:image/svg+xml;utf8,<svg width="20" height="2" viewBox="0 0 20 2" xmlns="http://www.w3.org/2000/svg"><path d="M0 1 H5 L10 0 L15 2 L20 1" stroke="%23C62828" stroke-width="2" fill="none"/></svg>') repeat-x;
    max-width: 100%;
}

/* --- Featured Articles Section Mobile Optimized --- */
.featured-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.featured-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 220px;
}

@media (min-width: 768px) {
    .featured-grid {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: repeat(2, 200px);
    }
    .featured-card { height: auto; }
    .featured-card.main { grid-column: span 8; grid-row: span 2; }
    .featured-card.side { grid-column: span 4; }
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-card:hover img {
    transform: scale(1.05);
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
}

.featured-content .category {
    display: inline-block;
    background: var(--gold-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.featured-content h3 {
    font-size: 1.25rem;
    font-weight: bold;
}

/* --- Latest Articles Section --- */
.article-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.article-card .category {
    color: var(--saffron-purple);
}

.btn-primary {
    background-color: var(--gold-accent);
    color: white;
    border-radius: 99px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--gold-accent);
}

/* --- Sidebar --- */
.sidebar {
    background: white;
    border-radius: 1.5rem;
    border: 1px solid #f0e9e0;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.sidebar-widget-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--saffron-gold);
    display: inline-block;
}

.sidebar ul li a:hover {
    color: var(--brand-color);
    padding-right: 5px;
    transition: all 0.2s;
}

/* --- Product Card in Sidebar --- */
.product-card {
    text-align: center;
    display: none;
}

.product-card.active {
    display: block;
    animation: fadeIn 0.8s;
}

.product-card img {
    border: 4px solid var(--neutral-light);
}

/* --- Pagination --- */
.pagination a, .pagination span {
    background: var(--neutral-dark);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--gold-accent);
    transform: scale(1.1);
}

.pagination span {
    background: var(--saffron-gold);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

    /* --- Product Card in Sidebar --- */
    .product-card {
        text-align: center;
        display: none;
    }

    .product-card.active {
        display: block;
        animation: fadeIn 0.8s;
    }

    .product-card img {
        border: 4px solid var(--neutral-light);
    }