/* =========================================
   1. GLOBAL VARIABLES & THEME
   ========================================= */
:root {
    /* Premium Navy/Slate Theme (Matches About Page) */
    --bg-main: #0f172a;       /* Slate 900 - Main Background */
    --bg-card: #1e293b;       /* Slate 800 - Cards */
    --bg-border: #334155;     /* Slate 700 - Borders */
    
    --text-primary: #f8fafc;  /* White/Light Gray */
    --text-muted: #94a3b8;    /* Muted Gray */
    
    --primary-blue: #3b82f6;  /* Brand Color */
    --primary-hover: #2563eb;
    
    /* Glow Gradient Variables */
    --hero-glow: radial-gradient(circle at top center, rgba(59, 130, 246, 0.20), transparent 60%);
}

body {
    background-color: var(--bg-main); /* Full Body Deep Blue */
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

a { text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography Highlights */
.highlight {
    color: var(--primary-blue);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

/* Gradient Text Style (Like About Page) */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.sec-title h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    color: white;
}

/* =========================================
   2. BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border: none;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
}
.btn-outline:hover {
    background: var(--primary-blue);
    color: white;
}

/* =========================================
   3. HERO SECTION (GLOW EFFECT ADDED)
   ========================================= */
.portfolio-hero {
    /* 🔥 Exact Glow from About Page 🔥 */
    background: var(--hero-glow), var(--bg-main);
    padding: 160px 0 80px;
    position: relative;
    text-align: center;
}

.portfolio-hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 700;
    color: white;
}

/* =========================================
   4. LOGOS SECTION
   ========================================= */
.logos-section {
    padding: 40px 0;
    background: var(--bg-main); /* Same as body */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    align-items: center;
}

.logo-grid img {
    height: 35px;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: 0.3s;
}

.logo-grid img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* =========================================
   5. INTRO SECTION
   ========================================= */
.intro-section {
    padding: 100px 0;
    background: var(--bg-main);
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 50px;
}

.intro-content { flex: 1; }
.intro-image { flex: 1; }

.intro-content h2 { font-size: 2.2rem; margin-bottom: 20px; color: white; }
.intro-content p { color: var(--text-muted); line-height: 1.8; margin-bottom: 15px; }
.intro-image img { width: 100%; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }

/* =========================================
   6. EXPLAINER VIDEOS (GRID)
   ========================================= */
.section { 
    padding: 80px 0; 
    background: var(--bg-main); /* No Black */
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.video-card {
    background: var(--bg-card); /* Slate 800 */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-blue);
}

.thumb-box {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.video-card:hover .thumb-box img { transform: scale(1.05); }

.play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 50px; height: 50px;
    background: rgba(59, 130, 246, 0.9);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.3);
}

.info-box { padding: 20px; }
.info-box h4 { font-size: 1.1rem; margin: 0; color: var(--text-primary); }

/* =========================================
   7. GRAPHICS SECTION (UPDATED)
   ========================================= */

/* 1. Background Fix (No more Pitch Black) */
.bg-darker { 
    background-color: var(--bg-secondary); /* Slate 900 matches theme */
    padding: 100px 0; /* একটু স্পেস বাড়ানো হলো */
}

/* 2. Layout & Width Fix */
.flex-row-reverse {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 80px; /* টেক্সট এবং ইমেজের মাঝে দূরত্ব বাড়ানো হয়েছে */
}

/* Text Styling */
.graphics-text { 
    flex: 0.8; /* টেক্সট এরিয়া ৪০% জায়গা নিবে */
}

.graphics-text h3 {
    font-size: 2.8rem; /* টাইটেল বড় করা হয়েছে */
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
}

.graphics-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 40px; /* 🔥 বাটনের সাথে দূরত্ব তৈরি করা হলো 🔥 */
}

/* 3. Image Grid Fix (Bigger Images) */
.graphics-grid {
    flex: 1.2; /* ইমেজ সেকশন ৬০% জায়গা নিবে */
    display: grid;
    /* 🔥 আগে 3 ছিল, এখন 2 করাতে ছবিগুলো বড় দেখাবে 🔥 */
    grid-template-columns: repeat(2, 1fr); 
    gap: 25px;
}

.graphic-item {
    height: 240px; /* হাইট বাড়ানো হয়েছে */
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.graphic-item img {
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    transition: 0.5s ease;
}

/* Hover Effect */
.graphic-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
}

.graphic-item:hover img { 
    transform: scale(1.1); 
}

