@import url('/static/css/fonts.css');

:root {
    --bg: #658C58;
    /* پس‌زمینه کلی سایت */
    --accent: #29986f;
    /* رنگ متن/آیکون/اکسنت */
    --card: #fdffce;
    /* کارت‌ها برای خوانایی */
    --muted: #F79A19;
    --glass: #fdffce;
    --maxwidth: 1200px;
    --text-dark: #31694E;
    --text-yellow: #d8cd27;
}
body[dir="rtl"] {
    text-align: right;
}

body[dir="ltr"] {
    text-align: left;
}

/* ---------- Reset ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Shabnam" !important;
}

html,
body {
    height: 100%
}

body {
    background-color: #224042;
    background-image: url("/static/img/pattern.png");
    /* آدرس عکس */

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    line-height: 1.45;
    font-family: ahang2;

    background-size: cover;
    /* کل صفحه را پوشش می‌دهد */
    background-position: center;
    /* وسط قرار می‌گیرد */
    background-repeat: no-repeat;
    /* تکرار نمی‌شود */
    background-attachment: fixed;
    /* هنگام اسکرول ثابت می‌ماند */
}


a {
    color: var(--accent);
    text-decoration: none
}

img {
    display: block;
    max-width: 100%
}

/* ---------- Container ---------- */
.site {
    max-width: var(--maxwidth);
    margin: 0 auto;
    padding: 0 16px 64px;
}

/* ========== Header ========== */
header.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #132728;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: ahang3;
}

.header-inner {
    max-width: var(--maxwidth);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    background-color: #132728;
}

/* right: logo */
.hdr-right {
    display: flex;
    align-items: center;
    gap: 12px
}

.site-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
}

.site-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

/* center nav */
nav.main-nav {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    flex: 1;
}

nav.main-nav a {
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--text-yellow);
    text-align: center;
    font-size: 15px;
    transition: .18s;
}

nav.main-nav a:hover {
    color: #ffef00;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45)
}

/* left: search and actions */
.hdr-left {
    display: flex;
    align-items: center;
    gap: 10px
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--accent)
}


/* ========== Content ========== */
main {
    margin-top: 24px
}

.section-title {
    font-size: 20px;
    color: var(--accent);
    margin: 12px 6px 10px;
    font-weight: 800
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.card {
    margin:5px;
    background: var(--card);
    color: var(--text-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: transform .18s, box-shadow .18s;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.04);
    /* دو بوردر همزمان */
    border: 3px solid #ffef00;
    /* زرد داخلی */
    outline: 1.5px solid #ffef00;
    /* سبز خارجی */
    outline-offset: 5px;
    /* فاصله بینشون */

    /* سایه سبز + طلایی ملایم */
    box-shadow:
        0px 0px 35px 5px #29986f,
        0 20px 50px rgba(41, 152, 111, 0.3),
        0 0 0 1px rgba(41, 152, 111, 0.15),
        inset 0 3px 12px rgba(245, 233, 54, 0.3);

    /* درخشش طلایی از بالا */
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.18)
}

.card .thumb {
    overflow: hidden
    
    width: 100%;
    aspect-ratio: 16 / 9;

}

.card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.card .card-body {
    padding: 12px;
    font-weight: 700
}

.card .meta {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    font-weight: 500
}

.video-card {
    margin: 8px;
    background: var(--card, #1a1a1a);
    color: var(--text-dark, #e0e0e0);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative !important;

    /* افکت نور زرد/سبز درخشان حفظ شده و حتی بهتر شده */

}
.duration {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.video-card:hover {
    transform: translateY(-10px) scale(1.02);
}
/* ========== Footer ========== */
footer.site-footer {
    margin-top: 34px;
    padding: 28px 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.08);
    color: var(--accent);
    text-align: center
}
.title {
    margin: 0 0 8px 0;
    font-size: 15px;           /* کوچکتر از قبل */
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.meta-info {
    font-size: 10px;
    color: #aaa;
    font-weight: 500;
}

.meta-info .views {
    color: #29986f;
    font-weight: 600;
}

.meta-info .upload-date {
    color: #ccc;
}

.socials {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px
}

.socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.03)
}

.socials svg {
    width: 20px;
    height: 20px;
    fill: var(--accent)
}

.socials * {
    fill: var(--accent) !important;
}
.footer-copy {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9)
}
/* جایگزین این قسمت‌های قدیمی شو */
.thumb-wrapper {
    position: relative;
    height: 160px;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.video-card:hover .thumb-wrapper img {
    transform: scale(1.08);
}

/* دو تا لیبل کنار هم در گوشه پایین چپ */
.bottom-left-overlays {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
}

.duration,
.views-overlay {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 8px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.views-overlay {
    background: rgba(0, 0, 0, 0.85);
    font-size: 11.5px;
    padding: 3px 8px;
}

/* فقط تاریخ آپلود زیر عنوان (کوچک و شیک) */
.upload-date-small {
    font-size: 12.5px;
    color: #aaa;
    margin-top: 4px;
    font-weight: 500;
}
/* ========== Mobile Responsiveness ========== */
.mobile-only {
    display: none
}



@media (max-width:720px) {
    .header-inner {
        padding: 8px
    }

    nav.main-nav {
        display: none
    }

    /* hide desktop nav in mobile */
    .desktop-only {
        display: none
    }

    .mobile-only {
        display: inline-flex
    }

    .thumbs {
        display: none !important
    }

    /* HIDE thumbnails on mobile (requirement) */





}

/* ========== Mobile Drawer (side menu) ========== */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 78%;
    max-width: 320px;
    background: var(--card);
    z-index: 150;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.4);
    transition: right .28s ease;
    padding: 18px;
}

