/* ============================================
   PulseWire News - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #D90429;
    --secondary-color: #1D3557;
    --accent-color: #FFB703;
    --dark-color: #111827;
    --bg-color: #F8FAFC;
    --white: #FFFFFF;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    
    --font-heading: 'Merriweather', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-color: #0F172A;
    --white: #1E293B;
    --gray-100: #1E293B;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748B;
    --gray-500: #94A3B8;
    --gray-600: #CBD5E1;
    --gray-700: #E2E8F0;
    --gray-800: #F1F5F9;
    --gray-900: #FFFFFF;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}

[data-theme="dark"] body {
    color: var(--gray-200);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--gray-100);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

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

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

/* ============================================
   Header Styles
   ============================================ */

.site-header {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* Collapse the top bar once the user scrolls, so only the nav stays pinned */
.site-header:has(.main-navbar.sticky) .top-bar {
    display: none;
}

[data-theme="dark"] .site-header {
    background: var(--gray-800);
}

/* Top Bar */
.top-bar {
    background: var(--secondary-color);
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--white);
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.current-date {
    font-weight: 500;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weather-widget i {
    font-size: 1.1rem;
}

.language-selector .dropdown-toggle {
    color: var(--white);
    padding: 0;
}

.language-selector .dropdown-toggle::after {
    margin-left: 0.25rem;
}

.social-icons {
    display: flex;
    gap: 0.5rem;
}

.social-link {
    color: var(--white);
    font-size: 1rem;
    padding: 0.25rem;
    transition: var(--transition);
}

.social-link:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.subscribe-btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.subscribe-btn:hover {
    background: #c00324;
    border-color: #c00324;
}

/* Main Navigation */
.main-navbar {
    padding: 1rem 0;
    background: var(--white);
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

/* Compact state applied by js/main.js after 100px of scroll */
.main-navbar.sticky {
    box-shadow: var(--shadow-lg);
    padding: 0.4rem 0;
}

.main-navbar.sticky .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}

.main-navbar.sticky .logo-text h1 {
    font-size: 1.35rem;
}

.main-navbar.sticky .logo-text .tagline {
    display: none;
}

[data-theme="dark"] .main-navbar {
    background: var(--gray-800);
}

.navbar-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.navbar-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.logo-text h1 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--primary-color);
    font-weight: 900;
}

