/* assets/css/style.css */

/* === CSS Variables & Theming === */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #e11d48;
    --bg-color: #f4f7f6;
    --surface-color: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --container-width: 1200px;
    --font-family: 'Mukta', 'Segoe UI', sans-serif;
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-color: #111827;
    --surface-color: #1f2937;
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-color: #374151;
}

/* === Reset & Typography === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color var(--transition), color var(--transition);
}

a { text-decoration: none; color: inherit; transition: color var(--transition); }
a:hover { color: var(--primary-color); }

/* Image scaling fix for mobile */
img { max-width: 100%; height: auto; display: block; object-fit: cover; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 15px; }

/* === Topbar === */
.topbar { background: var(--surface-color); border-bottom: 1px solid var(--border-color); padding: 8px 0; font-size: 0.85rem; color: var(--text-muted); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }

/* === Header & Navigation === */
.site-header { background: var(--surface-color); border-bottom: 3px solid var(--primary-color); position: sticky; top: 0; z-index: 1000; }
.header-main { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; position: relative; }
.site-logo img { max-height: 60px; }

.main-nav { background-color: var(--primary-color); }
.main-nav ul { list-style: none; display: flex; gap: 20px; }
.main-nav a { font-weight: 600; font-size: 1.1rem; text-transform: uppercase; color: #ffffff; display: block; padding: 10px 0; }
.main-nav a:hover { color: #facc15; }

/* Mobile Menu Button */
.menu-toggle { display: none; background: none; border: none; font-size: 1.8rem; color: var(--primary-color); cursor: pointer; }

/* === Breaking News Ticker === */
.breaking-news { background: var(--surface-color); border-bottom: 1px solid var(--border-color); display: flex; align-items: center; overflow: hidden; font-size: 0.95rem; }
.bn-label { background: var(--secondary-color); color: white; padding: 8px 15px; font-weight: bold; white-space: nowrap; z-index: 10; }
.bn-marquee { flex-grow: 1; white-space: nowrap; overflow: hidden; }
.bn-marquee a { display: inline-block; padding-left: 100%; animation: marquee 25s linear infinite; color: var(--text-main); font-weight: 600; }
body.dark-mode .bn-marquee a { color: #fff; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* === News Grid System === */
.news-section { padding: 40px 0; }
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; border-bottom: 3px solid var(--primary-color); display: inline-block; padding-bottom: 5px; color: var(--primary-color); text-transform: uppercase; }
.news-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }

.news-card { background: var(--surface-color); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 15px rgba(0,0,0,0.06); transition: transform var(--transition); }
.news-card:hover { transform: translateY(-3px); }
.news-thumb { position: relative; padding-top: 56.25%; overflow: hidden; background: #eee; }
.news-thumb img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.news-cat-badge { position: absolute; top: 10px; left: 10px; background: var(--secondary-color); color: white; padding: 3px 8px; font-size: 0.75rem; border-radius: 3px; font-weight: bold; z-index: 2; }
.news-content { padding: 15px; }
.news-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.news-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; justify-content: space-between; }

.grid-main { grid-column: span 8; }
.grid-side { grid-column: span 4; }

/* === Premium Article Styling === */
.breadcrumb { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; background: var(--surface-color); padding: 8px 15px; border-radius: 4px; border: 1px solid var(--border-color); }
.breadcrumb a { color: var(--primary-color); font-weight: 600; }
.article-title { font-size: 2.2rem; line-height: 1.3; margin-bottom: 15px; }
.article-meta-modern { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; background: var(--surface-color); padding: 15px; border-radius: 6px; border: 1px solid var(--border-color); margin-bottom: 20px; gap: 15px; }
.author-info { display: flex; align-items: center; gap: 10px; }
.author-avatar { background: #e5e7eb; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.stat-badge { background: var(--bg-color); padding: 5px 10px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-left: 5px; }

.article-featured-image { margin-bottom: 25px; border-radius: 8px; overflow: hidden; }
.dynamic-content { font-size: 1.15rem; line-height: 1.8; }
.dynamic-content p { margin-bottom: 15px; }
.dynamic-content > p:first-of-type::first-letter { font-size: 3.5rem; font-weight: bold; color: var(--primary-color); float: left; line-height: 1; margin-right: 8px; margin-top: 5px; }
.dynamic-content img { border-radius: 8px; margin: 15px 0; box-shadow: 0 2px 10px rgba(0,0,0,0.1); width: 100%; height: auto; }

/* Share Buttons */
.share-box { background: var(--surface-color); padding: 20px; border-radius: 6px; border: 1px dashed var(--border-color); margin-top: 30px; }
.share-btn { display: inline-block; padding: 10px 20px; border-radius: 4px; color: white !important; font-weight: bold; margin-right: 10px; margin-bottom: 10px; transition: opacity 0.3s; }
.share-btn:hover { opacity: 0.8; }
.whatsapp { background: #25D366; }
.facebook { background: #1877F2; }
.twitter { background: #1DA1F2; }

/* Sidebar & Ads */
.sidebar-widget { background: var(--surface-color); padding: 20px; border-radius: 6px; margin-bottom: 20px; box-shadow: 0 2px 15px rgba(0,0,0,0.04); }
.widget-title { margin-bottom: 15px; font-size: 1.2rem; border-left: 4px solid var(--primary-color); padding-left: 10px; }
.ad-space { background: var(--surface-color); border: 1px dashed var(--border-color); text-align: center; padding: 10px; margin: 20px 0; color: var(--text-muted); font-size: 0.9rem; overflow: hidden; }

/* Footer */
.site-footer { background: var(--surface-color); border-top: 1px solid var(--border-color); padding: 40px 0 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid var(--border-color); color: var(--text-muted); }

/* Theme Switch */
.theme-switch-wrapper { display: flex; align-items: center; }
.theme-switch { display: inline-block; height: 24px; position: relative; width: 50px; }
.theme-switch input { display:none; }
.slider { background-color: #ccc; bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: .4s; border-radius: 34px; }
.slider:before { background-color: #fff; bottom: 4px; content: ""; height: 16px; left: 4px; position: absolute; transition: .4s; width: 16px; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-color); }
input:checked + .slider:before { transform: translateX(26px); }


/* ==========================================================================
   📱 MOBILE RESPONSIVENESS (SUPER OPTIMIZED)
   ========================================================================== */
@media (max-width: 992px) {
    .grid-main, .grid-side { grid-column: span 12; }
}

@media (max-width: 768px) {
    /* Topbar stacking */
    .topbar-inner { flex-direction: column; gap: 10px; text-align: center; }
    
    /* Header adjustments */
    .site-logo img { max-height: 45px; } /* Smaller logo on mobile */
    .site-logo h1 { font-size: 1.5rem; }
    
    /* Mobile Menu Toggle Magic */
    .menu-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        z-index: 1001;
    }
    .main-nav.active { display: block; animation: slideDown 0.3s ease-in-out; }
    
    .main-nav ul { flex-direction: column; gap: 0; padding: 0; }
    .main-nav a { padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
    
    /* Breaking News */
    .bn-label { padding: 5px 10px; font-size: 0.8rem; }
    .bn-marquee { font-size: 0.9rem; }
    
    /* Articles & Fonts for mobile */
    .article-title { font-size: 1.6rem; }
    .article-meta-modern { flex-direction: column; align-items: flex-start; gap: 10px; }
    .dynamic-content { font-size: 1.05rem; }
    .dynamic-content > p:first-of-type::first-letter { font-size: 2.8rem; } /* Smaller Dropcap */
    
    /* Full width buttons on mobile */
    .share-btn { display: block; width: 100%; text-align: center; margin-right: 0; box-sizing: border-box; }
    
    /* Adjust News Grids */
    .news-grid { gap: 15px; }
    .news-section { padding: 20px 0; }
}

/* Menu Animation for Mobile */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}