@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@200;400;700;900&display=swap');

:root {
    --gold: #febc16;
    --dark: #0a0a0a;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(30px);
    --panel-radius: 40px;
    --gap: 25px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Vazirmatn', sans-serif; outline: none; }

/* تنظیمات اصلی صفحه */
body {
    background-color: var(--dark);
    color: white;
    height: 100vh; /* در دسکتاپ تمام صفحه */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* در دسکتاپ اسکرول بسته است */
}

/* --- بک‌گراند جذاب و متحرک --- */
.background-animation {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: radial-gradient(circle at center, #1a1a1a, #000);
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
    animation: floatOrb 10s infinite alternate ease-in-out;
}
.orb-1 { width: 400px; height: 400px; background: var(--gold); top: -10%; left: -10%; animation-delay: 0s; }
.orb-2 { width: 500px; height: 500px; background: #333; bottom: -20%; right: -10%; animation-delay: -3s; }
.orb-3 { width: 300px; height: 300px; background: rgba(254, 188, 22, 0.3); top: 40%; left: 40%; animation-delay: -5s; }

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* --- چیدمان اصلی (۳ ستون جدا) --- */
.layout-wrapper {
    display: flex;
    gap: var(--gap);
    width: 95vw;
    height: 90vh;
    position: relative;
    z-index: 10;
}

/* --- کلاس پایه برای همه پنل‌های شیشه‌ای --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--panel-radius);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* ========================================= */
/*          1. پنل راست: منو (دسکتاپ)        */
/* ========================================= */
.nav-panel {
    width: 90px;
    display: flex; 
    flex-direction: column; /* در دسکتاپ عمودی */
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 20;
}
.nav-panel:hover { width: 260px; background: rgba(10,10,10,0.8); }

.menu-logo {
    padding: 30px 0; text-align: center; font-size: 1.8rem; color: var(--gold);
    border-bottom: 1px solid var(--glass-border);
}

.nav-list { 
    list-style: none; padding: 10px 0; flex: 1; 
    display: flex; flex-direction: column; /* در دسکتاپ عمودی */
    overflow-y: auto; 
}
.nav-item {
    padding: 18px 0; display: flex; align-items: center; cursor: pointer;
    color: #aaa; position: relative; transition: 0.3s;
    margin: 5px 10px; border-radius: 15px;
}
.nav-item i { width: 70px; text-align: center; font-size: 1.4rem; flex-shrink: 0; }
.nav-text { opacity: 0; white-space: nowrap; transition: 0.2s; transform: translateX(10px); font-weight: 300; }

.nav-panel:hover .nav-text { opacity: 1; transform: translateX(0); }
.nav-item:hover, .nav-item.active { background: rgba(254, 188, 22, 0.15); color: var(--gold); }

.spacer { flex: 1; }

/* ========================================= */
/*          2. پنل وسط: کاور (دسکتاپ)        */
/* ========================================= */
.middle-panel {
    flex: 1.2;
    position: relative;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center;
}
.bg-layer {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    transition: background-image 0.6s ease; filter: blur(10px); transform: scale(1.1); z-index: -2;
}
.overlay-layer { position: absolute; inset: 0; background: rgba(0,0,0,0.6); z-index: -1; }

.middle-content {
    padding: 40px;
    width: 100%;
    z-index: 5;
    /* --- اضافه شده برای وسط‌چین کردن قطعی همه چی --- */
    display: flex;
    flex-direction: column;
    align-items: center; /* این خط، ساب‌تایتل رو دقیقاً وسط میاره */
    justify-content: center;
}.logo-circle {
    width: 90px; height: 90px; border-radius: 50%; background: var(--gold);
    color: black; font-size: 2.5rem; font-weight: bold; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; box-shadow: 0 0 30px rgba(254, 188, 22, 0.5);
}
.middle-content h1 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 0;
    margin-bottom: 5px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
    text-align: center; /* محض اطمینان */
}
.subtitle {
    color: #eee;
    letter-spacing: 0;
    font-size: 1.1rem;
    font-weight: 700;
    /* --- تنظیمات نهایی --- */
    text-align: center !important;
    width: 100% !important;
    margin: 0 0 40px 0 !important; /* مارجین فقط از پایین، بغل‌ها صفر */
    display: block;
}
.info-box {
    padding: 25px; margin-top: 20px; border-radius: 20px;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.15); min-height: 80px;
    display: flex; align-items: center; justify-content: center;
}
.info-box p { font-size: 1rem; letter-spacing: 0; line-height: 1.8; font-weight: 400; color: #f0f0f0; }

/* ========================================= */
/*          3. پنل چپ: محتوا (دسکتاپ)        */
/* ========================================= */
.content-panel {
    flex: 2;
    padding: 30px;
    overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: var(--gold) transparent;
}
.tab-content { display: none; animation: slideUp 0.5s ease; }
.tab-content.active { display: block; }

@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* گرید تصاویر */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
.item {
    aspect-ratio: 1; border-radius: 25px; overflow: hidden; position: relative; cursor: pointer;
    border: 1px solid rgba(255,255,255,0.1); transition: 0.4s;
}
.item img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.item:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.5); border-color: var(--gold); }
.item:hover img { transform: scale(1.1); }
.icon-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex;
    align-items: center; justify-content: center; font-size: 2rem; opacity: 0; transition: 0.3s;
}
.item:hover .icon-overlay { opacity: 1; }

