/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
@font-face {
    font-family: 'vazir';
    src: url('../font/Vazir-Medium.ttf');
}
body {
    font-family: 'vazir', sans-serif;
}

body {
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: #ffffff;
    transition: 0.3s;
}

a:hover {
    transition: 0.3s;
    text-decoration: none;
    color: #c4c4c4;
}

body::before {
    content: "";
    position: fixed;
    /* همیشه کل صفحه رو بگیره */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/back.jpg');
    background-color: #222;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* Fixed for desktop */
    min-height: 100vh;
    overflow-x: hidden;
    filter: blur(10px);
    /* مقدار بلور */
    z-index: -1;
    /* پشت محتوای اصلی */
}



.container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

/* 1. نوار ناوبری شیشه‌ای */
.glass-nav {
    margin-top: 20px;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* background: rgba(255, 255, 255, 0.05); */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 35px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.logo-container span {
    font-size: 1.4rem;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
}

/* لینک‌های دسکتاپ */
.nav-links {
    display: flex;
    /* نمایش لینک‌ها در دسکتاپ */
}

.nav-links a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    margin-left: 20px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: #FBBF24;
}

/* منوی همبرگری (فقط برای موبایل) */
.hamburger-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.2s;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* منوی موبایل تمام صفحه */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.95);
    /* پس‌زمینه تیره */
    backdrop-filter: blur(8px);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: flex;
}

.mobile-menu-overlay .close-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}

.mobile-menu-overlay .menu-list {
    list-style: none;
    text-align: center;
}

.mobile-menu-overlay .menu-list li {
    margin: 25px 0;
}

.mobile-menu-overlay .menu-list a {
    color: #fff;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    transition: color 0.3s;
    display: block;
    padding: 10px 20px;
    border-radius: 10px;
}

.mobile-menu-overlay .menu-list a:hover {
    color: #FBBF24;
    background: rgba(255, 255, 255, 0.1);
}


/* Glass Card Utility */
.glass-card {
    background: rgba(0, 0, 0, 0.247);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 10px 40px 0 rgba(66, 135, 245, 0.2);
}

/* Header and Project Title */
.project-header {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 40px;
    padding: 20px 0;
}

.project-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* --- ساختار Grid جدید برای دسکتاپ (Desktop Grid Structure) --- */
.desktop-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* Description Section Styling */
.description-section h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    border-right: 4px solid #FBBF24;
    padding-right: 15px;
    color: #FBBF24;
}

.project-details p {
    font-size: 1rem;
    margin-top: 15px;
    line-height: 2.2;
}

.project-details i {
    width: 25px;
    text-align: center;
}

/* Desktop Media Tabs Styling */
.media-tabbed-desktop {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-bottom: 0;
}

.desktop-tab-nav {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0;
}

.desktop-tab-nav button {
    flex-grow: 1;
    background: none;
    border: none;
    padding: 12px 15px;
    font-size: 1.1rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s, border-bottom 0.3s;
    white-space: nowrap;
}

.desktop-tab-nav button.active {
    color: #10B981;
    border-bottom: 4px solid #10B981;
    font-weight: 700;
}

.desktop-tab-content {
    display: none;
    flex-grow: 1;
    padding-top: 10px;
}

.desktop-tab-content.active {
    display: block;
}

/* ---------------------------------------------------- */
/* رفع مشکل دوم: محصور کردن iframe ویدیو (مهم) */
/* ---------------------------------------------------- */
.iframe-container {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    /* نسبت تصویر 16:9 - این تضمین می‌کند که iframe در کادر بماند */
    padding-top: 56.25%;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding-top: 10px;
}

.gallery-item {
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.gallery-item img,
.gallery-item .video-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item .video-placeholder {
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item .video-placeholder i {
    font-size: 3rem;
    color: #ffc400;
    text-shadow: 0 0 10px rgba(255, 230, 0, 0.7);
}

/* Modal (Full Screen Viewer) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* تنظیم محتوای داخلی مدال برای پشتیبانی از iframe */
#modal-media-content {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    display: flex;
    /* اضافه شده */
    justify-content: center;
    align-items: center;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    text-shadow: 0 0 10px #fff;
}

.close-modal:hover {
    color: #bbb;
}

/* --- Mobile-Specific Styles (max-width 992px) --- */

.mobile-tab-nav {
    display: none;
}

.mobile-tab-content {
    display: none;
    padding-top: 10px;
}

.mobile-tab-content.active {
    display: block;
}

/* در حالت موبایل، کانتینر اصلی دسکتاپ مخفی شود. */
.desktop-content-grid {
    display: none;
}

@media (max-width: 992px) {

    /* در موبایل، لینک‌های ناوبری دسکتاپ مخفی می‌شوند */
    .nav-links {
        display: none;
    }

    /* و منوی همبرگری نمایش داده می‌شود */
    .hamburger-menu {
        display: block;
    }

    /* استایل موبایل برای نویگیشن: اکنون در یک خط است */
    .glass-nav {
        margin-top: 20px;
        padding: 15px 30px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(0, 0, 0, 0.25);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-radius: 35px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-section {
        display: flex;
        align-items: center;
        gap: 25px;
    }

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

.main-nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
    border-bottom: 1px solid white;
}

    .logo-container span {
        font-size: 1.2rem;
        font-weight: 700;
    }

    /* باقی استایل‌های موبایل */
    .mobile-tab-nav {
        display: flex;
        justify-content: space-around;
        margin-bottom: 20px;
        border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-tab-nav button {
        flex-grow: 1;
        background: none;
        border: none;
        padding: 15px 10px;
        font-size: 1.1rem;
        color: #aaa;
        cursor: pointer;
        transition: color 0.3s, background 0.3s;
    }

    .mobile-tab-nav button.active {
        color: #e0e0e0;
        background: rgba(245, 233, 66, 0.1);
        border-bottom: 3px solid #f5bc42;
        font-weight: 700;
    }

    /* مخفی کردن حالت دسکتاپ و نمایش حالت تب‌دار */
    .desktop-content-grid {
        display: none;
    }

    .mobile-content-wrapper {
        display: block;
        margin-top: 30px;
    }

    .project-header h1 {
        font-size: 2.5rem;
    }
}