/* ==========================================================================
   NJCIC Dashboard - Modern UI Design System

   This is the single source of truth for all dashboard styling.
   All pages should link only this CSS file - no need for separate
   Google Fonts links or Tailwind config duplication in HTML.
   ========================================================================== */

/* ==========================================================================
   Font Imports
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   Variables & Theme
   ========================================================================== */

:root {
    /* NJCIC Official Brand Colors */
    --njcic-teal: #2dc8d2;
    --njcic-teal-dark: #0e7c86;    /* Accessible teal for text on light bg */
    --njcic-teal-darker: #095057;  /* Even darker for small text */
    --njcic-orange: #f34213;
    --njcic-orange-dark: #c73610;  /* Accessible orange for backgrounds */
    --njcic-dark: #183642;
    --njcic-gray: #2b3436;
    --njcic-light: #e8f9fa;

    /* Brand Colors (mapped to NJCIC) */
    --color-primary: #0e7c86;      /* Rich Teal - USE FOR TEXT ON LIGHT BG */
    --color-primary-light: #2dc8d2; /* Bright Teal - decorative only */
    --color-primary-dark: #095057;  /* Deep Teal */
    --color-accent: #f34213;       /* NJCIC Orange - Secondary accent */
    --color-accent-dark: #c73610;  /* Darker orange for text */

    /* Neutral Scale (using NJCIC Dark/Gray) */
    --color-dark: #183642;    /* NJCIC Dark Navy */
    --color-dark-800: #2b3436; /* NJCIC Gray */
    --color-gray-600: #475569; /* Slate 600 - better for body text */
    --color-gray-500: #64748b; /* Slate 500 */
    --color-gray-400: #94a3b8; /* Slate 400 */
    --color-gray-300: #cbd5e1; /* Slate 300 - for text on dark bg */
    --color-gray-200: #e2e8f0; /* Slate 200 */
    --color-gray-100: #f1f5f9; /* Slate 100 */
    --color-gray-50: #f8fafc;  /* Slate 50 */
    --color-white: #ffffff;

    /* Sophisticated Shadow System - Brand-tinted for cohesion */
    --shadow-xs: 0 1px 2px rgb(24 54 66 / 0.04);
    --shadow-sm: 0 1px 3px rgb(24 54 66 / 0.06), 0 1px 2px rgb(24 54 66 / 0.04);
    --shadow-md: 0 4px 8px -2px rgb(24 54 66 / 0.08), 0 2px 4px -2px rgb(24 54 66 / 0.04);
    --shadow-lg: 0 12px 24px -4px rgb(24 54 66 / 0.12), 0 4px 8px -2px rgb(24 54 66 / 0.04);
    --shadow-xl: 0 24px 48px -8px rgb(24 54 66 / 0.16), 0 8px 16px -4px rgb(24 54 66 / 0.06);
    --shadow-2xl: 0 32px 64px -12px rgb(24 54 66 / 0.2), 0 12px 24px -4px rgb(24 54 66 / 0.08);
    --shadow-inner: inset 0 2px 4px 0 rgb(24 54 66 / 0.04);

    /* Colored shadows for visual depth */
    --shadow-teal: 0 8px 24px -4px rgb(45 200 210 / 0.25);
    --shadow-orange: 0 8px 24px -4px rgb(243 66 19 / 0.2);
    --shadow-card-hover: 0 20px 40px -12px rgb(24 54 66 / 0.18), 0 0 0 1px rgb(45 200 210 / 0.12);
    --shadow-glow-teal: 0 0 20px rgb(45 200 210 / 0.3), 0 0 40px rgb(45 200 210 / 0.1);
    --shadow-glow-orange: 0 0 20px rgb(243 66 19 / 0.25), 0 0 40px rgb(243 66 19 / 0.08);

    /* Typography - Libre Baskerville for editorial authority, Source Sans 3 for readability */
    --font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
    --font-heading: 'Libre Baskerville', Georgia, 'Times New Roman', serif;

    /* Animation Timing */
    --transition-fast: 150ms;
    --transition-base: 250ms;
    --transition-slow: 400ms;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-spring: cubic-bezier(0.22, 1.0, 0.36, 1);

    /* Noise texture as data URI for subtle grain */
    --noise-texture: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--color-gray-50);
    color: var(--color-dark);
    line-height: 1.5;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 1.875rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
    line-height: 1.4;
}

h4 {
    font-size: 1.25rem;
    line-height: 1.4;
}

h5 {
    font-size: 1.125rem;
    line-height: 1.5;
}

h6 {
    font-size: 1rem;
    line-height: 1.5;
}

/* Metric numbers - impactful display for statistics */
.metric-number {
    font-family: var(--font-family);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* ==========================================================================
   Navigation - Dark theme with high contrast
   ========================================================================== */

#main-nav {
    background: var(--njcic-dark);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(45, 200, 210, 0.2);
    transition: all 0.3s ease;
}

/* Nav link base - white text for 12:1+ contrast on dark */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Active nav link - teal accent underline */
.nav-link.active,
.nav-link[aria-current="page"] {
    color: #ffffff;
    background: rgba(45, 200, 210, 0.15);
    font-weight: 600;
}

.nav-link.active::after,
.nav-link[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--njcic-teal), var(--njcic-orange));
    border-radius: 1px;
}

/* Mobile nav links */
.mobile-nav-link {
    display: block;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-link.active,
.mobile-nav-link[aria-current="page"] {
    color: #ffffff;
    background: rgba(45, 200, 210, 0.15);
    font-weight: 600;
    border-left: 3px solid var(--njcic-teal);
}

/* ==========================================================================
   Hero Section & Patterns
   ========================================================================== */

.hero-pattern {
    background-color: var(--color-dark);
    background-image: radial-gradient(var(--color-dark-800) 1px, transparent 1px);
    background-size: 32px 32px;
    position: relative;
    overflow: hidden;
}

.hero-pattern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--color-gray-50));
    pointer-events: none;
}

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

/* Modern Card Base */
.modern-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

/* Primary card - subtle gradient border */
.card-primary {
    background: var(--color-white);
    border: 1px solid transparent;
    background-image: linear-gradient(white, white),
                      linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-dark) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: 1rem;
}

/* ==========================================================================
   METRIC CARDS - Bold Statistics Display (REDESIGNED)
   Numbers that DOMINATE with asymmetric accents
   ========================================================================== */

.metric-card {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.11) 0%,
        rgba(255, 255, 255, 0.03) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.75rem 1.5rem 1.5rem 1.75rem;
    position: relative;
    overflow: hidden;
    animation: metricCardEnter 0.6s var(--ease-out-expo) forwards;
    opacity: 0;
    transition: all 0.4s var(--ease-out-expo);
}

