/* ==========================================================================
   1. GLOBAL & ROOT STYLES (মার্জ ও ক্লিন করা)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --panel-width: 380px;
    --bg-color: #0a0a0a;
}

html {
    scrollbar-gutter: stable;
}

body { 
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: var(--bg-color);
    color: #fff;
    overflow-x: hidden;
}

body.scroll-lock {
    overflow: hidden;
}

.page-wrapper {
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    will-change: transform;
    width: 100%;
}

@media (min-width: 769px) {
    body.panel-active .page-wrapper {
        transform: translateX(calc(var(--panel-width) * -0.2));
    }
}


/* ==========================================================================
   2. NAVIGATION HEADER CSS
   ========================================================================== */
/* --- Desktop Dropdown Slide Down & Up --- */
.dropdown-menu {
    display: grid !important;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.25s ease-in-out, 
                visibility 0.35s;
}

.dropdown-menu > div {
    min-height: 0;
}

/* Hover এবং Open দুই অবস্থাতেই ড্রপডাউন দেখাবে */
.dropdown:hover .dropdown-menu,
.dropdown.dropdown-open .dropdown-menu {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
}

/* Chevron Icon Rotation */
.icon-chevron { 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}

.dropdown:hover .icon-chevron,
.dropdown.dropdown-open .icon-chevron,
.mobile-dropdown-open > summary .icon-chevron { 
    transform: rotate(90deg); 
}

/* --- Mobile Slide-In Menu & Scroll Fix --- */
@media (max-width: 1023px) {
    #mobileMenu { 
        position: fixed;
        top: 0;
        right: -100%; /* শুরুতে স্ক্রিনের বাইরে ডান দিকে লুকিয়ে থাকবে */
        width: 90%;
        max-width: 360px;
        height: 100vh; 
        overflow-y: auto; /* কন্টেন্ট বড় হলে নিচের দিকে স্ক্রল করার সুবিধা */
        overflow-x: hidden;
        background-color: #0a0a0a;
        z-index: 45; 
        display: flex !important; 
        flex-direction: column;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        padding-top: 16px; 
        /* মেনু আসার সময় হালকা ডিলে এবং চমৎকার স্মুথ কার্ভ ট্রানজিশন */
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        -webkit-overflow-scrolling: touch;
    }

    /* মোবাইল মেনু একটিভ হলে ডান দিক থেকে শো করবে */
    #mobileMenu.active {
        right: 0; 
    }

    /* মেনুর ভেতরের কোনো উপাদান যাতে সংকুচিত না হয় */
    #mobileMenu > * {
        flex-shrink: 0 !important;
    }
}

@media (min-width: 1024px) {
    #mobileMenu {
        display: none !important; /* ডেস্কটপে মোবাইল মেনু সম্পূর্ণ হাইড থাকবে */
    }
}

/* মোবাইল মেনু বাটনটি যাতে কোনো গ্লিচ বা ব্লিচিং ছাড়া অত্যন্ত দ্রুত গায়েব হয় */
#mobileMenuBtn {
    transition: opacity 0.1s ease-out, transform 0.1s ease-out;
    will-change: opacity, transform;
}

#mobileMenuBtn.menu-btn-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9); /* বাটনটি ক্লিক করার সাথে সাথে ভ্যানিশ হবে */
}

/* প্রিমিয়াম ব্যাকগ্রাউন্ড ব্লার ওভারলে ইফেক্ট */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* --- মোবাইল ড্রপডাউন মসৃণ স্লাইড ইফেক্ট --- */
.mobile-accordion {
    overflow: hidden;
}

.mobile-accordion-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.25s ease-in-out;
}

/* ডিফল্ট ডিটেইলস মার্কার রিমুভ করা */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* কাস্টম স্ক্রলবার */
#mobileMenu::-webkit-scrollbar { width: 3px; }
#mobileMenu::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }


/* ==========================================================================
   3. SOCIAL ACCOUNT SECTION CSS
   ========================================================================== */
.social-media-section {
    padding: 120px 0 80px;
    min-height: 100vh;
}

/* ডেস্কটপে দুই পাশের গ্যাপ বাড়ানোর জন্য max-width ১১২০ পিক্সেল লক করা হয়েছে */
.container {
    max-width: 1300px !important; 
    margin: 0 auto !important;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 3.2rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #b3b3b3;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Social Grid */
.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.social-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #fff;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    opacity: 0;
}

.social-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    transition: left 0.6s;
}

.social-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.social-item:hover::before {
    left: 100%;
}

.platform-wrapper {
    display: flex;
    align-items: center;
}

.platform-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-right: 24px;
    background: rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.social-item:hover .platform-icon {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.platform-info h3 { font-size: 1.2rem; font-weight: 500; margin-bottom: 4px; }
.platform-info p { font-size: 0.95rem; color: #888; }

.arrow-icon {
    opacity: 0;
    transform: translateX(-15px);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
}

.social-item:hover .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}

/* Side Panel */
.side-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: var(--panel-width);
    height: 100vh;
    background: #111;
    border-left: 1px solid rgba(255,255,255,0.05);
    z-index: 2000;
    padding: 40px 30px;
    transition: right 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: -15px 0 45px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    will-change: right;
}

.side-panel.open {
    right: 0;
}

.panel-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.panel-header h2 { font-size: 1.4rem; font-weight: 300; letter-spacing: 2px; text-transform: uppercase; }

.close-btn {
    background: transparent;
    border: 1px solid #333;
    color: #fff;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.close-btn:hover { background: #fff; color: #000; }

.account-list {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 5px;
}

.account-list::-webkit-scrollbar { width: 3px; }
.account-list::-webkit-scrollbar-thumb { background: #333; }

.account-link {
    display: flex;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #222;
    color: #999;
    text-decoration: none;
    transition: 0.3s;
}

.account-link:hover { color: #fff; padding-left: 10px; }

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: none;
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.overlay.visible {
    display: block;
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .social-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
    .section-title { font-size: 2.4rem; }
    .social-grid { grid-template-columns: 1fr; gap: 16px; }
    .social-item { padding: 20px 24px; }
    :root { --panel-width: 85%; }
    .side-panel { padding: 30px 20px; right: -90%; }
}

/* জাভাস্ক্রিপ্ট ফেইড-ইন অ্যানিমেশনের ফিক্স */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}