/* ==========================================================================
   1. Fonts & Variables (Eye-Soothing Colors)
   ========================================================================== */
@font-face {
    font-family: 'Kalpurush';
    src: url('../fonts/Kalpurush.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-blue: #0056b3;
    --dark-blue: #1a365d;
    --brand-yellow: #f4b41a;
    
    /* Eye-soothing text colors */
    --text-main: #333333; 
    --text-muted: #555555; 
    
    --bg-light: #f8f9fa;
    --bg-gray: #e9ecef;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --black: #000000;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kalpurush', sans-serif;
    color: var(--text-main);
    background: var(--white);
    
    /* Adjusted Eye-soothing base font settings */
    font-size: 15px; 
    line-height: 1.5; 
    width: 100%;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-blue);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ==========================================================================
   3. Utility Classes (Fixed Margin Override Bug)
   ========================================================================== */
/* Perfect Centered Container with Balanced Left-Right Space */
.container {
    width: 100%;
    max-width: 1170px; /* Professional standard width */
    margin: 0 auto;    /* Centers the website perfectly */
    padding-left: 15px;
    padding-right: 15px;
}

/* Display & Alignment */
.d-flex { display: flex; align-items: center; justify-content: space-between; }
.d-flex-start { display: flex; align-items: flex-start; justify-content: flex-start; }
.d-flex-center { display: flex; align-items: center; justify-content: center; flex-direction: column; }
.text-center { text-align: center; }
.position-relative { position: relative; }
.w-100 { width: 100%; }

/* Colors */
.text-white { color: var(--white); }
.text-primary { color: var(--primary-blue); }
.text-muted { color: var(--text-muted); }
.text-dark { color: var(--dark-blue); }
.bg-dark { background: var(--dark-blue); }
.bg-light { background: var(--bg-light); }
.bg-yellow { background: var(--brand-yellow); }
.bg-white { background: var(--white); }

/* Spacing Utilities (Fixed to avoid overwriting container's margin: auto) */
.m-0 { margin: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 35px; }

.p-0 { padding: 0; }
.p-1 { padding: 10px; }
.p-2 { padding: 15px; }
.p-3 { padding: 25px; }
.py-1 { padding-top: 10px; padding-bottom: 10px; }
.py-2 { padding-top: 15px; padding-bottom: 15px; }
.py-3 { padding-top: 30px; padding-bottom: 30px; }

/* Shorthand Borders */
.border-all { border: 1px solid var(--border-color); }
.border-width-bottom-only { border-width: 0 0 1px 0; border-style: solid; border-color: var(--border-color); }
.border-width-top-only { border-width: 1px 0 0 0; border-style: solid; border-color: var(--border-color); }
.border-width-right-only { border-width: 0 1px 0 0; border-style: solid; border-color: var(--border-color); }
.border-none { border: 0; }
.radius-sm { border-radius: 4px; }
.radius-md { border-radius: 6px; }

/* Eye-Friendly Typography Options */
.font-bold { font-weight: bold; }
.title-large { font-size: 22px; font-weight: bold; line-height: 1.4; color: var(--dark-blue); }
.title-medium { font-size: 17px; font-weight: bold; line-height: 1.4; }
.title-small { font-size: 15px; font-weight: bold; line-height: 1.4; }
.meta-text { font-size: 13px; color: var(--text-muted); }

/* ==========================================================================
   4. Header Section
   ========================================================================== */
.top-bar { font-size: 13px; color: var(--text-muted); }
.top-menu a { margin: 0 8px; }
.icon-btn { background: transparent; border: 0; cursor: pointer; font-size: 16px; margin-left: 15px; color: var(--text-main); }
.main-nav { background: var(--white); }
.logo img { max-height: 45px; }
.nav-list { display: flex; }
.nav-list li a { display: block; padding: 10px 14px; font-weight: bold; font-size: 16px; }
.nav-list .active-item a { background: var(--brand-yellow); color: var(--black); border-radius: 4px; }

/* Mobile Header Elements */
.mobile-header { display: none; }
.mobile-sidebar {
    position: fixed;
    inset: 0 auto 0 -300px;
    width: 280px;
    background: var(--white);
    z-index: 9999;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
}
.mobile-sidebar.active { transform: translateX(300px); }
.close-btn { font-size: 28px; cursor: pointer; display: block; text-align: right; padding: 15px; }
.mobile-menu-list li a { display: block; padding: 12px 15px; font-weight: bold; border-width: 0 0 1px 0; border-style: solid; border-color: var(--bg-gray); }

/* ==========================================================================
   5. Ticker Section
   ========================================================================== */
.ticker-wrap { display: flex; align-items: center; background: var(--white); overflow: hidden; }
.ticker-label { padding: 8px 15px; font-weight: bold; white-space: nowrap; font-size: 14px; }
.ticker-content { flex: 1; padding: 0 15px; font-size: 14px; }
.ticker-content span { font-weight: bold; margin-right: 25px; }

/* ==========================================================================
   6. Main Layout Grids
   ========================================================================== */
.main-grid {
    display: grid;
    grid-template-columns: 7fr 3fr; /* Standard news portal ratio */
    gap: 30px;
}
.news-grid-2 {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

/* Post Cards */
.category-badge {
    position: absolute;
    inset: 10px auto auto 10px;
    background: var(--dark-blue);
    color: var(--white);
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
}
.main-featured-post img { width: 100%; aspect-ratio: 16/9; }

/* List Posts */
.list-post { display: flex; align-items: flex-start; }
.list-thumb { width: 120px; height: 80px; margin-right: 12px; }
.list-info { flex: 1; }

/* ==========================================================================
   7. Sidebar Widgets
   ========================================================================== */
.tab-header { display: flex; }
.tab-btn {
    flex: 1;
    padding: 12px 0;
    background: var(--bg-gray);
    border: 0;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Kalpurush', sans-serif;
    font-size: 14px;
}
.tab-btn.active {
    background: var(--white);
    color: var(--primary-blue);
    border-width: 1px 1px 0 1px;
    border-style: solid;
    border-color: var(--border-color);
    margin-bottom: -1px;
}
.tab-body { display: none; }
.tab-body.active { display: block; }
.ad-box { min-height: 180px; text-align: center; }
.btn-primary { background: #ff5722; color: var(--white); border: 0; cursor: pointer; padding: 10px 20px; font-weight: bold; font-size: 15px; }

/* ==========================================================================
   8. Multi-Column Category Section
   ========================================================================== */
.cat-3-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cat-header {
    background: var(--dark-blue);
    color: var(--white);
    padding: 8px 15px;
    font-weight: bold;
    font-size: 17px;
}
.cat-list-item { display: flex; }
.cat-list-thumb { width: 90px; height: 60px; margin-right: 12px; }

/* ==========================================================================
   9. Media / Gallery Section
   ========================================================================== */
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.video-card .play-icon {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

/* ==========================================================================
   10. Footer Styling
   ========================================================================== */
.social-bar { display: flex; width: 100%; }
.social-link { flex: 1; text-align: center; padding: 15px 0; font-weight: bold; color: var(--white); font-size: 15px; }
.social-link:hover { color: rgba(255,255,255,0.9); }
.bg-fb { background: #3b5998; }
.bg-yt { background: #ff0000; }
.bg-tw { background: #1da1f2; }
.bg-ig { background: #c13584; }

.footer-grid { display: grid; grid-template-columns: 2fr 1.5fr 2fr 1fr; gap: 30px; }
.footer-logo { max-width: 150px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a:hover { color: var(--primary-blue); }
.footer-heading {
    display: inline-block;
    padding-bottom: 6px;
    border-width: 0 0 2px 0;
    border-style: solid;
    border-color: var(--primary-blue);
    font-size: 16px;
}
.scroll-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 18px;
    border-radius: 50%;
}

/* ==========================================================================
   11. 100% Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .nav-list li a { padding: 10px 8px; font-size: 14px; }
    .main-grid { grid-template-columns: 1fr; gap: 30px; }
    .news-grid-2 { grid-template-columns: 1fr; }
    .cat-3-cols { grid-template-columns: repeat(2, 1fr); }
    .media-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
    .desktop-only { display: none !important; }
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        background: var(--white);
    }
    .mobile-logo img { max-height: 40px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .cat-3-cols { grid-template-columns: 1fr; }
    .media-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 20px; }
    .social-bar { flex-direction: column; }
    .ticker-wrap { flex-direction: column; align-items: flex-start; }
    .ticker-label { width: 100%; text-align: center; }
    .list-post { flex-direction: column; }
    .list-thumb, .cat-list-thumb { width: 100%; height: auto; margin-bottom: 10px; margin-right: 0; }
    .footer-heading { margin: 20px 0 10px 0; }
    .d-flex, .d-flex-start { flex-direction: column; align-items: flex-start; }
}