/* Thick asymmetric LEFT accent bar - signature element */
.metric-card::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 0;
    width: 5px;
    height: calc(100% - 3rem);
    background: linear-gradient(
        180deg,
        var(--color-primary-light) 0%,
        var(--color-accent) 100%
    );
    border-radius: 0 4px 4px 0;
    opacity: 0.5;
    transform: scaleY(0.5);
    transform-origin: center;
    transition: all 0.5s var(--ease-out-expo);
}

/* Glowing corner highlight */
.metric-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 120px;
    height: 120px;
    background: radial-gradient(
        circle,
        rgba(45, 200, 210, 0.12) 0%,
        transparent 70%
    );
    transition: all 0.5s var(--ease-out-expo);
    pointer-events: none;
}

.metric-card:hover {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.06) 100%
    );
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(45, 200, 210, 0.25);
    box-shadow:
        0 30px 60px -15px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(45, 200, 210, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.metric-card:hover::before {
    opacity: 1;
    transform: scaleY(1);
}

.metric-card:hover::after {
    transform: translate(-15px, 15px) scale(1.4);
}

/* THE NUMBER - this is the star */
.metric-card .counter,
.metric-card .metric-number,
.metric-card .text-3xl,
.metric-card .text-4xl {
    font-family: var(--font-family);
    font-size: 3.5rem !important;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        rgba(255, 255, 255, 0.85) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.625rem;
    position: relative;
    z-index: 2;
}

/* Label - subtle but readable */
.metric-card .text-gray-200,
.metric-card .text-sm {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

/* Icon container */
.metric-card .p-2 {
    border-radius: 12px;
    transition: all 0.3s var(--ease-out-back);
}

.metric-card:hover .p-2 {
    transform: scale(1.15) rotate(-5deg);
}

/* Staggered animation */
.metric-card:nth-child(1) { animation-delay: 0.1s; }
.metric-card:nth-child(2) { animation-delay: 0.18s; }
.metric-card:nth-child(3) { animation-delay: 0.26s; }
.metric-card:nth-child(4) { animation-delay: 0.34s; }

@keyframes metricCardEnter {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chart Cards */
.chart-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

/* ==========================================================================
   GRANTEE CARDS - Premium Interaction (REDESIGNED)
   Clear hierarchy: Name > Engagement > Platforms
   ========================================================================== */

.grantee-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    opacity: 0;
    animation: granteeCardEnter 0.5s var(--ease-out-expo) forwards;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: var(--shadow-sm);
}

/* Animated top gradient bar */
.grantee-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--color-primary-light) 0%,
        var(--color-primary) 40%,
        var(--color-accent) 100%
    );
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out-expo);
    z-index: 2;
}

/* Subtle inner glow on hover */
.grantee-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 100% 60% at 50% 0%,
        rgba(45, 200, 210, 0.04) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.grantee-card:hover {
    border-color: rgba(45, 200, 210, 0.5);
    transform: translateY(-6px);
    box-shadow:
        0 25px 50px -15px rgba(24, 54, 66, 0.15),
        0 0 0 1px rgba(45, 200, 210, 0.1),
        var(--shadow-glow-teal);
}

.grantee-card:hover::before {
    transform: scaleX(1);
}

.grantee-card:hover::after {
    opacity: 1;
}

/* Grantee name - primary hierarchy (sans-serif for data context) */
.grantee-card h3,
.grantee-card .font-bold:first-of-type,
.grantee-card .font-semibold {
    font-family: var(--font-family);
    font-weight: 700;
    color: var(--color-dark);
    transition: color 0.3s ease;
    line-height: 1.35;
    position: relative;
    z-index: 3;
}

.grantee-card:hover h3,
.grantee-card:hover .font-bold:first-of-type {
    color: var(--color-primary-dark);
}

/* All numbers in grantee cards - sans-serif for data readability */
.grantee-card .text-2xl,
.grantee-card .text-xl,
.grantee-card .text-lg {
    font-family: var(--font-family);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--color-dark);
    position: relative;
    z-index: 3;
}

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

/* Section heading with accent border */
.section-heading {
    position: relative;
    padding-left: 1rem;
}

.section-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-accent) 100%);
    border-radius: 2px;
}

/* Rankings row - highlight effect */
.ranking-row {
    transition: all 0.2s ease;
}

.ranking-row:hover {
    background: linear-gradient(90deg, rgba(45, 200, 210, 0.05) 0%, transparent 100%) !important;
}

/* Top 3 ranking special treatment */
.ranking-row.top-3 {
    background: linear-gradient(90deg, rgba(243, 66, 19, 0.03) 0%, transparent 100%);
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

@keyframes pulse-ring {
    0% { transform: scale(0.33); }
    80%, 100% { opacity: 0; }
}

@keyframes pulse-dot {
    0% { transform: scale(0.8); }
    50% { transform: scale(1); }
    100% { transform: scale(0.8); }
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(14, 124, 134, 0.15);
    border: 1px solid rgba(14, 124, 134, 0.3);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: #0e7c86;
    font-weight: 500;
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #0e7c86;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ==========================================================================
   Components
   ========================================================================== */

/* Search Input */
.search-input {
    background: var(--color-gray-100);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.search-input:focus {
    background: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(14, 124, 134, 0.1);
}

/* Platform Filter Buttons */
.platform-btn {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    color: var(--color-gray-500);
    border-radius: 9999px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.platform-btn:hover {
    border-color: var(--color-gray-500);
    color: var(--color-dark);
}

.platform-btn.active {
    background: var(--color-dark);
    color: var(--color-white);
    border-color: var(--color-dark);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   RANKINGS TABLE - Leaderboard Design (REDESIGNED)
   Feels like competition, not a spreadsheet
   ========================================================================== */

.rankings-table-container {
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-gray-200);
    overflow: hidden;
    background: var(--color-white);
}

#rankings-table {
    width: 100%;
    border-collapse: collapse;
}

/* Table header - commanding presence */
#rankings-table thead {
    background: linear-gradient(
        180deg,
        var(--color-gray-50) 0%,
        rgba(248, 250, 252, 0.6) 100%
    );
    position: relative;
}

#rankings-table thead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--color-gray-200) 10%,
        var(--color-gray-200) 90%,
        transparent
    );
}

#rankings-table th {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gray-500);
    padding: 1.125rem 1rem;
    border-bottom: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#rankings-table th:hover {
    color: var(--color-primary-dark);
    background: rgba(45, 200, 210, 0.05);
}

