/* Fonts and Global Variables */
:root {
    --primary-red: #e02d33;
    --dark-bg: #1a1a1a;
    --light-bg: #f8f9fa;
    --border-color: #eaeaea;
}

body {
    font-family: 'Mukta', 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: #333;
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); /* Space for mobile bottom nav */
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0; /* Remove space on desktop */
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.text-danger {
    color: var(--primary-red) !important;
}

.bg-danger {
    background-color: var(--primary-red) !important;
}

.border-danger {
    border-color: var(--primary-red) !important;
}

/* Header */
.main-header {
    background-color: #fff;
    z-index: 1020;
}

.logo h1 {
    font-size: 2.2rem;
    letter-spacing: -1px;
}

.desktop-nav .nav-link {
    font-size: 1rem;
    padding: 0.8rem 0;
    margin: 0 0.5rem;
    position: relative;
    transition: color 0.3s;
}

.desktop-nav .nav-link:hover {
    color: var(--primary-red) !important;
}

/* Cards */
.news-card {
    background: #fff;
    border: none;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.news-card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.news-card-img-wrapper img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.news-card:hover .news-card-img-wrapper img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-red);
    color: white;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 2px;
    z-index: 2;
}

.news-card-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.news-card-title a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}

.news-card-title a:hover {
    color: var(--primary-red);
}

.news-meta {
    font-size: 0.85rem;
    color: #777;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Horizontal Card (List View) */
.news-card-horizontal {
    display: flex;
    background: #fff;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.news-card-horizontal .img-wrapper {
    flex: 0 0 120px;
    max-width: 120px;
    height: 90px;
}

.news-card-horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-horizontal .content {
    padding: 0 1rem;
    flex-grow: 1;
}

.news-card-horizontal .title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.3rem;
}

/* Breaking News Ticker */
.breaking-ticker-wrapper {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
}

.breaking-label {
    background: var(--primary-red);
    color: white;
    padding: 8px 15px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.ticker-viewport {
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%; /* Start from right edge of viewport */
    animation: ticker 30s linear infinite;
}

.ticker-content:hover {
    animation-play-state: paused;
}

.ticker-content a {
    color: #333;
    text-decoration: none;
}

.ticker-content a:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Section Titles */
.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.section-title a {
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    font-weight: 500;
}

.section-title a:hover {
    color: var(--primary-red);
}

/* Footer Links */
.footer-links a:hover {
    color: white !important;
    padding-left: 5px;
    transition: all 0.3s ease;
}

.hover-white:hover {
    color: white !important;
}

.transition-all {
    transition: all 0.3s ease;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    
    /* Hardware acceleration to prevent scroll jitter/lag on iOS */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.mobile-bottom-nav a {
    transition: all 0.2s;
}

.mobile-bottom-nav a:hover, .mobile-bottom-nav a.active-nav {
    color: var(--primary-red) !important;
}

.mobile-bottom-nav i {
    transition: transform 0.2s;
}

.mobile-bottom-nav a:hover i, .mobile-bottom-nav a.active-nav i {
    transform: translateY(-2px);
}

/* ===== Ad Slot Styles ===== */
.ad-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1.5rem auto;
    padding: 0;
    position: relative;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef1f5 100%);
    border: 1px solid #e4e8ee;
    border-radius: 6px;
    animation: adSlotFadeIn 0.5s ease-out;
}

@keyframes adSlotFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ad-slot__label {
    display: inline-block;
    width: 100%;
    text-align: center;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a0a8b4;
    padding: 4px 0 2px;
    background: rgba(255,255,255,0.6);
    border-bottom: 1px solid #e4e8ee;
    font-family: 'Poppins', sans-serif;
}

.ad-slot__content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    min-height: 60px;
}

.ad-slot__content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Leaderboard (728×90) */
.ad-slot--leaderboard {
    max-width: 728px;
}

/* Sidebar / Rectangle (300×250) */
.ad-slot--sidebar {
    max-width: 300px;
}

/* Full-width (970×90) */
.ad-slot--full-width {
    max-width: 970px;
    width: 100%;
}

/* Responsive: On small screens, constrain and center all ads */
@media (max-width: 767.98px) {
    .ad-slot {
        margin: 1rem auto;
    }

    .ad-slot--leaderboard,
    .ad-slot--full-width {
        max-width: 100%;
    }

    .ad-slot__content {
        padding: 8px;
        min-height: 50px;
    }
}

/* When inside a sidebar column, remove extra margins */
.col-lg-4 .ad-slot--sidebar {
    margin-left: auto;
    margin-right: auto;
}

/* Swiper Customize */
.swiper-pagination-bullet-active {
    background-color: var(--primary-red) !important;
}

/* Dropdown Hover opening on Desktop */
@media (min-width: 992px) {
    .desktop-nav .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: navFadeIn 0.2s ease-out;
    }
    
    .desktop-nav .dropdown-menu {
        border-radius: 4px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    }
}

@keyframes navFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
