html {
    scroll-behavior: smooth;
}

:root {
    --glass-bg: rgba(18, 20, 28, 0.55);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ffffff;
    --text-muted: rgba(230, 230, 235, 0.6);
    --smoke-gray: rgba(74, 78, 90, 0.8);
    --brand-gray: #a0a4b0;
    --accent: #3b82f6;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Tahoma, 'Segoe UI', sans-serif;
    background: #0b0e14;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    
}

.site-content {
    zoom: 85%;
}

/* پس‌زمینه سایت */
.site-background {
    position: fixed;

    top: 0;
    left: 0;

    width: 100vw;
    height: 100lvh;

    z-index: -2;
    overflow: hidden;
    pointer-events: none;

    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;

    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.site-background::after {
    content: "";
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.65);

    pointer-events: none;
}

/* ساختار نویگیشن */
.nav-wrap {
    position: fixed;
    top: 24px;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    width: 100%;
    max-width: 1200px;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 28px;
    border: 1px solid var(--glass-border);
}

.nav-top {
    display: flex;
    justify-content: space-between;
    padding: 13px 32px;
    font-size: 15px;
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.brand-name {
    font-weight: 800;
    color: rgb(255, 255, 255);
    letter-spacing: 2px;
}

.quick-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    margin-left: 15px;
    font-weight: 600;
}

.nav-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 35px;
    transition: var(--transition);
}

.nav-right { display: flex; align-items: center; gap: 35px; }
.logo img { height: 38px; }

.nav-menu {
    list-style: none;
    display: flex;
    gap: 10px;
}

.nav-link {
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 18px;
    border-radius: 14px;
    transition: var(--transition);
}

.nav-link:hover { background: var(--smoke-gray); }

/* جستجو دسکتاپ */
.search-box-desktop {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 5px 12px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 160px;
}

.search-box-desktop:focus-within {
    width: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.search-input {
    background: none;
    border: none;
    color: #fff;
    outline: none;
    width: 100%;
    font-size: 13px;
}

.search-icon { background: none; border: none; cursor: pointer; color: #fff; opacity: 0.7; }

/* وضعیت اسکرول هدر */
.nav-wrap.scrolled { top: 12px; }
.nav-wrap.scrolled .nav-top { height: 0; padding: 0; opacity: 0; overflow: hidden; border-bottom: none; }
.nav-wrap.scrolled .nav-main { padding: 12px 32px; }

/* منوی موبایل */
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.bar { width: 25px; height: 2px; background: #fff; border-radius: 2px; }

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 130vh;
    background: rgba(18, 20, 28, 0.98);
    backdrop-filter: blur(20px);
    padding: 100px 30px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
}

.mobile-menu.active { right: 0; }
.mobile-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
}

.mobile-search-input {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: #fff;
    margin-bottom: 35px;
}

.mobile-menu ul { list-style: none; }
.mobile-menu li { margin-bottom: 22px; }
.mobile-menu a { color: #fff; text-decoration: none; font-weight: bold; }

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 1500;
}

.menu-overlay.active { opacity: 1; pointer-events: auto; }

/* بخش Hero */
.content-wrapper { padding-top: 210px; text-align: center; }
.hero-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 22px;
    border-radius: 50px;
    margin-bottom: 25px;
    font-weight: bold;
}