/* Sortable column indicator */
#rankings-table th[data-sort] {
    cursor: pointer;
    position: relative;
    user-select: none;
}

/* Table body */
#rankings-table tbody tr {
    transition: all 0.25s var(--ease-out-expo);
    position: relative;
    border-left: 4px solid transparent;
}

/* Zebra striping */
#rankings-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

/* Row hover - satisfying highlight sweep */
#rankings-table tbody tr:hover {
    background: linear-gradient(
        90deg,
        rgba(45, 200, 210, 0.08) 0%,
        rgba(45, 200, 210, 0.03) 40%,
        transparent 100%
    );
    border-left-color: var(--color-primary-light);
    transform: scale(1.003);
    z-index: 1;
}

#rankings-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    vertical-align: middle;
    transition: all 0.2s ease;
}

#rankings-table tbody tr:hover td {
    border-bottom-color: transparent;
}

/* Top 3 rows - special golden treatment */
#rankings-table tbody tr:nth-child(1),
#rankings-table tbody tr:nth-child(2),
#rankings-table tbody tr:nth-child(3) {
    background: linear-gradient(
        90deg,
        rgba(255, 215, 0, 0.05) 0%,
        transparent 50%
    );
}

#rankings-table tbody tr:nth-child(1):hover,
#rankings-table tbody tr:nth-child(2):hover,
#rankings-table tbody tr:nth-child(3):hover {
    background: linear-gradient(
        90deg,
        rgba(255, 215, 0, 0.1) 0%,
        rgba(45, 200, 210, 0.05) 40%,
        transparent 100%
    );
}

/* ==========================================================================
   Loading & Utilities
   ========================================================================== */

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

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

.skeleton {
    background: linear-gradient(
        90deg,
        var(--color-gray-100) 25%,
        var(--color-gray-200) 50%,
        var(--color-gray-100) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.counter {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-200);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-500);
}

/* ==========================================================================
   Distinctive Visual Elements
   ========================================================================== */

/* Gradient divider */
.divider-gradient {
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        #2dc8d2 20%,
        #f34213 50%,
        #2dc8d2 80%,
        transparent 100%
    );
    margin: 2rem 0;
}

/* Subtle pattern background for sections */
.pattern-bg {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(45, 200, 210, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(243, 66, 19, 0.03) 0%, transparent 50%);
}

/* Subtle grid pattern for white sections */
.grid-pattern {
    background-image:
        linear-gradient(rgba(45, 200, 210, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 200, 210, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Custom scrollbar for tables */
.custom-scrollbar::-webkit-scrollbar {
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #2dc8d2;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #25b0b9;
}

/* ==========================================================================
   BUTTONS & CTAs - Unmistakable Actions (REDESIGNED)
   Inviting, tactile, with micro-animations
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s var(--ease-out-expo);
}

/* Shine sweep effect on hover */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

/* Primary button - bold gradient */
.btn-primary {
    background: linear-gradient(
        135deg,
        var(--njcic-teal-dark) 0%,
        var(--njcic-teal-darker) 100%
    );
    color: white;
    box-shadow:
        0 4px 14px rgba(14, 124, 134, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
    background: linear-gradient(
        135deg,
        #0a6a73 0%,
        #064248 100%
    );
    transform: translateY(-3px);
    box-shadow:
        0 10px 28px rgba(14, 124, 134, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 124, 134, 0.35);
}

/* Secondary button - accent gradient */
.btn-secondary {
    background: linear-gradient(
        135deg,
        var(--njcic-orange-dark) 0%,
        #a52a0c 100%
    );
    color: white;
    box-shadow:
        0 4px 14px rgba(199, 54, 16, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: linear-gradient(
        135deg,
        #a52a0c 0%,
        #8a220a 100%
    );
    transform: translateY(-3px);
    box-shadow:
        0 10px 28px rgba(199, 54, 16, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Outline button - sophisticated border */
.btn-outline {
    background: transparent;
    color: var(--njcic-teal-dark);
    border: 2px solid var(--njcic-teal-dark);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--njcic-teal-dark);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(14, 124, 134, 0.3);
}

.btn-outline::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(14, 124, 134, 0.1) 50%,
        transparent 100%
    );
}

/* Ghost button - subtle */
.btn-ghost {
    background: transparent;
    color: var(--njcic-dark);
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(45, 200, 210, 0.12);
    color: var(--njcic-teal-dark);
}

.btn-ghost::before {
    display: none;
}

/* Button icon animation */
.btn svg {
    width: 1.125rem;
    height: 1.125rem;
    transition: transform 0.3s var(--ease-out-back);
}

.btn:hover svg {
    transform: translateY(-2px);
}

/* Download/Export button arrow animation */
.btn:hover svg[class*="download"],
.btn:hover svg path[d*="M4 16v1"] {
    animation: downloadBounce 0.5s ease infinite;
}

@keyframes downloadBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* Button focus */
.btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}

/* ==========================================================================
   FILTER CONTROLS - Custom & Tactile (REDESIGNED)
   Not browser defaults - feels designed
   ========================================================================== */

.filter-tab {
    padding: 0.625rem 1.25rem;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 10px;
    background: var(--color-white);
    color: var(--color-gray-500);
    border: 2px solid var(--color-gray-200);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

/* Animated underline accent on hover */
.filter-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--njcic-teal), var(--njcic-orange));
    transition: all 0.3s var(--ease-out-expo);
    transform: translateX(-50%);
    border-radius: 2px 2px 0 0;
}

.filter-tab:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary-dark);
    background: rgba(45, 200, 210, 0.04);
}

.filter-tab:hover::after {
    width: 60%;
}

.filter-tab:active {
    transform: scale(0.97);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-800) 100%);
    color: white;
    border-color: var(--color-dark);
    box-shadow: 0 4px 16px rgba(24, 54, 66, 0.25);
}

.filter-tab.active::after {
    display: none;
}

/* Custom select wrapper - distinctive appearance */
select.appearance-none,
.filter-select,
.comparison-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--color-white);
    border: 2px solid var(--color-gray-200);
    border-radius: 10px;
    padding: 0.75rem 2.75rem 0.75rem 1rem;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--color-dark);
    cursor: pointer;
    transition: all 0.25s var(--ease-out-expo);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    box-shadow: var(--shadow-sm);
}

select.appearance-none:hover,
.filter-select:hover,
.comparison-select:hover {
    border-color: var(--color-gray-400);
    box-shadow: var(--shadow-md);
}

