@import 'variables.css';

/* Reset & Base */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    background-image:
        var(--gradient-mesh-4),
        var(--gradient-mesh-1),
        var(--gradient-mesh-2),
        var(--gradient-mesh-3);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    /* Disable body scroll, move to main */
}


/* Scrollable Body Mode (for List View) */
body.body-scroll-enabled {
    overflow-y: auto;
}

body.body-scroll-enabled .app-container {
    height: auto;
    overflow: visible;
}

body.body-scroll-enabled main {
    height: auto;
    overflow: visible;
}

/* Global Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--bg-primary);
    /* efficient way to create padding around thumb */
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

/* Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) var(--bg-primary);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Layout */
/* Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Header */
header {
    position: sticky;
    /* stick to top */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(15, 23, 42, 0.1);
    /* Very transparent */
    backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid #020617;
    /* Dark blackish blue */
    border-top: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: var(--spacing-sm) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: var(--spacing-md);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation Container */
nav ul {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Nav "Card" Link Styling */
.nav-card-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--border-radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    text-decoration: none;
    height: 100%;
}

.nav-card-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.nav-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.nav-icon svg {
    width: 16px;
    height: 16px;
}

.nav-card-link:hover .nav-title,
.nav-card-link:hover .nav-icon {
    color: var(--text-primary);
}

/* Specific Colors for Icons (matching dashboard cards) */
.nav-card-link.color-blue .nav-icon {
    color: #60a5fa;
}

.nav-card-link.color-green .nav-icon {
    color: #34d399;
}

.nav-card-link.color-purple .nav-icon {
    color: #a78bfa;
}

.nav-card-link.color-orange .nav-icon {
    color: #fbbf24;
}

.nav-card-link.color-teal .nav-icon {
    color: #2dd4bf;
}

.nav-card-link.color-red .nav-icon {
    color: #f87171;
}

.nav-card-link.color-indigo .nav-icon {
    color: #818cf8;
}

.nav-card-link.color-pink .nav-icon {
    color: #f472b6;
}

.nav-card-link.color-cyan .nav-icon {
    color: #22d3ee;
}

/* Active State */
.nav-card-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Active State Text Colors */
.nav-card-link.active .nav-title {
    color: white;
}

/* Active Glows per color */
.nav-card-link.active.color-blue {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.nav-card-link.active.color-green {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.nav-card-link.active.color-purple {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.nav-card-link.active.color-orange {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
}

.nav-card-link.active.color-teal {
    background: rgba(20, 184, 166, 0.15);
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: 0 0 15px rgba(20, 184, 166, 0.2);
}

.nav-card-link.active.color-red {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.nav-card-link.active.color-indigo {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.nav-card-link.active.color-pink {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.2);
}

.nav-card-link.active.color-cyan {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* Dynamic Logo Handling */
/* .is-home header .logo { opacity: 0; pointer-events: none; } Removed to show logo */

header .logo {
    font-size: 1.3rem;
    font-weight: 700;
    transition: opacity 0.3s ease;
    /* Logo Image Updates */
    display: flex;
    align-items: center;
    height: 44px;
    /* Constrain header expansion */
    width: 250px;
    /* Reserve space for the scaled logo to prevent overlap with nav */
    overflow: visible;
    /* Allow scale to bleed slightly if needed, or hidden if strict */
    /* background: none !important;  Legacy text gradients removed via cascade usually, but safer to leave alone as they apply to text content */
}

.header-logo-img {
    height: 100%;
    width: auto;
    transform: scale(3.5);
    /* Increase size ~200% from base, adjusted for whitespace */
    transform-origin: left center;
    margin-left: -35px;
    /* Pull logo left to consume padding/whitespace */
}

/* Hero Title (Replacement Logo) */
.hero-logo {
    display: none;
    /* Default hidden */
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.is-home .hero-logo {
    display: block;
    /* Show only on home */
}

nav a:hover,
nav a.active {
    color: var(--text-primary);
}

/* nav a::after underline removed to prevent full-width line bug */

/* Main Content */
main {
    flex: 1;
    overflow-y: auto;
    /* Scroll happens here */
    padding-top: var(--spacing-md);
    /* Remove header offset */
    padding-left: var(--spacing-xl);
    /* Increased for side ads */
    padding-right: var(--spacing-xl);
    /* Increased for side ads */
    padding-bottom: var(--spacing-lg);
    width: 100%;
    max-width: none;
    margin: 0;
    scroll-behavior: smooth;

    /* Responsive Padding: Reduce side rails on smaller screens/zoomed views */
    @media (max-width: 1200px) {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }
}

/* Hero Section */
.hero {
    text-align: left;
    padding: 0 0 var(--spacing-sm) 0;
}

.hero h1 {
    font-size: 2rem;
    text-align: left;
    margin-bottom: 4px;
    margin-top: 0;
    /* explicit removal of top margin */
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0;
}

/* Filters */
.filter-container {
    display: flex;
    gap: var(--spacing-sm);
    margin: 4px 0;
    /* Reduced margin */
    flex-wrap: wrap;
    overflow-x: visible;
    overflow-y: visible;
    /* Allow wrapping */
    scrollbar-width: auto;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding: var(--spacing-sm) var(--spacing-xs) 0 var(--spacing-xs);
    /* Explicit padding to clear shadows and prevent text clipping */
    width: 100%;
    /* Ensure it takes full width */
    /* Filter Container Colors */
}

.filter-container.color-blue {
    --toggle-color: #3b82f6;
    --toggle-rgb: 59, 130, 246;
}

.filter-container.color-green {
    --toggle-color: #10b981;
    --toggle-rgb: 16, 185, 129;
}

.filter-container.color-purple {
    --toggle-color: #8b5cf6;
    --toggle-rgb: 139, 92, 246;
}

.filter-container.color-orange {
    --toggle-color: #f59e0b;
    --toggle-rgb: 245, 158, 11;
}

.filter-container.color-teal {
    --toggle-color: #14b8a6;
    --toggle-rgb: 20, 184, 166;
}

.filter-container.color-red {
    --toggle-color: #f43f5e;
    --toggle-rgb: 244, 63, 94;
}

.filter-container.color-indigo {
    --toggle-color: #6366f1;
    --toggle-rgb: 99, 102, 241;
}

.filter-container.color-pink {
    --toggle-color: #ec4899;
    --toggle-rgb: 236, 72, 153;
}

.filter-container.color-cyan {
    --toggle-color: #06b6d4;
    --toggle-rgb: 6, 182, 212;
}

/* Default */
.filter-container {
    --toggle-color: #3b82f6;
    --toggle-rgb: 59, 130, 246;
}

.filter-container {
    min-width: 0;
    /* Critical for flex child scrolling */
    position: relative;
    z-index: 2;
}

.filter-container::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active {
    background: rgba(var(--toggle-rgb), 0.15);
    color: var(--toggle-color);
    border-color: rgba(var(--toggle-rgb), 0.5);
    box-shadow: 0 0 15px rgba(var(--toggle-rgb), 0.2);
}

.filter-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: inherit;
}

.filter-btn.active .filter-badge {
    background: rgba(0, 0, 0, 0.2);
    color: white;
}

/* Sub-filters (Manufacturer/Country) */
.sub-filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.sub-filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sub-filter-btn.active {
    background: rgba(var(--toggle-rgb), 0.15);
    color: var(--toggle-color);
    border-color: rgba(var(--toggle-rgb), 0.5);
    box-shadow: 0 0 10px rgba(var(--toggle-rgb), 0.15);
}

.sub-filter-btn .filter-badge {
    background: rgba(255, 255, 255, 0.12);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.65rem;
}

.sub-filter-btn.active .filter-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Sub-Filters (Cascading) */
.sub-filter-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    width: 100%;
}

.sub-filter-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    width: 100%;
}

.sub-filter-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}

.sub-filter-btn {
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.2);
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sub-filter-btn:hover {
    background: rgba(20, 184, 166, 0.2);
    border-color: rgba(20, 184, 166, 0.4);
}

.sub-filter-btn.active {
    background: var(--accent-secondary);
    color: white;
    border-color: var(--accent-secondary);
}

/* Grid Layout for Cards */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-top: 5px;
}

/* Dashboard Card (Compact) */
/* Dashboard Card (Compact) */
#dashboard-grid {
    display: flex;
    flex-wrap: nowrap;
    /* Force single row */
    gap: var(--spacing-sm);
    padding: 40px 20px;
    /* Expanded spacing */
    margin-top: 80px;
    min-height: 200px;
    /* Ensure volume */
    justify-content: center;
    width: 100%;
    /* Fill the container space provided by main, which has the side paddings */
    margin-left: auto;
    margin-right: auto;

    /* Container Query Context */
    container-type: inline-size;
    container-name: dashboard;

    align-items: start;

    /* Fix Blocking Issue */
    position: relative;
    z-index: 50;
}

#dashboard-grid::-webkit-scrollbar {
    display: none;
}

