/* ==========================================================================
   RESPONSIVE DESIGN RULES (CLEANED & OPTIMIZED)
   ========================================================================== */

/* 💻 PC Version par Hamburger aur Close button ko chhupa ke rakho */
.menu-toggle, .menu-close-btn {
    display: none !important;
}

/* 📐 For Tablets and Small Laptops (Max-width: 992px) */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .main-blog-layout {
        display: flex;
        flex-direction: column;
        gap: 40px;
    }
}

/* 📱 MOBILE & TABLET RESPONSIVE STYLE (Screen size 768px aur usse choti ke liye) */
@media screen and (max-width: 768px) {
    
    /* Global Container Padding ताकि टेक्स्ट स्क्रीन से न चिपके */
    .container {
        width: 100%;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Header Container: Logo Left mein aur Dark Mode + Hamburger Right mein */
    .header-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px !important;
    }

    /* Logo Text Control */
    .logo {
        font-size: 1.3rem !important;
        white-space: nowrap !important;
    }

    /* 3-Line Hamburger Button ko mobile par dikhao */
    .menu-toggle {
        display: block !important;
        background: none !important;
        border: none !important;
        font-size: 1.8rem !important;
        color: inherit !important;
        cursor: pointer !important;
    }

    /* Navigation Bar: Sliding Side-Drawer Menu */
    .nav-bar {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important; /* Shuruat me screen ke right side se bahar chhipa rahega */
        width: 260px !important; /* Drawer ki perfect choudai */
        height: 100vh !important;
        background: #1a1e29 !important; /* Premium Dark Background */
        box-shadow: -5px 0 15px rgba(0,0,0,0.3) !important;
        transition: right 0.3s ease-in-out !important; /* Smooth sliding animation */
        z-index: 9999 !important;
        padding: 70px 25px 25px 25px !important;
        display: block !important;
    }

    /* Jab JavaScript se 'active' class judegi, toh menu andar slide karega */
    .nav-bar.active {
        right: 0 !important;
    }

    /* Navigation Links Styling Inside Drawer */
    .nav-links {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 20px !important;
        padding: 0 !important;
        margin-top: 20px !important;
        display: flex !important;
    }

    .nav-links li {
        width: 100% !important;
    }

    .nav-links li a {
        font-size: 1.2rem !important;
        color: #ffffff !important; /* Mobile menu ke andar text white dikhega */
        display: block !important;
        padding: 10px 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        text-align: left !important;
    }

    /* Close (✕) Button Positioning Inside Drawer */
    .menu-close-btn {
        display: block !important;
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        background: none !important;
        border: none !important;
        font-size: 1.5rem !important;
        color: #ffffff !important;
        cursor: pointer !important;
    }

    /* Hero Section Spacing Fix */
    .hero-section {
        padding: 40px 15px !important;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 1.8rem !important;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .hero-section p {
        font-size: 1rem !important;
        line-height: 1.6;
        margin-bottom: 25px;
    }

    /* Sidebar Layout Control for Mobile */
    .main-blog-layout {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .site-sidebar {
        width: 100% !important;
    }
}

/* 📱 MOBILE OPTIMIZATION (Screens < 768px) */
@media screen and (max-width: 768px) {
    
    /* Container ko thoda breathing space dein */
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Main layout grid ko single column mein set karein */
    .main-blog-layout {
        grid-template-columns: 1fr !important;
        margin-top: 20px !important;
        gap: 30px !important;
    }

    /* Blog cards container (Jo JS se inject hota hai) */
    #latest-posts-container {
        grid-template-columns: 1fr !important; /* Mobile par 1 card per row */
        gap: 20px !important;
    }

    /* Card styling mobile ke liye */
    .post-card {
        padding: 20px !important;
        transform: none !important; /* Mobile par 3D effect thoda complex ho sakta hai */
    }

    /* Section title ko chota karein */
    .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 20px !important;
    }

    /* Sidebar widget spacing */
    .site-sidebar {
        gap: 20px !important;
    }
    
    /* Footer links ko vertical stack karein */
    .footer-legal-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}
/* Responsive Fix for Blog Images */
.card-img-wrapper {
    overflow: hidden;
    border-radius: 16px;
}

.card-img-wrapper img,
.post-card img {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    object-fit: cover !important;
    display: block !important;
    max-height: 340px !important;
}

.post-card {
    width: 100% !important;
    overflow: hidden !important;
    margin-bottom: 20px !important;
}

/* Mobile-specific image ratio and sizing */
@media screen and (max-width: 768px) {
    .card-img-wrapper img,
    .post-card img {
        max-height: 240px !important;
        aspect-ratio: 16 / 10 !important;
    }
}

