/* ==========================================================================
   Aria Shabrang - Professional Magazine & Articles Styles (Clean Light Mode)
   ========================================================================== */

:root {
    /* Color Palette - Clean, Bright & Low-Black */
    --bg-base: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-input: #ffffff;

    /* Brand & Accent (Aria Shabrang Red) */
    --primary: #e11d48;
    --primary-hover: #be123c;
    --primary-glow: rgba(225, 29, 72, 0.15);
    --primary-light: #fff1f2;
    --primary-border: #fecdd3;

    /* Text Colors */
    --text-pure: #0f172a;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Borders & Dividers */
    --border-subtle: #f1f5f9;
    --border-card: #e2e8f0;
    --border-hover: #cbd5e1;

    /* Shadows & Elevation */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --shadow-glow: 0 10px 25px -5px rgba(225, 29, 72, 0.12);

    /* Animation Curve */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease-in-out;
}

/* Base Container */
.articles-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 80px 20px;
    direction: rtl;
    color: var(--text-primary);
    box-sizing: border-box;
}

/* Breadcrumb Navigation */
.articles-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    padding: 0 4px;
}

.articles-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.articles-breadcrumb a:hover {
    color: var(--primary);
}

.articles-breadcrumb .separator {
    font-size: 0.68rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Header & Hero Section */
/* Header & Hero Section */
.articles-header {
    position: relative;
    border-radius: 24px;
    padding: 60px 25px;
    text-align: center;
    overflow: hidden;
    margin-bottom: 45px;
    background-color: #ffffff;

    /* گرادیانت ترکیبی چندلایه (سبز زنده در چپ، زرد موزی گرم در راست) */
    background-image:
        radial-gradient(circle at 5% 30%, rgb(21 211 152 / 0.45) 0%, rgba(16, 185, 129, 0.02) 45%, transparent 65%),
        radial-gradient(circle at 95% 40%, rgb(251 191 36 / 0.45) 0%, rgba(254, 240, 138, 0.04) 50%, transparent 70%),
        radial-gradient(circle at 50% -20%, rgb(65 178 135 / 0.45) 0%, transparent 60%),
        linear-gradient(180deg, rgb(142 178 65 / 0.45) 0%, rgb(142 178 65 / 0.45) 100%);

    /* حاشیه و سایه‌پردازی لوکس و نرم */
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.02),
        0 20px 40px -15px rgba(16, 185, 129, 0.04),
        0 20px 40px -15px rgba(251, 191, 36, 0.05);
}

/* افکت هاله نوری درخشان در بالای کادر هدر */
.articles-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(16, 185, 129, 0.3) 25%,
        rgba(251, 191, 36, 0.35) 75%,
        transparent 100%
    );
    pointer-events: none;
}


.brand-ku {
    color: #111827; /* مشکی شیک/تیره */
    font-weight: 800;
}

.brand-coco {
    color: #dc2626; /* قرمز استاندارد و جذاب */
    font-weight: 800;
}

.header-title {
    font-size: 2.35rem;
    font-weight: 800;
    color: var(--text-pure);
    margin-bottom: 14px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}



.header-subtitle {
    font-size: 1.02rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 32px auto;
    line-height: 1.7;
}

/* Search Form Component */
.articles-search-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--border-card);
    border-radius: 50px;
    padding: 5px 5px 5px 5px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
    gap: 8px;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 4px 20px -2px var(--primary-glow), 0 0 0 3px var(--primary-light);
}

.search-icon {
    color: var(--text-muted);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: var(--primary);
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--text-pure);
    font-size: 0.95rem;
    font-family: inherit;
    padding: 10px 8px;
    direction: rtl;
    min-width: 0;
}