/* Color Themes */
.color-blue {
    --card-color: #3b82f6;
}

.color-green {
    --card-color: #10b981;
}

.color-purple {
    --card-color: #8b5cf6;
}

.color-orange {
    --card-color: #f59e0b;
}

.color-teal {
    --card-color: #14b8a6;
}

.color-red {
    --card-color: #f43f5e;
}

.color-indigo {
    --card-color: #6366f1;
}

.color-pink {
    --card-color: #ec4899;
}

.color-cyan {
    --card-color: #06b6d4;
}

/* Dashboard Card (Compact) */
/* [Removed legacy dashboard interactions to prevent conflict] */

/* Reduced padding for Carousel Container */
.news-carousel-container {
    padding-bottom: 0;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
    /* Hide scrollbar/overflow for infinite scroll */
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.news-carousel-wrapper {
    width: 100%;
    overflow: hidden;
}

/* Infinite Scroll Track */
.news-carousel-track {
    display: flex;
    gap: 16px;
    width: max-content;
    /* Ensure it fits all content */
    animation: marquee 40s linear infinite;
    padding: 10px 0;
    /* Space for shadows */
}

/* Pause on hover */
.news-carousel-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Moves half way (since we duplicate content) */
}

/* Removed duplicate .dashboard-card styles to avoid conflict */

/* --- News Feed Styles --- */

/* Highlighted Article */
.highlighted-news-card {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    min-height: 350px;
    transition: var(--transition-normal);
}

.highlighted-news-card:hover {
    box-shadow: var(--shadow-glow);
    border-color: var(--accent-primary);
}

.highlighted-news-card .highlight-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    background: linear-gradient(to right, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0.9) 100%);
    min-width: 40%;
}

.highlighted-news-card .highlight-image {
    flex: 1.5;
    background-size: cover;
    background-position: center;
    min-height: 300px;
}

.highlight-badge {
    background: var(--accent-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 16px;
}

.highlight-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.highlight-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
    background: linear-gradient(to right, #fff, #94a3b8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.highlight-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-link {
    color: var(--accent-primary);
    font-weight: 600;
    transition: color 0.2s;
}

.highlighted-news-card:hover .read-more-link {
    color: var(--accent-secondary);
}

/* Feed List */
.news-feed-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    /* Large gap for large items */
    max-width: 1000px;
    /* Wider container */
    margin: 0 auto;
}

.news-feed-item {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: var(--transition-fast);
}

.news-feed-item:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
}

.news-feed-item a {
    padding: 30px;
    /* Spacious padding */
    display: flex;
    gap: 40px;
    /* Big gap between image and text */
}

