/* =========================================================
   BlogNews - Beautification Layer
   Modern magazine-style polish with elegant typography,
   refined spacing, editorial accents and smooth motion.
   Loaded LAST so it wins.
   ========================================================= */

/* ---- Color refinements ---- */
:root {
    --blog-ink: #0b1220;
    --blog-ink-soft: #1f2937;
    --blog-text: #334155;
    --blog-mute: #64748b;
    --blog-surface: #ffffff;
    --blog-surface-soft: #f8fafc;
    --blog-line: #e5e7eb;
    --blog-accent: #111827;
    --blog-accent-2: #d946ef;
    --blog-accent-3: #4F46E5;
    --blog-gold: #c79a46;
    --blog-shadow-sm: 0 1px 2px rgba(15,23,42,.06);
    --blog-shadow: 0 12px 30px -12px rgba(15,23,42,.18);
    --blog-shadow-lg: 0 30px 60px -25px rgba(15,23,42,.28);
    --blog-radius: 14px;
}

/* ---- Typography polish ---- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--blog-text);
    background: var(--blog-surface-soft);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .hero-overlay h2, .hero-overlay h3,
.post-title, .post-title a, .section-header h2 {
    font-family: 'Playfair Display', 'Times New Roman', Georgia, serif;
    letter-spacing: -0.015em;
    color: var(--blog-ink);
    line-height: 1.2;
}

.post-title a { color: inherit; }
.post-title a:hover { color: var(--blog-accent-3); }

/* ---- Top bar: quieter, cleaner ---- */
.top-bar {
    background: #0b1220;
    color: #cbd5e1;
    border-bottom: 0;
}
.top-bar a { color: #cbd5e1; }
.top-bar a:hover { color: #fff; }
.top-social a {
    color: #cbd5e1;
    width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background .2s, color .2s;
}
.top-social a:hover { background: rgba(255,255,255,.08); color: #fff; }

/* ---- Navbar: sleek with subtle border ---- */
.navbar {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--blog-line);
    box-shadow: none;
}
.logo .logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    letter-spacing: -0.01em;
}
.logo-icon {
    background: var(--blog-ink) !important;
    color: #fff !important;
}
.nav-link {
    color: var(--blog-ink-soft) !important;
    font-weight: 500 !important;
    position: relative;
    padding: 8px 14px !important;
    border-radius: 8px !important;
    transition: color .2s, background .2s !important;
}
.nav-link:hover { color: var(--blog-accent-3) !important; background: transparent !important; }
.nav-link::after {
    content: '';
    position: absolute;
    left: 14px; right: 14px; bottom: 4px;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link-hot { color: #ef4444 !important; }

.nav-action-btn, .search-toggle {
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--blog-line);
    color: var(--blog-ink-soft);
    background: #fff;
    transition: all .2s;
}
.nav-action-btn:hover, .search-toggle:hover {
    background: var(--blog-ink);
    color: #fff;
    border-color: var(--blog-ink);
    transform: translateY(-1px);
}

/* ---- Hero: magazine cover ---- */
.hero-section {
    padding: 28px 0 10px;
    background: transparent;
}
.hero-grid {
    gap: 22px !important;
}
.hero-card {
    border-radius: 18px !important;
    overflow: hidden;
    box-shadow: var(--blog-shadow) !important;
    transition: transform .35s ease, box-shadow .35s ease;
    border: 1px solid rgba(15,23,42,.05);
}
.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--blog-shadow-lg) !important;
}
.hero-card .hero-img img,
.hero-card .hero-img {
    transition: transform .8s ease;
}
.hero-card:hover .hero-img img { transform: scale(1.06); }