/* بخش صوتی */
.audio-item { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; flex-wrap: wrap; }
.audio-item audio { flex: 1; height: 40px; }

/* لایت باکس */
.lightbox {
    position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center;
}
.lightbox.show { display: flex; }
.lightbox-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); }
.lightbox-body { position: relative; z-index: 101; max-width: 85vw; max-height: 85vh; }
.lightbox-body img, .lightbox-body video { max-width: 100%; max-height: 80vh; border-radius: 15px; box-shadow: 0 0 50px rgba(254, 188, 22, 0.2); }
.close-icon { position: absolute; top: 30px; right: 30px; font-size: 3rem; color: white; cursor: pointer; z-index: 102; transition: 0.3s; }
.close-icon:hover { color: var(--gold); transform: rotate(90deg); }

/* ========================================= */
/*        استایل فرم سفارش پروژه (GRID)      */
/* ========================================= */

.form-box {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.02); 
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.form-header { 
    text-align: center; margin-bottom: 35px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 20px;
}
.form-header h3 { 
    color: var(--gold); font-size: 1.8rem; font-weight: 900; 
    text-shadow: 0 0 15px rgba(254, 188, 22, 0.3);
}

/* --- استفاده از GRID برای هم‌اندازه شدن دقیق --- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* دو ستون دقیقاً برابر */
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 20px;
}

.form-full { margin-bottom: 20px; width: 100%; }

.form-row input, 
.form-row select {
    width: 100%;
    height: 60px;
    margin: 0;
    box-sizing: border-box;
    
    background: rgba(0, 0, 0, 0.2); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    
    -webkit-appearance: none; /* حذف استایل مرورگر */
    appearance: none;
}

/* پدینگ‌ها */
.form-row input { padding: 0 20px; }
.form-row select { 
    padding: 0 20px 0 50px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 18px;
    cursor: pointer;
}

textarea {
    width: 100%; min-height: 120px; padding: 20px;
    background: rgba(0, 0, 0, 0.2); border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1); color: white;
    resize: vertical;
}