/* Mobile Responsive Adjustments */
@media (max-width: 991px) {
    .flex-row-reverse {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .graphics-text {
        width: 100%;
        margin-bottom: 20px;
    }

    .graphics-text h3 { font-size: 2.2rem; }
    
    .graphics-grid {
        width: 100%;
        /* মোবাইলে আবার ছোট গ্রিড ভালো লাগে না, তাই বড় রাখা হলো */
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .graphic-item { height: 180px; }
}

@media (max-width: 480px) {
    .graphics-grid {
        /* খুব ছোট স্ক্রিনে একটা করে ছবি */
        grid-template-columns: 1fr; 
    }
}

/* =========================================
   8. SOCIAL MEDIA (FACEBOOK 3D SLIDER)
   ========================================= */
.social-showcase-section {
    padding: 100px 0;
    /* Blend with body, no sharp black */
    background: var(--bg-main); 
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.carousel-3d-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 650px;
    perspective: 1000px;
    margin-top: 40px;
}

/* Center Phone - Removed Pitch Black */
.phone-mockup-fb {
    width: 320px;
    height: 640px;
    background: #18191a; /* Keep Facebook Dark Gray for UI Realism */
    border-radius: 40px;
    border: 8px solid var(--bg-border); /* Slate Border */
    position: relative;
    z-index: 10;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5); /* Softer Shadow */
    transition: all 0.5s ease;
    overflow: hidden;
}

.notch {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 140px; height: 25px;
    background: var(--bg-border);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 20;
}

/* Side Blurred Cards */
.blur-card {
    position: absolute;
    width: 280px; height: 500px;
    opacity: 0.6;
    filter: blur(4px) brightness(0.8);
    transition: all 0.6s ease-in-out;
    border-radius: 20px;
    overflow: hidden;
    z-index: 5;
    background: var(--bg-card);
    border: 2px solid var(--bg-border);
}

.blur-card.left { transform: translateX(-280px) scale(0.85); }
.blur-card.right { transform: translateX(280px) scale(0.85); }

/* Facebook UI Internals */
.fb-header {
    display: flex; align-items: center;
    padding: 40px 15px 15px;
    color: white;
}
.fb-profile-pic img { width: 40px; height: 40px; border-radius: 50%; margin-right: 10px; border: 1px solid #333; }
.fb-user-info { flex: 1; }
.fb-name { font-size: 0.9rem; font-weight: 600; margin: 0; color: #e4e6eb; }
.verified { color: #2d88ff; font-size: 0.8rem; margin-left: 3px; }
.fb-time { font-size: 0.7rem; color: #b0b3b8; display: block; }
.fb-options { color: #b0b3b8; }

/* REPLACED BLACK CONTENT BG WITH DARK SLATE */
.fb-content {
    width: 100%; height: 410px;
    background: #020617; /* Very Dark Slate (Not pure #000) */
    display: flex; align-items: center; overflow: hidden;
}
.fb-content img { width: 100%; height: 100%; object-fit: cover; }

.fb-footer {
    padding: 15px; border-top: 1px solid #3e4042; margin-top: auto;
}
.fb-actions {
    display: flex; justify-content: space-around;
    color: #b0b3b8; font-size: 0.9rem;
}
.fb-actions .action { cursor: pointer; transition: 0.3s; }
.fb-actions .action:hover { color: var(--primary-blue); }

/* =========================================
   9. RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 991px) {
    .portfolio-hero h1 { font-size: 2.5rem; }
    .flex-row, .flex-row-reverse { flex-direction: column; text-align: center; }
    .graphics-text { text-align: center; }
    
    .logo-grid { gap: 20px; }
    
    .blur-card { display: none; }
    .carousel-3d-container { height: auto; padding: 20px 0; }
}

@media (max-width: 768px) {
    .video-grid { grid-template-columns: 1fr; }
    .graphics-grid { grid-template-columns: repeat(2, 1fr); }
    .phone-mockup-fb { width: 100%; max-width: 320px; }
    
    .portfolio-hero { padding-top: 120px; }
}



/* =========================================
   10. MOBILE OVERFLOW FIXES (ADD AT BOTTOM)
   ========================================= */

/* 1. Global Overflow Fix */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important; /* ডানে বামে স্ক্রল বন্ধ */
}

/* 2. Hero Section Fixes */
@media (max-width: 768px) {
    .portfolio-hero {
        padding-top: 140px;
        padding-bottom: 50px;
        overflow: hidden; /* হিরো সেকশনের ভেতরের এলিমেন্ট বাইরে যাবে না */
    }

    .portfolio-hero h1 {
        font-size: 2.2rem; /* মোবাইলে টাইটেল ছোট করা হলো */
        padding: 0 10px;   /* দুই পাশে সেফটি গ্যাপ */
    }

    .logo-grid {
        gap: 20px; /* লোগোগুলোর গ্যাপ কমানো হলো */
    }
}

/* 3. Facebook Slider Mobile Fix */
@media (max-width: 768px) {
    .social-showcase-section {
        overflow: hidden; /* স্লাইডার সেকশনের স্ক্রল ফিক্স */
        padding: 60px 0;
    }

    .carousel-3d-container {
        height: auto;
        width: 100%;
        overflow: hidden; 
    }

    /* ফোন মকআপের সাইজ ফিক্স */
    .phone-mockup-fb {
        width: 90%;       /* ফিক্সড 320px এর বদলে ৯০% */
        max-width: 300px; /* ম্যাক্সিমাম ৩০০ পিক্সেল */
        height: 580px;    /* হাইট একটু কমানো হলো */
        margin: 0 auto;   /* সেন্টারে রাখার জন্য */
        border-width: 5px; /* বর্ডার চিকন করা হলো */
    }
    
    .notch {
        width: 100px; /* নচ ছোট করা হলো */
    }

    /* ব্লার কার্ডগুলো মোবাইলে সম্পূর্ণ হাইড */
    .blur-card {
        display: none !important;
    }
}

/* 4. Graphics Grid Fix */
@media (max-width: 768px) {
    .graphics-grid {
        display: grid;
        grid-template-columns: 1fr; /* এক লাইনে একটা করে ইমেজ */
        padding: 0 10px; /* সেফটি প্যাডিং */
    }
    
    .graphic-item {
        width: 100%;
    }
}

/* 5. Container Padding Fix */
.container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    box-sizing: border-box;
}



/* =========================================
   NEW BUTTON STYLE (Added to Portfolio)
   ========================================= */
.btn-style-recent {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    background: transparent;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: capitalize;
    cursor: pointer;
    text-decoration: none;
}

.btn-style-recent:hover {
    background: #ffffff;
    color: var(--bg-main); /* Theme Background Color */
    border-color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* Margin helper if needed */
.mt-20 { margin-top: 20px; }