/* ========================================
   CATEGORY GRID SECTIONS
   ======================================== */
.category-showcase {
    position: relative;
}

.category-showcase .section-heading {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 12px;
    margin-bottom: 22px;
}

.category-showcase .section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1c1c1c;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-showcase .section-title .title-accent {
    display: inline-block;
    width: 6px;
    height: 24px;
    background: linear-gradient(180deg, #52b848 0%, #3a8a34 100%);
    border-radius: 3px;
}

.category-card {
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(17, 24, 39, 0.12);
}

.category-card__image {
    position: relative;
    overflow: hidden;
}

.category-card__image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover .category-card__image img {
    transform: scale(1.08);
}

.category-card__badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.category-card__body {
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.category-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.category-card__title a {
    color: #1c1c1c;
    text-decoration: none;
}

.category-card__title a:hover {
    color: #52b848;
}

.category-card__excerpt {
    color: #54606c;
    font-size: 0.92rem;
    margin: 0;
}

.category-card__meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #6c7786;
    margin-top: auto;
}

.category-card__meta i {
    margin-right: 6px;
    color: #52b848;
}

.category-card--featured .category-card__image img {
    height: 260px;
}

@media (max-width: 991.98px) {
    .category-card__image img {
        height: 200px;
    }
}

@media (max-width: 767.98px) {
    .category-card__image img {
        height: 180px;
    }

    .category-card__body {
        padding: 16px 18px 20px;
    }
}

/* Salone Web - Custom Styles */

:root {
    --primary-color: #52b848;
    --secondary-color: #0b3d66;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --sports-color: #e31e24;
    --business-color: #00a8e1;
    --entertainment-color: #ff6b35;
    --politics-color: #2e7d32;
    --news-color: #1976d2;
}

/* Dark mode variables */
[data-bs-theme="dark"] {
    --primary-color: #4d94ff;
    --text-color: #e9ecef;
    --bg-color: #212529;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background: #f5f5f5;
}

/* ========================================
   CONTAINER - BOXED LAYOUT
   ======================================== */
.container-boxed {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    background: #fff;
    padding: 20px;
    margin: 0 auto;
    max-width: 1400px;
}

/* Override container-fluid for boxed layout */
.container-fluid {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* ========================================
   HEADER & LOGO
   ======================================== */
.site-brand {
    display: flex;
    align-items: center;
}

.logo-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.site-logo {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.site-tagline {
    font-size: 0.9rem;
    color: #52b848;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ========================================
   BREAKING NEWS TICKER
   ======================================== */
.breaking-news {
    overflow: hidden;
    font-weight: 500;
}

/* ========================================
   TOP BAR
   ======================================== */
.top-bar {
    font-size: 0.875rem;
}

.social-links a {
    color: inherit;
    font-size: 1.1rem;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-block;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ========================================
   MAIN NAVIGATION (STICKY) - GhanaWeb Rounded Style
   ======================================== */
.main-navigation {
    background: #52b848;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1020;
    padding: 15px 0;
    overflow: visible;
}

.nav-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.mobile-menu-toggle {
    margin: 10px;
    background: white;
}

/* Desktop: Always show navbar */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
    }
}

/* Mobile: Let Bootstrap handle collapse */
@media (max-width: 991px) {
    .navbar-collapse {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease-out;
    }
    
    .navbar-collapse.show {
        max-height: 100vh;
        overflow-y: auto;
    }
}

.main-nav-list {
    list-style: none;
    margin: 0;
    padding: 8px 15px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    background: white;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.main-nav-list .nav-item {
    position: relative;
}

.main-nav-list .nav-link {
    display: block;
    padding: 12px 28px;
    color: #333;
    background: transparent;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 25px;
    white-space: nowrap;
}

.main-nav-list .nav-link:hover {
    background: #f0f0f0;
    color: #52b848;
}

.main-nav-list .nav-link.active {
    background: #52b848;
    color: white;
    box-shadow: 0 2px 4px rgba(82, 184, 72, 0.3);
}

.main-nav-list .dropdown-menu {
    border-radius: 16px;
    padding: 0.5rem 0;
    border: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-top: 12px;
    transform: translateY(10px);
}

.main-nav-list .dropdown-menu .dropdown-item {
    padding: 0.65rem 1.5rem;
    font-weight: 500;
}

.main-nav-list .dropdown-menu .dropdown-item:hover,
.main-nav-list .dropdown-menu .dropdown-item.active {
    background: #52b848;
    color: #fff;
}

/* ========================================
   CATEGORY HERO BANNER
   ======================================== */
.category-hero {
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-hero h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.category-ad-banner .ad-placeholder {
    transition: all 0.3s ease;
}

.category-ad-banner .ad-placeholder:hover {
    transform: scale(1.02);
}

.category-stats {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.category-stats span {
    font-size: 0.9rem;
}

.category-stats i {
    margin-right: 5px;
    color: var(--primary-color);
}

/* ========================================
   CATEGORY SUB-NAVIGATION
   ======================================== */
.category-sub-nav {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

.sub-nav-list {
    list-style: none;
    margin: 0;
    padding: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sub-nav-list li {
    display: inline-block;
}

.sub-nav-list a {
    display: block;
    padding: 8px 16px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.sub-nav-list a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.sub-nav-list a.active {
    background: white;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   ARTICLES GRID - CATEGORY PAGE
   ======================================== */
.articles-grid .article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.articles-grid .article-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.article-card .article-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.article-card .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.08);
}

.article-card .article-image .img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.article-card .article-image .img-placeholder i {
    opacity: 0.6;
}

.article-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.article-card .article-content {
    padding: 20px;
}

.article-card .article-title {
    color: #333;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card:hover .article-title {
    color: var(--primary-color);
}

.article-card .article-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.8rem;
    color: #999;
}

.article-card .article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-card .article-meta i {
    color: var(--primary-color);
}

/* ========================================
   OLD CATEGORY SUB-NAVIGATION (FALLBACK)
   ======================================== */
.category-sub-nav-old {
    padding: 12px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.category-sub-nav.category-sports {
    background: var(--sports-color);
    color: white;
}

.category-sub-nav.category-business {
    background: var(--business-color);
    color: white;
}

.category-sub-nav.category-entertainment {
    background: var(--entertainment-color);
    color: white;
}

.category-sub-nav.category-politics {
    background: var(--politics-color);
    color: white;
}

.category-sub-nav.category-news {
    background: var(--news-color);
    color: white;
}

.sub-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sub-nav-list li {
    display: inline-block;
}

.sub-nav-list a {
    color: white;
    text-decoration: none;
    padding: 5px 12px;
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.sub-nav-list a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sub-nav-list .more-dropdown a {
    font-weight: bold;
}

/* ========================================
   CATEGORY HERO BANNERS
   ======================================== */
.category-hero {
    padding: 0;
    margin-bottom: 20px;
}

.category-hero-sports {
    background: linear-gradient(135deg, #e31e24 0%, #c41e3a 100%);
}

.category-hero-business {
    background: linear-gradient(135deg, #00a8e1 0%, #0077b6 100%);
}

.category-hero-entertainment {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

.category-hero-politics {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}

.category-hero-news {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.hero-ad-placeholder {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   ADVERTISEMENT PLACEHOLDERS
   ======================================== */
.ad-placeholder {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ad-placeholder:hover {
    border-color: #999;
    background: linear-gradient(135deg, #e8e8e8 0%, #d5d5d5 100%);
}

.ad-placeholder-content {
    text-align: center;
}

.ad-placeholder-hero {
    text-align: center;
    padding: 50px 20px;
}

/* ========================================
   STICKY BEHAVIOR
   ======================================== */
.sticky-top {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* ========================================
   SEARCH FORM
   ======================================== */
.search-form .input-group {
    max-width: 100%;
}

.search-form .form-control {
    border: 2px solid #e0e0e0;
    padding: 10px 15px;
    border-radius: 25px 0 0 25px;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.search-form .btn {
    border-radius: 0 25px 25px 0;
    padding: 10px 20px;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    border-radius: 0;
}

.card img {
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.featured-card {
    border-left: 4px solid var(--primary-color);
}

.featured-card .card-img-top {
    height: 400px;
}

/* Article Card Layouts */
.article-card {
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.article-card .card-img {
    height: 200px;
    object-fit: cover;
}

.article-card-horizontal .card-img {
    height: 100%;
    min-height: 200px;
}

.article-card .card-body {
    padding: 15px;
}

.article-card .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.article-card .card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-card .card-title a:hover {
    color: #52b848;
}

.article-meta {
    font-size: 0.8rem;
    color: #777;
}

.article-meta i {
    margin-right: 3px;
}

/* Better spacing for sections */
section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ========================================
   IMAGES
   ======================================== */
.object-fit-cover {
    object-fit: cover;
}

img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* Image Placeholder for articles without images */
.img-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    height: 220px;
    width: 100%;
}

.img-placeholder i {
    opacity: 0.5;
}

.card-img-top.img-placeholder {
    height: 220px;
}

.featured-card .img-placeholder {
    height: 400px;
    font-size: 5rem;
}

/* ========================================
   SECTION TITLES
   ======================================== */
.section-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #333;
    position: relative;
    padding-bottom: 12px;
    border-bottom: 3px solid #52b848;
}

.section-title .title-icon {
    font-size: 1.2rem;
    margin-right: 5px;
}

.section-title .btn {
    font-size: 0.85rem;
    padding: 5px 15px;
}

/* ========================================
   ARTICLE
   ======================================== */
.article-title {
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-meta {
    font-size: 0.9rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}

/* ========================================
   SOCIAL SHARE
   ======================================== */
.social-share .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ========================================
   COMMENTS
   ======================================== */
.comments-section {
    margin-top: 3rem;
}

.comment-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.replies {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
    margin-top: 4rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

/* ========================================
   NEWSLETTER
   ======================================== */
.newsletter-section {
    margin-top: 4rem;
}

.newsletter-form .input-group {
    max-width: 500px;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    .main-navigation {
        padding: 10px 0;
    }
    
    .nav-wrapper {
        padding: 0 10px;
    }
    
    .mobile-menu-toggle {
        width: 100%;
        margin: 0 0 10px 0;
        padding: 10px 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: white;
        color: #52b848;
        font-weight: 600;
    }
    
    .mobile-menu-toggle:hover,
    .mobile-menu-toggle:focus {
        background: #f8f9fa;
        border-color: #52b848;
    }
    
    .mobile-menu-toggle[aria-expanded="true"] {
        background: #52b848;
        color: white;
        border-color: #52b848;
    }
    
    .mobile-menu-toggle[aria-expanded="true"] .fas.fa-bars::before {
        content: "\f00d"; /* X icon */
    }
    
    .navbar-collapse {
        background: white;
        margin-top: 10px;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease-out;
    }
    
    .navbar-collapse.show {
        max-height: 80vh;
        overflow-y: auto;
        padding: 10px 0;
    }
    
    .main-nav-list {
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding: 0;
        width: 100%;
    }
    
    .main-nav-list .nav-item {
        width: 100%;
        margin: 0;
    }
    
    .main-nav-list .nav-link {
        border-radius: 0;
        margin: 0;
        padding: 12px 15px;
        border-bottom: 1px solid #e0e0e0;
        display: block;
        width: 100%;
        color: #333;
    }
    
    .main-nav-list .nav-link:hover,
    .main-nav-list .nav-link.active {
        background: #f8f9fa;
        color: #52b848;
    }
    
    .main-nav-list .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    .sub-nav-list {
        flex-direction: column;
    }
    
    .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .site-logo {
        font-size: 1.5rem;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .category-hero {
        min-height: 150px;
    }
    
    section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.1rem;
    }
    
    .main-content {
        padding: 10px;
    }
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar-ad {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.list-group-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 15px;
}

.list-group-item:last-child {
    border-bottom: none;
}

.card-header {
    font-weight: 600;
    padding: 12px 15px;
}

/* ========================================
   UTILITIES
   ======================================== */
.text-primary {
    color: #52b848 !important;
}

.bg-primary {
    background-color: #52b848 !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #419a39;
    border-color: #419a39;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ========================================
   LOADING ANIMATION
   ======================================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   DARK MODE TRANSITIONS
   ======================================== */
body,
.card,
.navbar,
header {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