.news-feed-image {
    flex-shrink: 0;
    width: 450px;
    /* 4x size target (approx from 120 -> 450) */
    height: 300px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.news-feed-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-feed-item:hover .news-feed-image img {
    transform: scale(1.03);
}

.news-feed-content {
    flex: 1;
    min-width: 0;
    /* Fix flex text truncation */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically relative to image */
}

.news-feed-title {
    font-size: 1.25rem;
    /* Larger Title */
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.news-feed-meta {
    font-size: 0.75rem;
    color: var(--accent-secondary);
    margin-bottom: 8px;
    display: flex;
    gap: 6px;
}

.news-feed-snippet {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Load More Button */
.load-more-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.load-more-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
    .highlighted-news-card {
        flex-direction: column-reverse;
        /* Image on top */
    }

    .highlighted-news-card .highlight-image {
        min-height: 200px;
        flex: none;
    }

    .highlighted-news-card .highlight-content {
        padding: 24px;
    }

    .news-feed-item a {
        flex-direction: column;
    }

    .news-feed-image {
        width: 100%;
        height: 160px;
        margin-bottom: 12px;
    }
}

/* Cards */
.card {
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border: var(--card-border);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    transition: var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-glow);
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(30, 41, 59, 0.9);
}

.card h3 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.card .tag {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Simple Aircraft Cards (Grid View) */
.aircraft-card-simple {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    /* Premium Card Styles */
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.aircraft-card-simple::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--card-color), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.aircraft-card-simple:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.aircraft-card-simple:hover::before {
    opacity: 0.15;
}

/* Color Variables */
.aircraft-card-simple.color-blue {
    --card-color: #3b82f6;
}

.aircraft-card-simple.color-green {
    --card-color: #10b981;
}

.aircraft-card-simple.color-purple {
    --card-color: #8b5cf6;
}

.aircraft-card-simple.color-orange {
    --card-color: #f59e0b;
}

.aircraft-card-simple.color-teal {
    --card-color: #14b8a6;
}

.aircraft-card-simple.color-red {
    --card-color: #f43f5e;
}

.aircraft-card-simple.color-indigo {
    --card-color: #6366f1;
}

.aircraft-card-simple.color-pink {
    --card-color: #ec4899;
}

.aircraft-card-simple.color-cyan {
    --card-color: #06b6d4;
}

/* Color Specific Hover Glows */
.aircraft-card-simple.color-blue:hover {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.4), 0 0 15px rgba(59, 130, 246, 0.2);
}

.aircraft-card-simple.color-green:hover {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.4), 0 0 15px rgba(16, 185, 129, 0.2);
}

.aircraft-card-simple.color-purple:hover {
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 10px 30px -5px rgba(139, 92, 246, 0.4), 0 0 15px rgba(139, 92, 246, 0.2);
}

.aircraft-card-simple.color-orange:hover {
    border-color: rgba(245, 158, 11, 0.6);
    box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.4), 0 0 15px rgba(245, 158, 11, 0.2);
}

.aircraft-card-simple.color-teal:hover {
    border-color: rgba(20, 184, 166, 0.6);
    box-shadow: 0 10px 30px -5px rgba(20, 184, 166, 0.4), 0 0 15px rgba(20, 184, 166, 0.2);
}

.aircraft-card-simple.color-red:hover {
    border-color: rgba(244, 63, 94, 0.6);
    box-shadow: 0 10px 30px -5px rgba(244, 63, 94, 0.4), 0 0 15px rgba(244, 63, 94, 0.2);
}

.aircraft-card-simple.color-indigo:hover {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 10px 30px -5px rgba(99, 102, 241, 0.4), 0 0 15px rgba(99, 102, 241, 0.2);
}

.aircraft-card-simple.color-pink:hover {
    border-color: rgba(236, 72, 153, 0.6);
    box-shadow: 0 10px 30px -5px rgba(236, 72, 153, 0.4), 0 0 15px rgba(236, 72, 153, 0.2);
}

.aircraft-card-simple.color-cyan:hover {
    border-color: rgba(6, 182, 212, 0.6);
    box-shadow: 0 10px 30px -5px rgba(6, 182, 212, 0.4), 0 0 15px rgba(6, 182, 212, 0.2);
}

.aircraft-image-simple {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.aircraft-image-simple img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

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

.aircraft-segment-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(59, 130, 246, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-content {
    padding: var(--spacing-lg);
}

.card-content h3 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.card-content .manufacturer {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-md) 0;
}

.card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm) var(--spacing-md);
}

.card-metric-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-metric-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.card-metric-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.card-metric-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-metric-fill-secondary {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
}

.card-metric-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Modal Enhancements */
.modal-top-split {
    display: flex;
    gap: 32px;
    margin-bottom: var(--spacing-lg);
    align-items: flex-start;
}

.modal-left-col {
    flex: 0 0 45%;
    max-width: 500px;
}

.modal-right-col {
    flex: 1;
    min-width: 0;
    /* Prevent flex child overflow */
}

.modal-image-container {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

/* Responsive adjustments for modal split */
@media (max-width: 768px) {
    .modal-top-split {
        flex-direction: column;
    }

    .modal-left-col {
        flex: none;
        width: 100%;
        max-width: none;
    }
}

.modal-image-section {
    /* Legacy support or fallback */
    width: 100%;
    max-height: 180px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    border-radius: var(--border-radius-md);
}

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

.modal-news-section,
.modal-metrics-section {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.modal-news-section h3,
.modal-metrics-section h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.modal-news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.modal-news-item {
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.modal-news-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

.modal-news-item .news-date {
    font-size: 0.65rem;
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 2px;
}

.modal-news-item .news-title {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
    font-weight: 500;
}

.modal-news-item .news-source {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-style: italic;
}

.modal-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
}

.modal-metric-card {
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.modal-metric-card .metric-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

.modal-metric-card .metric-visual {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.modal-metric-card .metric-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-metric-card .metric-fill-secondary {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
}

.modal-metric-card .metric-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 700;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: var(--transition-normal);
}

.modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    max-width: 1200px;
    width: 95%;
    height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(0);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.95);
    opacity: 0;
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent-error);
    border-color: var(--accent-error);
    color: white;
}

/* Modal Header */
.modal-header {
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-sm);
}

.modal-header h2 {
    font-size: 2rem;
    margin: 0;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-header .modal-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #94a3b8;
}

.modal-category-tag {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modal Grid */
.modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-sm);
}

.modal-detail-item {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.modal-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.7rem;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.modal-value {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Hero Controls */
.hero-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
    flex-wrap: wrap;
}

/* Search Box */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 8px 12px 8px 36px;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 250px;
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}


.search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-secondary);
    pointer-events: none;
}

/* View Toggle (Segmented Control) */
.view-toggle-group {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    gap: 4px;
    position: relative;
    /* For absolute positioning of pulse */
    z-index: 5;
}

/* Color Mappings for View Group */
/* Color Mappings for View Group */
.view-toggle-group.color-blue {
    --toggle-color: #3b82f6;
    --toggle-rgb: 59, 130, 246;
}

.view-toggle-group.color-green {
    --toggle-color: #10b981;
    --toggle-rgb: 16, 185, 129;
}

.view-toggle-group.color-purple {
    --toggle-color: #8b5cf6;
    --toggle-rgb: 139, 92, 246;
}

.view-toggle-group.color-orange {
    --toggle-color: #f59e0b;
    --toggle-rgb: 245, 158, 11;
}

.view-toggle-group.color-teal {
    --toggle-color: #14b8a6;
    --toggle-rgb: 20, 184, 166;
}