.mobile-drawer.open {
    right: 0
}

.mobile-drawer h4 {
    color: var(--text-dark);
    margin-bottom: 12px
}

.mobile-drawer a {
    display: block;
    padding: 12px 8px;
    border-radius: 8px;
    color: var(--text-dark);
    margin-bottom: 8px
}

.drawer-close {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer
}

/* ========== Fullscreen Search Overlay ========== */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.search-overlay.open {
    display: flex
}

.search-box-full {
    width: 94%;
    max-width: 900px;
    background: var(--card);
    padding: 18px;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);

}

.search-box-full input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: 12px;
    font-size: 10px;
    color: var(--text-dark);
    font-family: ahang2;
}

.search-close {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.06)
}

.search-close svg {
    width: 18px;
    height: 18px;
    fill: var(--text-dark)
}

/* small helper */
.visually-hidden {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap
}

.search-overlay .search-box-full {
    transform: scale(0.85);
    opacity: 0;
    transition: all 0.28s ease;
}

.search-overlay.open .search-box-full {
    transform: scale(1);
    opacity: 1;
}


.category-bar {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 32px 20px;
    background: rgba(253, 255, 206, 0.45);     /* زرد خیلی ملایم و شیشه‌ای */
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 3px solid #ffef00;
    /* زرد داخلی */
    outline: 1.5px solid #ffef00;
    /* سبز خارجی */
    outline-offset: 5px;
    /* فاصله بینشون */

    /* سایه سبز + طلایی ملایم */
    box-shadow:
        0px 0px 35px 5px #29986f,
        0 20px 50px rgba(41, 152, 111, 0.3),
        0 0 0 1px rgba(41, 152, 111, 0.15),
        inset 0 3px 12px rgba(245, 233, 54, 0.3);

    /* درخشش طلایی از بالا */
}

.category-title {
    font-family: 'ahang4', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #1a3d33;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-align: center;
}

.category-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0;
}

