/* ============================================
   NEWSPAPER - MAIN STYLESHEET
   Premium, Responsive, Clean Design
============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --brand-dark: #1f2937;
    --brand-red: #dc3545;
    --brand-blue: #0d6efd;
    --brand-gold: #ffc107;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
}

/* Base Styles */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

a {
    transition: all 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   HERO SLIDER - MOBILE CLICK FIX
============================================ */
.hero-slide {
    position: relative;
}

.hero-content {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5) 50%, transparent);
    z-index: 5;
}

.hero-title-link {
    display: inline-block;
}

.hero-title-link:hover {
    text-decoration: underline !important;
}

/* Carousel Touch Fix */
.carousel-item .hero-slide img {
    pointer-events: none;
}

/* ============================================
   HORIZONTAL SCROLL WRAPPER
============================================ */
.horizontal-scroll-wrapper {
    margin: 0 -15px;
    padding: 0 15px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   NEWS CARD STYLES
============================================ */
.news-card-item {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 8px;
    overflow: hidden;
}

.news-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.news-card-item .card-img-wrapper img {
    transition: transform 0.3s;
}

.news-card-item:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.news-card-item .card-title:hover {
    color: var(--brand-red) !important;
}

/* ============================================
   CATEGORY PAGE STYLES
============================================ */
.category-header {
    background: linear-gradient(135deg, var(--brand-dark), #374151);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

/* ============================================
   HOMEPAGE CATEGORY TITLE STYLES - RED BUTTON
============================================ */
/* Universal Red Button Category Title */
.category-btn-title,
.d1-cat-simple,
.d2-cat-simple,
.d3-cat-title,
.d4-cat-simple,
.d5-cat-simple,
.d6-cat-simple,
.d7-cat-simple,
.m1-cat-title,
.m2-cat-title,
.m3-cat-title,
.m4-cat-title,
.m5-cat-title,
.m6-cat-title,
.m7-cat-title {
    font-family: Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 15px 0 !important;
    padding: 10px 20px !important;
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: #fff !important;
    border-radius: 6px !important;
    display: inline-block !important;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
}

.category-btn-title a,
.d1-cat-simple a,
.d2-cat-simple a,
.d3-cat-title a,
.d4-cat-simple a,
.d5-cat-simple a,
.d6-cat-simple a,
.d7-cat-simple a,
.m1-cat-title a,
.m2-cat-title a,
.m3-cat-title a,
.m4-cat-title a,
.m5-cat-title a,
.m6-cat-title a,
.m7-cat-title a {
    color: #fff !important;
    text-decoration: none !important;
}

.category-btn-title:hover,
.d1-cat-simple:hover,
.d2-cat-simple:hover,
.d3-cat-title:hover,
.d4-cat-simple:hover,
.d5-cat-simple:hover,
.d6-cat-simple:hover,
.d7-cat-simple:hover,
.m1-cat-title:hover,
.m2-cat-title:hover,
.m3-cat-title:hover,
.m4-cat-title:hover,
.m5-cat-title:hover,
.m6-cat-title:hover,
.m7-cat-title:hover {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4) !important;
}

/* ============================================
   RESPONSIVE ADS STYLES
============================================ */
.ad-container {
    text-align: center;
    margin: 15px 0;
    overflow: hidden;
}

.ad-container img,
.ad-container iframe {
    max-width: 100%;
    height: auto;
}

/* Desktop Ads */
@media (min-width: 992px) {
    .ad-header_top {
        max-width: 970px;
        margin: 0 auto;
    }

    .ad-header_bottom {
        max-width: 728px;
        margin: 0 auto;
    }

    .ad-sidebar_top,
    .ad-sidebar_middle {
        max-width: 300px;
    }

    .ad-sidebar_bottom {
        max-width: 300px;
    }

    .ad-homepage_top,
    .ad-homepage_middle,
    .ad-homepage_bottom {
        max-width: 728px;
        margin: 0 auto;
    }

    .ad-single_before_content,
    .ad-single_after_content {
        max-width: 728px;
        margin: 15px auto;
    }

    .ad-single_in_content {
        max-width: 468px;
        margin: 15px auto;
    }
}

/* Mobile Ads */
@media (max-width: 991px) {
    .ad-container {
        padding: 10px;
    }

    .ad-header_top,
    .ad-header_bottom,
    .ad-homepage_top,
    .ad-homepage_middle,
    .ad-homepage_bottom,
    .ad-single_before_content,
    .ad-single_after_content {
        max-width: 100%;
    }

    .ad-sidebar_top,
    .ad-sidebar_middle,
    .ad-sidebar_bottom {
        max-width: 320px;
        margin: 10px auto;
    }
}

/* Popup Ad Styles */
.ad-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    max-width: 600px;
    max-height: 80vh;
    overflow: auto;
    position: relative;
}

.ad-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    z-index: 10;
}

/* ============================================
   FOOTER STYLES
============================================ */
.main-footer {
    background: #111827;
    color: #d1d5db;
    padding: 50px 0 30px;
}

.main-footer h5 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.main-footer h5::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--brand-red);
}

.main-footer a {
    color: #9ca3af;
    text-decoration: none;
}

.main-footer a:hover {
    color: #ffffff;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 8px;
    color: white;
    font-size: 0.9rem;
}

.social-icons a:hover {
    background: var(--brand-red);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
============================================ */

/* Tablet */
@media (max-width: 992px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .masthead-title {
        font-size: 1.8rem !important;
    }

    .branding-section {
        padding: 1rem 0 !important;
    }

    .btn-premium {
        padding: 8px 15px !important;
        font-size: 0.8rem !important;
    }

    .main-navbar .nav-link {
        padding: 0.8rem 0.5rem !important;
        font-size: 0.75rem !important;
    }

    /* Carousel */
    #heroSlider .carousel-item {
        height: 280px !important;
    }

    #heroSlider h2 {
        font-size: 1.2rem !important;
    }

    /* Cards */
    .news-card-item .card-img-wrapper {
        height: 130px !important;
    }

    .news-card-item .card-title {
        font-size: 0.8rem !important;
    }

    /* Article Page */
    .article-content {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }
}

/* ============================================
   UTILITY CLASSES
============================================ */
.text-brand-red {
    color: var(--brand-red) !important;
}

.bg-brand-red {
    background-color: var(--brand-red) !important;
}

.text-brand-dark {
    color: var(--brand-dark) !important;
}

.bg-brand-dark {
    background-color: var(--brand-dark) !important;
}

/* ============================================
   CAROUSEL / SLIDER MOBILE FIX
============================================ */
.carousel {
    touch-action: pan-y pinch-zoom;
}

.carousel-item a {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.carousel-item img {
    pointer-events: none;
}

/* Ensure caption links are clickable */
.carousel-caption a,
.carousel-item .position-absolute a {
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    #heroSlider .carousel-item>a {
        height: 280px !important;
    }

    #heroSlider h2 {
        font-size: 1.1rem !important;
    }

    #heroSlider .position-absolute {
        padding: 15px !important;
    }
}