.view-toggle-group.color-red {
    --toggle-color: #f43f5e;
    --toggle-rgb: 244, 63, 94;
}

.view-toggle-group.color-indigo {
    --toggle-color: #6366f1;
    --toggle-rgb: 99, 102, 241;
}

.view-toggle-group.color-pink {
    --toggle-color: #ec4899;
    --toggle-rgb: 236, 72, 153;
}

.view-toggle-group.color-cyan {
    --toggle-color: #06b6d4;
    --toggle-rgb: 6, 182, 212;
}

/* Default fallback */
.view-toggle-group {
    --toggle-color: #3b82f6;
    --toggle-rgb: 59, 130, 246;
}

@keyframes viewPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.1);
    }

    50% {
        transform: scale(1.08);
        opacity: 0.9;
        /* create a glow using the color */
        box-shadow: 0 0 25px 8px rgba(var(--toggle-rgb), 0.3);
    }

    100% {
        transform: scale(1);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.1);
    }
}

/* view-highlight-pulse removed */

/* --- Search & Filter Layout Refactor (Refined) --- */
.view-controls-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Vertical gap between Search and Filter rows */
    margin-bottom: 0px;
}

/* Row 1: Search - Top Left 25% */
.view-controls-grid .filter-bar-controls {
    width: 25%;
    margin-bottom: 0;
    padding: 0;
}

/* Row 2: Filters - 50/50 Split */
.filters-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Category 50%, OEM 50% */
    gap: 10px;
    width: 100%;
}

@media (max-width: 900px) {
    .view-controls-grid .filter-bar-controls {
        width: 100%;
    }

    .filters-wrapper {
        grid-template-columns: 1fr;
        /* Stack vertically on mobile */
        gap: 15px;
    }
}

.view-toggle-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-fast);
    position: relative;
    z-index: 2;
}

.view-toggle-option:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.view-toggle-option.active {
    background: var(--bg-secondary);
    color: var(--toggle-color);
    /* Updated to use dynamic color */
    box-shadow: var(--shadow-sm);
}

.view-toggle-option svg {
    opacity: 0.8;
}

.view-toggle-option.active svg {
    opacity: 1;
}

/* Visual Tabs Navigation (Universal) */
.visual-tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    background: rgba(15, 23, 42, 0.3);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.visual-tab-btn {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 4px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.visual-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* The pulse/glow background based on --toggle-color */
.visual-tab-btn.active {
    background: radial-gradient(circle at center, rgba(var(--toggle-rgb), 0.2) 0%, rgba(var(--toggle-rgb), 0.05) 100%);
    border-color: rgba(var(--toggle-rgb), 0.4);
    box-shadow:
        0 0 15px rgba(var(--toggle-rgb), 0.15),
        inset 0 0 10px rgba(var(--toggle-rgb), 0.1);
}

.visual-tab-btn.active .tab-icon {
    color: var(--toggle-color);
    background: rgba(var(--toggle-rgb), 0.1);
    box-shadow: 0 0 10px rgba(var(--toggle-rgb), 0.2);
}

.tab-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Explicit Variable Overrides to ensure correct theming */
.view-toggle-group.color-blue .visual-tab-btn.active,
.visual-tabs-nav.color-blue .visual-tab-btn.active {
    --toggle-rgb: 59, 130, 246;
    --toggle-color: #3b82f6;
}

.view-toggle-group.color-green .visual-tab-btn.active,
.visual-tabs-nav.color-green .visual-tab-btn.active {
    --toggle-rgb: 16, 185, 129;
    --toggle-color: #10b981;
}

.view-toggle-group.color-orange .visual-tab-btn.active,
.visual-tabs-nav.color-orange .visual-tab-btn.active {
    --toggle-rgb: 245, 158, 11;
    --toggle-color: #f59e0b;
}

.view-toggle-group.color-purple .visual-tab-btn.active,
.visual-tabs-nav.color-purple .visual-tab-btn.active {
    --toggle-rgb: 139, 92, 246;
    --toggle-color: #8b5cf6;
}

.view-toggle-group.color-teal .visual-tab-btn.active,
.visual-tabs-nav.color-teal .visual-tab-btn.active {
    --toggle-rgb: 20, 184, 166;
    --toggle-color: #14b8a6;
}

.view-toggle-group.color-red .visual-tab-btn.active,
.visual-tabs-nav.color-red .visual-tab-btn.active {
    --toggle-rgb: 244, 63, 94;
    --toggle-color: #f43f5e;
}

.view-toggle-group.color-indigo .visual-tab-btn.active,
.visual-tabs-nav.color-indigo .visual-tab-btn.active {
    --toggle-rgb: 99, 102, 241;
    --toggle-color: #6366f1;
}

.view-toggle-group.color-pink .visual-tab-btn.active,
.visual-tabs-nav.color-pink .visual-tab-btn.active {
    --toggle-rgb: 236, 72, 153;
    --toggle-color: #ec4899;
}

.view-toggle-group.color-cyan .visual-tab-btn.active,
.visual-tabs-nav.color-cyan .visual-tab-btn.active {
    --toggle-rgb: 6, 182, 212;
    --toggle-color: #06b6d4;
}

.visual-tab-btn.active .tab-icon {
    background: var(--toggle-color);
    color: white;
    box-shadow: 0 0 12px rgba(var(--toggle-rgb), 0.6);
}

.tab-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.tab-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 1px;
}

.visual-tab-btn.active .tab-title {
    color: white;
}

.tab-desc {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.visual-tab-btn.active .tab-desc {
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 900px) {
    .visual-tabs-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 600px) {
    .visual-tabs-nav {
        grid-template-columns: 1fr;
    }
}

/* Filter Bar & Toggle */
.filter-bar-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto 30px;
    padding: 0;
}

.search-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    max-width: 800px;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 44px;
    /* Align with search input */
}

.filter-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.filter-toggle-btn svg {
    transition: transform 0.3s ease;
}

.filter-toggle-btn.active svg {
    transform: rotate(180deg);
}

.filter-toggle-btn.active {
    background: rgba(var(--toggle-rgb), 0.1);
    border-color: rgba(var(--toggle-rgb), 0.4);
    color: var(--toggle-color);
}

/* Redefine search container for the bar */
.search-row .search-container {
    flex: 1;
}

.search-row .search-input {
    width: 100%;
    height: 44px;
}