.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 800; margin-left: 20%; margin-right: 20%; }
.gradient-text {
    background: linear-gradient(90deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-actions { display: flex; gap: 15px; justify-content: center; margin-top: 35px; }

.btn { padding: 14px 34px; border-radius: 14px; text-decoration: none; font-weight: bold; transition: 0.3s; display: inline-block; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); }
.btn-glass { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); color: #fff; }

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Tertiary Button (Outlined Blue) */
.btn-tertiary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-tertiary:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.app-shell {
    max-width: 1100px;
    margin: 80px auto;
    padding: 60px;
    background: rgba(22, 25, 32, 0.35);
    backdrop-filter: blur(15px);
    border-radius: 40px;
    border: 1px solid var(--glass-border);
}

/* A simpler shell for content sections like comments or related posts */
.content-shell {
    max-width: 1100px;
    margin: 80px auto;
    padding: 60px;
    background: rgba(22, 25, 32, 0.35);
    backdrop-filter: blur(15px);
    border-radius: 40px;
    border: 1px solid var(--glass-border);
}

.placeholder-box {
    width: 100%;
    height: 550px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden; 
}

.placeholder-box img {
    width: 100%;
    height: 100%;
    object-fit: fill; /* عکس را به اجبار در تمام کادر جا می‌دهد (ممکن است کشیده شود) */
    border-radius: 15px;
}

.glass-ui {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.placeholder-box p {
    color: var(--text-muted);
    font-weight: bold;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    margin-bottom: 0px;
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 16px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 2px;
    font-weight: 600;
    color:  rgba(255, 255, 255, 0.74);
}

.post-meta strong {
    color: var(--text-main);
    font-weight: 600;
}

.post-content {
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 40px;
    direction: rtl;
    text-align: right;
}

.post-content h2 {
    font-size: 24px;
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.post-content blockquote {
    border-right: 4px solid var(--primary-color);
    padding-right: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-muted);
}

.post-content img {
    max-width: 100%;
    height: auto !important;
    display: block;

}

.section-title {
    font-size: 28px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    margin-top: 10px;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--text-muted);
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs span {
    color: var(--text-color);
}

.social-share-container {
    display: flex;
    margin-left: auto; /* Move to the right */
    margin-top: 150px;
    margin-bottom: 40px;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px; /* More padding */
    border-radius: 15px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px; /* Bigger buttons */
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1); /* Glass effect */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--text-color);
    font-size: 15px; /* Bigger font */
    font-weight: bold;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
}

.share-btn i {
    color: var(--primary-color);
    font-size: 18px;
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.share-buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.divider {
    height: 1px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    margin-top: 40px;
    margin-bottom: 50px;
}

/* Related Posts */
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.related-post-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    transition: var(--transition);
}

.related-post-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.related-post-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.related-post-content {
    padding: 20px;
    text-align: right;
}

.related-post-card h3 {
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 10px;
    font-weight: 600;
}

.related-post-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Comments Section */
.comment-form {
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.comment-form h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.comment-form .form-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: var(--text-muted);
}

.comment-form textarea {
    resize: vertical;
    margin-bottom: 20px;
}

.form-actions {
    text-align: center; /* Center the button */
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-card {
    padding: 20px;
    border-radius: 15px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover; /* Ensures the avatar image covers the circle without distortion */
}

.comment-author strong {
    color: var(--text-color);
    font-size: 20px;
}

.comment-author small {
    color: rgba(221, 221, 221, 0.9);
    font-size: 16px;
}

.comment-card p {
    color: var(--text-color);
    line-height: 1.7;
}

.video-container {
    position: relative;
    width: 80%;
    padding-top: 45%; /* 16:9 Aspect Ratio for 80% width */
    border-radius: 20px;
    overflow: hidden;
    margin: 40px auto 40px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}
.video-container.playing iframe {
    opacity: 1;
}
.video-container.playing .play-button-overlay {
    opacity: 0;
    pointer-events: none;
}
.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}
.play-button {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.play-button:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}
.play-button svg {
    color: #fff;
    width: 28px;
    height: 28px;
}

.separator { width: 50px; height: 4px; background: var(--brand-gray); margin: 20px 0 30px; border-radius: 10px; }

/* دکمه اسکرول به بالا */
#scrollTopBtn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 999;
    font-size: 1.5rem;
}

#scrollTopBtn.show { opacity: 1; visibility: visible; }

/* نوار پیشرفت مطالعه */
.reading-progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 4px; z-index: 2100; }
.progress-bar { height: 100%; background: var(--accent); width: 0%; box-shadow: 0 0 10px var(--accent); }

