/* ==========================================================================
   Near Me Engine Premium Styling Sheet
   ========================================================================== */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables for Premium Dark/Glassmorphic Design */
:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Semantic Colors */
    --bg-base: #070913;
    --bg-card: rgba(18, 22, 41, 0.65);
    --bg-glass: rgba(10, 14, 30, 0.75);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-active: rgba(0, 242, 254, 0.25);
    
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;

    /* Gradients */
    --gradient-accent: linear-gradient(135deg, #00F2FE 0%, #4FACFE 100%);
    --gradient-glow: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(79, 172, 254, 0.15) 100%);
    --gradient-card-hover: linear-gradient(180deg, rgba(22, 28, 54, 0.8) 0%, rgba(14, 18, 36, 0.9) 100%);
    
    /* System Status */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* Shadows & Transitions */
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 20px 0 rgba(0, 242, 254, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Glowing Orbs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
}
body::before {
    top: 10%;
    left: -100px;
    background: #00F2FE;
}
body::after {
    top: 60%;
    right: -100px;
    background: #4FACFE;
}

a {
    color: #00F2FE;
    text-decoration: none;
    transition: var(--transition-smooth);
}
a:hover {
    color: #4FACFE;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

/* Header */
.main-header {
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-base);
    font-size: 1.25rem;
    font-weight: 800;
    box-shadow: var(--shadow-glow);
}
.logo-text h1,
.logo-text-h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}
.logo-text h1 span,
.logo-text-h1 span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-text .tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

/* Main Container */
.page-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Hero Section */
.hero-section {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem;
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    opacity: 0.05;
    pointer-events: none;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin: 1rem 0;
    max-width: 800px;
}
.suburb-badge {
    background: var(--gradient-glow);
    border: 1px solid var(--border-active);
    color: #00F2FE;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

/* Programmatic Summary Block */
.summary-container {
    background: rgba(0, 242, 254, 0.03);
    border-left: 4px solid #00F2FE;
    padding: 1.5rem 2rem;
    border-radius: 0 16px 16px 0;
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.7;
    margin-top: 1.5rem;
}
.summary-container p {
    font-weight: 400;
}

/* Google Ad Slots */
.ad-slot-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
}
.ad-slot {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    width: 100%;
    text-align: center;
    padding: 1.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
}
.ad-slot::before {
    content: 'ADVERTISEMENT';
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    position: absolute;
    top: 6px;
    left: 12px;
}
.ad-slot-header {
    max-width: 728px;
    min-height: 90px;
}
.ad-slot-in-grid {
    min-height: 180px;
    background: rgba(0, 242, 254, 0.01);
    border: 1px dashed var(--border-active);
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem;
    border-radius: 16px;
}
.ad-title-mock {
    color: #4FACFE;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Business Grid */
.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}
.business-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: var(--transition-smooth);
    position: relative;
}
.business-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
    background: var(--gradient-card-hover);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}
.company-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}
.distance-badge {
    background: var(--gradient-accent);
    color: var(--bg-base);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}
.info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.info-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}
.view-profile-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}
.business-card:hover .view-profile-btn {
    background: var(--gradient-accent);
    color: var(--bg-base);
    border-color: transparent;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

/* Footer & Internal Mesh Links */
.footer-mesh-grid {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 3rem;
}
.footer-mesh-grid h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}
.mesh-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}
.mesh-link-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.mesh-link-item a {
    font-weight: 600;
    font-size: 0.95rem;
}
.mesh-link-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.main-footer {
    border-top: 1px solid var(--border-glass);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Mobile Sticky Anchor Ad (AC 4.3) */
.mobile-anchor-ad {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 15, 25, 0.85);
    border-top: 1px solid var(--border-active);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.75rem 1.25rem;
    box-shadow: 0 -4px 20px rgba(0, 242, 254, 0.15);
}
.anchor-ad-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.anchor-ad-text {
    flex-grow: 1;
}
.anchor-ad-title {
    color: #00F2FE;
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.2;
}
.anchor-ad-desc {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.2;
}
.btn-ad-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.btn-ad-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

/* Profile Details Styles */
.profile-container {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.profile-info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}
@media (max-width: 900px) {
    .profile-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
.registry-table {
    width: 100%;
    border-collapse: collapse;
}
.registry-table th, .registry-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
}
.registry-table th {
    color: var(--text-secondary);
    font-weight: 600;
    width: 30%;
}
.registry-table td {
    color: var(--text-primary);
}

/* Responsiveness overrides */
@media (max-width: 768px) {
    .mobile-anchor-ad {
        display: block;
    }
    .hero-section {
        padding: 2rem 1.5rem;
    }
    .page-container {
        padding: 0 1rem;
    }
    .business-grid {
        gap: 1rem;
    }
}