select option { background-color: #151515; color: #ddd; padding: 15px; }

/* راست چین کردن متون فارسی */
input, select, textarea { text-align: right; direction: rtl; }

/* اعداد تلفن (ظاهر راست، تایپ استاندارد) */
input[type="tel"] { direction: ltr; text-align: right; }

button[type="submit"] {
    width: 100%; height: 60px;
    background: linear-gradient(135deg, var(--gold), #e0a800);
    color: black; border-radius: 15px; border: none;
    font-weight: 900; font-size: 1.2rem; cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 20px rgba(254, 188, 22, 0.2);
}
button[type="submit"]:hover { transform: translateY(-3px); }


/* ================================================== */
/*            MOBILE & TABLET (RESPONSIVE)            */
/* ================================================== */

@media screen and (max-width: 992px) {

    /* 1. باز کردن قفل اسکرول صفحه */
    html, body {
        overflow-y: auto !important;
        height: auto !important;
        display: block !important; /* حذف فلکس بادی برای اجازه اسکرول */
    }

    /* 2. چیدمان ستونی برای کل صفحه */
    .layout-wrapper {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        width: 100% !important;
        padding: 20px 20px 120px 20px !important; /* فضای خالی پایین برای منو */
        overflow: visible !important;
    }

    /* 3. تنظیم همه پنل‌ها به تمام عرض */
    .glass-panel {
        width: 100% !important;
        margin-bottom: 20px !important;
        /* اصلاح سایه در موبایل */
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    }

    /* --- تغییر ترتیب نمایش (Order) --- */
    
    /* کاور (پروفایل) - اول دیده شود */
    .middle-panel {
        order: 1 !important;
        flex: none !important;
        padding: 30px 10px !important;
    }

    /* محتوا - دوم دیده شود */
    .content-panel {
        order: 2 !important;
        flex: none !important;
        height: auto !important;
        overflow: visible !important; /* اسکرول داخلی پنل حذف و به اسکرول صفحه سپرده شود */
    }

    /* -------------------------------------------------- */
    /* 4. منوی پایین (Fixed Horizontal Menu)              */
    /* -------------------------------------------------- */
    
    .nav-panel {
        order: 3 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 70px !important; /* ارتفاع منو */
        z-index: 9999 !important;
        
        /* حذف استایل‌های دسکتاپ */
        background: rgba(20, 20, 20, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        border-radius: 20px 20px 0 0 !important;
        border: none !important;
        border-top: 1px solid rgba(255,255,255,0.1) !important;
        margin: 0 !important;
        padding: 0 10px !important;
        
        /* اجبار به افقی شدن */
        display: flex !important;
        flex-direction: row !important; 
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* مخفی کردن لوگو در منوی پایین */
    .menu-logo, .spacer { display: none !important; }

    /* لیست منو افقی شود */
    .nav-list {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        justify-content: space-around !important; /* فاصله مساوی */
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    /* آیتم‌های منو */
    .nav-item {
        flex-direction: column !important; /* آیکون بالا متن پایین */
        justify-content: center !important;
        padding: 5px !important;
        margin: 0 !important;
        border-radius: 10px !important;
        background: transparent !important;
        flex: 1 !important;
    }
    
    .nav-item i {
        font-size: 1.4rem !important;
        width: auto !important;
        margin-bottom: 4px !important;
    }

    .nav-text {
        opacity: 1 !important;
        transform: none !important;
        font-size: 0.65rem !important; /* متن خیلی ریز */
        display: block !important;
        position: static !important;
    }

    /* --- فرم در موبایل تک ستونه شود --- */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}


/* --- استایل عمومی اینپوت‌ها --- */
input, select, textarea {
    width: 100%;
    box-sizing: border-box; /* محاسبه دقیق پدینگ */
    background: rgba(0, 0, 0, 0.2); 
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    
    /* فونت و جهت */
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
    direction: rtl;
}

/* تنظیمات اختصاصی ارتفاع (جدا کردن textarea از بقیه) */
input, select {
    height: 60px;          /* ارتفاع ثابت فقط برای اینپوت و سلکت */
    padding: 0 20px;       /* پدینگ افقی */
    line-height: 60px;     /* تراز عمودی متن */
}

.info-box {
    /* تنظیمات چیدمان (حفظ شود تا جای متن درست بماند) */
    margin-top: 20px;
    min-height: 80px; /* ارتفاع رزرو شده تا با تغییر متن صفحه نپرد */
    display: flex;
    align-items: center;
    justify-content: center;
    /* --- حذف ظاهر مستطیلی --- */
    background: transparent; /* پس‌زمینه کاملاً شفاف */
    border: none; /* حذف خط دور */
    backdrop-filter: none; /* حذف تاری شیشه‌ای خود باکس */
    box-shadow: none; /* حذف سایه */
}

    /* کمی فونت متن را درشت‌تر و خواناتر می‌کنیم چون دیگر باکس زیرش نیست */
    .info-box p {
        font-size: 1.1rem;
        line-height: 1.8;
        font-weight: 500;
        color: #ffffff;
        text-shadow: 0 2px 10px rgba(0,0,0,0.8); /* سایه برای خوانایی روی عکس */
    }
.bg-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: background-image 0.6s ease;
    filter: blur(3px); /* بلر بودن عکس */
    transform: scale(1.1);
    z-index: -2;
    opacity: 50%; /* <--- این خط را اضافه کنید (عدد کمتر = تاریک‌تر) */
}
.middle-panel {
    flex: 1.2;
    position: relative; /* حیاتی برای اینکه لایه بک‌گراند دقیق داخلش بیفتد */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* این خط باعث می‌شود بلر و زوم تصویر از کادر بیرون نزند */
    border-radius: var(--panel-radius); /* شعاع گوشه‌ها رو از متغیر می‌گیرد */
}
.bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* ارتفاع و عرض کامل */

    background-size: cover; /* کل فضا را پر می‌کند (اگر لازم باشد برش می‌زند) */
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.6s ease;
    /* تنظیمات ظاهری شما */
    filter: blur(3px);
    opacity: 50%; /* شدت تاریکی */
    transform: scale(1.1); /* کمی زوم برای اینکه گوشه‌های بلر شده سفید نشوند */
    z-index: -2;
}
.middle-panel {
    flex: 1.2;
    height: 100%; /* <--- این خط حیاتی است */
    width:100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    border-radius: var(--panel-radius);
}
.layout-wrapper {
    display: flex;
    align-items: stretch; /* <--- این باعث می‌شود هر ۳ ستون هم‌قد شوند */
    gap: var(--gap);
    width: 95vw;
    height: 90vh;
    position: relative;
    z-index: 10;
}
/* ================================================== */
/*            MOBILE & TABLET (RESPONSIVE)            */
/* ================================================== */

@media screen and (max-width: 992px) {

    /* 1. باز کردن قفل اسکرول صفحه */
    html, body {
        overflow-y: auto !important;
        height: auto !important;
        display: block !important;
    }

    /* 2. چیدمان ستونی برای کل صفحه */
    .layout-wrapper {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        width: 100% !important;
        /* فضای خالی پایین رو زیاد میکنیم که محتوا زیر نوبار نره */
        padding: 20px 20px 100px 20px !important;
        overflow: visible !important;
    }

    /* 3. تنظیم پنل‌ها */
    .glass-panel {
        width: 100% !important;
        margin-bottom: 20px !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
    }

    /* ترتیب نمایش */
    .middle-panel {
        order: 1 !important;
        flex: none !important;
        padding: 30px 10px !important;
    }

    .content-panel {
        order: 2 !important;
        flex: none !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* -------------------------------------------------- */
    /* 4. منوی پایین (فیکس شده و استاندارد موبایل)        */
    /* -------------------------------------------------- */

    .nav-panel {
        order: 3 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important; /* این باعث میشه فیت عرض بشه و بیرون نزنه */
        width: auto !important; /* ویدث 100 نباشه */
        /* ارتفاع اتوماتیک بر اساس محتوا + ناحیه امن گوشی */
        height: auto !important;
        min-height: 60px;
        /* پدینگ هوشمند برای آیفون و اندروید جدید */
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom)) 10px !important;
        background: rgba(20, 20, 20, 0.9) !important; /* کمی تیره‌تر برای خوانایی */
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border-radius: 25px 25px 0 0 !important;
        border: none !important;
        border-top: 1px solid rgba(255,255,255,0.15) !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 9999 !important;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.3) !important;
    }

    .menu-logo, .spacer {
        display: none !important;
    }

    /* لیست منو با قابلیت اسکرول افقی نرم */
    .nav-list {
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        /* اگر آیتم‌ها کم باشن وسط چین، زیاد باشن اسکرول */
        justify-content: space-evenly !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 !important;
        /* اسکرول افقی برای وقتی آیتم زیاده */
        overflow-x: auto !important;
        scrollbar-width: none; /* مخفی کردن اسکرول بار فایرفاکس */
    }

        .nav-list::-webkit-scrollbar {
            display: none;
        }
    /* مخفی کردن اسکرول بار کروم */

    /* آیتم‌های منو */
    .nav-item {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 5px 12px !important; /* پدینگ افقی برای فاصله */
        margin: 0 2px !important;
        border-radius: 12px !important;
        background: transparent !important;
        flex-shrink: 0 !important; /* جلوگیری از له شدن آیتم‌ها */
        min-width: 60px; /* حداقل عرض برای تاچ راحت */
    }

        /* حالت اکتیو در موبایل */
        .nav-item.active {
            background: rgba(254, 188, 22, 0.15) !important;
        }

        /* سایز آیکون متناسب موبایل */
        .nav-item i {
            font-size: 1.3rem !important;
            width: auto !important;
            margin-bottom: 4px !important;
            display: block !important;
        }

    /* متن زیر آیکون */
    .nav-text {
        opacity: 1 !important;
        transform: none !important;
        font-size: 0.7rem !important; /* متن ریز و خوانا */
        font-weight: 400 !important;
        display: block !important;
        position: static !important;
        white-space: nowrap;
    }

    /* --- فرم تک ستونه --- */
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}