/* List View Table */
.data-list {
    width: 100%;
    overflow-x: auto;
    margin-top: var(--spacing-xl);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    padding: 0;
    /* Remove padding to let table fill */
}

.list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 800px;
    /* Ensure it doesn't squish on small screens */
}

.list-table th {
    text-align: left;
    padding: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
    position: relative;
}

.list-table th:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.th-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-icon {
    font-size: 0.8rem;
    opacity: 0.3;
}

.sortable-header.sorted .sort-icon {
    opacity: 1;
    color: var(--accent-primary);
}

.sortable-header:hover .sort-icon {
    opacity: 0.7;
}

.list-table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.list-table tr:last-child td {
    border-bottom: none;
}

.list-row {
    cursor: pointer;
    transition: var(--transition-fast);
}

.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.1);
}

.list-row:hover td {
    color: var(--accent-primary);
    /* Highlight text on hover */
}

/* Hero Content Layout */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    /* Align bottom of title with toggle */
    text-align: left;
    /* Reset center alignment */
    padding: var(--spacing-md) 0 var(--spacing-sm) 0;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    margin-bottom: var(--spacing-xs);
    text-align: left;
}

.hero p {
    margin: 0;
    text-align: left;
}

/* Responsive Navigation */
/* Medium screens - wrap navigation items */
@media (max-width: 1200px) {
    header {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

    nav {
        width: 80%;
        margin-left: auto;
        margin-right: auto;
        order: 3;
        position: static;
        transform: none;
        margin-top: 10px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-sm);
    }

    nav a {
        font-size: 0.9rem;
    }

    main {
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
    }
}

/* Adjustments for mobile */
@media (max-width: 768px) {
    header {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .logo {
        font-size: 1.25rem;
    }

    nav ul {
        gap: var(--spacing-xs);
    }

    nav a {
        font-size: 0.85rem;
        padding: var(--spacing-xs);
    }

    main {
        padding-top: 120px;
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
        /* Increased to accommodate wrapped nav */
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .view-toggle-group {
        width: 100%;
        justify-content: center;
    }

    .view-toggle-option {
        flex: 1;
        justify-content: center;
    }
}

/* Map View Styles */
.map-view-container {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: var(--spacing-md);
    height: calc(100vh - 200px);
    margin-top: var(--spacing-xl);
    background: var(--bg-secondary);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.map-view-list {
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid var(--border-color);
}

.map-view-map {
    position: relative;
    height: 100%;
    overflow: hidden;
}

#leaflet-map {
    width: 100%;
    height: 100%;
}

/* Map List Table */
.map-list-table-wrapper {
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.map-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.map-list-table thead {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}

.map-list-table th {
    text-align: left;
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.03);
}

.map-list-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.8rem;
}

.map-list-row {
    cursor: pointer;
    transition: var(--transition-fast);
}

.map-list-row:hover {
    background: rgba(59, 130, 246, 0.1);
}

.map-list-row.active {
    background: rgba(59, 130, 246, 0.15);
    border-left: 3px solid var(--accent-primary);
}

.map-list-row.active td {
    color: var(--accent-primary);
    font-weight: 600;
}

.no-data {
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
}

/* Leaflet Map Popup Customization */
.leaflet-popup-content-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.leaflet-popup-content {
    margin: var(--spacing-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.leaflet-popup-tip {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.map-popup h3 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.map-popup .popup-subtitle {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.popup-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: var(--spacing-sm);
    font-size: 0.8rem;
    color: var(--text-primary);
}

.popup-details div {
    padding: 4px 0;
}

.popup-address {
    margin: var(--spacing-sm) 0 0 0;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Leaflet Control Customization */
.leaflet-control-zoom {
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-sm) !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    color: var(--accent-primary) !important;
}

.leaflet-bar a:last-child {
    border-bottom: none !important;
}

/* Responsive Map View */
@media (max-width: 1024px) {
    .map-view-container {
        grid-template-columns: 1fr;
        grid-template-rows: 300px 1fr;
        height: calc(100vh - 150px);
    }

    .map-view-list {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .map-view-map {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .map-list-table {
        font-size: 0.75rem;
    }

    .map-list-table th,
    .map-list-table td {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .map-view-container {
        height: calc(100vh - 120px);
    }
}

/* Footer */
footer {
    border-top: none;
    padding: 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    flex-shrink: 0;
    background: transparent;
}

.footer-link-subtle {
    padding: 8px 12px;
    border-radius: 4px;
}

.footer-link-subtle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white !important;
}

/* Simple Sign Up Button (Home) */
.home-signup-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 30px;
    z-index: 10;
}

.simple-signup-btn {
    background: var(--accent-primary);
    color: white;
    border: 1px solid var(--accent-primary);
    padding: 12px 36px;
    border-radius: var(--border-radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    z-index: 2;
    overflow: hidden;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.simple-signup-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Modal Ad Banner */
.modal-ad-banner {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.95rem;
    position: relative;
    margin-bottom: 24px;
}

.modal-ad-banner .ad-label {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.modal-ad-banner .ad-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 16px;
}

.modal-ad-banner .ad-text {
    color: #e2e8f0;
}

.modal-ad-banner .ad-cta {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.modal-ad-banner .ad-cta:hover {
    color: #93c5fd;
}


.compact-hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
    min-width: 280px;
}

.compact-hero h1 {
    margin-bottom: 0;
    text-align: left;
}

.compact-hero p {
    text-align: left;
    margin: 0 0 var(--spacing-xs) 0;
    max-width: none;
    /* Override centered limit */
}

.compact-hero .search-container {
    margin-top: var(--spacing-xs);
    width: 100%;
    max-width: 320px;
}

.compact-hero .hero-controls {
    margin-top: 0;
    padding-bottom: 4px;
    justify-content: flex-end;
}

/* App Layout Overrides - Full Screen Viewport */
@media screen and (min-width: 1024px) {

    html,
    body {
        height: 100vh;
        overflow: hidden;
        /* Disable page scroll */
    }

    .app-container {
        height: 100vh;
        overflow: hidden;
    }

    main {
        height: 100%;
        overflow-y: auto;
        /* Scroll inside main */
        display: flex;
        flex-direction: column;
    }

    /* Dashboard grid overrides removed to enforce single row layout */


    #dashboard-grid .dashboard-card .count {
        font-size: 1.4rem;
        margin-top: 0;
    }
}

/* Authentication UI */
.auth-container {
    display: flex;
    align-items: center;
    margin-left: auto;
    /* Push to far right */
    flex-shrink: 0;
    /* Prevent shrinking overlap */
}

.auth-logged-in {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.auth-divider {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

#login-btn {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

#login-btn:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

/* List View Specific Column Widths */
.col-startDate,
.col-endDate {
    white-space: nowrap;
    min-width: 140px;
}

/* Auth Modal Content */
.auth-modal-content {
    max-width: 400px;
    margin: 0 auto;
    padding: var(--spacing-md);
    text-align: center;
}

.auth-modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-group input:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.1);
}

.primary-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-top: var(--spacing-sm);
}

.primary-btn:hover {
    background: var(--accent-secondary);
}

.auth-footer {
    margin-top: var(--spacing-lg);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--accent-primary);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-error {
    color: #ef4444;
    font-size: 0.9rem;
    min-height: 20px;
    margin-top: 5px;
}

.auth-message {
    color: #10b981;
    font-size: 0.9rem;
    min-height: 20px;
    margin-top: 5px;
}

.user-info {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-lg);
    text-align: left;
}

@import "filters.css";

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.pagination-info {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--accent-primary);
    border-radius: var(--border-radius-sm);
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.pagination-btn:hover:not(.disabled) {
    background: var(--accent-primary);
    color: white;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: var(--text-muted);
    color: var(--text-muted);
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
}

/* News Carousel Styles */
.news-carousel-container {
    width: 100%;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding: 0 var(--spacing-lg);
}

.news-carousel-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    /* Mask edges for fade effect */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.news-carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: scroll 60s linear infinite;
}

.news-carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Move half way since we duplicated items */
}

.news-carousel-item {
    flex: 0 0 300px;
    height: 100px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    display: flex;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.news-carousel-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
    background: var(--bg-card);
}

.news-carousel-image {
    width: 100px;
    height: 100%;
    flex-shrink: 0;
}

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

.news-carousel-text {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.news-carousel-source {
    font-size: 0.65rem;
    color: var(--accent-secondary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.news-carousel-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

.news-carousel-empty,
.news-carousel-error {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-md);
}

/* Google Auth Button */
.google-auth-btn {
    width: 100%;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: #757575;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    font-family: 'Roboto', sans-serif;
}

.google-auth-btn:hover {
    background-color: #f1f1f1;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.google-auth-btn img {
    width: 18px;
    height: 18px;
    margin-right: 10px;
}

.auth-divider-text {
    text-align: center;
    margin: 15px 0;
    position: relative;
    font-size: 0.85rem;
    color: #999;
}

.auth-divider-text::before,
.auth-divider-text::after {
    content: "";
    display: block;
    height: 1px;
    background: #444;
    /* Dark line for dark theme */
    position: absolute;
    top: 50%;
    width: 42%;
}

.auth-divider-text::before {
    left: 0;
}

.auth-divider-text::after {
    right: 0;
}

/* Feature Cards Hover Effects (Restored) */
.feature-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease !important;
    position: relative;
    z-index: 1;
    overflow: hidden;
    /* Ensure overflow hidden for the glow */
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Inner Glow Gradient */
    background: radial-gradient(circle at center, var(--card-color), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-5px) !important;
}

.feature-card:hover::before {
    opacity: 0.15;
}

/* Feature Card Colors */
.feature-card.color-blue {
    --card-color: #3b82f6;
}

.feature-card.color-green {
    --card-color: #10b981;
}

.feature-card.color-orange {
    --card-color: #f59e0b;
}

.feature-card.color-purple {
    --card-color: #8b5cf6;
}

/* Specific Border/Shadow overrides for cards to match icon color */
.feature-card.color-blue:hover {
    border-color: rgba(59, 130, 246, 0.6) !important;
    box-shadow: 0 10px 30px -5px rgba(59, 130, 246, 0.4), 0 0 15px rgba(59, 130, 246, 0.2) !important;
}

.feature-card.color-green:hover {
    border-color: rgba(16, 185, 129, 0.6) !important;
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.4), 0 0 15px rgba(16, 185, 129, 0.2) !important;
}

.feature-card.color-orange:hover {
    border-color: rgba(245, 158, 11, 0.6) !important;
    box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.4), 0 0 15px rgba(245, 158, 11, 0.2) !important;
}

.feature-card.color-purple:hover {
    border-color: rgba(139, 92, 246, 0.6) !important;
    box-shadow: 0 10px 30px -5px rgba(139, 92, 246, 0.4), 0 0 15px rgba(139, 92, 246, 0.2) !important;
}

/* Page Transitions */
#main-content {
    transition: opacity 0.05s ease-in-out;
    opacity: 1;
}