.category-btn {
    padding: 11px 24px;
    background: #132728;
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'ahang4', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-btn-c:hover {
    transform: scale(1.06) translateY(-3px);
    box-shadow: 0 15px 35px rgba(47, 224, 161, 0.3);
}

/* ریسپانسیو تمیز */
@media (max-width: 768px) {
    .category-container {
        justify-content: center;
        gap: 10px;
    }
    .category-btn {
        padding: 10px 20px;
        font-size: 14.5px;
    }
    .category-title {
        font-size: 23px;
    }
    .category-btn-c{
        font-size:8pt;
        margin:0px !important;
        padding: 10px !important;
    }
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #222;
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;

    pointer-events: auto;
    /* ✅ کلیک فعال شود */
    user-select: auto;

    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    border-right: 5px solid #00ff9c;
}

.toast-error {
    border-right: 5px solid #ff4f4f;
}

.toast a {
    color: #00ffd5;
    text-decoration: underline;
    font-weight: bold;
    cursor: pointer;
}

.sub-section-title {
    color: #fdffce;
}



/* بخش بالای عنوان */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

/* دکمه همه ویدیوها */
.view-all {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    color: #f5e936;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid rgba(245, 233, 54, 0.25);
    background: rgba(245, 233, 54, 0.05);
    backdrop-filter: blur(8px);
    transition: all .3s ease;
}

.view-all:hover {
    transform: translateY(-2px);
    background: rgba(245, 233, 54, 0.15);
    border-color: #f5e936;
    box-shadow: 0 4px 15px rgba(245, 233, 54, 0.25);
}

.view-all svg {
    margin-top: 2px;
    transition: 0.2s ease;
}

.view-all:hover svg {
    transform: translateX(-3px);
}

/* Language Switcher - کوچکتر و با پرچم واقعی */
.language-switcher {
    position: relative;
    margin-right: 10px; /* فاصله کمتر */
    display: inline-block;
}

.lang-current {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50px;
    padding: 4px 8px; /* نصف قبلی */
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.lang-flag {
    width: 20px !important;
    height: 15px !important;
    border-radius: 50%; /* پرچم‌ها کاملاً گرد */
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.dropdown-arrow {
    fill: white;
    transition: transform 0.3s ease;
}

.language-switcher.open .dropdown-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 20;
    margin-top: 6px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s ease;
    min-width: 140px; /* باریک‌تر */
    z-index: 1000;
}

.language-switcher.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-form {
    margin: 0;
    padding: 6px 0;
}

.lang-option {
    width: 100%;
    padding: 6px 12px; /* کوچکتر */
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 13px; /* فونت کوچکتر */
    color: #333;
}

.lang-option:hover {
    background: #f5f5f5;
}

.lang-option.active {
    background: #e3f2fd;
    font-weight: 600;
    color: #1976d2;
}

.lang-name {
    flex: 1;
    text-align: left;
}

/* ریسپانسیو موبایل */
@media (max-width: 720px) {
    .language-switcher {
        margin-right: 8px;
    }
    .lang-current {
        padding: 3px 6px;
    }
    .lang-flag {
        width: 18px !important;
        height: 13.5px !important;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}



#satra-neshan{
    border-radius:25px;
    margin:30px auto 10px auto;
    max-width:180px;
}


/* بخش شعار ها  */

/* =========================================
   SLOGAN BAR
========================================= */

.slogan-bar {

    width: 100%;

    padding: 16px 12px;

    background:
        linear-gradient(
            90deg,
            rgba(15, 23, 42, 0.96),
            rgba(30, 41, 59, 0.96)
        );

    border-top: 1px solid rgba(255,255,255,0.08);

    border-bottom: 1px solid rgba(255,255,255,0.08);

    overflow: hidden;
}

.slogan-inner {

    max-width: 1200px;

    margin: auto;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 10px;

    text-align: center;

    min-height: 36px;
}

.slogan-icon {

    color: #facc15;

    font-size: 1.1rem;

    text-shadow:
        0 0 8px rgba(250, 204, 21, 0.7);
}

#typed-text {

    color: white;

    font-size: 1.05rem;

    font-weight: 600;

    letter-spacing: 0.3px;

    text-shadow:
        0 2px 12px rgba(0,0,0,0.4);
}

.cursor {

    color: #22c55e;

    font-weight: bold;

    animation: blink 0.8s infinite;
}
.account-btn{

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 9px 18px;

    border-radius: 14px;

    text-decoration: none;

    font-family: 'Ahang2', sans-serif;

    font-size: .82rem;

    font-weight: 400;

    color: #fff;

    background: rgba(255,255,255,.06);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(255,255,255,.18);

    overflow: hidden;

    transition: all .35s ease;

    box-shadow:
        0 4px 18px rgba(0,0,0,.18),
        inset 0 1px 1px rgba(255,255,255,.15);
}

/* نور متحرک */
.account-btn::before{

    content:"";

    position:absolute;

    top:0;
    left:-150%;

    width:80%;
    height:100%;

    background:linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.35),
        transparent
    );

    transition:.9s;
}

.account-btn:hover::before{
    left:170%;
}

/* هاور */
.account-btn:hover{

    transform: translateY(-2px);

    background: rgba(255,255,255,.12);

    border-color: rgba(245,233,54,.45);

    box-shadow:
        0 8px 25px rgba(245,233,54,.15),
        0 0 20px rgba(245,233,54,.08);
}

.account-btn svg{

    width:16px;
    height:16px;

    margin-left:6px;

    opacity:.85;
}
.slide {
    position: relative;
    width: 100%;
    aspect-ratio: 1710 / 540;
    overflow: hidden;
    display: none;

    border-radius: 15px;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {

    .slogan-bar {

        padding: 13px 10px;
    }

    #typed-text {

        font-size: 0.88rem;

        line-height: 1.8;
    }

    .slogan-inner {

        gap: 6px;
    }
    .account-btn{
        display:none !important;
    }
}



@media (max-width: 428px) {
    .sub-section-title {
        font-size: 1rem;
    }
    .view-all{
        font-size: 0.9rem;
    }
}