select.appearance-none:focus,
.filter-select:focus,
.comparison-select:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow:
        var(--shadow-md),
        0 0 0 4px rgba(45, 200, 210, 0.12);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus visible outline for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Accessible Color Classes
   ========================================================================== */

/* Links on light backgrounds - use dark teal for 5.7:1 contrast */
.link-accessible,
a.text-teal-accessible {
    color: var(--njcic-teal-dark);
}

.link-accessible:hover,
a.text-teal-accessible:hover {
    color: var(--njcic-teal-darker);
    text-decoration: underline;
}

/* Text on dark backgrounds */
.text-on-dark {
    color: var(--color-gray-100);
}

.text-on-dark-muted {
    color: var(--color-gray-300);
}

/* Footer specific - lighter text for dark bg */
.footer-text {
    color: var(--color-gray-300);
}

.footer-text-muted {
    color: var(--color-gray-400);
}

.footer-heading {
    color: var(--color-white);
    font-weight: 600;
}

/* ==========================================================================
   PLATFORM BADGES - Distinct Visual Identities (REDESIGNED)
   Each platform instantly recognizable with brand DNA
   ========================================================================== */

.badge-platform {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: all 0.25s var(--ease-out-expo);
}

/* TikTok - signature split neon effect */
.badge-tiktok {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    border-color: #404040;
    box-shadow:
        inset -3px 0 0 #00f2ea,
        inset 3px 0 0 #ff0050;
}

.badge-tiktok:hover {
    transform: scale(1.08);
    box-shadow:
        inset -3px 0 0 #00f2ea,
        inset 3px 0 0 #ff0050,
        0 6px 16px rgba(0, 0, 0, 0.25);
}

/* Instagram - iconic gradient */
.badge-instagram {
    background: linear-gradient(
        135deg,
        #feda75 0%,
        #fa7e1e 20%,
        #d62976 45%,
        #962fbf 70%,
        #4f5bd5 100%
    );
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.badge-instagram:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(214, 41, 118, 0.45);
}

/* Bluesky - clean sky gradient */
.badge-bluesky {
    background: linear-gradient(135deg, #0085ff 0%, #0066cc 100%);
    color: #ffffff;
}

.badge-bluesky:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 133, 255, 0.45);
}

/* YouTube - iconic red */
.badge-youtube {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #ffffff;
}

.badge-youtube:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(255, 0, 0, 0.45);
}

/* Twitter/X - dark minimal */
.badge-twitter {
    background: linear-gradient(135deg, #14171a 0%, #2d3436 100%);
    color: #ffffff;
    border-color: #3d4448;
}

.badge-twitter:hover {
    transform: scale(1.08);
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}

/* Facebook */
.badge-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
    color: #ffffff;
}

.badge-facebook:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(24, 119, 242, 0.45);
}

/* Default/Unknown */
.badge-default {
    background: var(--color-gray-100);
    color: var(--color-gray-600);
    border-color: var(--color-gray-200);
}

.badge-default:hover {
    background: var(--color-gray-200);
}

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

/* Metric card labels on dark hero - use light colors */
.metric-label {
    color: var(--color-gray-200);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Hero subtitle - ensure readable on dark */
.hero-subtitle {
    color: var(--color-gray-300);
}

/* ==========================================================================
   Table & Rankings Fixes
   ========================================================================== */

/* ==========================================================================
   LEADERBOARD RANK BADGES - Gold/Silver/Bronze (REDESIGNED)
   Medals that feel earned - 3D metallic effect
   ========================================================================== */

.leaderboard-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    position: relative;
    transition: all 0.3s var(--ease-out-expo);
}

/* Gold - 1st place, premium metallic */
.leaderboard-rank.gold {
    background: linear-gradient(
        145deg,
        #ffd700 0%,
        #ffb800 35%,
        #e5a000 70%,
        #cc8f00 100%
    );
    color: #5c4a00;
    box-shadow:
        0 6px 20px rgba(255, 184, 0, 0.45),
        inset 0 2px 6px rgba(255, 255, 255, 0.5),
        inset 0 -3px 6px rgba(0, 0, 0, 0.1);
}

.leaderboard-rank.gold::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 8px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.45) 0%,
        transparent 50%
    );
    pointer-events: none;
}

/* Silver - 2nd place */
.leaderboard-rank.silver {
    background: linear-gradient(
        145deg,
        #e8e8e8 0%,
        #d0d0d0 35%,
        #b8b8b8 70%,
        #a0a0a0 100%
    );
    color: #3a3a3a;
    box-shadow:
        0 6px 20px rgba(180, 180, 180, 0.45),
        inset 0 2px 6px rgba(255, 255, 255, 0.6),
        inset 0 -3px 6px rgba(0, 0, 0, 0.08);
}

.leaderboard-rank.silver::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 8px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.55) 0%,
        transparent 50%
    );
    pointer-events: none;
}

/* Bronze - 3rd place */
.leaderboard-rank.bronze {
    background: linear-gradient(
        145deg,
        #e8a060 0%,
        #d08040 35%,
        #b87333 70%,
        #a06028 100%
    );
    color: #3d2000;
    box-shadow:
        0 6px 20px rgba(205, 127, 50, 0.45),
        inset 0 2px 6px rgba(255, 255, 255, 0.35),
        inset 0 -3px 6px rgba(0, 0, 0, 0.1);
}

.leaderboard-rank.bronze::before {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 8px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.3) 0%,
        transparent 50%
    );
    pointer-events: none;
}

/* Default rank - clean minimal */
.leaderboard-rank.default {
    background: var(--color-gray-100);
    color: var(--color-gray-500);
    border: 1px solid var(--color-gray-200);
}

/* Hover effect for all ranks */
.leaderboard-rank:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   ATMOSPHERIC VISUAL ENHANCEMENTS
   Editorial design elements for depth and distinction
   ========================================================================== */

/* ==========================================================================
   Custom Selection Color
   ========================================================================== */

::selection {
    background: rgba(45, 200, 210, 0.25);
    color: var(--njcic-dark);
}

::-moz-selection {
    background: rgba(45, 200, 210, 0.25);
    color: var(--njcic-dark);
}

/* ==========================================================================
   Refined Scrollbar Design
   ========================================================================== */

/* Webkit browsers */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(90deg, var(--color-gray-100) 0%, var(--color-gray-50) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-gray-300) 0%, var(--color-gray-400) 100%);
    border-radius: 5px;
    border: 2px solid var(--color-gray-50);
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--njcic-teal) 0%, var(--njcic-teal-dark) 100%);
}