.hero-overlay {
    background: linear-gradient(180deg,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.35) 45%,
        rgba(0,0,0,0.85) 100%) !important;
    padding: 26px !important;
}
.hero-overlay h2 {
    font-size: clamp(1.5rem, 3vw, 2.4rem) !important;
    color: #fff !important;
    text-shadow: 0 2px 18px rgba(0,0,0,.4);
    margin-bottom: 10px !important;
}
.hero-overlay h3 {
    font-size: 1.1rem !important;
    color: #fff !important;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hero-excerpt { color: rgba(255,255,255,.85) !important; }
.hero-meta { color: rgba(255,255,255,.75); }
.hero-meta span { opacity: .9; }
.hero-overlay .badge {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

/* ---- Ticker ---- */
.ticker-section {
    padding: 14px 0 6px;
}
.ticker {
    background: #fff !important;
    border: 1px solid var(--blog-line) !important;
    border-radius: var(--blog-radius) !important;
    box-shadow: var(--blog-shadow-sm);
    overflow: hidden;
}
.ticker-label {
    background: #0b1220 !important;
    color: #fff !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    padding: 10px 16px !important;
    text-transform: uppercase;
    font-size: 0.8rem !important;
}
.ticker-content a { color: var(--blog-ink-soft) !important; font-weight: 500; }
.ticker-content a:hover { color: var(--blog-accent-3) !important; }

/* ---- Section headers: editorial ---- */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 1px solid var(--blog-line);
    padding-bottom: 12px;
    margin-bottom: 22px;
}
.section-header h2 {
    font-size: clamp(1.3rem, 2.2vw, 1.9rem) !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.accent-bar {
    display: inline-block;
    width: 4px;
    height: 28px;
    background: var(--blog-accent-3);
    border-radius: 2px;
}

/* ---- Post cards: magazine tiles ---- */
.posts-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 24px !important;
}
.post-card {
    background: #fff !important;
    border-radius: 16px !important;
    overflow: hidden;
    border: 1px solid var(--blog-line) !important;
    box-shadow: var(--blog-shadow-sm) !important;
    transition: transform .3s, box-shadow .3s, border-color .3s;
    display: flex;
    flex-direction: column;
}
.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--blog-shadow) !important;
    border-color: rgba(79,70,229,.2) !important;
}
.post-card .post-img {
    aspect-ratio: 16/10;
    overflow: hidden;
    position: relative;
}
.post-card .post-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.post-card:hover .post-img img { transform: scale(1.05); }
.post-badge {
    position: absolute;
    top: 12px; left: 12px;
    padding: 5px 10px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em;
    border-radius: 999px !important;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

.post-body { padding: 18px 20px 20px !important; }
.post-meta {
    font-size: 0.78rem !important;
    color: var(--blog-mute) !important;
    margin-bottom: 8px !important;
    display: flex;
    align-items: center;
    gap: 12px !important;
}
.post-meta span { color: var(--blog-mute); }
.post-title {
    font-size: 1.15rem !important;
    margin-bottom: 8px !important;
    line-height: 1.35 !important;
}
.post-excerpt {
    font-size: 0.92rem;
    color: var(--blog-mute);
    line-height: 1.6;
    margin-bottom: 14px;
}
.post-footer {
    border-top: 1px solid var(--blog-line);
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.post-author {
    font-size: 0.8rem;
    color: var(--blog-ink-soft) !important;
    font-weight: 600;
}
.read-more {
    color: var(--blog-accent-3) !important;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap .2s;
}
.read-more:hover { gap: 10px; }

.post-share-btn {
    width: 26px; height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blog-surface-soft);
    transition: background .2s, color .2s;
    font-size: 0.8rem;
    opacity: 1 !important;
}
.post-share-btn:hover { background: var(--blog-accent-3); color: #fff !important; }

/* ---- Sidebar polish ---- */
.sidebar {
    position: sticky;
    top: 84px;
}
.sidebar-widget {
    background: #fff;
    border: 1px solid var(--blog-line);
    border-radius: var(--blog-radius);
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: var(--blog-shadow-sm);
}
.sidebar-widget .widget-title,
.sidebar-widget h3,
.sidebar-widget h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--blog-ink);
    color: var(--blog-ink);
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 30px;
}
.page-btn {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--blog-line);
    background: #fff;
    color: var(--blog-ink-soft);
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.page-btn:hover { border-color: var(--blog-ink); transform: translateY(-1px); }
.page-btn.active { background: var(--blog-ink); border-color: var(--blog-ink); color: #fff; }

/* ---- Footer ---- */
footer, .footer, .site-footer {
    background: var(--blog-ink) !important;
}

/* ---- Search overlay ---- */
.search-overlay {
    background: rgba(11, 18, 32, 0.65) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.search-overlay-content {
    background: #fff !important;
    border-radius: 18px !important;
    box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.search-input-wrap {
    border: 2px solid var(--blog-line);
    border-radius: 12px;
    background: var(--blog-surface-soft);
    padding: 2px;
    transition: border-color .2s;
}
.search-input-wrap:focus-within { border-color: var(--blog-ink); }

/* ---- Animations soften ---- */
.animate-fade { animation: blogFadeUp .5s ease both; }
@keyframes blogFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive tweaks ---- */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr !important; }
    .content-grid {
        grid-template-columns: 1fr !important;
    }
    .sidebar { position: static; }
}
@media (max-width: 600px) {
    .section-header { flex-direction: column; align-items: flex-start; gap: 6px; }
    .posts-grid { grid-template-columns: 1fr !important; }
    .hero-overlay { padding: 18px !important; }
    .hero-overlay h2 { font-size: 1.4rem !important; }
}