.search-input-wrapper input::placeholder {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.clear-search {
    color: var(--text-muted);
    font-size: 1.1rem;
    text-decoration: none;
    padding: 0 6px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.clear-search:hover {
    color: var(--primary);
}

.btn-search {
    background: var(--primary);
    color: #ffffff;
    border: none;
    outline: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.92rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px var(--primary-glow);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-search:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.35);
    transform: translateY(-1px);
}

.btn-search:active {
    transform: translateY(0);
}

.search-result-info {
    margin-bottom: 28px;
    background: var(--bg-card);
    padding: 14px 22px;
    border-radius: 12px;
    border-right: 4px solid var(--primary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    border-left: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.92rem;
    box-shadow: var(--shadow-sm);
}

/* Featured Article Section */
.featured-section {
    margin-bottom: 50px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1.15fr; /* چیدمان متوازن متن و عکس */
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    align-items: stretch;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.featured-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-image-wrapper a {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.featured-image-wrapper img {
    width: 100%;
    height: 100%;
    max-height: 420px;       /* کنترل حداکثر ارتفاع تا بیش از حد کشیده نشود */
    object-fit: contain;     /* نمایش کامل عکس بدون برش و زوم */
    object-position: center;
    padding: 12px;           /* فاصله زیبا از لبه‌های کادر */
    box-sizing: border-box;
}

/* حذف انیمیشن زوم و بزرگ‌شدن روی هاور */
.featured-card:hover .featured-image-wrapper img {
    transform: none;
}


.featured-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 15px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.featured-details {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.meta-row {
    display: flex;
    gap: 18px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.featured-title {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.45;
}

.featured-title a {
    color: var(--text-pure);
    text-decoration: none;
    transition: var(--transition-fast);
}

.featured-title a:hover {
    color: var(--primary);
}

.featured-subtitle {
    font-size: 0.98rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 12px;
}

.featured-excerpt {
    color: var(--text-secondary);
    font-size: 0.94rem;
    line-height: 1.75;
    margin-bottom: 22px;
}

.featured-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid var(--border-subtle);
    padding-top: 18px;
}

.btn-read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-read-more:hover {
    gap: 12px;
    color: var(--primary-hover);
}

.views-count {
    font-size: 0.84rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 45px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* اضافه شد تا همه کارت‌ها یک‌اندازه شوند */
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
    position: relative;
}

/* لینک روی کل کارت گسترش پیدا می‌کند */
.stretched-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
/* مهم: عناصر داخلی که لینک خودشان را دارند (مثل تصویر) باید بالاتر باشند */
.card-image-box a {
    position: relative;
    z-index: 2;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.card-image-box {
    position: relative;
    height: 195px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.55s ease;
}

.article-card:hover .card-image-box img {
    transform: scale(1.05);
}

.card-body {
    padding: 22px;
    flex: 1; /* اطمینان از پر کردن فضای خالی توسط بدنه */
    display: flex;
    flex-direction: column;
}


.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.5;
}

.card-title a {
    color: var(--text-pure);
    text-decoration: none;
    transition: var(--transition-fast);
}

.card-title a:hover {
    color: var(--primary);
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
    margin-bottom: 16px;
}

.card-footer {
    padding: 14px 22px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* این خط کل فوتر و لینک ادامه مطلب را به کف کارت می‌چسباند */
}


.link-read,
.link-more {
    color: var(--primary);
    font-size: large;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto; /* در صورت عدم وجود فوتر، لینک را به پایین هل می‌دهد */
    transition: var(--transition-smooth);
}


.link-read:hover,
.link-more:hover {
    gap: 9px;
    color: var(--primary-hover);
}

.card-views {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Pagination */
.articles-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.page-link.active,
.page-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 3px 10px var(--primary-glow);
}

/* Empty Search State */
.no-articles-found {
    text-align: center;
    padding: 70px 20px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px dashed var(--border-hover);
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.empty-icon {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    opacity: 0.6;
}

.no-articles-found h3 {
    font-size: 1.45rem;
    color: var(--text-pure);
    margin-bottom: 10px;
    font-weight: 700;
}

.no-articles-found p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.btn-reset-search {
    display: inline-block;
    background: var(--bg-secondary);
    border: 1px solid var(--border-card);
    color: var(--text-pure);
    padding: 11px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.btn-reset-search:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 3px 12px var(--primary-glow);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 850px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-image-wrapper {
        min-height: 240px;
        max-height: 280px;
    }
    .featured-details {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .articles-container {
        padding: 16px 12px 50px 12px;
    }

    .articles-header {
        padding: 35px 16px;
        border-radius: 18px;
        margin-bottom: 30px;
    }

    .header-title {
        font-size: 1.65rem;
    }

    .header-subtitle {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card-image-box {
        height: 180px;
    }

    .card-body {
        padding: 18px;
    }
}
/* استایل دقیق نوار اطلاعات مقاله (تاریخ، زمان مطالعه، بازدید) */
.meta-info-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 12px;
    direction: rtl;
}

.meta-info-bar .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.meta-info-bar .meta-item i {
    font-size: 0.9rem;
    color: #94a3b8;
}