#main-content.fade-out {
    opacity: 0;
}

/* --- Global Search (Home) --- */
.home-hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Space between title and search */
    gap: 40px;
    max-width: 1400px;
    /* Increased max width */
    margin: 0 auto;
    padding: 0 40px;
    /* More padding on sides */
    flex-wrap: wrap;
}

.home-hero-row h1 {
    margin-bottom: 0 !important;
    text-align: left !important;
    flex: 0 0 auto;
    white-space: nowrap;
    /* Solid vibrant blue, no gradient clipping */
    background: none;
    -webkit-text-fill-color: initial;
    color: #3b82f6;
    /* Tailwind blue-500 */
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    /* Glow instead of shadow */
}

.home-search-container {
    position: relative;
    flex: 2;
    /* Give it more weight */
    max-width: 100%;
    /* Take available space up to flex constraints */
    min-width: 500px;
    /* Expanded from 300px */
    margin: 0;
    /* Remove auto margin as we use flex gap */
    z-index: 100;
}

.home-search-label {
    position: absolute;
    top: -22px;
    left: 4px;
    /* Align with new corner radius */
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-primary);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes searchPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.home-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    /* Slightly more transparent */
    backdrop-filter: blur(16px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    /* Subtle blue tint border */
    border-radius: 12px;
    /* Less rounded corners */
    padding: 10px 20px;
    /* Slightly taller for professional feel */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: searchPulse 3s infinite;
}

.home-search-input-wrapper:focus-within {
    background: rgba(15, 23, 42, 0.9);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 8px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
    animation: none;
    /* Stop pulse on focus */
}

.home-search-icon {
    color: var(--accent-primary);
    /* Blue icon */
    margin-right: 12px;
}

.home-search-input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    /* Larger font */
    width: 100%;
    outline: none;
    padding: 6px 0;
}

