/* ============================================================
   NewsPortal CMS - Main Stylesheet
   ============================================================ */

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* ---- Typography ---- */
.urdu-text, .urdu-input, [dir="rtl"] { font-family: var(--font-urdu) !important; }
.content-body { font-size: 1.05rem; line-height: 1.9; }
.content-body p { margin-bottom: 1.2rem; }
.content-body h2, .content-body h3 { margin: 2rem 0 1rem; font-weight: 700; }
.content-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 1rem 0; }
.content-body blockquote {
    border-left: 4px solid var(--primary);
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}
.urdu-content { font-size: 1.15rem !important; line-height: 2.2 !important; }

/* ---- Links ---- */
a { color: var(--primary); transition: color .2s; }
a:hover { color: color-mix(in srgb, var(--primary) 80%, black); }

/* ---- Navbar ---- */
.navbar-nav .nav-link {
    font-weight: 500;
    color: #333;
    padding: .5rem .75rem;
    border-radius: 6px;
    transition: all .2s;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    color: var(--primary);
    background: rgba(231,76,60,.06);
}
.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
    border-radius: 10px;
    padding: .5rem;
}
.navbar-nav .dropdown-item {
    border-radius: 6px;
    font-size: .9rem;
    padding: .5rem .75rem;
}
.navbar-nav .dropdown-item:hover { background: rgba(231,76,60,.07); color: var(--primary); }

/* Mega Menu */
.mega-menu { border-radius: 12px !important; }
.mega-menu .dropdown-item { border-radius: 6px; }

/* ---- Category Bar ---- */
.category-bar .badge { font-size: .73rem; padding: .35em .65em; transition: opacity .2s; }
.category-bar .badge:hover { opacity: .85; }

/* ---- Breaking Ticker ---- */
.breaking-news-bar { height: 40px; }
.breaking-label { font-size: .8rem; letter-spacing: .5px; min-width: 110px; }
.ticker-wrap { overflow: hidden; }
.ticker-content {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: ticker-scroll linear infinite;
}
.ticker-content:hover { animation-play-state: paused; }
.ticker-item { font-size: .82rem; }
@keyframes ticker-scroll { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* ---- Post Cards ---- */
.hover-lift { transition: transform .25s ease, box-shadow .25s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.12) !important; }
.img-zoom { transition: transform .4s ease; }
.hover-lift:hover .img-zoom { transform: scale(1.05); }

/* ---- Widget ---- */
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1d23;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.widget-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

/* ---- Pagination ---- */
.pagination { gap: 4px; }
.page-link { border-radius: 6px !important; border: 1px solid #dee2e6; color: #495057; font-size: .85rem; }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ---- Social Icons ---- */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: background .2s, transform .2s;
    font-size: .8rem;
}
.social-icon:hover { background: var(--primary); transform: translateY(-2px); color: #fff; }

/* ---- Footer ---- */
.site-footer { border-top: 3px solid var(--primary); }
.footer-title {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-links a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: .85rem;
    display: block;
    padding: .2rem 0;
    transition: color .2s;
}
.footer-links a:hover { color: #fff; }

/* ---- Hero Slider ---- */
.swiper-button-prev, .swiper-button-next {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
}
.swiper-button-prev::after, .swiper-button-next::after { font-size: 14px !important; color: #fff; }
.swiper-pagination-bullet-active { background: var(--primary) !important; }

/* ---- Back to Top ---- */
.btn-back-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,.2);
    opacity: 0;
    transition: opacity .3s;
}
.btn-back-top.visible { display: flex; opacity: 1; }

/* ---- Author Box ---- */
.author-box { border-color: var(--primary) !important; }

/* ---- Post Content ---- */
.post-content a { color: var(--primary); text-decoration: underline; }
.post-content pre { background: #1e1e1e; color: #d4d4d4; padding: 1rem; border-radius: 8px; overflow-x: auto; }
.post-content code { background: #f1f1f1; color: #e74c3c; padding: .2em .4em; border-radius: 4px; font-size: .88em; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.post-content table th, .post-content table td { padding: .65rem 1rem; border: 1px solid #dee2e6; }
.post-content table thead { background: var(--primary); color: #fff; }

/* ---- Dark Mode ---- */
.dark-mode { background: #0f1117; color: #e2e8f0; }
.dark-mode .card, .dark-mode .form-card, .dark-mode .widget { background: #1a1d23; border-color: #2a2d35; }
.dark-mode .bg-light { background: #1a1d23 !important; }
.dark-mode .text-dark { color: #e2e8f0 !important; }
.dark-mode .admin-topbar, .dark-mode .site-header { background: #1a1d23 !important; border-color: #2a2d35; }
.dark-mode a.text-dark { color: #e2e8f0 !important; }
.dark-mode .border-bottom { border-color: #2a2d35 !important; }

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .hero-slide { height: 300px !important; }
    .content-body { font-size: .95rem; }
}
@media (max-width: 767px) {
    .hero-slide { height: 220px !important; }
    .category-hero { min-height: 80px !important; }
    .section-title { font-size: 1.1rem !important; }
    .topbar { font-size: .75rem; }
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .5s ease forwards; }

/* ---- Utility ---- */
.object-fit-cover { object-fit: cover; }
.inset-0 { top: 0; left: 0; right: 0; bottom: 0; }
.cursor-move { cursor: move; }
.btn-xs { font-size: .72rem; padding: .15rem .4rem; }
