﻿/* Base Variables and Reset */
:root {
    /* Light Theme Variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --table-header-bg: #f8fafc;
    --table-hover-bg: #f1f5f9;
    --buy-color: #22c55e;
    --sell-color: #ef4444;
    --chart-bg: #ffffff;
    --popover-bg: #ffffff;
    --hero-bg: rgb(239 246 255 / 0.5);
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --dark-bg: #121212;
    --dark-card: #2a2a2a;
    --border-radius: 12px;
    --box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    --section-spacing: 2rem;
    --card-spacing: 1.5rem;
    --hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    --bg-blue-light: rgb(239 246 255);
    --homepage-hero-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --homepage-feature-bg: #ffffff;
    --homepage-feature-shadow: 0 8px 16px rgba(0,0,0,0.05);
    --homepage-text-dark: #0f172a;
    --homepage-text-light: #334155;
    --homepage-accent: #0050e6;
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --border-color: #374151;
    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --card-bg: #1f2937;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --table-header-bg: #111827;
    --table-hover-bg: #374151;
    --buy-color: #4ade80;
    --sell-color: #f87171;
    --chart-bg: #1f2937;
    --popover-bg: #1f2937;
    --hero-bg: rgba(15, 23, 42, 0.8);
    --homepage-hero-bg: linear-gradient(135deg, #0a0f1e 0%, #111827 100%);
    --homepage-feature-bg: #1f2937;
    --homepage-feature-shadow: 0 8px 16px rgba(0,0,0,0.2);
    --homepage-text-dark: #e2e8f0;
    --homepage-text-light: #94a3b8;
    --homepage-accent: #3b82f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary); /* Ensure body uses theme background */
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth theme transitions */
}

/* Add specific styling for homepage showcase container */
#homepage-showcase-container {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-primary); /* Ensure homepage container uses theme background */
    min-height: 100vh; /* Ensure it covers full viewport height */
}

/* Layout Container */
.container.mt-4 {
    padding: 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    margin-top: 0.5rem !important;
}

/* Show container only when search-active class is present */
.search-active .container.mt-4 {
    display: block;
    margin-top: 0;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    width: 100%;
}

/* Hero background */
.hero-background {
    position: fixed;
    inset: 0;
    background: var(--hero-bg);
    z-index: 0;
}

/* Ensure the canvas fills the entire page */
.hero-background canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

/* Container for search results */
.container.mt-4 {
    position: relative;
    z-index: 1;
    max-width: 72rem;
    margin: 2rem auto 0;  /* Changed from -2rem to 2rem to add space */
    padding: 0 2rem;
    background: transparent;
}

/* Remove any background patterns from the results section */
.breadcrumb,
.company-info,
.transactions-header {
    position: relative;
    z-index: 2;
    background: transparent;
}

/* Adjust hero content when search is active */
.search-active .hero-section {
    min-height: auto;
    padding-bottom: 0.5rem;
}

/* Hero content adjustments */
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.hero-text {
    margin-bottom: 0;
}

.hero-text h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #1a202c;
}

.hero-text .highlight {
    color: #2563eb;
}

.hero-text p {
    font-size: 1.125rem;
    color: #4B5563;
    margin-bottom: 1.5rem;
}

/* Header container with inline search */
.header-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 72rem;
    margin: 0 auto 1.5rem;
    padding: 0 1rem;
}

.header-container h1 {
    margin: 0;
    white-space: nowrap;
    font-size: 2.5rem;
    font-weight: 700;
}

.header-container .highlight {
    color: #2563eb;
}

/* Search section adjustments */
.search-wrapper {
    flex: 1;
    max-width: 600px;
    margin: 0;
}

.search-container {
    position: relative;
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-container button {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Description text */
.hero-content p {
    text-align: center;
    max-width: 48rem;
    margin: 1rem auto;
    font-size: 1.125rem;
    color: #4B5563;
}

/* New Styles for Search Suggestions */
#suggestions {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    display: none;
}

.dropdown-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary);
}

