/* 
   Project: Minimal & Cinematic Tech Magazine 
   Mode: Light Mode
   Developer: Majid 
*/

:root {
    /* پالت رنگی لایت مود - مدرن و تمیز */
    --bg: #f5f7fa;           /* پس‌زمینه نرم محیط */
    --shell-bg: #ffffff;    /* پس‌زمینه سفید خالص بدنه */
    --text: #1a1f36;        /* متن اصلی تیره و خوانا */
    --muted: #697386;       /* متون فرعی و خاکستری */
    --accent: #e63434;      /* قرمز اختصاصی شما */
    --accent-hover: #ff0000;
    --glass: rgba(255, 255, 255, 0.8);
    --border: rgba(0, 0, 0, 0.08);
    --radius: 22px;
    --ease: cubic-bezier(.19, 1, .22, 1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* فاصله ۱۰۰ پیکسلی Main از بالا */
main {
    display: block;
    padding-top: 100px;
}

/* Reading Progress Bar */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #ff7878);
    z-index: 9999;
    transition: width .2s ease;
}

/* Layout Container */
.article-shell {
    max-width: 900px;
    margin: auto;
    padding: 0 20px 100px;
}

/* HERO IMAGE - FIXED 400px */
.article-hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s var(--ease);
}

.article-hero:hover img {
    transform: scale(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.2));
}

/* META INFORMATION */
.article-top-meta {
    color: var(--muted);
    font-size: .9rem;
    margin-bottom: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sep { margin: 0 8px; opacity: .5; }

/* TITLE & SUBTITLE */
.article-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.1;
    margin: 10px 0 24px;
    color: #000;
    position: relative;
    font-weight: 800;
}

.article-title::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 5px;
    background: var(--accent);
    border-radius: 10px;
    transition: width .5s var(--ease);
}

.article-title:hover::after {
    width: 150px;
}

.article-subtitle {
    color: var(--muted);
    font-size: 1.25rem;
    margin-bottom: 35px;
    line-height: 1.5;
}

/* AUTHOR & PILLS */
.author-badge, .meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--shell-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: all .4s var(--ease);
}

.author-badge:hover, .meta-pill:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* MAIN CONTENT */
.article-content p {
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 1.8rem;
    color: #3c4257;
    transition: color .3s ease;
}

.article-content p:hover {
    color: #000;
}

.article-content h2 {
    margin-top: 60px;
    font-size: 2rem;
    color: #000;
    position: relative;
    cursor: pointer;
    transition: all .4s var(--ease);
}

.article-content h2:hover {
    color: var(--accent);
    transform: translateX(10px);
}

/* RELATED ARTICLES BOX */
.related-box {
    margin-top: 50px;
    padding: 35px;
    background: var(--shell-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: all .5s var(--ease);
}

.related-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
}

.related-box h3 {
    color: var(--accent); /* رنگ قرمز درخواستی */
    font-size: 1.3rem;
    margin-bottom: 25px;
    font-weight: 700;
    transition: color 0.4s var(--ease);
}

.related-box:hover h3 {
    color: var(--accent-hover); /* تغییر رنگ به قرمز خالص در هاور */
}
/* ردیف اصلی متادیتا */
.article-meta-row {
    display: flex;         /* تبدیل به ردیف */
    align-items: center;  /* تراز کردن عمودی در مرکز */
    gap: 12px;            /* فاصله بین دو باکس */
    flex-wrap: wrap;      /* برای اینکه در موبایل اگر جا نشد، به ردیف بعد برود */
    margin-bottom: 30px;  /* فاصله از متن پایین */
}

/* اصلاح استایل باکس‌ها برای هماهنگی بیشتر */
.author-badge, .meta-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;  /* جلوگیری از شکستن متن داخل باکس */
    padding: 8px 16px;    /* پدینگ متقارن */
}

/* اگر آیکون یا عکس نویسنده لود نشد، جایش خالی نماند */
.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eee;    /* رنگ رزرو */
    flex-shrink: 0;      /* جلوگیری از دفرمه شدن عکس */
}

.related-box a {
    display: block;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    background: #f8fafc;
    font-weight: 500;
    transition: all .4s var(--ease);
}

.related-box a:hover {
    background: #fff1f1;
    color: var(--accent);
    transform: translateX(10px);
}

/* DIVIDER */
hr {
    border: none;
    height: 1px;
    margin: 60px 0;
    background: linear-gradient(to right, transparent, var(--border), transparent);
}

/* REVEAL ANIMATION */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all .9s var(--ease);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}