::-webkit-scrollbar-corner {
    background: var(--color-gray-50);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-gray-300) var(--color-gray-100);
}

/* ==========================================================================
   Noise Texture Overlay
   ========================================================================== */

.noise-overlay {
    position: relative;
}

.noise-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--noise-texture);
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
}

/* ==========================================================================
   Background Textures and Patterns
   ========================================================================== */

/* Refined dot pattern */
.dot-pattern {
    background-image: radial-gradient(circle at center, rgba(45, 200, 210, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Isometric grid pattern */
.isometric-grid {
    background-image:
        linear-gradient(30deg, rgba(45, 200, 210, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(45, 200, 210, 0.03) 87.5%, rgba(45, 200, 210, 0.03)),
        linear-gradient(150deg, rgba(45, 200, 210, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(45, 200, 210, 0.03) 87.5%, rgba(45, 200, 210, 0.03)),
        linear-gradient(30deg, rgba(45, 200, 210, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(45, 200, 210, 0.03) 87.5%, rgba(45, 200, 210, 0.03)),
        linear-gradient(150deg, rgba(45, 200, 210, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(45, 200, 210, 0.03) 87.5%, rgba(45, 200, 210, 0.03)),
        linear-gradient(60deg, rgba(243, 66, 19, 0.02) 25%, transparent 25.5%, transparent 75%, rgba(243, 66, 19, 0.02) 75%, rgba(243, 66, 19, 0.02)),
        linear-gradient(60deg, rgba(243, 66, 19, 0.02) 25%, transparent 25.5%, transparent 75%, rgba(243, 66, 19, 0.02) 75%, rgba(243, 66, 19, 0.02));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}

/* Gradient mesh effect for hero sections */
.gradient-mesh {
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(45, 200, 210, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(243, 66, 19, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 40% 60% at 60% 80%, rgba(45, 200, 210, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 10% 90%, rgba(243, 66, 19, 0.06) 0%, transparent 50%);
}

/* Subtle topographic lines */
.topo-lines {
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 50px,
            rgba(45, 200, 210, 0.02) 50px,
            rgba(45, 200, 210, 0.02) 51px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 50px,
            rgba(45, 200, 210, 0.02) 50px,
            rgba(45, 200, 210, 0.02) 51px
        );
}

/* ==========================================================================
   Section Dividers with Character
   ========================================================================== */

/* Wave divider */
.divider-wave {
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23f8fafc'/%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
    margin-top: -1px;
}

/* Diamond divider */
.divider-diamond {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
}

.divider-diamond::before,
.divider-diamond::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gray-200) 20%, var(--color-gray-200) 80%, transparent);
}

.divider-diamond span {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--njcic-teal), var(--njcic-orange));
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* Editorial rule divider */
.divider-editorial {
    position: relative;
    height: 3px;
    margin: 2.5rem 0;
    background: linear-gradient(90deg,
        var(--njcic-teal) 0%,
        var(--njcic-teal) 30%,
        transparent 30%,
        transparent 32%,
        var(--njcic-orange) 32%,
        var(--njcic-orange) 35%,
        transparent 35%
    );
}

/* Bracket divider - editorial style */
.divider-bracket {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2.5rem 0;
    color: var(--color-gray-400);
    font-size: 1.25rem;
}

.divider-bracket::before {
    content: '[';
    color: var(--njcic-teal);
}

.divider-bracket::after {
    content: ']';
    color: var(--njcic-orange);
}

/* ==========================================================================
   Decorative Geometric Elements
   ========================================================================== */

/* Corner accent - top left */
.corner-accent-tl {
    position: relative;
}

.corner-accent-tl::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    border-top: 3px solid var(--njcic-teal);
    border-left: 3px solid var(--njcic-teal);
    opacity: 0.5;
    pointer-events: none;
}

/* Corner accent - bottom right */
.corner-accent-br {
    position: relative;
}

.corner-accent-br::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-bottom: 3px solid var(--njcic-orange);
    border-right: 3px solid var(--njcic-orange);
    opacity: 0.5;
    pointer-events: none;
}

/* Frame accent - all corners */
.frame-accent {
    position: relative;
}

.frame-accent::before,
.frame-accent::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
}

.frame-accent::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--njcic-teal);
    border-left: 2px solid var(--njcic-teal);
}

.frame-accent::after {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid var(--njcic-orange);
    border-right: 2px solid var(--njcic-orange);
}

/* Floating geometric shapes - decorative background */
.geo-shapes {
    position: relative;
    overflow: hidden;
}

.geo-shapes::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -50px;
    width: 200px;
    height: 200px;
    border: 2px solid rgba(45, 200, 210, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.geo-shapes::after {
    content: '';
    position: absolute;
    bottom: 15%;
    left: -30px;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(243, 66, 19, 0.08);
    transform: rotate(45deg);
    pointer-events: none;
}

/* ==========================================================================
   Glass Morphism Refinements
   ========================================================================== */

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 4px 24px -4px rgba(24, 54, 66, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.glass-panel-dark {
    background: rgba(24, 54, 66, 0.75);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(45, 200, 210, 0.15);
    box-shadow:
        0 4px 24px -4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Frosted card with top highlight */
.frosted-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-gray-200);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.frosted-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.8) 20%,
        rgba(255, 255, 255, 0.8) 80%,
        transparent
    );
}

/* ==========================================================================
   Link Underline Effects
   ========================================================================== */

/* Animated underline on hover */
.link-underline {
    position: relative;
    text-decoration: none;
    color: var(--njcic-teal-dark);
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--njcic-teal), var(--njcic-orange));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--ease-out-expo);
}

.link-underline:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Gradient text link */
.link-gradient {
    background: linear-gradient(90deg, var(--njcic-teal-dark), var(--njcic-orange-dark));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    font-weight: 600;
}

.link-gradient:hover {
    background: linear-gradient(90deg, var(--njcic-orange-dark), var(--njcic-teal-dark));
    background-clip: text;
    -webkit-background-clip: text;
}

/* ==========================================================================
   Card Gradient Overlays
   ========================================================================== */

/* Subtle teal gradient overlay */
.card-gradient-teal {
    position: relative;
    overflow: hidden;
}

.card-gradient-teal::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(45, 200, 210, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

/* Subtle orange gradient overlay */
.card-gradient-orange {
    position: relative;
    overflow: hidden;
}

.card-gradient-orange::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(243, 66, 19, 0.03) 100%);
    pointer-events: none;
}

/* Diagonal stripe accent */
.card-stripe-accent {
    position: relative;
    overflow: hidden;
}