.home-search-input::placeholder {
    color: rgba(148, 163, 184, 0.7);
    font-style: italic;
}

/* Home Grid Spacing */
#dashboard-grid {
    margin-top: 35px;
    /* Push buttons down */
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .home-hero-row {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .home-hero-row h1 {
        text-align: center !important;
    }

    .home-search-container {
        width: 100%;
        min-width: auto;
    }
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 12px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: none;
    /* Hidden by default */
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-results-dropdown.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.result-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
    font-size: 1.2rem;
    /* Emoji size if used, or svg scale */
    color: white;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.result-type-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    margin-left: 10px;
    white-space: nowrap;
}

/* Empty State */
.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* --- New Aircraft Modal Grid (Bento Box) --- */
.modal-bento-grid {
    display: grid;
    grid-template-areas:
        "header header"
        "media kpi"
        "details details"
        "video video"
        "footer footer";
    grid-template-columns: 40% 60%;
    gap: 20px;
    width: 100%;
    margin-top: 10px;
}

.modal-slot-header {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.modal-slot-header h2 {
    font-size: 2rem;
    margin: 0;
    line-height: 1.1;
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-slot-header .subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-slot-header .header-logo img {
    max-height: 40px;
    max-width: 120px;
    object-fit: contain;
}

.modal-slot-media {
    grid-area: media;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-height: 200px;
    aspect-ratio: 16 / 9;
    background-color: #000;
}

.modal-slot-video {
    grid-area: video;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 10px;
    aspect-ratio: 16/9;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-slot-video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-slot-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.modal-segment-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-slot-kpi {
    grid-area: kpi;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px 0;
    position: relative;
}

.modal-comparison-context {
    position: absolute;
    top: 35px;
    /* Aligned with title line */
    right: 0;
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

.modal-comparison-context strong {
    color: #94a3b8;
}

.modal-kpi-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.modal-kpi-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    /* Allow shrinking */
}

.mini-chart-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 60px;
    width: 100px;
    padding-bottom: 2px;
    flex-shrink: 0;
}

.mini-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    /* Very muted secondary */
    border-radius: 1px;
    min-height: 2px;
}

.mini-bar.avg-bin {
    background: rgba(59, 130, 246, 0.5);
    /* Blue for average */
}

.mini-bar.active-above {
    background: #10b981;
    /* Green */
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.mini-bar.active-below {
    background: #ef4444;
    /* Red */
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.mini-bar.active-neutral {
    background: #3b82f6;
    /* Solid Blue if same as avg */
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.kpi-commentary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 65px;
}

.kpi-commentary.text-green {
    color: #10b981;
}

.kpi-commentary.text-red {
    color: #ef4444;
}

.kpi-commentary.text-blue {
    color: #3b82f6;
}

.avg-value-display {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b82f6;
    margin-top: 4px;
    opacity: 0.9;
}

.diff-value {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
}

.diff-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
}

.modal-kpi-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-kpi-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.modal-progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 3px;
    transition: width 1s ease-out;
}

.fill-blue {
    background: #3b82f6;
}

.fill-green {
    background: #10b981;
}

.fill-red {
    background: #ef4444;
}

.modal-slot-details {
    grid-area: details;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
}

.details-grid-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.detail-col h4 {
    color: var(--accent-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    margin: 0 0 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.detail-row span:first-child {
    color: var(--text-secondary);
}

.detail-row span:last-child {
    font-weight: 500;
    color: var(--text-primary);
}

.modal-slot-footer {
    grid-area: footer;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-action-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-secondary);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .modal-bento-grid {
        grid-template-areas:
            "header"
            "media"
            "kpi"
            "details"
            "video"
            "footer";
        grid-template-columns: 1fr;
    }

    .details-grid-cols {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-slot-kpi {
        grid-template-columns: 1fr;
    }
}

/* Footer Animation */
footer {
    position: relative;
    overflow: hidden;
    /* Contain the animation */
    /* Ensure text is above */
}

footer p {
    position: relative;
    z-index: 10;
    margin: 0;
    /* Remove default margins for compact height */
}

.footer-animation-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.footer-aircraft-group {
    position: absolute;
    left: -100px;
    top: 50%;
    transform: translateY(-50%);
    animation: flyAcross 60s linear infinite;
    /* Slow speed */
    display: flex;
    align-items: center;
}

.footer-aircraft-icon {
    color: #cbd5e1;
    /* Lighter Slate 300 - much more visible */
    transform: rotate(90deg);
    /* Orient plane to fly right */
    width: 24px;
    height: 24px;
    z-index: 2;
    opacity: 1;
}

.footer-contrail {
    position: absolute;
    right: 12px;
    /* Start at engines/tail */
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    /* Longer contrail */
    height: 4px;
    /* Slightly thicker for fluffiness */
    /* Gradient: Transparent far away (left) -> High visibility white (right) */
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8));
    filter: blur(2px);
    /* Fluffy effect */
    animation: contrailFade 4s ease-in-out infinite alternate;
}

/* Ensure content sits above background animation */
main {
    position: relative;
    z-index: 1;
}

/* Home Background Animation */
.home-bg-animation {
    display: block;
    /* Always visible */
    position: fixed;
    /* Fixed to viewport to cover everything */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    /* Behind content */
    overflow: hidden;
}

/* Dynamic JS Planes */
.dynamic-plane {
    position: absolute;
    display: flex;
    align-items: center;
    /* transition: transform linear;  // Handled inline for variable duration */
    will-change: transform;
    z-index: 1;
    /* Ensure above background */
}

.dynamic-plane-icon {
    /* Color handled via inline or inherited */
    color: rgba(30, 41, 59, 0.3);
    /* Transform handled in JS composition */
}

.dynamic-plane-contrail {
    position: absolute;
    right: 50%;
    /* Start from center of group/plane */
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: linear-gradient(to right, rgba(200, 200, 200, 0), rgba(200, 200, 200, 0.2));
    filter: blur(4px);
    transform-origin: right center;
    /* Animation handled by separate keyframe if needed, or simple opacity */
    animation: contrailFadeHome 5s ease-in-out infinite alternate;
}

@keyframes rotorSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.rotor-group {
    transform-origin: 12px 12px;
    /* Center of 24x24 viewBox */
    animation: rotorSpin 0.1s linear infinite;
}

.static-bubble {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    /* Much more subtle */
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    /* Behind chopper */
    animation: bubbleFadeDrop 4s ease-out forwards;
}

@keyframes bubbleFadeDrop {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.2);
    }
}