.logo-text .tagline {
    font-size: 0.7rem;
    color: var(--gray-500);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .logo-text .tagline {
    color: var(--gray-400);
}

.navbar-toggler {
    border: none;
    padding: 0;
    display: none; /* hidden on desktop, shown under 992px */
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--gray-100);
    color: var(--gray-800);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

[data-theme="dark"] .navbar-toggler {
    background: var(--gray-700);
    color: var(--gray-100);
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Bootstrap's .navbar-toggler-icon only gets its SVG inside a `.navbar`
   parent. This is a custom navbar, so draw the burger ourselves. */
.main-navbar .navbar-toggler-icon {
    width: 22px;
    height: 2px;
    background-image: none;
    background-color: currentColor;
    border-radius: 2px;
    position: relative;
    display: block;
}

.main-navbar .navbar-toggler-icon::before,
.main-navbar .navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease, top 0.25s ease;
}

.main-navbar .navbar-toggler-icon::before { top: -7px; }
.main-navbar .navbar-toggler-icon::after  { top:  7px; }

/* Animate burger -> X when the menu is open */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* ---- Desktop: force the nav to be visible (custom navbar, not .navbar-expand-*) ---- */
@media (min-width: 992px) {
    .main-navbar .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        align-items: center;
        flex-grow: 1;
        min-width: 0; /* allow the nav to shrink instead of overflowing */
    }

    /* The link list absorbs the leftover space and scrolls if it can't fit,
       so the search / dark-mode buttons are never pushed off screen. */
    .main-navbar .navbar-nav {
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .main-navbar .navbar-nav::-webkit-scrollbar {
        display: none;
    }

    .main-navbar .navbar-actions {
        flex-shrink: 0;
    }
}

/* ---- Mobile / Tablet: restore collapse behaviour + show burger ---- */
@media (max-width: 991.98px) {
    .navbar-toggler {
        display: inline-flex;
        order: 3;
    }

    .main-navbar .navbar-collapse {
        flex-basis: 100%;
        order: 4;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
    }

    /* Search + dark mode sit next to the burger, always reachable */
    .main-navbar .navbar-actions {
        order: 2;
        margin-left: auto;
        margin-top: 0;
    }
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.15rem;
    row-gap: 0.25rem;
}

/* Beat Bootstrap's `.navbar-nav { flex-direction: column }` on desktop */
@media (min-width: 992px) {
    .main-navbar .navbar-nav {
        flex-direction: row !important;
        flex-wrap: nowrap;
    }
}

.navbar-nav .nav-item {
    position: relative;
}

.nav-link {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
    color: var(--gray-700);
    padding: 0.5rem 0.6rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

/* Red underline indicator */
.nav-link::after {
    content: '';
    display: block;
    height: 2px;
    width: 0;
    margin-top: 4px;
    background: var(--primary-color);
    transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* keep Bootstrap's caret from being wiped out by the underline pseudo-element */
.nav-link.dropdown-toggle::after {
    display: inline-block;
    height: auto;
    width: auto;
    margin-top: 0;
    background: none;
}

[data-theme="dark"] .nav-link {
    color: var(--gray-300);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: var(--gray-100);
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    background: var(--gray-700);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

.dropdown-menu a {
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .dropdown-menu {
    background: var(--gray-800);
}

[data-theme="dark"] .dropdown-menu a {
    color: var(--gray-300);
}

.dropdown-menu a:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

[data-theme="dark"] .dropdown-menu a:hover {
    background: var(--gray-700);
}

.mega-menu {
    min-width: 200px;
}

.navbar-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-search,
.btn-dark-mode {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    color: var(--gray-700);
}

[data-theme="dark"] .btn-search,
[data-theme="dark"] .btn-dark-mode {
    background: var(--gray-700);
    color: var(--gray-300);
}

.btn-search:hover,
.btn-dark-mode:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ============================================
   Breaking News Bar
   ============================================ */

.breaking-news-bar {
    background: var(--dark-color);
    padding: 0.75rem 0;
    color: var(--white);
}

.breaking-news-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breaking-label {
    background: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.breaking-news-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    animation: ticker 30s linear infinite;
}

.ticker-content a {
    color: var(--white);
    white-space: nowrap;
    padding-right: 3rem;
    font-weight: 500;
}

.ticker-content a:hover {
    color: var(--accent-color);
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   Main Content
   ============================================ */

.site-main {
    min-height: calc(100vh - 500px);
}

.section-padding {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.75rem;
    margin: 0;
    position: relative;
    padding-bottom: 0.75rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.view-all {
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all:hover {
    gap: 0.75rem;
}

/* ============================================
   Hero Section
   ============================================ */

.hero-section {
    padding: 2rem 0;
}

.hero-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-slide {
    display: none;
    position: relative;
}

.hero-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.hero-image {
    position: relative;
    height: 500px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    color: var(--white);
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    color: var(--white);
}

.hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.hero-excerpt {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    max-width: 800px;
}

.hero-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.slider-controls {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slider-prev,
.slider-next {
    width: 45px;
    height: 45px;
    border: none;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--primary-color);
}

.slider-dots {
    display: flex;
    gap: 0.5rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--white);
    width: 30px;
    border-radius: 5px;
}

/* Top Stories Sidebar */
.top-stories {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    height: 100%;
}

[data-theme="dark"] .top-stories {
    background: var(--gray-800);
}

.top-stories .section-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.top-story-card {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

[data-theme="dark"] .top-story-card {
    border-bottom-color: var(--gray-700);
}

.top-story-card:last-child {
    border-bottom: none;
}

.top-story-card:hover {
    transform: translateX(5px);
}

.top-story-card img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.top-story-content {
    flex: 1;
}

.top-story-content h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.top-story-content .story-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ============================================
   News Cards
   ============================================ */

.news-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

[data-theme="dark"] .news-card {
    background: var(--gray-800);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.news-image {
    position: relative;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    transition: var(--transition);
}

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

.news-image .category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 1;
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.news-title a {
    color: var(--gray-900);
}

[data-theme="dark"] .news-title a {
    color: var(--gray-100);
}

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

.news-excerpt {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.6;
}

[data-theme="dark"] .news-excerpt {
    color: var(--gray-400);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.news-meta .author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Featured Card */
.featured-card .news-image {
    height: 250px;
}

.featured-card .news-image img {
    height: 100%;
    object-fit: cover;
}

.featured-card .news-title {
    font-size: 1.25rem;
}

/* Large Card */
.large-card .news-image {
    height: 280px;
}

.large-card .news-image img {
    height: 100%;
    object-fit: cover;
}

.large-card .news-title {
    font-size: 1.35rem;
}

/* Horizontal Card */
.horizontal-card {
    display: flex;
    flex-direction: row;
}

.horizontal-card .news-image {
    width: 140px;
    flex-shrink: 0;
}

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

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

.horizontal-card .news-title {
    font-size: 1rem;
}

.trend-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ============================================
   Category Sections
   ============================================ */

.category-block {
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--gray-200);
}

[data-theme="dark"] .category-block {
    border-bottom-color: var(--gray-700);
}

.category-block:last-child {
    border-bottom: none;
}

.category-title {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-title i {
    color: var(--primary-color);
}

/* ============================================
   Sidebar Widgets
   ============================================ */

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .sidebar-widget {
    background: var(--gray-800);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.most-read-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.most-read-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.read-number {
    width: 35px;
    height: 35px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

[data-theme="dark"] .read-number {
    background: var(--gray-700);
}

.read-content h5 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.read-content h5 a {
    color: var(--gray-800);
}

[data-theme="dark"] .read-content h5 a {
    color: var(--gray-200);
}

.read-content h5 a:hover {
    color: var(--primary-color);
}

.read-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ============================================
   Video Section
   ============================================ */

.video-section {
    background: var(--gray-100);
}

[data-theme="dark"] .video-section {
    background: var(--gray-900);
}

.video-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

[data-theme="dark"] .video-card {
    background: var(--gray-800);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(217, 4, 41, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

.video-card:hover .play-button {
    background: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0,0,0,0.8);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.video-content {
    padding: 1.25rem;
}

.video-content .category-badge {
    margin-bottom: 0.5rem;
}

.video-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-title a {
    color: var(--gray-900);
}

[data-theme="dark"] .video-title a {
    color: var(--gray-100);
}

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

.video-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ============================================
   Gallery Section
   ============================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--white);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--white);
}

.gallery-overlay span {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* ============================================
   Newsletter Section
   ============================================ */

.newsletter-section {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.newsletter-title {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.newsletter-text {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.newsletter-benefits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.newsletter-benefits li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
}

.newsletter-benefits i {
    color: var(--accent-color);
}

.newsletter-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    color: var(--gray-800);
}

.newsletter-form .form-label {
    font-weight: 600;
    color: var(--gray-700);
}

.newsletter-form .form-control {
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
}

.newsletter-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1);
}

.newsletter-form .btn-warning {
    background: var(--accent-color);
    border: none;
    font-weight: 600;
    padding: 0.875rem;
}

.newsletter-form .btn-warning:hover {
    background: #e5a502;
}

/* ============================================
   Advertisement Section
   ============================================ */

.advertisement-section {
    padding: 2rem 0;
}

.ad-banner {
    display: flex;
    justify-content: center;
}

.ad-placeholder {
    width: 728px;
    height: 90px;
    background: var(--gray-200);
    border: 2px dashed var(--gray-400);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
}

[data-theme="dark"] .ad-placeholder {
    background: var(--gray-700);
    border-color: var(--gray-600);
    color: var(--gray-400);
}

.ad-placeholder span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-placeholder p {
    font-size: 1rem;
    margin: 0;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background: var(--dark-color);
    color: var(--white);
    padding-top: 4rem;
}

.footer-top {
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-about .logo-container {
    margin-bottom: 1.5rem;
}

.footer-about .logo-icon {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
}

.footer-about .logo-text h2 {
    font-size: 1.5rem;
    color: var(--white);
}

.footer-description {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social .social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.footer-social .social-link:hover {
    background: var(--primary-color);
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 0.75rem;
}

.footer-nav a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.footer-bottom {
    padding: 1.5rem 0;
}

.copyright {
    margin: 0;
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
}

.footer-bottom-links {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
}

.footer-bottom-links a:hover {
    color: var(--white);
}

/* ============================================
   Search Overlay
   ============================================ */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    width: 100%;
    max-width: 700px;
    padding: 2rem;
}

.close-search {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-search:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

.search-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--white);
    color: var(--gray-800);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    padding: 1rem 2rem;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: #c00324;
}

.search-suggestions {
    color: var(--white);
}

.search-suggestions p {
    opacity: 0.7;
    margin-bottom: 1rem;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-tags .badge {
    padding: 0.5rem 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-tags .badge:hover {
    background: var(--primary-color);
}

/* ============================================
   Utility Classes
   ============================================ */

.bg-light {
    background-color: var(--gray-100) !important;
}

[data-theme="dark"] .bg-light {
    background-color: var(--gray-900) !important;
}

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

.text-secondary {
    color: var(--secondary-color) !important;
}

/* Bootstrap Override */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #c00324;
    border-color: #c00324;
}

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

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

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

.bg-warning {
    background-color: var(--accent-color) !important;
}

/* Responsive Utilities */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--white);
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-top: 1rem;
        box-shadow: var(--shadow-lg);
    }
    
    [data-theme="dark"] .navbar-collapse {
        background: var(--gray-800);
    }
    
    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    
    .navbar-nav .nav-link {
        font-size: 1rem;
        padding: 0.75rem 0.5rem !important;
        border-bottom: 1px solid var(--gray-200);
    }
    
    [data-theme="dark"] .navbar-nav .nav-link {
        border-bottom-color: var(--gray-700);
    }
    
    .navbar-nav .nav-link::after {
        display: none;
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    /* Keep the World dropdown inline inside the mobile panel */
    .navbar-nav .dropdown-menu {
        position: static !important;
        transform: none !important;
        float: none;
        width: 100%;
        box-shadow: none;
        border-left: 2px solid var(--primary-color);
        border-radius: 0;
        margin: 0 0 0 0.5rem;
        padding-left: 0.5rem;
    }
    
    .navbar-nav .dropdown-toggle::after {
        float: right;
        margin-top: 0.6rem;
    }
}
