/* --- Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- Navigation & Mobile Menu --- */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 70px; }
.logo { font-size: 24px; font-weight: 700; color: #0f172a; }
.logo span { color: #2563eb; }

.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { font-weight: 600; color: #64748b; transition: color 0.3s; }
.nav-links a:hover { color: #2563eb; }

/* Hamburger Menu Icon */
.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; }
.menu-toggle .bar { width: 25px; height: 3px; background-color: #0f172a; transition: all 0.3s ease; }

/* --- Hero Section --- */
.hero {
    display: flex; align-items: center; gap: 40px; margin: 40px 0;
    background: #ffffff; padding: 40px; border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}
.hero-content { flex: 1; }
.badge { background-color: #dbeafe; color: #1d4ed8; padding: 5px 12px; border-radius: 20px; font-size: 14px; font-weight: 600; display: inline-block; margin-bottom: 15px; }
.hero-content h1 { font-size: 40px; line-height: 1.2; margin-bottom: 20px; color: #0f172a; }
.hero-content p { font-size: 18px; color: #64748b; margin-bottom: 30px; }
.btn-primary { background-color: #2563eb; color: white; padding: 12px 28px; border-radius: 8px; font-weight: 600; transition: 0.3s; display: inline-block; }
.btn-primary:hover { background-color: #1d4ed8; }
.hero-image { flex: 1; }
.hero-image img { width: 100%; border-radius: 12px; object-fit: cover; }

/* --- Section Titles --- */
.section-title { margin: 60px 0 30px; }
.section-title h2 { font-size: 28px; color: #0f172a; margin-bottom: 20px; }

/* --- Carousel Design --- */
.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.carousel-header h2 { margin-bottom: 0; }
.slider-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.slider-btn:hover { background: #2563eb; color: #fff; border-color: #2563eb; }

.carousel-container {
    width: 100%;
    overflow: hidden; /* Hide scrollbar but keep functionality */
}
.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
    scrollbar-width: none; /* Firefox */
}
.carousel-track::-webkit-scrollbar { display: none; /* Chrome/Safari */ }

.category-card {
    min-width: 250px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    background: #ffffff; padding: 30px 20px; border-radius: 12px;
    text-align: center; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9; transition: 0.3s;
}
.category-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08); }

/* --- Latest Posts Grid --- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.post-card { background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04); transition: 0.3s; }
.post-card:hover { transform: translateY(-5px); }
.post-card img { width: 100%; height: 200px; object-fit: cover; }
.post-content { padding: 20px; }
.post-cat { color: #2563eb; font-size: 14px; font-weight: 600; text-transform: uppercase; margin-bottom: 10px; display: block; }
.post-content h3 { font-size: 20px; margin-bottom: 10px; color: #0f172a; }

/* --- AdSense --- */
.ad-container { margin: 40px 0; text-align: center; width: 100%; }
.ad-label { font-size: 12px; color: #94a3b8; margin-bottom: 5px; text-transform: uppercase; }
.ad-placeholder { background-color: #f1f5f9; border: 1px dashed #cbd5e1; min-height: 120px; display: flex; align-items: center; justify-content: center; color: #64748b; border-radius: 8px; }

/* Load More Button Styles */
.load-more-container { text-align: center; margin: 40px 0 60px; }
.btn-load-more {
    background: #ffffff; color: #2563eb; border: 2px solid #2563eb; padding: 14px 32px; 
    font-size: 16px; font-weight: 700; border-radius: 30px; cursor: pointer; text-transform: uppercase; 
    letter-spacing: 1px; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 10px; 
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}
.btn-load-more:hover { background: #2563eb; color: #ffffff; box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3); transform: translateY(-2px); }
.btn-load-more span { font-size: 20px; transition: transform 0.4s; }
.btn-load-more:hover span { transform: rotate(180deg); }
.hidden { display: none !important; }

/* --- Footer --- */
footer { background-color: #0f172a; color: #f8fafc; padding: 40px 0; margin-top: 60px; text-align: center; }

/* =========================================
   RESPONSIVE DESIGN (Media Queries) 
========================================= */

/* Tablet & Smaller Laptops */
@media (max-width: 992px) {
    .hero { flex-direction: column; text-align: center; padding: 30px; }
    .hero-content h1 { font-size: 32px; }
}

/* Mobile Devices */
@media (max-width: 768px) {
    /* হ্যামবার্গার মেনু একদম ডানদিকে সরানোর ফিক্স */
    .menu-toggle { 
        display: flex; 
        margin-left: auto; 
    } 
    
    /* নেভিগেশন ট্যাগকে হেডারের ফ্লেক্স লেআউট থেকে আলাদা করা হলো */
    nav {
        position: absolute; 
    }
    
    .nav-links {
        position: absolute;
        top: 70px;
        left: -100vw; /* স্ক্রিনের বাইরে রাখার জন্য */
        flex-direction: column;
        background-color: #ffffff;
        width: 100vw; /* মোবাইলে ফুল উইডথ পাবে */
        text-align: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.05);
        transition: 0.3s ease-in-out;
        z-index: 999; /* মেনুটি যেন অন্য কোনো টেক্সটের নিচে চাপা না পড়ে */
    }
    
    .nav-links.active { 
        left: 0; 
    }
    
    .category-card { min-width: 200px; padding: 20px 10px; }
    .category-card h3 { font-size: 16px; }
    
    .section-title h2 { font-size: 24px; }
}

/* Small Mobile Screens */
@media (max-width: 480px) {
    .hero-content h1 { font-size: 28px; }
    .hero-content p { font-size: 16px; }
    .post-grid { grid-template-columns: 1fr; }
    .carousel-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .carousel-buttons { align-self: flex-end; }
}