.card-stripe-accent::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(45, 200, 210, 0.05) 50%);
    pointer-events: none;
}

/* ==========================================================================
   Color-coded Section Backgrounds
   ========================================================================== */

/* Section with flowing teal accent */
.section-teal-flow {
    background:
        linear-gradient(180deg, var(--color-gray-50) 0%, rgba(232, 249, 250, 0.5) 50%, var(--color-gray-50) 100%),
        linear-gradient(90deg, transparent 0%, rgba(45, 200, 210, 0.03) 50%, transparent 100%);
}

/* Section with flowing orange accent */
.section-orange-flow {
    background:
        linear-gradient(180deg, var(--color-gray-50) 0%, rgba(255, 245, 243, 0.5) 50%, var(--color-gray-50) 100%),
        linear-gradient(90deg, transparent 0%, rgba(243, 66, 19, 0.02) 50%, transparent 100%);
}

/* Section with dual accent */
.section-dual-flow {
    background:
        radial-gradient(ellipse 100% 100% at 0% 0%, rgba(45, 200, 210, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 100% 100% at 100% 100%, rgba(243, 66, 19, 0.03) 0%, transparent 50%),
        var(--color-gray-50);
}

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

.hero-enhanced {
    position: relative;
    overflow: hidden;
}

/* Animated gradient orbs in background */
.hero-enhanced::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(45, 200, 210, 0.15) 0%, transparent 70%);
    animation: float-slow 20s ease-in-out infinite;
    pointer-events: none;
}

.hero-enhanced::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(243, 66, 19, 0.1) 0%, transparent 70%);
    animation: float-slow 25s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes float-slow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -20px) scale(1.05);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* ==========================================================================
   Data Visualization Accents
   ========================================================================== */

/* Stat highlight bar */
.stat-bar {
    height: 4px;
    background: var(--color-gray-200);
    border-radius: 2px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--njcic-teal), var(--njcic-teal-dark));
    border-radius: 2px;
    transition: width 1s var(--ease-out-expo);
}

/* Percentage ring background */
.ring-bg {
    stroke: var(--color-gray-200);
    fill: none;
}

.ring-fill {
    stroke: url(#gradient-teal-orange);
    fill: none;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s var(--ease-out-expo);
}

/* ==========================================================================
   Interactive State Enhancements
   ========================================================================== */

/* Hover lift with colored shadow */
.hover-lift-teal {
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}

.hover-lift-teal:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-teal);
}

.hover-lift-orange {
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}

.hover-lift-orange:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-orange);
}

/* Glow effect on focus/hover */
.glow-teal:focus,
.glow-teal:hover {
    box-shadow: var(--shadow-glow-teal);
}

.glow-orange:focus,
.glow-orange:hover {
    box-shadow: var(--shadow-glow-orange);
}

/* ==========================================================================
   Print Styles - Clean output
   ========================================================================== */

@media print {
    .noise-overlay::before,
    .hero-enhanced::before,
    .hero-enhanced::after,
    .geo-shapes::before,
    .geo-shapes::after,
    .corner-accent-tl::before,
    .corner-accent-br::after {
        display: none;
    }

    .glass-panel,
    .glass-panel-dark,
    .frosted-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ==========================================================================
   Motion Design System
   Distinctive animations and micro-interactions for premium feel
   ========================================================================== */

/* --------------------------------------------------------------------------
   Page Load Orchestration
   -------------------------------------------------------------------------- */

/* Hero content staggered entrance */
.hero-content {
    opacity: 0;
    animation: heroFadeIn 0.8s var(--ease-out-expo) forwards;
}

.hero-content .hero-badge {
    opacity: 0;
    animation: fadeSlideDown 0.6s var(--ease-out-expo) 0.1s forwards;
}

.hero-content h1 {
    opacity: 0;
    animation: fadeSlideUp 0.7s var(--ease-out-expo) 0.2s forwards;
}

.hero-content > p {
    opacity: 0;
    animation: fadeSlideUp 0.7s var(--ease-out-expo) 0.35s forwards;
}

@keyframes heroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Enhanced metric card cascade - smoother with expo ease */
.metric-card {
    animation: metricCardEnter 0.6s var(--ease-out-expo) forwards;
}

@keyframes metricCardEnter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.metric-card:nth-child(1) { animation-delay: 0.15s; }
.metric-card:nth-child(2) { animation-delay: 0.25s; }
.metric-card:nth-child(3) { animation-delay: 0.35s; }
.metric-card:nth-child(4) { animation-delay: 0.45s; }

/* Section reveal animations - for use with IntersectionObserver */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease-out-expo),
                transform 0.7s var(--ease-out-expo);
}

.section-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section heading reveal with accent bar animation */
.section-heading-animated {
    position: relative;
    padding-left: 1rem;
}

.section-heading-animated::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--color-primary-light) 0%, var(--color-accent) 100%);
    border-radius: 2px;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s var(--ease-out-expo);
}

.section-heading-animated.is-visible::before {
    transform: scaleY(1);
}

/* --------------------------------------------------------------------------
   Navigation Micro-interactions
   -------------------------------------------------------------------------- */

/* Sliding underline on hover - left to right */
.nav-link-animated {
    position: relative;
    overflow: hidden;
}

.nav-link-animated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--njcic-teal), var(--njcic-orange));
    transform: translateX(-100%);
    transition: transform var(--transition-base) var(--ease-out-expo);
}

.nav-link-animated:hover::after {
    transform: translateX(0);
}

/* Nav scroll state - enhanced shadow */
#main-nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Mobile menu slide animation - smoother */
#mobile-menu {
    background: var(--njcic-dark);
}

#mobile-menu.hidden {
    display: block !important;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height var(--transition-slow) var(--ease-in-out-cubic),
                opacity var(--transition-base) ease,
                visibility 0s linear var(--transition-slow);
}

#mobile-menu:not(.hidden) {
    display: block !important;
    max-height: 300px;
    opacity: 1;
    visibility: visible;
    transition: max-height var(--transition-slow) var(--ease-out-expo),
                opacity var(--transition-base) ease,
                visibility 0s linear 0s;
}

/* --------------------------------------------------------------------------
   Card Micro-interactions
   -------------------------------------------------------------------------- */

/* Enhanced card hover with shadow growth and subtle glow */
.modern-card,
.chart-card {
    transition: transform var(--transition-base) var(--ease-out-expo),
                box-shadow var(--transition-base) var(--ease-out-expo),
                border-color var(--transition-base) ease;
}

