/* Clean Typography */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #ffffff;

    /* Space for bottom nav on mobile */
}


/* Mobile Sticky Header (Logo + Ads) */
/* Mobile Sticky Header (Logo + Ads) */
/* Mobile Sticky Header (Logo + Ads) */
@media (max-width: 768px) {
    .mobile-header-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        padding-bottom: 0px;
    }

    .breaking-news-bar {
        margin-top: 2vh;
    }

    .mobile-header-spacer {
        height: 130px;
        /* Adjust based on actual Logo + Ad height */
    }
	.mobileview{padding-right:0px!important;}
	
	.adsbygoogle{display:none;}
}

/* ===========================
   1. Header & Navigation 
   =========================== */

/* Top Ad Carousel */
.top-ad-carousel img {
    height: 100px;
    object-fit: cover;
    width: 100%;
}

.paddd {
    padding: 0px 100px 0px 100px;
}

.paddd-l {
    padding-left: 100px;
}

.paddd-r {

    padding-right: 100px;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Navbar visibility */
@media (max-width: 768px) {
    .paddd {
        padding: 0px 0px 0px 0px;
    }

    .paddd-l {
        padding-right: calc(var(--bs-gutter-x) * .5);
        padding-left: calc(var(--bs-gutter-x) * .5);
    }

    .paddd-r {
        padding-right: calc(var(--bs-gutter-x) * .5);
        padding-left: calc(var(--bs-gutter-x) * .5);
    }

    /* Hide Desktop Navbar on mobile to use Bottom Nav */
    .navbar {
        display: none;
    }

    body {
        padding-bottom: 5vh;
    }

    .news-card img.card-img-top {}

    .sticky-footer-ad {
        bottom: 7vh;
    }
}

@media (min-width: 769px) {

    /* Ensure Desktop Navbar is visible */
    .navbar {
        display: block !important;
    }
}

/* Premium Navbar */
.navbar {
    /* background controlled by settings */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link:hover,
.nav-link.active {
    color: #fff !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Hover Underline Animation */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    background-color: #fff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Dropdown Styling */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
    margin-top: 0;
    /* Align closely */
}

.dropdown-toggle::after {
    margin-left: 38px;
    margin-bottom: 12px;
    background-color: transparent !important;
}

.nav-link.dropdown-toggle:hover::after {
    width: 10px;
}

/* Open on Hover (Desktop) and Allow Parent Links */
@media (min-width: 992px) {
    .dropdown:hover>.dropdown-menu {
        display: block;
        margin-top: 0;
    }

    /* Ensure parent link is clickable */
    .dropdown>.dropdown-toggle:active {
        pointer-events: auto;
    }


    .dropdown-menu li {
        position: relative;
    }

    .nav-item .submenu {
        display: none;
        position: absolute;
        left: 100%;
        top: -7px;
    }

    .dropdown-menu>li:hover>.submenu {
        display: block;
    }
}

/* Base Dropdown Item Style */
.dropdown-item {
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    position: relative;
    padding: 8px 20px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    padding-left: 25px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Breaking News Ticker Enhanced */
.breaking-news-bar {
    background: #212529;
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 48px;
    border-bottom: 2px solid #d9534f;
}

.breaking-label {
    background: #d9534f;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    z-index: 10;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
    padding-right: 30px;
}

.breaking-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.breaking-content {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    /* Speed increased (25s) and linear infinite loop */
    animation: ticker 50s linear infinite;
    /* Clean positioning for seamless loop */
    transform: translate3d(0, 0, 0);
}

/* Pause on Hover */
.breaking-ticker:hover .breaking-content {
    animation-play-state: paused;
}

.breaking-item {
    display: inline-flex;
    align-items: center;
    margin-right: 50px;
}

.breaking-item img {
    height: 32px;
    width: 45px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid #555;
    background: #000;
}

.breaking-item a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.breaking-item a:hover {
    text-decoration: none;
    color: #ffc107;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    /* Scroll 1/3rd of the total width (since we have 3 copies) */
    100% {
        transform: translate3d(-33.33%, 0, 0);
    }
}

/* Main Slider Overlay Cards */
.overlay-card {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.overlay-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s;
}

.overlay-card:hover img {
    transform: scale(1.03);
}

.overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.9));
    z-index: 2;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-card img.card-img-top {

    object-fit: cover;
    border-radius: 0px 0px 0 0;
}

.news-card-body {
    padding: 15px;
}

.news-title {
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    font-size: 1rem;
}

.news-meta {
    font-size: 0.8rem;
    color: #888;
}

/* Multi-level Dropdown Helper */
.dropdown-menu .dropdown-toggle::after {
    transform: rotate(-90deg);
}

.dropdown-menu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: .1rem;
    margin-top: -1px;
}

/* ===========================
   3. Mobile Enhancements 
   =========================== */

/* Bottom Navigation Bar */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1050;
    padding: 8px 0;
    border-top: 1px solid #eee;
}

.bottom-nav-item {
    text-align: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bottom-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.bottom-nav-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    /* Top Ads - Auto Height to fit content */
    #topAdsCarousel .carousel-item img {
        height: auto !important;
        object-fit: contain !important;
    }

    /* Main Slider - Fixed smaller height on mobile */
    .overlay-card img {
        height: 250px !important;
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Mobile Grid & List Improvements */
    .news-title {
        font-size: 0.9rem;
        /* Smaller titles on mobile for 2-col layout */
    }

    .mobile-horizontal-card .ratio {
        height: 100%;
        min-height: 90px;
    }

    .mobile-horizontal-card .card-body {
        padding: 0.5rem;
    }
}

@media (min-width: 769px) {

    /* Reset styles for Desktop to convert List View back to Card View logic if needed, 
       but our HTML structure handles most of it via col-md-12 */
    .rounded-md-top {
        border-top-left-radius: var(--bs-border-radius) !important;
        border-top-right-radius: var(--bs-border-radius) !important;
        border-bottom-left-radius: 0 !important;
    }

    .ratio-md-16x9 {
        --bs-aspect-ratio: 56.25%;
        /* 16x9 */
    }
}

/* Post Feature Image Limit */
.post-feature-img {
    width: 500px;
    max-height: 500px;
    /* Prevent taking up entire screen on desktop */
    object-fit: cover;
    /* Maintain aspect ratio */
}

/* Post Content Styling */
.post-content img {
    max-width: 100%;
    /* Ensure images inside content don't overflow */
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* Animated Arcs for Mobile Breaking News */
.breaking-label .animated-arcs {
    position: relative;
    width: 24px;
    height: 24px;
}

.breaking-label .animated-arcs span {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

/* Outer Arc - Rotates Right */
.breaking-label .animated-arcs span:nth-child(1) {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-top-color: currentColor;
    border-right-color: currentColor;
    animation: spin-right 1.2s linear infinite;
}

/* Inner Arc - Rotates Left */
.breaking-label .animated-arcs span:nth-child(2) {
    top: 20%;
    left: 20%;
    width: 60%;
    height: 60%;
    border-bottom-color: currentColor;
    border-left-color: currentColor;
    animation: spin-left 1.5s linear infinite;
}

/* Hide unused spans */
.breaking-label .animated-arcs span:nth-child(n+3) {
    display: none;
}

@keyframes spin-right {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-left {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}