@keyframes flyAcross {
    0% {
        left: -150px;
    }

    100% {
        left: 100%;
    }
}

@keyframes contrailFade {
    0% {
        opacity: 0.2;
        width: 150px;
    }

    100% {
        opacity: 0.5;
        width: 250px;
    }
}

@keyframes contrailFadeHome {
    0% {
        opacity: 0.1;
        width: 300px;
    }

    100% {
        opacity: 0.3;
        width: 500px;
    }
}


/* --- Functions View Styles --- */
.functions-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--text-primary);
}

.functions-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.functions-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.functions-desc {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.functions-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.functions-section-title {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.functions-section-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.functions-controls {
    display: flex;
    gap: 1rem;
}

.functions-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 1rem;
}

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

.functions-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.functions-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.functions-btn-primary {
    background: #3b82f6;
    color: white;
}

.functions-btn-primary:hover:not(:disabled) {
    background: #2563eb;
}

.functions-btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 100%;
}

.functions-btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
}

.functions-terminal {
    background: #0f172a;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    overflow: hidden;
}

.functions-terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.functions-log-output {
    padding: 1rem;
    margin: 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #94a3b8;
    height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* --- Functions Control Center Styles --- */
.functions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    /* Reduced from 500px to prevent wrapping on laptops */
    gap: 32px;
    width: 100%;
    margin-top: 32px;
}

@media (max-width: 900px) {

    /* Reduced from 1100px */
    .functions-grid {
        grid-template-columns: 1fr;
    }
}

.func-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    /* For two-tone split */
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.func-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Top Half: Info */
.func-card-body {
    padding: 24px;
    flex: 1;
}

.func-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.func-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.func-title-group h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.func-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Bottom Half: Controls */
.func-actions {
    background: rgba(15, 23, 42, 0.6);
    /* Darker bottom */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.func-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.func-input {
    background: #020617;
    /* Very dark for terminal feel */
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Fira Code', 'Roboto Mono', monospace;
    /* Monospace */
    font-size: 0.9rem;
    width: 100%;
    transition: all 0.2s ease;
}

.func-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
    background: #0f172a;
}

.func-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.func-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    transform: translateY(-1px);
}

/* Specific Theme Gradients */
.btn-blue {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-blue:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
}

.btn-green {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: none;
    box-shadow: 0 4px 6px rgba(5, 150, 105, 0.2);
}

.btn-green:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 6px 15px rgba(5, 150, 105, 0.4);
}

.btn-orange {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
    border: none;
    box-shadow: 0 4px 6px rgba(234, 88, 12, 0.2);
}

.btn-orange:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 6px 15px rgba(234, 88, 12, 0.4);
}

.btn-red {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: none;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.2);
}

.btn-red:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 6px 15px rgba(220, 38, 38, 0.4);
}

/* Group Action Buttons for History */
.func-group-btns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.group-btn {
    background: rgba(251, 146, 60, 0.1);
    border: 1px solid rgba(251, 146, 60, 0.2);
    color: #fb923c;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.group-btn:hover {
    background: rgba(251, 146, 60, 0.2);
    border-color: rgba(251, 146, 60, 0.4);
    transform: translateY(-1px);
}

.group-btn svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Terminal - Enhanced */
.terminal-window {
    margin-top: 40px;
    background: #020617;
    /* Slate 950 */
    border: 1px solid #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: #0f172a;
    padding: 12px 20px;
    border-bottom: 1px solid #1e293b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% {
        opacity: 0.6;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    100% {
        opacity: 0.6;
        transform: scale(0.95);
    }
}

.terminal-content {
    padding: 20px;
    font-family: 'Fira Code', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #38bdf8;
    /* Cyan text */
    height: 350px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.5;
}

.hero-header {
    margin-bottom: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.hero-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    /* Standard property */
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.system-status-badge {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- News Hub Bento Grid & Typography --- */

.hub-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Bento Spans */
.bento-span-2 {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .bento-span-2 {
        grid-column: span 1;
        /* revert on mobile */
    }
}

/* Enhanced Card Styling */
.hub-feed-card {
    display: flex;
    flex-direction: column;
    background: rgba(30, 41, 59, 0.4);
    /* Slate 800/40 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    height: 100%;
    /* Fill grid cell */
}

/* Horizontal card for wide spans */
.hub-feed-card.wide-card {
    flex-direction: row;
}

.hub-feed-card:hover {
    transform: translateY(-4px);
    background: rgba(30, 41, 59, 0.6);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.hub-feed-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hub-feed-card.wide-card .hub-feed-img {
    width: 45%;
    height: 100%;
}

.hub-feed-card:hover .hub-feed-img {
    transform: scale(1.05);
}

.hub-feed-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Typography Hierarchy */
.hub-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    /* Slate 100 */
    line-height: 1.4;
    margin-bottom: 15px;
    /* Space between title and meta/desc */
    flex: 1;
    /* Push others down */
}

.hub-card-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    /* Slate 400 */
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Technical Meta Data Style */
.hub-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    /* Slate 500 */
    margin-top: auto;
    /* Push to bottom */
}

.hub-source-tag {
    color: var(--accent-color, #38bdf8);
    /* Fallback cyan */
}

/* Infinite Scroll Sentinel */
.scroll-sentinel {
    width: 100%;
    height: 20px;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

.scroll-loading {
    opacity: 1;
    color: #94a3b8;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    animation: pulse 1.5s infinite;
}


/* --- AeroDataNexus Publisher Highlights --- */
.publisher-glow {
    position: relative;
    border: 1px solid rgba(6, 182, 212, 0.5) !important;
    /* Cyan border */
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15), inset 0 0 20px rgba(6, 182, 212, 0.05);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(15, 23, 42, 0.9) 100%) !important;
    overflow: hidden;
}

.publisher-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #06b6d4;
    /* Cyan accent bar */
    box-shadow: 0 0 10px #06b6d4;
    z-index: 2;
}

.adn-pill {
    display: inline-block;
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(6, 182, 212, 0.3);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 5px rgba(6, 182, 212, 0.2);
}

/* Adjust hub-feed-card for the accent bar */
.hub-feed-card.publisher-glow {
    padding-left: 4px;
    /* Space for the bar, though absolute positioning handles it */
}