:root {
    --primary-color: #0b3b60;
    --secondary-color: #e31837;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #ffffff;
    --white: #fff;
    --border-color: #ddd;
    --font-family: 'Mukta', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 4px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
header {
    background-color: var(--white);
    border-bottom: 2px solid var(--primary-color);
}

.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.9rem;
    padding: 5px 0;
}

.brand-area {
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.logo-box {
    text-align: left;
}
.header-banner img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.logo-box h1 {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 5px;
}

.slogan {
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.main-nav {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    margin: 0;
}

.main-nav ul li a {
    display: block;
    padding: 12px 20px;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
}

.main-nav ul li a:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.menu-highlight-group {
    display: flex;
    gap: 10px;
    margin-left: 20px;
    border-left: 2px solid rgba(255,255,255,0.3);
    padding-left: 20px;
}

.main-nav ul li a.highlight-btn {
    border-radius: 4px;
    padding: 6px 15px;
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
}
.main-nav ul li a.highlight-btn:hover {
    background-color: #333;
}

.main-nav ul li a.highlight-btn.cat-btn {
    background-color: #27ae60;
}
.main-nav ul li a.highlight-btn.cat-btn:hover {
    background-color: #2ecc71;
}

.main-nav ul li a.highlight-btn.news-btn {
    background-color: #e67e22;
}
.main-nav ul li a.highlight-btn.news-btn:hover {
    background-color: #f39c12;
}

/* Main Content */
main {
    padding: 30px 0;
}

.section-block {
    background-color: var(--white);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    /* box-shadow removed for flat UI */
}

.section-title {
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.section-title h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: inline-block;
    border-bottom: 3px solid var(--secondary-color);
    margin-bottom: -7px;
}

.bg-light {
    background-color: #fff;
    border-top: 4px solid var(--secondary-color);
}

/* Bisesh (Banner) */
.bisesh-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.main-news {
    position: relative;
}

.main-news img {
    height: 450px;
    width: 100%;
}

.main-news .news-content {
    margin-top: 15px;
}

.main-news h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.main-news p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.side-news {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sub-news img {
    height: 200px;
    width: 100%;
    margin-bottom: 10px;
}

.sub-news h4 {
    font-size: 1.3rem;
}

/* Mixed Grid (1 Big, 4 Small) */
.mixed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.big-side img {
    height: 350px;
    width: 100%;
    margin-bottom: 15px;
}

.big-side h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.list-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.list-item {
    display: flex;
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.list-item img {
    width: 130px;
    height: 90px;
}

.list-item h4 {
    font-size: 1.2rem;
    line-height: 1.4;
}

/* Vichar Grid (Image Bg, Text Overlay) */
.vichar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.overlay-news {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.overlay-news::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0; top: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.overlay-content {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    color: var(--white);
    z-index: 1;
}

.overlay-content h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}
.overlay-content h4 a {
    color: var(--white);
}
.overlay-content h4 a:hover {
    color: #ccc;
}

.author {
    font-size: 0.9rem;
    color: #ffd700;
}

/* Podcast */
.podcast-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: center;
}

.podcast-info h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.video-thumbnail-block {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.video-thumbnail-block img {
    width: 100%;
    display: block;
    opacity: 0.8;
    transition: opacity 0.3s;
}
.video-link:hover img {
    opacity: 1;
}
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: color 0.3s, transform 0.3s;
}
.video-link:hover .play-icon {
    color: var(--secondary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Photo Sansar */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-auto-rows: 200px;
    gap: 10px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.photo-item:hover img {
    transform: scale(1.05);
}
.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
    padding: 20px 10px 10px 10px;
    font-size: 1rem;
    text-align: center;
}
.photo-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.photo-item:nth-child(1) .photo-caption { font-size: 1.3rem; padding-bottom: 15px; }

/* 2 Col Layout */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.standard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.std-news img {
    height: 160px;
    width: 100%;
    margin-bottom: 10px;
}

.std-news h4 {
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

.footer-brand h2 {
    font-size: 2rem;
}
.footer-brand p {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.footer-links p {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 992px) {
    .bisesh-grid, .mixed-grid, .podcast-container, .two-col-layout {
        grid-template-columns: 1fr;
    }
    .vichar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .main-news img {
        height: 300px;
    }
    .photo-grid img:nth-child(1) {
        grid-column: span 1; grid-row: span 1;
    }
}
@media (max-width: 576px) {
    .vichar-grid, .standard-grid {
        grid-template-columns: 1fr;
    }
    .main-nav ul li a {
        padding: 10px;
        font-size: 1rem;
    }
}

/* Single Page Layout */
.single-page {
    margin-top: 20px;
}
.single-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 30px;
}
.single-content {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    /* box-shadow removed for flat UI */
}
.category-tag {
    background: var(--secondary-color);
    color: var(--white);
    padding: 4px 10px;
    font-size: 0.9rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 15px;
}
.article-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.3;
}
.article-meta {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.article-featured-image {
    margin-bottom: 25px;
}
.article-featured-image img {
    width: 100%;
    border-radius: 8px;
}
.image-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}
.article-body p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: justify;
}
.article-body h3 {
    font-size: 1.5rem;
    margin: 25px 0 15px;
    color: var(--primary-color);
}
.article-body ul {
    margin-bottom: 20px;
    padding-left: 30px;
}
.article-body ul li {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.share-buttons {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap; /* Prevent overflow on small screens */
}
.share-btn {
    padding: 8px 15px;
    color: var(--white);
    border-radius: 4px;
    font-size: 0.9rem;
}
.share-btn.fb { background: #3b5998; }
.share-btn.tw { background: #1da1f2; }
.share-btn.wa { background: #25d366; }
.share-btn:hover { opacity: 0.9; color: var(--white); }

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.widget {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    /* box-shadow removed for flat UI */
}
.widget-title {
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 5px;
}
.widget-title h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
}
.widget-list {
    list-style: none;
}
.widget-list li {
    border-bottom: 1px dashed var(--border-color);
    padding: 12px 0;
}
.widget-list li:last-child {
    border-bottom: none;
}
.widget-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
}
.widget-list li img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}
.widget-list li span {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
}
.banner-widget img {
    width: 100%;
}
.related-news {
    margin-top: 40px;
}
.related-news .standard-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
    .single-layout {
        grid-template-columns: 1fr;
    }
    .related-news .standard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .related-news .standard-grid {
        grid-template-columns: 1fr;
    }
    .article-title {
        font-size: 2rem;
    }
}

/* Archive Page Styles */
.archive-page {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
    margin-bottom: 30px;
    /* box-shadow removed for flat UI */
}
.archive-header {
    margin-bottom: 30px;
}
.cat-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 15px;
}
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.page-link {
    display: inline-block;
    padding: 8px 15px;
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: 4px;
    font-weight: 600;
}
.page-link:hover, .page-link.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Logo link fixes */
.logo-box h1 a {
    color: var(--primary-color);
    text-decoration: none;
}
.logo-box h1 a:hover {
    color: var(--primary-color);
}


/* Mobile Menu & Responsiveness Updates */
.main-nav .container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    /* Header/Logo scaling */

    .container {
        width: 95%; /* Make content area wider on mobile */
    }
    .bisesh-grid, .mixed-grid, .podcast-container, .two-col-layout, .single-layout {
        gap: 15px; /* Reduce massive gaps on mobile */
    }
    section {
        margin-bottom: 30px; /* Reduce section spacing */
    }
    .section-title {
        margin-bottom: 15px;
    }

    .main-news img {
        height: 220px; /* Looks much better on mobile than 300px */
    }


    .single-content, .archive-page {
        padding: 15px;
    }
    .article-title {
        font-size: 1.8rem;
    }
    .article-body p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: justify;
}
    .widget {
        padding: 15px;
    }

    .brand-area {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 15px 0;
    }
    .logo-box {
        text-align: center;
    }
    .header-banner {
        width: 100%;
    }
    .header-banner img {
        width: 100%;
    }
    .logo-box h1 {
        font-size: 2.2rem;
    }
    .slogan {
        font-size: 1rem;
    }

    /* Horizontal Scroll Menu for Mobile */
    .main-nav .container {
        padding: 0; /* Remove padding so scroll goes edge to edge */
    }
    .main-nav ul.nav-menu {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap; /* THIS FIXES THE SCROLL */
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0;
        -webkit-overflow-scrolling: touch;
        align-items: center;
        justify-content: flex-start;
    }
    
    /* Hide scrollbar for a cleaner look */
    .main-nav ul.nav-menu::-webkit-scrollbar {
        display: none;
    }
    .main-nav ul.nav-menu {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .main-nav ul.nav-menu li {
        width: auto;
        text-align: left;
        flex-shrink: 0;
    }

    .main-nav ul.nav-menu li a {
        padding: 12px 15px;
        border-bottom: none;
        display: inline-block;
    }

    .menu-highlight-group {
        flex-direction: row;
        margin: 0;
        padding: 0;
        gap: 5px;
        padding-right: 15px; /* Space at the end of scroll */
        border-left: none;
        flex-shrink: 0;
    }
    
    .main-nav ul li a.highlight-btn {
        margin: 0;
        padding: 6px 12px;
    }
}

/* Footer Mobile Responsiveness */
@media (max-width: 576px) {
    footer {
        padding: 20px 0;
    }
    .footer-content {
        display: flex;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .footer-brand h2 {
        font-size: 1.5rem;
    }
    .footer-brand p {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    .footer-links p {
        font-size: 0.8rem;
    }
}

/* Mobile Bottom Nav & Popups */
@media (max-width: 768px) {
    
    
    
    
    
    

    /* Popups and Overlays */
    .popup-overlay {
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
        display: none;
        opacity: 0;
        transition: opacity 0.3s;
    }
    .popup-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Bottom Popup (Menu) */
    .bottom-popup {
        position: fixed;
        bottom: -100%;
        left: 0; right: 0;
        background: var(--white);
        z-index: 1002;
        padding: 20px;
        border-radius: 15px 15px 0 0;
        transition: bottom 0.3s ease-in-out;
        box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    }
    .bottom-popup.active {
        bottom: 0;
    }
    .bottom-popup h3 {
        color: var(--primary-color);
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    .popup-menu-list {
        list-style: none;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    .popup-menu-list li a {
        display: block;
        padding: 10px;
        background: var(--bg-color);
        border-radius: 4px;
        text-align: center;
        font-weight: 600;
    }

    /* Side Drawer (Recent Updates) */
    .side-drawer {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        z-index: 1002;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
        padding: 20px;
        overflow-y: auto;
    }
    .side-drawer.active {
        right: 0;
    }
    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 2px solid var(--primary-color);
        padding-bottom: 10px;
        margin-bottom: 20px;
    }
    .drawer-header h3 {
        color: var(--primary-color);
    }
    .drawer-header button {
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
    }
    .drawer-list {
        list-style: none;
    }
    .drawer-list li {
        border-bottom: 1px dashed var(--border-color);
        padding: 15px 0;
    }
    .drawer-list li a {
        font-size: 1.1rem;
        line-height: 1.4;
        display: block;
    }
}

/* Hide mobile elements on desktop */
@media (min-width: 769px) {
    .mobile-bottom-nav, .popup-overlay, .bottom-popup, .side-drawer {
        display: none !important;
    }
}

/* Refined Mobile App Navigation CSS */
@media (max-width: 768px) {
    body {
        padding-bottom: calc(75px + env(safe-area-inset-bottom)) !important;
    }
    
    .mobile-bottom-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0;
        right: 0;
        background: var(--white);
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 10px 0;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
        z-index: 99999 !important;
        border-top: 1px solid rgba(0,0,0,0.05);
    }
    
    .mobile-bottom-nav .nav-item {
        background: none;
        border: none;
        color: var(--text-light);
        font-size: 0.75rem;
        font-weight: 600;
        text-align: center;
        cursor: pointer;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        text-decoration: none;
        transition: color 0.2s ease, transform 0.2s ease;
    }

    .mobile-bottom-nav .nav-item span {
        font-size: 1.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        height: 24px;
    }

    .mobile-bottom-nav .nav-item:hover,
    .mobile-bottom-nav .nav-item:active {
        color: var(--primary-color);
        transform: translateY(-2px);
    }
}
