/* ==================================================================
   frontend/style.css - News Portal Theme (Blue/White)
   ================================================================== */
:root {
    --brand: #0b3d91;
    --brand-light: #3b82f6;
    --brand-dark: #1e3a8a;
    --accent: #dc2626;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    background-color: #fff;
}

a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--brand-light); }

.logo-text { font-size: 1.5rem; font-weight: 800; color: var(--brand); letter-spacing: -1px; text-transform: uppercase; }

/* Navbar */
.top-bar { background: var(--brand-dark); color: #fff; font-size: 0.85rem; padding: 5px 0; }
.navbar { box-shadow: 0 2px 4px rgba(0,0,0,.05); }
.nav-link { font-weight: 600; text-transform: uppercase; font-size: 0.9rem; color: var(--text-dark) !important; }
.nav-link.active, .nav-link:hover { color: var(--brand) !important; }

/* Dropdown Menu (Desktop) */
.dropdown-menu { border-radius: 8px; border: 1px solid var(--border-color); padding: 8px 0; }
.dropdown-item { padding: 8px 20px; font-size: 0.9rem; font-weight: 500; color: var(--text-dark); transition: all .2s; }
.dropdown-item:hover { background: var(--brand); color: #fff; }
.dropdown-toggle::after { font-size: 0.7rem; margin-left: 4px; }

/* Dropdown Menu (Mobile) */
@media (max-width: 991.98px) {
    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        border: none;
        box-shadow: none;
        padding-left: 1.5rem;
        margin-top: 0;
        margin-bottom: 0;
    }
    .navbar-nav .dropdown-menu .dropdown-item {
        padding: 4px 12px;
        font-size: 0.85rem;
        color: var(--text-muted);
    }
    .navbar-nav .dropdown-menu .dropdown-item:hover {
        background: var(--bg-light);
        color: var(--brand);
    }
    .navbar-nav .dropdown-toggle::after {
        float: right;
        margin-top: 8px;
    }
    .navbar-nav .dropdown-divider { margin: 4px 0; }
}

/* Ticker */
.ticker-wrap { background: #fff; border-bottom: 1px solid var(--border-color); padding: 10px 0; overflow: hidden; }
.ticker-label { background: var(--accent); color: #fff; padding: 4px 12px; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; border-radius: 4px; margin-right: 15px; white-space: nowrap; }
.ticker { white-space: nowrap; overflow: hidden; box-sizing: border-box; }
.ticker-content { display: inline-block; white-space: nowrap; padding-right: 100%; animation: ticker 40s linear infinite; }
.ticker-content a { color: var(--text-dark); font-weight: 600; font-size: 0.9rem; margin-right: 30px; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* Cards & Articles */
.hero-title { font-size: 2rem; font-weight: 800; line-height: 1.3; margin: 10px 0; }
.hero-img { width: 100%; height: 450px; object-fit: cover; border-radius: 8px; }
.card { border: 1px solid var(--border-color); border-radius: 8px; transition: box-shadow .2s; height: 100%; }
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.card-title { font-weight: 700; font-size: 1.1rem; line-height: 1.4; }
.card-title a { color: var(--text-dark); }
.card-title a:hover { color: var(--brand); }
.card-img-top { height: 220px; object-fit: cover; }
.badge-category { background: var(--brand); color: #fff; font-size: 0.7rem; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; }

/* Sidebar */
.sidebar-title { border-bottom: 3px solid var(--brand); padding-bottom: 8px; margin-bottom: 15px; font-weight: 700; text-transform: uppercase; font-size: 1.1rem; color: var(--brand-dark); }
.list-group-item { border: none; border-bottom: 1px dashed var(--border-color); }
.popular-list .rank { font-size: 1.5rem; font-weight: 800; color: var(--border-color); width: 40px; }

/* Article Detail */
.article-header h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 15px; }
.article-meta { font-size: 0.9rem; color: var(--text-muted); border-bottom: 1px solid var(--border-color); padding-bottom: 15px; margin-bottom: 20px; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.article-body { font-size: 1.15rem; line-height: 1.8; color: #374151; }
.article-body p { margin-bottom: 1.5rem; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5rem 0; }

/* Comments */
.comment-avatar { width:40px; height:40px; background:var(--brand); color:#fff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:bold; }
.comment-avatar-sm { width:30px; height:30px; background:#64748b; color:#fff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:bold; }

/* Footer */
footer { background: var(--brand-dark); color: #cbd5e1; padding: 40px 0 20px; margin-top: 40px; }
footer h5 { color: #fff; font-weight: 700; text-transform: uppercase; font-size: 1rem; margin-bottom: 15px; }
footer a { color: #cbd5e1; display: block; margin-bottom: 8px; font-size: 0.9rem; }
footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 30px; padding-top: 20px; font-size: 0.85rem; text-align: center; }