/* ریسپانسیو */
@media (max-width: 950px) {
    .nav-menu, .search-box-desktop { display: none !important; }
    .menu-toggle { display: flex; }
    .nav-top { display: flex !important; }
    .nav-top { 
        padding: 11px 18px;
        font-size: 13px; 
    }
    .nav-main { padding: 16px 18px; }
    .logo img { height: 30px; }
    .nav-wrap.scrolled .nav-main { padding: 12px 32px; }

    .app-shell {
        margin: 60px 20px;
        padding: 40px;
    }

    .hero-content h1 {
        font-size: 2.8rem;
        margin-left: 5%;
        margin-right: 5%;
    }
}




/* ===== Glass Footer ===== */
.site-footer {
    max-width: 1200px;
    margin: 72px auto 40px;
    padding: 34px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
    text-align: right;
}

.footer-brand h2 {
    font-size: 1.6rem;
    margin-bottom: 14px;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #ffffff, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-brand p,
.footer-newsletter p,
.footer-bottom p {
    color: var(--text-muted);
}

.footer-brand p,
.footer-newsletter p,
.footer-links a {
    font-size: 0.95rem;
    line-height: 1.9;
}

.footer-links h4,
.footer-newsletter h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: #fff;
}

.footer-links ul,
.wrapper {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #93c5fd;
    padding-right: 6px;
}

.footer-newsletter form {
    display: grid; /* استفاده از Grid */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* حداقل عرض 180 پیکسل، پر کردن فضای موجود */
    gap: 12px;
    margin-top: 16px;
    align-items: center; /* هم‌ترازی عمودی */
}

.footer-newsletter input {
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    outline: none;
    min-width: 0; /* اضافه شد برای اطمینان از کوچک شدن */
    width: 100%; /* اطمینان از پر کردن فضای گرید */
}

.footer-newsletter button {
    padding: 12px 22px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.95), rgba(96, 165, 250, 0.8));
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    width: auto; /* اجازه بده عرضش رو خود گرید تعیین کنه */
    min-width: 120px; /* حداقل عرض برای دکمه */
}

.footer-newsletter button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.22);
}

.wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.wrapper .icon {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.wrapper .tooltip {
    position: absolute;
    top: -42px;
    right: 50%;
    transform: translateX(50%);
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.wrapper .tooltip::before {
    content: "";
    position: absolute;
    inset-inline-start: calc(50% - 5px);
    bottom: -5px;
    width: 10px;
    height: 10px;
    background: rgba(15, 23, 42, 0.92);
    transform: rotate(45deg);
}

.wrapper .icon:hover {
    transform: translateY(-4px);
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(96, 165, 250, 0.35);
}

.wrapper .icon:hover .tooltip {
    opacity: 1;
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.86rem;
}

/* ============================= */
/* ✅ Tablet */
@media (max-width: 992px) {

    .site-footer {
        margin: 60px 20px 30px;
        padding: 28px;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .video-container {
        width: 90%;
        padding-top: 50.625%; /* 90% * 16:9 */
    }

}

/* ============================= */
/* ✅ Mobile */
@media (max-width: 768px) {

    .content-wrapper {
        padding-top: 175px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }

    .app-shell {
        margin: 40px 0; /* Remove horizontal margins */
        padding: 25px 20px; /* Adjust padding for content inside full-width shell */
        border-radius: 40px; /* Remove border-radius for a seamless full-width look */
    }

    .placeholder-box {
        height: 350px;
    }

    .main-container {
        padding: 30px 0; /* Remove horizontal padding */
    }

    .video-container {
        /* Re-apply the successful breakout technique to guarantee the large size */
        width: calc(100% + 30px) !important;
        margin-left: -15px !important;
        margin-right: -15px !important;
        padding-top: 45% !important; /* 16:9 Aspect Ratio */
        margin-top: 20px !important;
        border-radius: 25px !important; /* Keep the rounded corners */
        overflow: visible !important; /* Essential for breakout */
    }

    .video-container img,
    .video-container .video-overlay {
        border-radius: 25px !important; /* Match parent's radius for all children */
    }

    .post-meta {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px 10px; /* row-gap, column-gap */
        justify-items: start;
        font-size: 13px;
    }

    .play-button {
        width: 60px;
        height: 60px;
    }

    .play-button svg {
        width: 25px;
        height: 25px;
    }

    .section-title {
        font-size: 24px;
    }

    .comment-form .form-group {
        flex-direction: column;
        gap: 15px;
    }

    .site-footer {
        margin: 50px 16px 24px;
        padding: 24px;
        border-radius: 22px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-brand h2 {
        font-size: 1.4rem;
    }

    .footer-links ul {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links li {
        margin-bottom: 8px;
    }

    /* ✅ فرم خبرنامه استک شود */
    .footer-newsletter form {
        flex-direction: column;
        gap: 12px;
    }

    .footer-newsletter input,
    .footer-newsletter button {
        width: 100%;
    }

    /* ✅ آیکن‌های سوشال وسط‌چین */
    .wrapper {
        justify-content: center;
        gap: 14px;
    }

    .wrapper .icon {
        width: 44px;
        height: 44px;
    }

    /* ✅ در موبایل tooltip روی hover کاربردی نیست */
    .wrapper .tooltip {
        display: none;
    }

    .footer-bottom {
        font-size: 0.8rem;
        margin-top: 24px;
    }
}

/* ============================= */
/* ✅ Small Mobile */
@media (max-width: 480px) {

    .post-meta {
        grid-template-columns: repeat(2, 1fr); /* Change to 2 columns */
        justify-items: start; /* Align items to the start */
        gap: 15px 10px;
    }

    .social-share-container {
        justify-content: center;
    }

    .social-share {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        width: 100%;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 20px;
    }

    .site-footer {
        padding: 20px;
        border-radius: 18px;
    }

    .footer-brand h2 {
        font-size: 1.25rem;
    }

    .footer-brand p,
    .footer-newsletter p,
    .footer-links a {
        font-size: 0.85rem;
        line-height: 1.8;
    }

    .wrapper .icon {
        width: 40px;
        height: 40px;
    }

}

@media (max-width: 360px) {
    .related-post-card h3 {
        font-size: 16px;
    }
}




.post-meta strong {
    color: var(--text-main);
    font-weight: 600;
}


.video-container {
    position: relative;
    width: 60%;
    padding-top: 30%; /* 16:9 Aspect Ratio for 80% width */
    border-radius: 20px;
    overflow: hidden;
    margin: 40px auto 0;
    cursor: pointer;
}

.video-container img,
.video-container .video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area without distortion */
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.video-container:hover .video-overlay {
    background: rgba(0, 0, 0, 0.5);
}


.play-button {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.video-container:hover .play-button {
    transform: scale(1.1);
    background: rgba(59, 130, 246, 0.8);
}

.play-button svg {
    width: 30px;
    height: 30px;
    fill: #fff;
    margin-left: 2px;
}

.video-time {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 14px;
    opacity: 1;
    transition: var(--transition);
}




/* کانتینر اصلی که ویدیو را در مرکز صفحه قرار می‌دهد */
/* کانتینر والد که ویدیو را مرکز می‌کند */
.aparat-custom-center-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 20px 0;
}

/* اصلاح کانتینر آپارات برای جلوگیری از کراپ شدن */
.aparat-custom-center-container .h_iframe-aparat_embed_frame {
    position: relative !important;
    width: 75% !important; /* تنظیم عرض */
    height: auto !important; /* ارتفاع خودکار برای جلوگیری از کراپ */
    aspect-ratio: 16 / 9;   /* حفظ نسبت ویدیو */
    overflow: hidden;
}

/* اصلاح مستقیم آیفریم */
.aparat-custom-center-container iframe {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* مخفی کردن آن اسپن مزاحم که ارتفاع را خراب می‌کند */
.aparat-custom-center-container .h_iframe-aparat_embed_frame span {
    display: none !important;
}



    @media (max-width: 768px) {
        .aparat-custom-center-container .h_iframe-aparat_embed_frame {
            width: 90% !important; /* در موبایل عرض بیشتر باشد */
        }
    }


/* ===== Categories Mega Menu ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    padding: 12px 8px;
    background: #121620;
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-dropdown:hover .mega-menu,
.nav-dropdown:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-item {
    display: block;
    padding: 10px 18px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.mega-menu-item:hover {
    background: rgba(74, 78, 90, 0.8);
    color: #fff;
}

.nav-dropdown .dropdown-toggle::after {

    margin-left: 5px;
    font-size: 10px;
    opacity: 0.7;
}

/* Mobile submenu for categories */
.mobile-menu .mobile-dropdown {
    margin-bottom: 22px;
}

.mobile-menu .mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
}

.mobile-menu .mobile-dropdown-toggle::after {

    font-size: 10px;
    opacity: 0.7;
}

.mobile-menu .mobile-submenu {
    list-style: none;
    margin-right: 10px;
    margin-top: 10px;
}

.mobile-menu .mobile-submenu li {
    margin-bottom: 16px;
}

.mobile-menu details[open] .mobile-dropdown-toggle {
    color: var(--accent, #3b82f6);
}




/* ===== Bookmark Button ===== */
.breadcrumbs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.breadcrumb-row-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bookmark-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.bookmark-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: var(--accent, #3b82f6);
    color: #fff;
    transform: translateY(-2px);
}

.bookmark-btn.bookmarked {
    background: rgba(59, 130, 246, 0.3);
    border-color: var(--accent, #3b82f6);
    color: #fff;
}

.bookmark-btn.bookmarked:hover {
    background: rgba(59, 130, 246, 0.4);
}

.bookmark-icon {
    font-size: 16px;
}



/* Newsletter Form Captcha */
.footer-newsletter .captcha-field-footer {
    display: grid;
    grid-template-columns: auto 1fr; /* Image and Input */
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}

.footer-newsletter .captcha-field-footer > label {
    grid-column: 1 / -1; /* Label spans both columns */
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.footer-newsletter .captcha-field-footer .captcha { /* Image */
    height: 42px;
    border-radius: 8px;
}

.footer-newsletter .captcha-field-footer input[type="text"] { /* Input */
    height: 42px;
    width: 100%;
    border-radius: 10px;
    padding: 0 15px;
    font-size: 14px;
}


/* ===== Footer Newsletter Responsive Fix ===== */
/* ===== Footer Newsletter Responsive Fix ===== */

@media (max-width: 768px) {

    .footer-newsletter form {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }


    /* فیلد ایمیل */
    .footer-newsletter form input[type="email"] {
        width: 100%;
        height: 42px;
        box-sizing: border-box;
    }


    /* کپچا - همچنان در یک خط */
    .footer-newsletter .captcha-field-footer {

        display: grid !important;

        grid-template-columns: 40% 60% !important;

        gap: 10px;

        align-items: center;

        width: 90% !important;

        margin-top: 0;

    }


    /* عنوان کپچا */
    .footer-newsletter .captcha-field-footer > label {

        grid-column: 1 / -1;

        width: 100%;

        text-align: right;

        margin-bottom: 0;

    }


    /* wrapper داخلی Django captcha */
    .footer-newsletter .captcha-field-footer > div {

        display: contents !important;

    }


    /* تصویر کپچا */
    .footer-newsletter .captcha-field-footer img,
    .footer-newsletter .captcha-field-footer .captcha {

        width: 100% !important;

        height: 42px;

        object-fit: fill;

        border-radius: 8px;

    }


    /* ورودی کد */
    .footer-newsletter .captcha-field-footer input[type="text"] {

        width: 100% !important;

        height: 42px;

        box-sizing: border-box;

        border-radius: 10px;

    }


    /* دکمه */
    .footer-newsletter button {

        width: 100%;

        height: 42px;

    }

}