/* Updated section headers to match the Insider Share Ownership Breakdown style exactly */
.section-header, .transactions-header {
    background: #3478F6;  /* Solid color to match the screenshot */
    color: white;
    padding: 12px 16px;  /* Changed from 1rem to match simple-header height */
    border-radius: 12px;  /* Rounded on all sides */
    margin-bottom: 2rem;  /* Add space between cards */
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Style the table header to connect with the section header */
.transactions-table thead {
    background: #3478F6;  /* Match exact color */
    color: white;
}

.transactions-table thead th {
    border: none;
    padding: 1rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Add border radius to the bottom of the table */
.transactions-table {
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.1);
}

/* Keep the bubble effect */
.section-header::before,
.section-header::after,
.transactions-header::before,
.transactions-header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.section-header::before,
.transactions-header::before {
    width: 150px;
    height: 150px;
    right: -75px;
    top: -75px;
}

.section-header::after,
.transactions-header::after {
    width: 150px;
    height: 150px;
    left: -75px;
    bottom: -75px;
}

/* Add h2 styling to match */
.section-header h2,
.transactions-header h2 {
    margin: 0;
    font-size: 1.5rem; /* Adjusted font size to match the image */
    font-weight: 600;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dark mode support */
[data-theme="dark"] .section-header,
[data-theme="dark"] .transactions-header {
    background: linear-gradient(45deg, #1565c0, #0d47a1);
    box-shadow: 0 4px 15px rgba(21, 101, 192, 0.3);
}

/* Insider Cards Container */
.insider-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 1.5rem;
    position: relative;
}

/* Insider Card Base Styles */
.insider-card {
    display: flex;
    justify-content: space-between;
    padding: 1.25rem;
    margin: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    grid-row: auto;
    grid-column: auto;
}

.insider-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Expanded state for insider card */
.insider-card.expanded {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    margin-bottom: 1.5rem;
    background-color: rgb(239 246 255);
    border-color: rgb(59 130 246 / 0.3);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    z-index: 2;
    order: 0;
}

/* Force all cards after an expanded card to move to the next row */
.insider-card.expanded ~ .insider-card {
    grid-row: auto !important;
    grid-column: auto;
}

/* Container for expanded card and its transactions */
.expanded-content {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Recent Transactions Header */
.recent-transactions-header {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
    margin-bottom: 0;
    padding: 12px 16px;  /* Add consistent padding to match other headers */
}

/* Transaction table styles */
.transaction-table {
    grid-column: 1 / -1;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin: 0 0 1.5rem 0;
    z-index: 1;
}

/* Dark mode support */
[data-theme="dark"] .insider-card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .insider-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .insider-card.expanded {
    background-color: var(--bg-tertiary);
}

[data-theme="dark"] .transaction-table {
    background-color: var(--bg-secondary);
}

/* Insider Details Layout */
.insider-details-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.insider-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

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

.insider-details-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Share Ownership Details Popover Styles */
.popover {
    max-width: 250px !important; /* Limit width to prevent overflow */
    overflow: hidden !important; /* Prevent scrollbars inside the popover */
    position: absolute !important; /* Ensure absolute positioning */
    padding: 0 !important;
    border: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    background-color: var(--bg-primary) !important;
}

.popover-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    max-height: 200px; /* Limit height for very large content */
    overflow-y: auto; /* Allow vertical scrolling if needed */
    overflow-x: hidden; /* Prevent horizontal scrolling */
    padding: 0 !important;
}

.share-ownership-details {
    width: 100%;
}

.share-ownership-header {
    background: var(--accent-color);
    padding: 16px 20px;
    color: white;
    border-radius: 12px 12px 0 0;
}

.share-ownership-header h3 {
    font-weight: 500;
    margin-bottom: 4px;
}

.header-details {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.owner-name {
    font-size: 14px;
    opacity: 0.9;
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
}

.total-shares {
    font-size: 20px;
    font-weight: 600;
    color: white;
}

.share-details-content {
    padding: 20px;
}

.share-section {
    margin-bottom: 16px;
}

.share-detail-item {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

.progress-container {
    width: 100%;
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.percent-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Dark mode support */
[data-theme="dark"] .popover {
    background-color: #2c3546;
    border-color: #3a4456;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .popover-header {
    background-color: #1c2333;
    color: #ffffff;
    border-bottom-color: #3a4456;
}

[data-theme="dark"] .popover-body {
    color: #e0e0e0;
}

/* Ensure the popover arrow matches the background */
[data-theme="dark"] .popover .popover-arrow::before,
[data-theme="dark"] .popover .popover-arrow::after {
    border-right-color: #2c3546;
}

[data-theme="dark"] .popover[data-popper-placement^="left"] .popover-arrow::before,
[data-theme="dark"] .popover[data-popper-placement^="left"] .popover-arrow::after {
    border-left-color: #2c3546;
}

/* Reset z-index for popovers to ensure they appear above other elements */
.popover {
    z-index: 1060 !important;
}

/* Ensure footnote icon has proper hover state */
.footnote-icon {
    cursor: pointer;
    transition: color 0.2s ease;
}

.footnote-icon:hover {
    color: #007bff;
}

[data-theme="dark"] .footnote-icon:hover {
    color: #4dabf7;
}

/* Hover trigger styles */
.shares-info {
    cursor: pointer;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.shares-info:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

[data-theme="dark"] .shares-info:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

/* Animation for popover */
@keyframes fadeInPopover {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popover.show {
    animation: fadeInPopover 0.2s ease-out forwards;
}

/* Shares and Company Percentage Display */
.insider-shares-owned,
.insider-percent-owned {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.insider-shares-owned span:first-child,
.insider-percent-owned span:first-child {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insider-shares-owned span:last-child,
.insider-percent-owned span:last-child {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0066ff;
    background-color: #f0f7ff;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

/* Add hover effect for clickable shares info */
.shares-info {
    cursor: pointer;
    transition: all 0.2s ease;
}

.shares-info:hover {
    background-color: var(--bg-tertiary);
}

/* Dark mode support */
[data-theme="dark"] .shares-info:hover {
    background-color: var(--bg-tertiary);
}

/* Dark Mode Support */
[data-theme="dark"] .insider-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

[data-theme="dark"] .insider-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .insider-name {
    color: var(--text-primary);
}

[data-theme="dark"] .insider-title {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .insider-container {
        grid-template-columns: 1fr;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .features-list {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .feature-item {
        justify-content: center;
    }
}

/* Transaction Table Styles */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-top: 8px;  /* Reduced from original value for consistency */
    overflow: hidden;
}

/* Make simple-header connect seamlessly with table */
.table-container .simple-header {
    border-bottom: 1px solid #e5e7eb;  /* Ensure there's a visible separator line */
    margin-bottom: 0;  /* No gap below header */
    padding: 12px 16px;  /* Explicitly match the main simple-header padding */
    padding-left: 20px;  /* Match the main simple-header left padding */
}

/* Ensure table-responsive connects to header */
.table-container .table-responsive {
    margin-top: 0;  /* No gap above table */
    border-radius: 0;  /* Remove border radius since it's inside container */
}

/* For tables directly in table-container (without table-responsive wrapper) */
.table-container .table {
    margin-top: 0;  /* No gap above table */
    margin-bottom: 0;  /* No gap below table */
}

/* Add spacing when insider card is expanded */
.insider-card.expanded + .transaction-table {
    margin-top: 24px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-bottom: 20px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.table thead th {
    background-color: var(--table-header-bg);
    color: var(--text-secondary);
    padding: 15px 10px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--table-hover-bg);
}

/* Transaction type badges */
.transaction-buy {
    color: var(--buy-color);
    font-weight: 600;
}

.transaction-sell {
    color: var(--sell-color);
    font-weight: 600;
}

/* Dark mode support */
[data-theme="dark"] .table-container {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .table tbody tr,
[data-theme="dark"] .table tbody tr:nth-child(odd),
[data-theme="dark"] .table tbody tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

[data-theme="dark"] .table tbody tr:hover {
    background-color: var(--bg-tertiary);
}

/* Dark Mode Styles */
body[data-theme="dark"] {
    background-color: rgb(17 24 39);
    color: white;
}

[data-theme="dark"] .container.mt-4,
[data-theme="dark"] .insider-card,
[data-theme="dark"] .table-container {
    background-color: var(--bg-secondary);
    border-color: #444;
}

[data-theme="dark"] .insider-card.expanded {
    background-color: var(--bg-tertiary);
}

[data-theme="dark"] .insider-card:hover {
    background-color: var(--bg-tertiary);
}

[data-theme="dark"] .transactions-header::before,
[data-theme="dark"] .transactions-header::after {
    background-color: var(--border-color);
}

/* Add spacing between header and table */
#recent-transactions-table {
    margin-top: 0;  /* Remove the gap between header and table */
}

/* Add new styles for expanded state */
.insider-card.expanded {
    background-color: rgb(239 246 255); /* Light blue background */
    border-color: rgb(59 130 246 / 0.3); /* Subtle blue border */
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15); /* Enhanced shadow with blue tint */
}

/* Ensure the transaction table has proper spacing */
.transaction-table {
    position: relative;
    grid-column: 1 / -1;
    grid-row: auto;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin: 0 0 1.5rem 0;
    z-index: 1;
}

/* Dark mode support */
[data-theme="dark"] .transaction-table {
    background-color: var(--bg-secondary);
}

/* Dark mode adjustments */
[data-theme="dark"] .hero-background {
    background-color: var(--hero-bg);
}

.chart-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chart-type-selector {
    display: flex;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.chart-type-btn {
    padding: 0.375rem 0.75rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-type-btn:hover {
    background: #e5e7eb;
}

.chart-type-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Dark mode support */
[data-theme="dark"] .chart-type-btn {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .chart-type-btn:hover {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .chart-type-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-hover);
}

/* Update section header styling */
.section-header {
    background: #3478F6;
    color: white;
    padding: 12px 16px;  /* Changed from 1rem to match simple-header height */
    border-radius: 12px;  /* Rounded on all sides */
    margin-bottom: 2rem;  /* Add space between cards */
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Keep bubble effects */
.section-header::before,
.section-header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.section-header::before {
    width: 150px;
    height: 150px;
    right: -75px;
    top: -75px;
}

.section-header::after {
    width: 150px;
    height: 150px;
    left: -75px;
    bottom: -75px;
}

/* Style the transactions table header */
.table thead th {
    background: #3478F6;
    color: white;
    padding: 1rem;
    border: none;
    font-weight: 500;
}

/* Add border radius to the table */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Remove any margins that might be causing connection */
.table {
    margin: 0;
}

/* Most Recent Transactions header */
.transactions-header {
    background: #3478F6;
    color: white;
    padding: 12px 16px;  /* Changed from 1rem to match simple-header height */
    border-radius: 12px 12px 0 0;  /* Only round top corners */
    margin-bottom: 0;  /* Remove bottom margin */
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Table header styling */
.table thead th {
    background: #3478F6;
    color: white;
    padding: 1rem;
    border: none;
    font-weight: 500;
    margin-top: 0;  /* Remove top margin */
}

/* Remove any gaps between table elements */
.table {
    margin: 0;
    border-collapse: collapse;  /* This helps remove spacing */
}

.table-responsive {
    margin-top: 0;  /* Remove the negative margin that was covering the header line */
}

/* Keep the bubble effects */
.transactions-header::before,
.transactions-header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.transactions-header::before {
    width: 150px;
    height: 150px;
    right: -75px;
    top: -75px;
}

.transactions-header::after {
    width: 150px;
    height: 150px;
    left: -75px;
    bottom: -75px;
}

/* Hidden blue element that may be causing the issue */
.progress-bar::before,
.progress-bar::after {
    display: none !important;
}

/* SEC Filing Link Styles */
.sec-filing-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.sec-filing-link:hover {
    background-color: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.sec-filing-link i {
    font-size: 0.875rem;
    color: #3b82f6;
}

.sec-filing-link span {
    font-weight: 600;
}

/* Dark mode support */
[data-theme="dark"] .sec-filing-link {
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .sec-filing-link:hover {
    background-color: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.5);
}

[data-theme="dark"] .sec-filing-link i {
    color: #60a5fa;
}

/* Chart Popover Styles */
.chart-popover {
    position: absolute;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 250px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInPopover 0.2s ease forwards;
}

@keyframes fadeInPopover {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.insider-transaction-popover {
    position: absolute;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 280px;
    max-width: 320px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.shares-percent-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.progress-container {
    width: 100%;
    margin: 8px 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    border-radius: 4px;
    transition: width 0.3s ease;
    width: var(--progress-width, 0%);
}

.progress-fill[data-width] {
    width: attr(data-width percentage);
}

.progress-fill.buy {
    background-color: #22c55e;
}

.progress-fill.sell {
    background-color: #ef4444;
}

/* Make progress bars more visible in dark mode */
[data-theme="dark"] .progress-fill.buy {
    background-color: #4ade80; /* Brighter green */
}

[data-theme="dark"] .progress-fill.sell {
    background-color: #f87171; /* Brighter red */
}

.percent-text {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

[data-theme="dark"] .insider-transaction-popover {
    background: #1a202c; /* Darker background for better contrast */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); /* Stronger shadow for better visibility */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
}

[data-theme="dark"] .shares-percent-section {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .progress-bar {
    background-color: rgba(255, 255, 255, 0.15); /* Slightly brighter for better contrast */
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2); /* Add subtle inner shadow for definition */
}

[data-theme="dark"] .percent-text {
    color: #f3f4f6; /* Much brighter text for percentage text */
    font-weight: 600; /* Make it more visible */
}

.transaction-header {
    padding: 16px 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: white;
}

/* Add text shadow to header text in dark mode for better contrast on colored backgrounds */
[data-theme="dark"] .transaction-header .title,
[data-theme="dark"] .transaction-header .subtitle,
[data-theme="dark"] .transaction-header .date {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

[data-theme="dark"] .transaction-header .date {
    background-color: rgba(0, 0, 0, 0.25);
}

.transaction-header.buy {
    background: #26a69a;
}

.transaction-header.sell {
    background: #ef5350;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-content .title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.header-content .subtitle {
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.transaction-header .date {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.95;
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    margin-top: 4px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.transaction-badges {
    display: flex;
    gap: 8px;
    padding: 16px 20px 4px;
}

.transaction-type {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.transaction-type.buy {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.transaction-type.sell {
    background: rgba(255, 99, 132, 0.1);
    color: #e11d48;
}

.transaction-type.detail {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    text-transform: none;
    font-weight: 500;
}

/* Dark mode support */
[data-theme="dark"] .transaction-type.detail {
    background: rgba(156, 163, 175, 0.25); /* Stronger background */
    color: #f8fafc; /* Almost white text for maximum contrast */
    font-weight: 700; /* Extra bold for maximum visibility */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Add text shadow for better readability */
}

.transaction-details {
    padding: 12px 20px 20px;
}

/* Advanced Filters Styles */
.advanced-filters-container {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 12px;
}

.filter-count {
    display: none;
}

.active-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    padding: 0;
    background: transparent;
    border: none;
}

.filters-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    margin-bottom: 0;
    border-radius: 6px;
    background: #f3f4f6;
    transition: all 0.2s ease;
    position: relative;
}

.filters-header:hover {
    background: #e5e7eb;
}

.filters-header::after {
    content: '▼';
    font-size: 0.8em;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.filters-header.open::after {
    transform: rotate(180deg);
}

.filters-header i {
    color: #4b5563;
    margin-right: 2px;
    font-size: 14px;
}

.filters-header span {
    color: #111827;
    font-weight: 600;
    font-size: 14px;
}

/* Dark mode support for filters header */
[data-theme="dark"] .filters-header {
    background: #1f2937;
}

[data-theme="dark"] .filters-header:hover {
    background: #374151;
}

[data-theme="dark"] .filters-header i {
    color: #9ca3af;
}

[data-theme="dark"] .filters-header span {
    color: #f3f4f6;
}

/* Add a subtle pulsing animation to draw attention */
@keyframes subtle-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.filters-header:not(.open) {
    position: relative;
    transition: all 0.2s ease;
}

.filters-header:not(.open)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.05);
    pointer-events: none;
    transition: all 0.2s ease;
}

[data-theme="dark"] .filters-header:not(.open)::before {
    background: rgba(59, 130, 246, 0.1);
}

/* Add a subtle indicator that it's clickable */
.filters-header:not(.open)::before {
    content: 'Click to expand';
    position: absolute;
    right: 32px;
    font-size: 12px;
    color: #6b7280;
    opacity: 0.8;
}

[data-theme="dark"] .filters-header:not(.open)::before {
    color: #9ca3af;
}

/* Filters Grid Layout */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding-top: 20px;
    overflow: visible; /* Ensure dropdowns aren't cut off */
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible; /* Ensure dropdowns aren't cut off */
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Modern Dropdowns */
.modern-dropdown {
    position: relative;
    width: 100%;
}

.modern-dropdown select {
    display: none; /* Hide the native select */
}

.modern-dropdown-container {
    position: relative;
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
}

.modern-dropdown-selected {
    padding: 8px 12px;
    font-size: 14px;
    background: transparent;
}

.modern-dropdown-selected::after {
    content: '▼';
    font-size: 0.8em;
    margin-left: 8px;
}

.modern-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-top: 4px;
    max-height: 300px; /* Increased max-height for better visibility */
    overflow-y: auto;
    z-index: 10000; /* Significantly increased z-index to ensure it's above all other content */
    display: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); /* Enhanced shadow for better visibility */
}

/* Ensure the dropdown stays visible when open */
.modern-dropdown.open {
    position: relative;
    z-index: 9999; /* High z-index for the parent container when open */
    overflow: visible !important; /* Force overflow to be visible */
}

.modern-dropdown.open .modern-dropdown-options {
    display: block;
}

.modern-dropdown-option {
    padding: 8px 12px;
    color: #1e293b;
}

.modern-dropdown-option:hover {
    background: #f1f5f9;
}

.modern-dropdown-option.selected {
    background: #e0f2fe;
    color: #0369a1;
}

/* Dark mode support */
[data-theme="dark"] .modern-dropdown-container {
    background: #1e293b;
    border-color: #ffffff;
}

[data-theme="dark"] .modern-dropdown-selected {
    background: #1e293b;
    border-color: #ffffff;
    color: #e2e8f0;
}

[data-theme="dark"] .modern-dropdown-options {
    background: #1e293b;
    border-color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .modern-dropdown-option {
    color: #f1f5f9;
    background: transparent;
}

[data-theme="dark"] .modern-dropdown-option:hover {
    background: #334155;
    color: #ffffff;
}

[data-theme="dark"] .modern-dropdown-option.selected {
    background: #0c4a6e;
    color: #bae6fd;
}

/* Scrollbar styling */
.modern-dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.modern-dropdown-options::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.modern-dropdown-options::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.modern-dropdown-options::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Selected Filters Display */
.selected-filters {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;  /* Reduced padding */
    margin: 0 4px 4px 0;  /* Reduced margin */
    border-radius: 4px;  /* Slightly reduced border radius */
    font-size: 12px;  /* Smaller font size */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);  /* Subtle shadow for depth */
}

/* Color coordination for different filter types */
.filter-chip[data-type="period"] {
    background-color: rgba(147, 197, 253, 0.25);  /* Increased opacity for more prominence */
    color: #3b82f6;
}

.filter-chip[data-type="transaction"] {
    background-color: rgba(167, 139, 250, 0.25);
    color: #8b5cf6;
}

.filter-chip[data-type="transactionType"] {
    background-color: rgba(248, 113, 113, 0.25);
    color: #ef4444;
}

.filter-chip[data-type="insider"] {
    background-color: rgba(52, 211, 153, 0.25);
    color: #10b981;
}

.filter-chip[data-type="title"] {
    background-color: rgba(251, 146, 60, 0.25);
    color: #f97316;
}

.filter-chip[data-type="sharesPercent"],
.filter-chip[data-type="dollarAmount"],
.filter-chip[data-type="shares"] {
    background-color: rgba(99, 102, 241, 0.25);
    color: #6366f1;
}

/* Dark theme variants */
[data-theme="dark"] .filter-chip[data-type="period"] {
    background-color: rgba(147, 197, 253, 0.25);
    color: #93c5fd;
}

[data-theme="dark"] .filter-chip[data-type="transaction"] {
    background-color: rgba(167, 139, 250, 0.25);
    color: #a78bfa;
}

[data-theme="dark"] .filter-chip[data-type="transactionType"] {
    background-color: rgba(248, 113, 113, 0.25);
    color: #f87171;
}

[data-theme="dark"] .filter-chip[data-type="insider"] {
    background-color: rgba(52, 211, 153, 0.25);
    color: #34d399;
}

[data-theme="dark"] .filter-chip[data-type="title"] {
    background-color: rgba(251, 146, 60, 0.25);
    color: #fb923c;
}

[data-theme="dark"] .filter-chip[data-type="sharesPercent"],
[data-theme="dark"] .filter-chip[data-type="dollarAmount"],
[data-theme="dark"] .filter-chip[data-type="shares"] {
    background-color: rgba(99, 102, 241, 0.25);
    color: #818cf8;
}

/* Hover effects for both themes */
.filter-chip:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .filter-chip:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Remove chip icon styles */
.filter-chip .remove-chip {
    display: inline-flex;
    align-items: center;
    padding-left: 6px;
    color: currentColor;
    opacity: 0.7;
}

.filter-chip .remove-chip:hover {
    opacity: 1;
}

/* Color coordination for different filter types */
.filter-chip[data-type="period"] {
    background-color: rgba(147, 197, 253, 0.2);  /* Soft blue with slightly higher opacity */
    color: #3b82f6;
}

.filter-chip[data-type="transaction"] {
    background-color: rgba(167, 139, 250, 0.2);  /* Soft purple */
    color: #8b5cf6;
}

.filter-chip[data-type="transactionType"] {
    background-color: rgba(248, 113, 113, 0.2);  /* Soft red */
    color: #ef4444;
}

.filter-chip[data-type="insider"] {
    background-color: rgba(52, 211, 153, 0.2);  /* Soft green */
    color: #10b981;
}

.filter-chip[data-type="title"] {
    background-color: rgba(251, 146, 60, 0.2);  /* Soft orange */
    color: #f97316;
}

.filter-chip[data-type="sharesPercent"],
.filter-chip[data-type="dollarAmount"],
.filter-chip[data-type="shares"] {
    background-color: rgba(99, 102, 241, 0.2);  /* Soft indigo */
    color: #6366f1;
}

/* Dark theme variants */
[data-theme="dark"] .filter-chip[data-type="period"] {
    background-color: rgba(147, 197, 253, 0.2);
    color: #93c5fd;
}

[data-theme="dark"] .filter-chip[data-type="transaction"] {
    background-color: rgba(167, 139, 250, 0.2);
    color: #a78bfa;
}

[data-theme="dark"] .filter-chip[data-type="transactionType"] {
    background-color: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

[data-theme="dark"] .filter-chip[data-type="insider"] {
    background-color: rgba(52, 211, 153, 0.2);
    color: #34d399;
}

[data-theme="dark"] .filter-chip[data-type="title"] {
    background-color: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}

[data-theme="dark"] .filter-chip[data-type="sharesPercent"],
[data-theme="dark"] .filter-chip[data-type="dollarAmount"],
[data-theme="dark"] .filter-chip[data-type="shares"] {
    background-color: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

/* Hover effects for both themes */
.filter-chip:hover {
    filter: brightness(0.95);
    transition: all 0.2s ease;
}

[data-theme="dark"] .filter-chip:hover {
    filter: brightness(1.1);
    transition: all 0.2s ease;
}

/* Reset and Apply filter buttons */
.reset-filters {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apply-filters {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #ffffff;
    background: #2563eb;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-filters:hover {
    background: #e2e8f0;
}

.apply-filters:hover {
    background: #1d4ed8;
}

[data-theme="dark"] .reset-filters {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-theme="dark"] .reset-filters:hover {
    background: #334155;
}

[data-theme="dark"] .apply-filters {
    background: #2563eb;
}

[data-theme="dark"] .apply-filters:hover {
    background: #1d4ed8;
}

/* Period and Transaction Buttons */
.period-buttons,
.transaction-buttons {
    display: flex;
    gap: 8px;
}

.period-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 4px;
}

.period-btn:hover,
.period-btn:focus {
    background: #e2e8f0;
}

.period-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Input fields styling */
input[type="text"],
input[type="number"],
.modern-dropdown-selected {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Dropdown styling */
.modern-dropdown-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #1e293b;
}

.modern-dropdown-selected {
    padding: 8px 12px;
    font-size: 14px;
    background: transparent;
}

.modern-dropdown-options {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modern-dropdown-option {
    padding: 8px 12px;
    color: #1e293b;
}

.modern-dropdown-option:hover {
    background: #f1f5f9;
}

.modern-dropdown-option.selected {
    background: #e0f2fe;
    color: #0369a1;
}

/* Dark mode styles */
[data-theme="dark"] .period-btn {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-theme="dark"] .period-btn:hover,
[data-theme="dark"] .period-btn:focus {
    background: #334155;
}

[data-theme="dark"] .period-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] .modern-dropdown-container {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] input[type="text"]:focus,
[data-theme="dark"] input[type="number"]:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .modern-dropdown-options {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .modern-dropdown-option {
    color: #e2e8f0;
}

[data-theme="dark"] .modern-dropdown-option:hover {
    background: #334155;
}

[data-theme="dark"] .modern-dropdown-option.selected {
    background: #0c4a6e;
    color: #bae6fd;
}

/* Buy/Sell button styling */
.transaction-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.transaction-btn:hover {
    background: #e2e8f0;
}

.transaction-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

[data-theme="dark"] .transaction-btn {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

[data-theme="dark"] .transaction-btn:hover {
    background: #334155;
}

[data-theme="dark"] .transaction-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Range Inputs */
.range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.range-input {
    background: var(--surface-secondary, #2a3142);
    border: 1px solid var(--border-color, #374151);
    border-radius: 6px;
    color: var(--text-color, #fff);
    padding: 8px;
    width: 100%;
}

.range-separator {
    color: var(--text-muted, #9ca3af);
}

/* Dark mode specific styles */
[data-theme="dark"] {
    --surface-color: #1e2330;
    --surface-secondary: #2a3142;
    --surface-secondary-hover: #343b4f;
    --text-color: #fff;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --primary-color: #6366f1;
    --primary-color-hover: #4f46e5;
}

/* Light mode specific styles */
[data-theme="light"] {
    --surface-color: #f8fafc;
    --surface-secondary: #f1f5f9;
    --surface-secondary-hover: #e2e8f0;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --primary-color: #6366f1;
    --primary-color-hover: #4f46e5;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile responsiveness for header and search */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .header-container h1 {
        font-size: 2rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .search-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .search-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .input-wrapper input {
        padding: 0.625rem 0.875rem;
    }

    .search-container button {
        width: 100%;
        padding: 0.625rem 1rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.5rem;
    }

    .container.mt-4 {
        padding: 0.25rem;
    }

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

/* Dark Mode Support */
[data-theme="dark"] .input-wrapper input {
    background: #1a202c;
    border-color: #2d3748;
    color: #e2e8f0;
}

[data-theme="dark"] .input-wrapper input:focus {
    border-color: #4a5568;
}

[data-theme="dark"] .hero-text h1 {
    color: #f7fafc;
}

/* Hero section mobile adjustments */
.hero-section {
    padding: 2rem 1rem 3rem;
    position: relative;
    /* background-color: rgba(255, 255, 255, 0.5); */ /* Removed to allow hero-background to show */
}

/* Dark mode hero section adjustments */
[data-theme="dark"] .hero-section {
    background-color: transparent; /* Ensure it's transparent in dark mode */
}

@media (max-width: 768px) {
    .hero-section {
        padding: 1rem 0.5rem 2rem;
    }

    .hero-content {
        padding: 0 0.5rem;
    }
}

/* Search suggestions mobile adjustments */
@media (max-width: 768px) {
    #suggestions {
        position: absolute;
        width: 100%;
        max-height: 200px;
        background: white;
        border: 1px solid #D1D5DB;
        border-radius: 0.5rem;
        margin-top: 0.25rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .dropdown-item {
        padding: 0.875rem 1rem;
        border-bottom: 1px solid #E5E7EB;
        font-size: 16px;
    }

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

    /* Dark mode support for mobile dropdown items */
    [data-theme="dark"] #suggestions {
        background: #2d3748;
        border-color: #4a5568;
    }

    [data-theme="dark"] .dropdown-item {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }

    [data-theme="dark"] .dropdown-item:hover {
        background-color: #4a5568;
        color: #f7fafc;
    }
}

/* Recent Transactions Table Styles */
#recent-transactions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

#recent-transactions-table thead th {
    background: #f8f9fa;
    color: #6B7280;
    font-size: 12px;
    font-weight: 600;
    padding: 12px 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

#recent-transactions-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
}

#recent-transactions-table tbody tr:hover {
    background-color: #f9fafb;
}

#recent-transactions-table td {
    padding: 16px;
    vertical-align: middle;
}

/* Date Column Styles */
.date-column {
    min-width: 120px;
}

.transaction-date {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
    margin-bottom: 4px;
}

.filing-date {
    color: #6B7280;
    font-size: 12px;
}

/* Insider Column Styles */
.insider-column {
    min-width: 200px;
}

.insider-name {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
    margin-bottom: 4px;
}

.insider-title {
    color: #6B7280;
    font-size: 12px;
}

/* Transaction Badge Styles */
.transaction-type-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}

.badge-buy {
    background-color: rgba(34, 197, 94, 0.1);
    color: #15803d;
}

.badge-sell {
    background-color: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.transaction-reason {
    color: #6B7280;
    font-size: 12px;
}

/* Dark mode support */
[data-theme="dark"] #recent-transactions-table thead th {
    background: #1f2937;
    color: #9ca3af;
    border-bottom-color: #374151;
}

[data-theme="dark"] #recent-transactions-table tbody tr {
    border-bottom-color: #374151;
}

[data-theme="dark"] #recent-transactions-table tbody tr:hover {
    background-color: #1f2937;
}

[data-theme="dark"] .transaction-date,
[data-theme="dark"] .insider-name {
    color: #e5e7eb;
}

[data-theme="dark"] .filing-date,
[data-theme="dark"] .insider-title,
[data-theme="dark"] .transaction-reason {
    color: #9ca3af;
}

/* Table Container Styles */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-top: 8px;  /* Reduced from original value for consistency */
    overflow: hidden;
}

[data-theme="dark"] .table-container {
    background-color: #1e293b;
    border-color: #374151;
}

/* Dark mode support for table-container header border */
[data-theme="dark"] .table-container .simple-header {
    border-bottom-color: #374151;  /* Dark mode separator */
    padding: 12px 16px;  /* Explicitly match the main simple-header padding */
    padding-left: 20px;  /* Match the main simple-header left padding */
}

.text-center {
    text-align: center !important;
}

/* Center the transaction type wrapper while maintaining the badge alignment */
.transaction-type-wrapper {
    align-items: center;
    margin: 0 auto;
}

/* Notes Column Styles */
.notes-column {
    width: 80px;
}

.footnote-icon {
    color: #6B7280;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footnote-icon:hover {
    color: #3b82f6;
}

/* Dark mode support for notes */
[data-theme="dark"] .footnote-icon {
    color: #9ca3af;
}

[data-theme="dark"] .footnote-icon:hover {
    color: #60a5fa;
}

/* Ensure the transaction badge stays centered */
.transaction-badge {
    margin: 0 auto;
}

/* Center the filing date text */
.date-column .filing-date {
    text-align: center;
}

/* Popover styles for notes */
.popover {
    max-width: 300px;
    font-size: 13px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .popover {
    background-color: #1a202c; /* Darker background for better contrast */
    border-color: #2d3748; /* Slightly lighter border for definition */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6); /* Stronger shadow */
}

[data-theme="dark"] .popover-body {
    color: #f7fafc; /* Much brighter text for better readability */
}

/* Amount Column Styles */
.amount-column {
    position: relative;
    font-weight: 600;
}

.amount-column::before {
    content: "$";
    display: inline;
    margin-right: 1px;
    font-weight: 600;
}

/* Remove any previous rules that might interfere */
#recent-transactions-table td:nth-last-child(2)::before {
    content: none;
}

/* Percentage Change Styles */
.percent-change {
    font-weight: 500;
}

.text-success {
    color: #15803d !important;
}

.text-danger {
    color: #b91c1c !important;
}

[data-theme="dark"] .text-success {
    color: #22c55e !important;
}

[data-theme="dark"] .text-danger {
    color: #ef4444 !important;
}

/* Filter Chips Styling - Consolidated */
.active-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding: 0;
    background: transparent;
    border: none;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    animation: chipAppear 0.2s ease-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: none;
}

.filter-chip i {
    font-size: 12px;
    opacity: 0.8;
}

.filter-chip .remove-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    margin-left: 4px;
}

.filter-chip .remove-chip:hover {
    opacity: 1;
}

/* Color coordination for different filter types */
.filter-chip[data-type="period"] {
    background-color: rgba(147, 197, 253, 0.2);
    color: #3b82f6;
}

.filter-chip[data-type="transaction"] {
    background-color: rgba(167, 139, 250, 0.2);
    color: #8b5cf6;
}

.filter-chip[data-type="transactionType"] {
    background-color: rgba(248, 113, 113, 0.2);
    color: #ef4444;
}

.filter-chip[data-type="insider"] {
    background-color: rgba(52, 211, 153, 0.2);
    color: #10b981;
}

.filter-chip[data-type="title"] {
    background-color: rgba(251, 146, 60, 0.2);
    color: #f97316;
}

.filter-chip[data-type="sharesPercent"],
.filter-chip[data-type="dollarAmount"],
.filter-chip[data-type="shares"] {
    background-color: rgba(99, 102, 241, 0.25);
    color: #6366f1;
}

/* Dark theme variants */
[data-theme="dark"] .filter-chip[data-type="period"] {
    background-color: rgba(147, 197, 253, 0.25);
    color: #93c5fd;
}

[data-theme="dark"] .filter-chip[data-type="transaction"] {
    background-color: rgba(167, 139, 250, 0.25);
    color: #a78bfa;
}

[data-theme="dark"] .filter-chip[data-type="transactionType"] {
    background-color: rgba(248, 113, 113, 0.25);
    color: #f87171;
}

[data-theme="dark"] .filter-chip[data-type="insider"] {
    background-color: rgba(52, 211, 153, 0.25);
    color: #34d399;
}

[data-theme="dark"] .filter-chip[data-type="title"] {
    background-color: rgba(251, 146, 60, 0.25);
    color: #fb923c;
}

[data-theme="dark"] .filter-chip[data-type="sharesPercent"],
[data-theme="dark"] .filter-chip[data-type="dollarAmount"],
[data-theme="dark"] .filter-chip[data-type="shares"] {
    background-color: rgba(99, 102, 241, 0.25);
    color: #818cf8;
}

/* Hover effects for both themes */
.filter-chip:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .filter-chip:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes chipAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Empty state styling */
.active-filters-container:empty {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .active-filters-container {
        padding: 0;
        gap: 6px;
        margin-top: 6px;
    }
    
    .filter-chip {
        padding: 4px 10px;
        font-size: 12px;
    }
}

#stock-chart {
    width: 100%;
    height: 500px;
    position: relative;
    background: var(--background-color);
    border-radius: 8px;
    margin: 0;
    padding: 0;  /* Remove all padding to fill container completely */
}

#stock-chart canvas {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.period-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.period-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover,
.period-btn:focus {
    background: #e2e8f0;
}

.period-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Custom Transaction Period Styles */
.date-range-inputs {
    width: 100%;
}

.date-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.date-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-color);
    font-size: 0.9em;
    transition: border-color 0.2s ease;
}

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

.date-separator {
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Dark mode styles for date inputs */
[data-theme="dark"] .date-input {
    background: var(--surface-secondary);
    color: var(--text-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .date-input:focus {
    border-color: var(--primary-color);
}

/* Calendar icon styling */
.date-input::-webkit-calendar-picker-indicator {
    filter: var(--calendar-icon-filter);
    cursor: pointer;
}

[data-theme="dark"] .date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

.insider-volume-chart {
    position: relative;
    width: 100%;
    height: 450px;
    margin: 0 auto;
}

/* Add styles for the scrollable container */
.insider-volume-chart > div {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

/* Customize scrollbar appearance */
.insider-volume-chart > div::-webkit-scrollbar {
    height: 6px;
}

.insider-volume-chart > div::-webkit-scrollbar-track {
    background: transparent;
}

.insider-volume-chart > div::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 20px;
    border: transparent;
}

/* Dark mode scrollbar */
[data-theme="dark"] .insider-volume-chart > div {
    scrollbar-color: rgba(75, 85, 99, 0.5) transparent;
}

[data-theme="dark"] .insider-volume-chart > div::-webkit-scrollbar-thumb {
    background-color: rgba(75, 85, 99, 0.5);
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .insider-volume-chart {
        margin: 0 -16px; /* Negative margin to allow full-width scrolling */
        width: calc(100% + 32px);
    }
    
    .insider-volume-chart > div {
        padding: 0 16px;
        margin: 0 -16px;
        width: calc(100% + 32px);
    }
}

/* Chart section header */
.volume-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.volume-chart-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Legend */
.volume-chart-legend {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-color.buy {
    background-color: rgba(34, 197, 94, 0.9);
}

.legend-color.sell {
    background-color: rgba(239, 68, 68, 0.9);
}

/* Hide the individual filter chips in dropdown sections while maintaining functionality */
.hidden-filter-item {
    display: none !important;
}

/* When a dropdown is open, ensure nothing covers it */
body:has(.modern-dropdown.open) {
    overflow: visible !important;
}

/* For older browsers that don't support :has */
.dropdown-open-helper {
    overflow: visible !important;
}

/* Updated Company Header Styles */
.company-header-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.company-name-price h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.company-info-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.company-name-price {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.company-name-price h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.stock-price-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.price-change {
    font-size: 1rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.price-change.positive {
    background-color: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.price-change.negative {
    background-color: rgba(244, 63, 94, 0.15);
    color: #be123c;
}

.add-to-watchlist-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f8fafc;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-to-watchlist-btn:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

/* Dark mode styles */
[data-theme="dark"] .company-header-container {
    background-color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .company-name-price h1 {
    color: #f1f5f9;
}

[data-theme="dark"] .current-price {
    color: #f1f5f9;
}

[data-theme="dark"] .price-change.positive {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .price-change.negative {
    background-color: rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

[data-theme="dark"] .add-to-watchlist-btn {
    background-color: #0f172a;
    color: #e2e8f0;
    border-color: #334155;
}

[data-theme="dark"] .add-to-watchlist-btn:hover {
    background-color: #1e293b;
    border-color: #475569;
}

/* Adjust advanced filters container to fit inside company header */
.company-header-container .advanced-filters-container {
    margin-top: 0;
    margin-bottom: 0;
    background-color: transparent;
    box-shadow: none;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

[data-theme="dark"] .company-header-container .advanced-filters-container {
    border-top-color: #334155;
}

.stock-chart-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;  /* Reduced from 32px */
    overflow: hidden;
    padding: 0;  /* Ensure no container padding */
}

.simple-header {
    position: relative;
    padding: 12px 16px;  /* Reduced top/bottom padding from 16px to 12px */
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    background: #f8fafc;  /* Light background to distinguish header from content */
    border: none;  /* Remove border to integrate with container */
    border-radius: 0;  /* Remove border radius to integrate seamlessly */
    margin-bottom: 0;  /* No gap below header */
    box-shadow: none;  /* Remove box shadow for seamless integration */
    padding-left: 20px;  /* Reduced left padding from 32px to 20px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;  /* Add subtle separator instead */
}

.simple-header::before {
    content: '';
    position: absolute;
    left: 8px;  /* Reduced from 16px to match the reduced padding */
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: 2px;
    background-color: #8b5cf6; /* Purple color */
}

#stock-chart {
    padding: 0;  /* Remove all padding to fill container completely */
}

/* Dark mode support */
[data-theme="dark"] .stock-chart-container {
    background: #1e293b;
    border-color: #374151;
}

[data-theme="dark"] .simple-header {
    background-color: #1f2937;
    border: none;  /* Remove border for seamless integration */
    box-shadow: none;  /* Remove box shadow for seamless integration */
    color: #f1f5f9;
    border-bottom: 1px solid #374151;  /* Dark mode separator */
}

[data-theme="dark"] .simple-header::before {
    background-color: #a78bfa; /* Lighter purple for dark mode */
}

.volume-legend {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 13px;
    color: #6b7280;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-dot.buy {
    background-color: rgba(16, 185, 129, 0.9);
}

.legend-dot.sell {
    background-color: rgba(239, 68, 68, 0.9);
}

[data-theme="dark"] .volume-legend {
    color: #9ca3af;
}

.filter-chip[data-type="dollarAmount"] {
    background-color: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.filter-chip[data-type="shares"] {
    background-color: rgba(168, 85, 247, 0.15);
    color: #7c3aed;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

[data-theme="dark"] .filter-chip[data-type="dollarAmount"] {
    background-color: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .filter-chip[data-type="shares"] {
    background-color: rgba(168, 85, 247, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.filters-header:not(.open) {
    position: relative;
    transition: all 0.2s ease;
}

.filters-header:not(.open)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.05);
    pointer-events: none;
    transition: all 0.2s ease;
}

[data-theme="dark"] .filters-header:not(.open)::before {
    background: rgba(59, 130, 246, 0.1);
}

/* Insider Ownership Table Styles */
.insider-ownership-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.insider-ownership-table th {
    background: #f8f9fa !important;  /* Override any other background colors */
    color: #6B7280 !important;  /* Override any other text colors */
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
    height: 40px;
    vertical-align: middle;
    line-height: 1;
}

.insider-ownership-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
}

.insider-ownership-table tbody tr:hover {
    background-color: #f9fafb;
}

.insider-ownership-table td {
    padding: 16px;
    vertical-align: middle;
}

.insider-ownership-table th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 24px; /* Make room for the sort icon */
}

.insider-ownership-table th.sortable i {
    margin-left: 4px;
    font-size: 10px;
    color: #9ca3af;
    transition: color 0.2s ease;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.insider-ownership-table th.sortable:hover i {
    color: #6B7280;
}

[data-theme="dark"] .insider-ownership-table th {
    background: #1f2937 !important;
    color: #9ca3af !important;
    border-bottom-color: #374151;
}

[data-theme="dark"] .insider-ownership-table tbody tr {
    border-bottom-color: #374151;
}

[data-theme="dark"] .insider-ownership-table tbody tr:hover {
    background-color: #1f2937;
}

[data-theme="dark"] .insider-ownership-table th.sortable i {
    color: #6B7280;
}

[data-theme="dark"] .insider-ownership-table th.sortable:hover i {
    color: #9ca3af;
}

.insider-ownership-table .percent-owned {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.insider-ownership-table .progress-bar {
    flex: 1;
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.insider-ownership-table .progress-fill {
    height: 100%;
    background-color: var(--accent-color);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.insider-ownership-table .percent-value {
    min-width: 60px;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

[data-theme="dark"] .insider-ownership-table .progress-bar {
    background-color: var(--bg-tertiary);
}

[data-theme="dark"] .insider-ownership-table .progress-fill {
    background-color: var(--accent-color);
}

[data-theme="dark"] .insider-ownership-table .percent-value {
    color: var(--text-secondary);
}

.insider-ownership-table .total-row {
    border-top: 2px solid #e5e7eb;
}

.insider-ownership-table .total-row .insider-name {
    font-weight: 600;
    color: #111827;
}

[data-theme="dark"] .insider-ownership-table .total-row {
    border-top-color: #374151;
}

[data-theme="dark"] .insider-ownership-table .total-row .insider-name {
    color: #f3f4f6;
}

/* Other table styles remain unchanged */

/* Add these rules for dark mode table improvements */

/* Fix for Insider Share Ownership table in dark mode */
[data-theme="dark"] .delta-change-cell,
[data-theme="dark"] .shares-info,
[data-theme="dark"] .last-transaction-cell {
    color: #f0f0f0;
}

[data-theme="dark"] .delta-change .change-value {
    color: #f0f0f0;
}

/* Fix for Most Recent Transactions table text in dark mode */
[data-theme="dark"] #recent-transactions-table td {
    color: #f0f0f0;
}

/* Ensure transaction type is still visible */
[data-theme="dark"] .transaction-type-wrapper .transaction-reason {
    color: #d8d8d8;
}

/* Ensure amount column is visible */
[data-theme="dark"] .amount-column {
    color: #f0f0f0;
}

/* Keep footnote icon visible in dark mode */
[data-theme="dark"] .footnote-icon {
    color: #7ac0ff;
}

/* Make shares and price columns more visible */
[data-theme="dark"] #recent-transactions-table td.text-center {
    color: #f0f0f0;
}

[data-theme="dark"] .percent-change {
    color: #f0f0f0;
}

[data-theme="dark"] .percent-change.text-success {
    color: #4dff77;
}

[data-theme="dark"] .percent-change.text-danger {
    color: #ff6b6b;
}

[data-theme="dark"] .insider-ownership-table thead th {
    color: #e2e2e2;
    background-color: #2c3546;
    border-color: #3a4456;
}

/* Ensure transaction badge colors stand out in dark mode */
[data-theme="dark"] .transaction-badge {
    color: white;
}

[data-theme="dark"] .badge-buy {
    background-color: #28a745;
}

[data-theme="dark"] .badge-sell {
    background-color: #dc3545;
}

/* Improve transaction date and filing date visibility */
[data-theme="dark"] .transaction-date,
[data-theme="dark"] .filing-date {
    color: #e0e0e0;
}

/* Make insider name and title more visible */
[data-theme="dark"] .insider-column .insider-name {
    color: #ffffff;
    font-weight: 600;
}

[data-theme="dark"] .insider-column .insider-title {
    color: #b8b8b8;
}

/* Make all table content more visible */
[data-theme="dark"] table {
    color: #e0e0e0;
}

/* Improve progress bar visibility */
[data-theme="dark"] .progress-bar {
    background-color: #2c3546;
}

/* Fix for insider name and title in insider ownership table */
[data-theme="dark"] .insider-ownership-table .insider-name {
    color: #ffffff;
}

[data-theme="dark"] .insider-ownership-table .insider-title {
    color: #b8b8b8;
}

/* Enhance note popovers */
.footnote-icon[data-bs-toggle="popover"] {
    position: relative;
    cursor: pointer;
}

.popover {
    max-width: 300px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.popover-header {
    font-size: 16px;
    padding: 10px 14px;
}

.popover-body {
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
}

[data-theme="dark"] .popover-header {
    background-color: #1c2333;
    color: #ffffff;
    border-bottom: 1px solid #3a4456;
}

[data-theme="dark"] .popover-body {
    background-color: #2c3546;
    color: #e0e0e0;
}

/* Ensure popovers appear over everything else */
.popover {
    z-index: 9999 !important;
}

/* Make footnote icons more visible in dark mode */
[data-theme="dark"] .footnote-icon {
    color: #7ac0ff;
    opacity: 0.9;
    font-size: 15px;
}

[data-theme="dark"] .footnote-icon:hover {
    color: #a0d6ff;
    opacity: 1;
}

/* Add a subtle glow effect on hover */
[data-theme="dark"] .footnote-icon:hover {
    text-shadow: 0 0 5px rgba(122, 192, 255, 0.5);
}

/* Make the tag icon more visible */
.footnote-icon {
    display: inline-block;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

/* Enhance the note popover */
.popover[role="tooltip"] {
    transition: opacity 0.15s ease-in-out;
}

/* Fix for Add to Watchlist button popover */
#addToWatchlistBtn + .popover {
    position: absolute !important;
    inset: auto !important; /* Reset any fixed positioning */
    transform: translate(-50%, -100%) !important; /* Position above button */
    margin-top: -10px !important; /* Adjust distance from button */
}

/* Ensure proper positioning of note popovers */
.footnote-icon + .popover {
    position: absolute !important;
    max-width: 250px !important;
    margin-left: -10px !important;
}

/* Specific styling for the "Coming Soon" tooltip */
#addToWatchlistBtn + .popover {
    background-color: #333 !important;
    color: white !important;
    max-width: 150px !important;
    text-align: center !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    padding: 5px 10px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

#addToWatchlistBtn + .popover .popover-body {
    padding: 5px 10px !important;
    color: white !important;
}

#addToWatchlistBtn + .popover .popover-arrow::before,
#addToWatchlistBtn + .popover .popover-arrow::after {
    border-top-color: #333 !important;
}

/* Fix positioning of footnote icons in table cells */
.footnote-icon {
    position: relative;
    z-index: 2; /* Ensure icon is above other elements */
}

/* Ensure the note popovers have proper styling */
.footnote-icon + .popover {
    border: 1px solid rgba(0,0,0,0.2) !important;
    background-color: white !important;
}

.footnote-icon + .popover .popover-body {
    padding: 10px !important;
    color: #333 !important;
}

[data-theme="dark"] .footnote-icon + .popover {
    background-color: #2c3546 !important;
    border-color: #3a4456 !important;
}

[data-theme="dark"] .footnote-icon + .popover .popover-body {
    color: #e0e0e0 !important;
}

/* Fix for popover arrow colors */
[data-theme="dark"] .footnote-icon + .popover .popover-arrow::before,
[data-theme="dark"] .footnote-icon + .popover .popover-arrow::after {
    border-right-color: #2c3546 !important;
}

/* Add these styles at the end of the file */

/* Value Owned column styles */
.value-owned {
    font-weight: 500;
    color: var(--text-secondary);
}

[data-theme="dark"] .value-owned {
    color: var(--color-light-gray);
}

/* No transactions message */
.no-transactions {
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.7;
    font-size: 0.9em;
    padding: 4px 8px;
    display: inline-block;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.05);
    white-space: nowrap;
}

[data-theme="dark"] .no-transactions {
    color: var(--color-light-gray);
    opacity: 0.7;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Make sure delta change displays properly */
.delta-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.delta-change i {
    font-size: 0.9em;
}

.delta-change .change-value {
    font-weight: 500;
}

/* Add dark mode styling for transaction headers */
[data-theme="dark"] .transaction-header.buy {
    background: #26a69a; /* Keep the same green for buys */
}

[data-theme="dark"] .transaction-header.sell {
    background: #ef5350; /* Keep the same red for sells */
}

/* Improve dark mode text readability in transaction-details */
[data-theme="dark"] .transaction-details {
    color: #f3f4f6; /* Brighter text color for much better contrast */
    background-color: rgba(30, 41, 59, 0.98); /* Slightly darker background */
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

[data-theme="dark"] .detail-label {
    color: #e2e8f0; /* Even lighter label color for better contrast */
    font-weight: 500; /* Medium weight for better visibility */
}

[data-theme="dark"] .detail-value {
    color: #ffffff; /* Pure white text color for maximum contrast */
    font-weight: 600; /* Semi-bold for better visibility */
}

/* Make transaction type badges more readable in dark mode */
[data-theme="dark"] .transaction-type.buy {
    background: rgba(34, 197, 94, 0.3); /* Even more visible background */
    color: #4ade80; /* Brighter green for better visibility */
    font-weight: 700; /* Make it bolder */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Add text shadow for better contrast */
}

[data-theme="dark"] .transaction-type.sell {
    background: rgba(255, 99, 132, 0.3); /* Even more visible background */
    color: #fb7185; /* Brighter red for better visibility */
    font-weight: 700; /* Make it bolder */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* Add text shadow for better contrast */
}

[data-theme="dark"] .percent-text {
    color: #f3f4f6; /* Much brighter text for percentage text */
    font-weight: 600; /* Make it more visible */
}

/* Improve styles for earnings and split popovers in dark mode */
[data-theme="dark"] .insider-transaction-popover .title {
    color: #ffffff; /* Pure white color for title */
    font-weight: 700; /* Make it bolder */
}

[data-theme="dark"] .insider-transaction-popover .subtitle {
    color: #e2e8f0; /* Brighter color for subtitle */
    font-weight: 600; /* Make it more visible */
}

[data-theme="dark"] .insider-transaction-popover .date {
    color: #ffffff; /* Pure white for maximum visibility */
}

/* Styles for New Homepage Content */
#homepage-showcase-container {
    position: relative;
    overflow: hidden;
}

/* Enhanced Hero Section with Animated Background */
.homepage-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 35%, #334155 100%);
    position: relative;
    color: #ffffff;
    padding: 80px 20px 60px; /* Reduced bottom padding from 100px to 60px */
    text-align: center;
    overflow: hidden; /* Keep this to contain pseudo-elements */
    /* Removed background-attachment: fixed; as it's less suitable for a contained hero */
    max-width: 1400px; /* Contain the hero */
    margin: 0 auto;    /* Center the hero */
    border-radius: 24px; /* Optional: Add border-radius to match feature cards */
    margin-top: 40px;    /* Optional: Add some top margin */
    box-shadow: 0 16px 32px rgba(0,0,0,0.1);
}

.homepage-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 40%);
    animation: subtleGlow 8s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes subtleGlow {
    0% { 
        opacity: 0.6;
        transform: scale(1);
    }
    100% { 
        opacity: 0.9;
        transform: scale(1.05);
    }
}

.homepage-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.05), transparent),
        radial-gradient(1px 1px at 60% 70%, rgba(59,130,246,0.08), transparent),
        radial-gradient(1px 1px at 80% 40%, rgba(16,185,129,0.06), transparent),
        radial-gradient(2px 2px at 40% 80%, rgba(168,85,247,0.04), transparent);
    background-size: 200px 200px, 150px 150px, 180px 180px, 220px 220px;
    animation: gentleFloat 20s linear infinite;
    z-index: 1;
}

@keyframes gentleFloat {
    0% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-10px) translateX(5px); }
    50% { transform: translateY(-5px) translateX(-3px); }
    75% { transform: translateY(-15px) translateX(8px); }
    100% { transform: translateY(0px) translateX(0px); }
}

.hero-content-inner {
    position: relative;
    z-index: 2;
    /* max-width: 1400px; /* No longer needed here as parent .homepage-hero controls width */
    /* margin: 0 auto; /* No longer needed here */
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.homepage-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: brightness(1) contrast(1); }
    100% { filter: brightness(1.1) contrast(1.05); }
}

.homepage-hero .subtitle {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: #e2e8f0;
    font-weight: 400;
    line-height: 1.6;
}

.homepage-hero .subtitle em {
    font-style: italic;
    color: #60a5fa;
    position: relative;
}

.homepage-hero .subtitle em::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #60a5fa, transparent);
    animation: underlineGlow 2s ease-in-out infinite;
}

@keyframes underlineGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.homepage-hero .cta-prompt {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-top: 2rem;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: inline-block;
    transition: all 0.3s ease;
}

.homepage-hero .cta-prompt:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Updated Features Grid with Container */
.features-grid-homepage {
    padding: 80px 20px;
    /* Removed background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%); to let body background show */
    position: relative;
    max-width: 1400px;
    margin: 20px auto 0; /* Reduced top margin from 40px to 20px */
    background: transparent; /* Explicitly set to transparent to inherit body background */
}

.features-grid-homepage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
    border-radius: 2px;
}

.homepage-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 40px;
    margin-bottom: 40px;
    background: var(--card-bg); /* Use theme variable for card background */
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    /* backdrop-filter: blur(10px); /* Removed as card is now opaque */
    border: 1px solid var(--border-color); /* Use theme variable for border */
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.homepage-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transition: left 0.6s ease;
}

.homepage-feature:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(59, 130, 246, 0.2);
}

.homepage-feature:hover::before {
    left: 100%;
}

.homepage-feature:nth-child(odd) {
    animation-delay: 0.1s;
}

.homepage-feature:nth-child(even) {
    animation-delay: 0.2s;
}

[data-theme="dark"] .homepage-feature {
    /* background: rgba(30, 41, 59, 0.8); /* Handled by var(--card-bg) */
    /* border-color: rgba(71, 85, 105, 0.3); /* Handled by var(--border-color) */
}

[data-theme="dark"] .homepage-feature:hover {
    background: rgba(45, 58, 75, 0.95); /* Slightly lighter than card-bg for dark hover */
    border-color: rgba(59, 130, 246, 0.3);
}

.homepage-feature.alt-layout {
    grid-template-columns: 1fr 1fr;
}

.homepage-feature.alt-layout > * {
    order: 0;
}

.homepage-feature.alt-layout .feature-visual {
    order: 2;
}

.feature-visual {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.feature-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.1));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.homepage-feature:hover .feature-visual::before {
    opacity: 1;
}

.feature-visual img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    transition: all 0.4s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.homepage-feature:hover .feature-visual img {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-text {
    animation: slideInText 0.8s ease-out;
}

@keyframes slideInText {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-text h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    position: relative;
}

.feature-text h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 2px;
}

[data-theme="dark"] .feature-text h2 {
    color: #f1f5f9;
}

.feature-text p {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.7;
    font-weight: 400;
}

[data-theme="dark"] .feature-text p {
    color: #cbd5e1;
}

/* Updated Trust Section with Container */
.homepage-trust-seo {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
    max-width: 1400px; /* Contain the trust section */
    margin: 40px auto;    /* Center the trust section and add consistent margin */
    border-radius: 24px; /* Optional: Add border-radius */
    box-shadow: 0 16px 32px rgba(0,0,0,0.1);
}

.homepage-trust-seo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="0,0 100,0 80,100 0,100" fill="rgba(59,130,246,0.05)"/></svg>') no-repeat center center;
    background-size: cover;
}

.trust-content-inner {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
}

.homepage-trust-seo h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.homepage-trust-seo p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #e2e8f0;
    max-width: 900px;
    margin: 0 auto;
}

/* Enhanced responsive design for contained layout */
@media (max-width: 992px) {
    .homepage-hero {
        padding: 60px 15px 40px; /* Reduced bottom padding for mobile */
        margin-top: 30px;
        border-radius: 16px;
    }
    .homepage-hero h1 { 
        font-size: 2.8rem; 
    }
    .homepage-hero .subtitle { 
        font-size: 1.2rem; 
    }
    .features-grid-homepage { 
        padding: 60px 15px; 
        margin-top: 15px; /* Reduced margin for mobile */
    }
    .homepage-feature {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        padding: 40px 30px;
    }
    .homepage-feature.alt-layout {
        grid-template-columns: 1fr;
    }
    .homepage-feature.alt-layout .feature-visual {
        order: 0;
    }
    .feature-visual img {
        max-width: 400px;
        margin: 0 auto;
    }
    .feature-text h2 { 
        font-size: 2rem; 
    }
    .feature-text p { 
        font-size: 1.05rem; 
    }
    .homepage-trust-seo { 
        padding: 60px 15px; 
        margin: 30px auto;
        border-radius: 16px;
    }
    .homepage-trust-seo h2 { 
        font-size: 2.2rem; 
    }
}

@media (max-width: 576px) {
    .homepage-hero {
        padding: 40px 15px 30px; /* Further reduced for small mobile */
        margin-top: 20px;
        border-radius: 12px;
    }
    .homepage-hero h1 { 
        font-size: 2.2rem; 
    }
    .homepage-hero .subtitle { 
        font-size: 1.05rem; 
    }
    .homepage-hero .cta-prompt { 
        font-size: 1rem;
        padding: 12px 20px;
    }
    .features-grid-homepage { 
        padding: 40px 10px;
        margin-top: 10px; /* Minimal margin for small screens */
    }
    .homepage-feature { 
        padding: 30px 20px; 
        gap: 30px;
    }
    .feature-text h2 { 
        font-size: 1.8rem; 
    }
    .feature-text p { 
        font-size: 1rem; 
    }
    .homepage-trust-seo { 
        padding: 40px 10px;
        margin: 20px auto;
        border-radius: 12px;
    }
    .homepage-trust-seo h2 { 
        font-size: 2rem; 
    }
}

/* Add scroll-triggered animations */
.homepage-feature {
    opacity: 0;
    transform: translateY(30px);
    animation: revealOnScroll 0.8s ease-out forwards;
}

.homepage-feature:nth-child(1) { animation-delay: 0.1s; }
.homepage-feature:nth-child(2) { animation-delay: 0.2s; }
.homepage-feature:nth-child(3) { animation-delay: 0.3s; }
.homepage-feature:nth-child(4) { animation-delay: 0.4s; }

@keyframes revealOnScroll {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.volume-legend {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 15px;
}

/* Add this to ensure content after hero section is visible */
.container {
    position: relative;
    background: white; /* Or any background color that matches your design */
    z-index: 2;
}

/* Modern header styles */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* This remains full-width to provide the background color/shadow across the screen */
    background-color: var(--bg-primary); /* Changed from #ffffff to use theme variable */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px; /* This will contain the header content */
    margin: 0 auto;    /* This will center the header content */
    padding: 0 20px;   /* Keep some padding for smaller screens */
}

/* Dark mode styles for the header */
[data-theme="dark"] .modern-header {
    background-color: #1a202c; /* Keep dark mode background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .logo-link {
    color: #f1f5f9;
}

/* Dark mode styles for dropdown items */
[data-theme="dark"] .dropdown-item {
    color: #e2e8f0;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: #4a5568;
    color: #f7fafc;
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"] {
    background: #1e293b;
    border-color: #ffffff;
    color: #e2e8f0;
}

[data-theme="dark"] input[type="text"]:focus,
[data-theme="dark"] input[type="number"]:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

@media (max-width: 576px) {
    .header-inner {
        flex-wrap: nowrap;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 0 8px;
        gap: 8px;
    }
    .logo-section {
        flex: 0 0 auto;
        min-width: 44px;
        max-width: 60px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .logo-link img {
        height: 38px;
    }
    .search-section {
        flex: 1 1 0;
        min-width: 0;
        margin: 0 6px 0 6px;
        order: 2;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .search-input-container {
        width: 100%;
    }
    .search-input {
        font-size: 16px;
        padding: 10px 12px;
    }
    .nav-section {
        flex: 0 0 auto;
        order: 3;
        margin-left: 0;
        margin-right: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .compact-learn .learn-text {
        font-size: 15px;
        padding: 0 4px;
    }
    .nav-dropdown.compact-learn {
        min-width: unset;
        padding-left: 0;
    }
    .theme-toggle {
        display: none !important;
    }
    .homepage-hero, .hero-content-inner {
        padding-top: 32px !important;
    }
}

.content-container, .container.mt-4, #search-results-content {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 100px !important;
}

@media (max-width: 576px) {
    .content-container, .container.mt-4, #search-results-content {
        padding-top: 72px !important;
    }
}

.container.mt-4, .content-container, #search-results-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.search-active .container.mt-4 {
    margin-top: 0 !important;
}

.header-spacer { height: 64px; }
@media (max-width: 576px) { .header-spacer { height: 48px; } }

.modern-header { padding: 12px 0; }
@media (max-width: 576px) { .modern-header { padding: 8px 0; } }