.modern-card:hover,
.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* Grantee card enhanced interaction */
.grantee-card {
    transition: transform var(--transition-base) var(--ease-spring),
                box-shadow var(--transition-base) var(--ease-out-expo),
                border-color var(--transition-fast) ease;
}

.grantee-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 0 0 3px rgba(45, 200, 210, 0.12),
                var(--shadow-xl);
}

/* Card border glow effect on hover */
.grantee-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(45, 200, 210, 0.3), rgba(243, 66, 19, 0.2));
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-base) ease;
}

.grantee-card:hover::after {
    opacity: 1;
}

/* Metric card icon bounce on hover */
.metric-card .p-2 {
    transition: transform var(--transition-base) var(--ease-out-back);
}

.metric-card:hover .p-2 {
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   Button Interactions
   -------------------------------------------------------------------------- */

.btn {
    transition: transform var(--transition-fast) var(--ease-out-back),
                box-shadow var(--transition-fast) var(--ease-out-expo),
                background var(--transition-fast) ease,
                border-color var(--transition-fast) ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0) scale(0.98);
    transition-duration: 50ms;
}

/* Platform button press feedback */
.platform-btn {
    transition: all var(--transition-fast) var(--ease-out-expo);
}

.platform-btn:active {
    transform: scale(0.95);
}

.platform-btn.active {
    animation: buttonActivate 0.3s var(--ease-out-back);
}

@keyframes buttonActivate {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* --------------------------------------------------------------------------
   Table Row Interactions
   -------------------------------------------------------------------------- */

/* Highlight sweep effect on table rows */
#rankings-table tbody tr {
    position: relative;
    transition: background var(--transition-fast) ease;
}

#rankings-table tbody tr::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(45, 200, 210, 0.08) 0%,
        rgba(45, 200, 210, 0.03) 50%,
        transparent 100%);
    opacity: 0;
    transform: translateX(-100%);
    transition: transform var(--transition-slow) var(--ease-out-expo),
                opacity var(--transition-fast) ease;
    pointer-events: none;
}

#rankings-table tbody tr:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Sortable column header interaction */
#rankings-table th[data-sort] {
    cursor: pointer;
    transition: background var(--transition-fast) ease,
                color var(--transition-fast) ease;
    user-select: none;
}

#rankings-table th[data-sort]:hover {
    background: rgba(45, 200, 210, 0.08);
    color: var(--color-primary);
}

#rankings-table th[data-sort]:active {
    background: rgba(45, 200, 210, 0.12);
}

/* Sort indicator animation */
#rankings-table th[data-sort] .sort-icon {
    display: inline-block;
    margin-left: 0.375rem;
    opacity: 0;
    transition: opacity var(--transition-fast) ease,
                transform var(--transition-fast) var(--ease-out-expo);
}

#rankings-table th[data-sort]:hover .sort-icon {
    opacity: 0.4;
}

#rankings-table th[data-sort].sorted-asc .sort-icon,
#rankings-table th[data-sort].sorted-desc .sort-icon {
    opacity: 1;
}

#rankings-table th[data-sort].sorted-asc .sort-icon {
    transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Live Indicator - Refined Professional Pulse
   -------------------------------------------------------------------------- */

.live-indicator {
    position: relative;
}

.live-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--njcic-teal-dark);
    border-radius: 50%;
    position: relative;
    animation: livePulse 2.5s var(--ease-in-out-cubic) infinite;
}

.live-indicator::after {
    content: '';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--njcic-teal-dark);
    border-radius: 50%;
    animation: liveRing 2.5s var(--ease-out-expo) infinite;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.9);
    }
}

@keyframes liveRing {
    0% {
        transform: translateY(-50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translateY(-50%) scale(2.2);
        opacity: 0;
    }
}

/* --------------------------------------------------------------------------
   Progress Bar Animations
   -------------------------------------------------------------------------- */

.progress-bar {
    background: var(--color-gray-200);
    border-radius: 4px;
    overflow: hidden;
    height: 6px;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--njcic-teal-dark), var(--njcic-teal));
    border-radius: 4px;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1s var(--ease-out-expo);
    position: relative;
}

.progress-bar-fill.animate {
    transform: scaleX(var(--progress, 0));
}

/* Shimmer effect on progress bars */
.progress-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: progressShimmer 2s ease-in-out infinite;
}

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

/* --------------------------------------------------------------------------
   Counter Number Animation Enhancement
   -------------------------------------------------------------------------- */

.counter.counting {
    animation: counterPulse 0.1s ease-out;
}

@keyframes counterPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Tabular figures for steady counter animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Search Input Focus Animation
   -------------------------------------------------------------------------- */

#grantee-search {
    transition: all var(--transition-base) var(--ease-out-expo);
}

#grantee-search:focus {
    width: 14rem;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--njcic-teal);
    box-shadow: 0 0 0 3px rgba(45, 200, 210, 0.15);
}

@media (max-width: 640px) {
    #grantee-search:focus {
        width: 10rem;
    }
}

/* --------------------------------------------------------------------------
   Hero Background Parallax Elements
   -------------------------------------------------------------------------- */

.hero-pattern .parallax-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    will-change: transform;
}

.parallax-orb-teal {
    width: 400px;
    height: 400px;
    background: rgba(45, 200, 210, 0.15);
    top: -100px;
    right: -100px;
    animation: orbFloat 20s ease-in-out infinite;
}

.parallax-orb-orange {
    width: 300px;
    height: 300px;
    background: rgba(243, 66, 19, 0.1);
    bottom: -50px;
    left: -50px;
    animation: orbFloat 25s ease-in-out infinite reverse;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-15px, 20px) scale(0.95);
    }
    75% {
        transform: translate(25px, 10px) scale(1.02);
    }
}

/* --------------------------------------------------------------------------
   Chart Card Entry Animation
   -------------------------------------------------------------------------- */

.chart-card {
    opacity: 0;
    animation: chartCardEnter 0.6s var(--ease-out-expo) forwards;
}

.chart-card:nth-child(1) { animation-delay: 0.1s; }
.chart-card:nth-child(2) { animation-delay: 0.2s; }
.chart-card:nth-child(3) { animation-delay: 0.3s; }

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

/* --------------------------------------------------------------------------
   Filter/Dropdown Transitions
   -------------------------------------------------------------------------- */

select {
    transition: border-color var(--transition-fast) ease,
                box-shadow var(--transition-fast) ease;
}

select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(14, 124, 134, 0.1);
}

/* --------------------------------------------------------------------------
   Loading State Transitions
   -------------------------------------------------------------------------- */