/* Leaflet Map Styling with Dark-Mode filter */
.map-section {
    position: relative;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    overflow: hidden;
    height: 350px;
    box-shadow: var(--shadow-premium);
    margin-bottom: 2.5rem;
}
#map {
    height: 100%;
    width: 100%;
    z-index: 10;
}
/* Invert OSM tiles to dark mode */
.leaflet-container .leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) brightness(90%) contrast(90%);
}
.leaflet-bar {
    border: 1px solid var(--border-glass) !important;
    background: var(--bg-glass) !important;
}
.leaflet-bar a {
    background-color: rgba(10, 14, 30, 0.9) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-glass) !important;
}
.leaflet-bar a:hover {
    background-color: var(--border-active) !important;
    color: #00F2FE !important;
}
/* Custom Leaflet Popup Box styling */
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: var(--bg-glass) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-active) !important;
    backdrop-filter: blur(12px);
    border-radius: 12px !important;
    box-shadow: var(--shadow-glow) !important;
}
.map-popup h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: #00F2FE;
    margin-bottom: 0.25rem;
    font-weight: 700;
}
.map-popup p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.map-popup a.btn-popup {
    display: inline-block;
    background: var(--gradient-accent);
    color: var(--bg-base) !important;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    text-shadow: none !important;
    transition: var(--transition-smooth);
}
.map-popup a.btn-popup:hover {
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.5);
}

/* Comparison Table Styling */
.comparison-section {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2.5rem;
}
.comparison-table-wrapper {
    overflow-x: auto;
    margin-top: 1rem;
}
.comp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 600px;
}
.comp-table th, .comp-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
}
.comp-table th {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
.comp-table td {
    color: var(--text-primary);
    vertical-align: middle;
}
.comp-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}
.distance-progress-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.distance-progress-bar {
    width: 120px;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}
.distance-progress-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 3px;
}
.action-icons {
    display: flex;
    gap: 0.5rem;
}
.action-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}
.action-icon-btn:hover {
    background: var(--gradient-glow);
    color: #00F2FE;
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}

/* Distance Filter Chips */
.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.filter-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.filter-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 0.4rem 1.15rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}
.filter-chip:hover, .filter-chip.active {
    background: var(--gradient-glow);
    border-color: var(--border-active);
    color: #00F2FE;
    box-shadow: var(--shadow-glow);
}

/* Premium Google Ads Mockups (High-Fidelity) */
.premium-ad-card {
    background: #FFFDF2; /* High-converting cream ad card background */
    border: 1px solid #EBE0C5;
    border-radius: 16px;
    padding: 1.75rem;
    color: #333333;
    text-align: left;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 1rem 0;
}
.premium-ad-card .ad-badge {
    background: #006621;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    display: inline-block;
    align-self: flex-start;
    letter-spacing: 0.05em;
    font-family: Arial, sans-serif;
}
.premium-ad-card h4 {
    font-family: Arial, sans-serif;
    color: #1A0DAB; /* Google blue */
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
}
.premium-ad-card h4:hover {
    text-decoration: underline;
    cursor: pointer;
}
.premium-ad-card .ad-url {
    color: #006621; /* Google green */
    font-size: 0.85rem;
    font-family: Arial, sans-serif;
}
.premium-ad-card p {
    color: #4D4D4D;
    font-size: 0.875rem;
    font-family: Arial, sans-serif;
    line-height: 1.4;
}
.premium-ad-card .ad-btn {
    align-self: flex-end;
    background: #1A73E8;
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: sans-serif;
    transition: background 0.2s;
    margin-top: 0.25rem;
}
.premium-ad-card .ad-btn:hover {
    background: #1557B0;
    text-shadow: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* In-Grid Native Ad Dark Theme Adaptation */
.native-ad-dark {
    background: rgba(22, 28, 54, 0.4);
    border: 1px solid var(--border-active);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}
.native-ad-dark .ad-badge {
    background: #00F2FE;
    color: var(--bg-base);
}
.native-ad-dark h4 {
    color: #00F2FE;
}
.native-ad-dark p {
    color: var(--text-secondary);
}
.native-ad-dark .ad-btn {
    background: var(--gradient-accent);
    color: var(--bg-base) !important;
}
.native-ad-dark .ad-btn:hover {
    background: #4FACFE;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

/* Header Search Widget Layout (AC Autocomplete) */
.header-search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
    gap: 0.5rem;
    max-width: 650px;
    width: 100%;
    margin-left: 2rem;
    position: relative;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.header-search-form:focus-within {
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.15);
    background: rgba(255, 255, 255, 0.04);
}
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0.5rem;
}
.search-input-wrapper .search-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    min-width: 16px;
}
.search-input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 100%;
    padding: 0.4rem 0;
}
.search-input-wrapper input::placeholder {
    color: var(--text-muted);
}
.search-divider {
    width: 1px;
    height: 20px;
    background: var(--border-glass);
}
.search-submit-btn {
    background: var(--gradient-accent);
    border: none;
    outline: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-base);
    cursor: pointer;
    transition: var(--transition-smooth);
    min-width: 32px;
}
.search-submit-btn:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}
.search-submit-btn i {
    width: 16px;
    height: 16px;
}

/* Suggestion Overlay Dropdowns */
.suggest-overlay {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(13, 18, 41, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 20000;
    overflow: hidden;
    display: none;
}
.suggest-item {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}
.suggest-item:hover,
.suggest-item.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.1) 0%, rgba(79, 172, 254, 0.1) 100%);
    color: #00F2FE;
}
.suggest-item span.major-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

/* Mobile & Tablet Responsive Adjustments */
.above-fold-metrics-grid {
    grid-template-columns: 1fr 1fr;
}
.home-suburbs-grid {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .header-search-form {
        margin-left: 0;
        max-width: 100%;
    }
    .registry-table tr {
        display: flex;
        flex-direction: column;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-glass);
    }
    .registry-table th, .registry-table td {
        display: block;
        width: 100% !important;
        padding: 0.25rem 0 !important;
    }
    .registry-table th {
        font-size: 0.8rem;
        color: var(--text-muted);
    }
}

@media (max-width: 576px) {
    .header-search-form {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.5rem;
        margin-left: 0;
    }
    .search-divider {
        display: none;
    }
    .search-input-wrapper {
        border-bottom: 1px solid var(--border-glass);
        padding-bottom: 0.25rem;
    }
    .search-input-wrapper:last-of-type {
        border-bottom: none;
    }
    .search-submit-btn {
        width: 100%;
        height: 38px;
    }
    .home-suburbs-grid {
        grid-template-columns: 1fr;
    }
    .comp-table, .comp-table thead, .comp-table tbody, .comp-table th, .comp-table td, .comp-table tr {
        display: block;
        width: 100% !important;
    }
    .comp-table thead {
        display: none; /* Hide headers on mobile */
    }
    .comp-table tr {
        margin-bottom: 1rem;
        border: 1px solid var(--border-glass);
        border-radius: 12px;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.01);
    }
    .comp-table td {
        border-bottom: none;
        padding: 0.35rem 0.25rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }
    .comp-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-secondary);
        font-size: 0.75rem;
        text-transform: uppercase;
        text-align: left;
        display: block;
    }
    .action-icons {
        justify-content: flex-end;
    }
    .distance-progress-container {
        justify-content: flex-end;
    }
}

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

/* SGE AI Overview Container */
.sge-container {
    background: linear-gradient(180deg, rgba(0, 242, 254, 0.03) 0%, rgba(10, 14, 30, 0.45) 100%);
    border: 1px solid rgba(0, 242, 254, 0.12);
    border-left: 5px solid #00F2FE;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
}
.sge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}
.sge-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #00F2FE;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    margin: 0;
}
.sge-sparkle {
    color: #00F2FE;
    filter: drop-shadow(0 0 5px rgba(0, 242, 254, 0.6));
}
.sge-sources {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sge-source-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.sge-source-badge:hover {
    background: rgba(0, 242, 254, 0.05);
    border-color: rgba(0, 242, 254, 0.25);
}
.sge-source-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
}
.sge-source-url {
    font-size: 0.6rem;
    color: var(--text-muted);
}
.sge-thumb {
    float: right;
    width: 150px;
    height: 110px;
    border-radius: 12px;
    object-fit: cover;
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-glass);
}
.sge-highlight {
    background: rgba(0, 242, 254, 0.1);
    border-radius: 4px;
    padding: 0 4px;
    border-bottom: 1px dashed rgba(0, 242, 254, 0.4);
}
.sge-list {
    list-style-type: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0;
}
.sge-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}
.sge-list li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #00F2FE;
    border-radius: 50%;
    margin-top: 0.5rem; /* Vertically centers the dot with the 1.5 line-height first line of text */
    margin-right: 0.65rem;
    flex-shrink: 0;
    box-shadow: 0 0 4px rgba(0, 242, 254, 0.6);
}

@media (max-width: 576px) {
    .sge-container {
        padding: 1.25rem;
    }
    .sge-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .sge-sources {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }
    .sge-thumb {
        float: none;
        width: 100%;
        height: 160px;
        margin-left: 0;
        margin-bottom: 1rem;
    }
}

.sge-details-grid {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
}

@media (max-width: 768px) {
    .sge-details-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}