#loading-overlay {
    transition: opacity var(--transition-slow) var(--ease-in-out-cubic);
}

#main-content {
    transition: opacity 0.8s var(--ease-out-expo);
}

/* --------------------------------------------------------------------------
   Scroll-triggered Section Animations
   -------------------------------------------------------------------------- */

/* For use with IntersectionObserver in JS */
.fade-in-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease-out-expo),
                transform 0.6s var(--ease-out-expo);
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s var(--ease-out-expo),
                transform 0.5s var(--ease-out-expo);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.4s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Tooltip Animations
   -------------------------------------------------------------------------- */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 0.5rem 0.75rem;
    background: var(--njcic-dark);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast) ease,
                transform var(--transition-fast) var(--ease-out-expo);
    pointer-events: none;
    z-index: 50;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

/* --------------------------------------------------------------------------
   Focus Ring Animation
   -------------------------------------------------------------------------- */

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-white),
                0 0 0 4px var(--njcic-teal);
    transition: box-shadow var(--transition-fast) var(--ease-out-expo);
}

/* --------------------------------------------------------------------------
   Reduced Motion Support
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-content,
    .hero-content .hero-badge,
    .hero-content h1,
    .hero-content > p,
    .metric-card,
    .grantee-card,
    .chart-card,
    .section-reveal,
    .fade-in-section,
    .stagger-children > * {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .live-indicator::before,
    .live-indicator::after {
        animation: none !important;
    }

    .parallax-orb-teal,
    .parallax-orb-orange,
    .hero-enhanced::before,
    .hero-enhanced::after {
        animation: none !important;
    }

    .progress-bar-fill::after {
        animation: none !important;
    }
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS - Component Scaling
   ========================================================================== */

/* Tablet & below */
@media (max-width: 768px) {
    /* Metric cards - smaller numbers, maintain impact */
    .metric-card .counter,
    .metric-card .metric-number,
    .metric-card .text-3xl,
    .metric-card .text-4xl {
        font-size: 2.75rem !important;
    }

    .metric-card {
        padding: 1.5rem 1.25rem 1.25rem 1.5rem;
    }

    .metric-card::before {
        width: 4px;
        top: 1rem;
        height: calc(100% - 2rem);
    }

    /* Grantee cards */
    .grantee-card:hover {
        transform: translateY(-4px);
    }

    /* Rankings table */
    .rankings-table-container {
        border-radius: 16px;
    }

    #rankings-table th {
        padding: 0.875rem 0.75rem;
        font-size: 0.625rem;
    }

    #rankings-table td {
        padding: 0.875rem 0.75rem;
    }

    /* Buttons */
    .btn {
        padding: 0.625rem 1.25rem;
    }

    /* Leaderboard badges */
    .leaderboard-rank {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    /* Filter tabs */
    .filter-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

/* Mobile */
@media (max-width: 640px) {
    /* Metric cards - compact but still impactful */
    .metric-card .counter,
    .metric-card .metric-number,
    .metric-card .text-3xl,
    .metric-card .text-4xl {
        font-size: 2.25rem !important;
    }

    .metric-card {
        padding: 1.25rem 1rem 1rem 1.25rem;
        border-radius: 16px;
    }

    .metric-card .text-gray-200,
    .metric-card .text-sm {
        font-size: 0.75rem;
        letter-spacing: 0.03em;
    }

    .metric-card::after {
        width: 80px;
        height: 80px;
        top: -35px;
        right: -35px;
    }

    /* Grantee cards - smaller lift */
    .grantee-card:hover {
        transform: translateY(-3px);
    }

    .grantee-card::before {
        height: 3px;
    }

    /* Rankings table - tighter spacing */
    .rankings-table-container {
        border-radius: 12px;
    }

    #rankings-table th {
        padding: 0.75rem 0.5rem;
        font-size: 0.5625rem;
        letter-spacing: 0.06em;
    }

    #rankings-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }

    #rankings-table tbody tr:hover {
        transform: none;
    }

    /* Leaderboard badges - smaller */
    .leaderboard-rank {
        width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
        border-radius: 8px;
    }

    .leaderboard-rank.gold,
    .leaderboard-rank.silver,
    .leaderboard-rank.bronze {
        box-shadow:
            0 3px 12px rgba(0, 0, 0, 0.25),
            inset 0 1px 3px rgba(255, 255, 255, 0.4);
    }

    /* Buttons - more compact */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
        border-radius: 10px;
    }

    .btn svg {
        width: 1rem;
        height: 1rem;
    }

    /* Platform badges - smaller */
    .badge-platform {
        padding: 0.25rem 0.5rem;
        font-size: 0.5625rem;
        border-radius: 6px;
        letter-spacing: 0.02em;
    }

    .badge-tiktok {
        box-shadow:
            inset -2px 0 0 #00f2ea,
            inset 2px 0 0 #ff0050;
    }

    /* Filter controls */
    .filter-tab {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        border-radius: 8px;
    }

    select.appearance-none,
    .filter-select,
    .comparison-select {
        padding: 0.625rem 2.25rem 0.625rem 0.875rem;
        font-size: 0.8125rem;
        border-radius: 8px;
    }

    /* Chart cards */
    .chart-card {
        padding: 1.25rem;
        border-radius: 14px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .metric-card .counter,
    .metric-card .metric-number,
    .metric-card .text-3xl,
    .metric-card .text-4xl {
        font-size: 2rem !important;
    }

    .metric-card::before {
        width: 3px;
    }

    .leaderboard-rank {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.75rem;
        border-radius: 6px;
    }

    .badge-platform {
        padding: 0.1875rem 0.375rem;
        font-size: 0.5rem;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    /* Remove decorative elements */
    .metric-card::before,
    .metric-card::after,
    .grantee-card::before,
    .grantee-card::after,
    .chart-card::before,
    .btn::before {
        display: none !important;
    }

    /* Remove shadows */
    * {
        box-shadow: none !important;
    }

    /* Ensure text is black */
    .metric-card .counter,
    .metric-card .metric-number {
        -webkit-text-fill-color: #000 !important;
        color: #000 !important;
    }

    /* Solid backgrounds for badges */
    .badge-tiktok {
        background: #1a1a1a !important;
        box-shadow: none !important;
    }

    .badge-instagram {
        background: #d62976 !important;
    }

    /* Leaderboard ranks - solid colors */
    .leaderboard-rank.gold {
        background: #ffd700 !important;
    }

    .leaderboard-rank.silver {
        background: #c0c0c0 !important;
    }

    .leaderboard-rank.bronze {
        background: #cd7f32 !important;
    }
}
