:root {
    /* More professional color palette - replacing the blue-heavy scheme */
    --primary-color: #4b7bec;      /* A softer blue */
    --primary-dark: #3867d6;       /* Darker blue for gradients */
    --secondary-color: #a5b1c2;    /* Soft neutral blue-grey */
    --accent-color: #ffffff;       /* White */
    --accent-light: #f7f9fc;       /* Very light blue-grey background */
    --text-color: #2f3542;         /* Dark grey for main text */
    --text-light: #57606f;         /* Lighter grey for secondary text */
    --low-wait-color: #218c5a;     /* Darker green for better legibility */
    --medium-wait-color: #e67e22;  /* More standard orange/amber */
    --high-wait-color: #e74c3c;    /* More standard red */
    --very-high-wait-color: #2d3436; /* Near black */
    --closed-color: #a4b0be;       /* Grey */
    --border-color: #dfe4ea;       /* Light grey for borders */
    --shadow-color: rgba(47, 53, 66, 0.1);
    --font-family: 'Google Sans', 'Segoe UI', Roboto, Arial, sans-serif;
    
    /* Card properties */
    --card-radius: 12px;
    --card-shadow: 0 2px 4px 0 var(--shadow-color), 0 1px 2px 0 rgba(47, 53, 66, 0.05);
    --card-hover-shadow: 0 4px 8px 0 var(--shadow-color), 0 2px 4px 0 rgba(47, 53, 66, 0.1);
    
    /* Animation speeds */
    --transition-speed: 0.2s;
    
    /* Heatmap colors */
    --heatmap-low: #27ae60;      /* Standard green */
    --heatmap-medium: #f39c12;   /* Standard yellow */
    --heatmap-high: #e74c3c;     /* Standard red */
    --heatmap-very-high: #2d3436; /* Near black */
}

/* Basic styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--accent-light);
    color: var(--text-color);
    font-size: 16px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header with more subtle gradient */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--accent-color);
    padding: 1.25rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay for header */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

header .container {
    position: relative;
    z-index: 2;
}

header h1 {
    font-size: 2rem;
    display: flex;
    align-items: center;
    font-weight: 500;
    letter-spacing: -0.5px;
}

header h1 i {
    margin-right: 0.75rem;
    font-size: 1.8rem;
}

.last-updated {
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    background-color: var(--accent-light);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.last-updated span {
    margin-left: 5px; /* Add spacing between colon and timestamp */
}

/* Modern language selector */
.language-selector {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.language-selector button {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
    font-weight: 500;
}

.language-selector button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.language-selector button:first-child {
    border-radius: 20px 0 0 20px;
}

.language-selector button:last-child {
    border-radius: 0 20px 20px 0;
}

.language-selector button:not(.active):hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Tabs container to hold tabs and language selector */
.tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.tabs-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
}

/* Modern tabs */
.tabs {
    display: flex;
    justify-content: flex-start;
    position: relative;
}

.tabs::after {
    content: none; /* Remove the previous underline */
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    color: var(--text-light);
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    margin: 0 0.25rem;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: transparent;
    z-index: 1;
    border-radius: 3px 3px 0 0;
    transition: background-color var(--transition-speed) ease;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 500;
}

.tab-btn.active::after {
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.tab-content.active {
    display: block;
}

/* Style for the tab explanation section */
.tab-explanation {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    text-align: center;
}

.tab-explanation h3 {
    margin-top: 0.5rem;
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 500;
}

.tab-explanation p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.tab-explanation p:last-child {
    margin-bottom: 0;
}

/* Responsive adjustment for the explanation section */
@media (max-width: 768px) {
    .tab-explanation {
        padding: 1.2rem;
        margin: 1.5rem 0;
    }
    
    .tab-explanation h3 {
        font-size: 1.1rem;
    }
    
    .tab-explanation p {
        font-size: 0.95rem;
    }
}

/* Card grid with softer shadows */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    padding: 1.75rem;
    transition: all var(--transition-speed) ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
}

/* Subtle card accents */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

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

.card:hover::before {
    opacity: 1;
}

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

.card-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
}

.card-header i {
    font-size: 1.2rem;
    color: var(--primary-color);
    background: rgba(75, 123, 236, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.card-body {
    text-align: center;
    padding: 1rem 0;
}

.wait-time {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1;
}

.status {
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-block;
    letter-spacing: 0.3px;
}

/* Special case for Line Full status */
.status-very-high {
    background-color: rgba(45, 52, 54, 0.9);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.status-low {
    background-color: rgba(33, 140, 90, 0.1);
    color: var(--low-wait-color);
    border: 1px solid rgba(33, 140, 90, 0.3);
}

.status-medium {
    background-color: rgba(230, 126, 34, 0.1);
    color: var(--medium-wait-color);
}

.status-high {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--high-wait-color);
}

.status-closed {
    background-color: rgba(164, 176, 190, 0.1);
    color: var(--closed-color);
}

/* Chart controls with larger styling */
.chart-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.chart-controls select {
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background-color: white;
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    flex: 1;
    min-width: 200px;
}

.chart-controls select:hover {
    border-color: var(--primary-color);
}

.chart-controls select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(75, 123, 236, 0.25);
}

/* Loading indicator */
.loading {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
    background-color: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    position: relative;
}

.loading::after {
    content: "";
    width: 40px;
    height: 40px;
    position: absolute;
    top: calc(50% - 40px);
    left: calc(50% - 20px);
    border: 3px solid rgba(75, 123, 236, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}

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

/* Improved footer with subtle pattern */
footer {
    margin-top: 4rem;
    padding: 2rem 0;
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

footer p {
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

/* Improved heatmap container */
.heatmap-container {
    width: 100%;
    padding: 1.5rem;
    background-color: white;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden; /* Ensure container properly contains all child elements */
    min-height: 480px; /* Adjust to match average heatmap height */
    transition: min-height 0.3s ease; /* Optional, smooth animation if height adjusts */  
}

.heatmap-title {
    margin-top: 14px;
    margin-bottom: 12px;
    text-align: center;
    font-size: 1.3em;
    font-weight: 500;
    color: var(--text-color);
}

.hours-info {
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: var(--text-light);
    background-color: var(--accent-light);
    padding: 8px;
    border-radius: 20px;
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
}

/* Heatmap table with standard colors */
.heatmap-table-wrapper {
    width: 100%;
    overflow-x: hidden; /* Hide horizontal scrollbar on desktop */
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-width: 100%; /* Ensure it doesn't extend beyond container */
}

.heatmap-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    table-layout: fixed; /* Fixed table layout to better control column widths */
}

.heatmap-table th, .heatmap-table td {
    text-align: center;
    padding: 10px;
    border: 1px solid var(--border-color);
    white-space: nowrap; /* Prevent content wrapping */
    min-width: 40px; /* Minimum width for all cells */
    max-width: 60px; /* Maximum width for better layout control */
}

.heatmap-table thead th {
    background-color: var(--accent-light);
    color: var(--text-color);
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 2;
}

.heatmap-table tbody th {
    background-color: var(--accent-light);
    color: var (--text-color);
    text-align: left;
    font-weight: 500;
}

.heatmap-table .low-wait {
    background-color: var(--heatmap-low);
    color: white;
    transition: all 0.2s ease;
}

.heatmap-table .medium-wait {
    background-color: var(--heatmap-medium);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.heatmap-table .high-wait {
    background-color: var(--heatmap-high);
    color: white;
    transition: all 0.2s ease;
}

.heatmap-table .very-high-wait {
    background-color: var(--heatmap-very-high);
    color: white;
    transition: all 0.2s ease;
}

.heatmap-table td:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 3;
    position: relative;
}

.heatmap-table .outside-hours {
    background-color: var(--accent-light);
    color: var(--text-light);
    font-style: italic;
}

.heatmap-table .no-data {
    background-color: #eee;
    color: var(--text-light);
}

/* Legend with standard colors */
.heatmap-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding: 10px;
    background-color: var(--accent-light);
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 5px 10px;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 4px;
}

.legend-color.low-wait {
    background-color: var(--heatmap-low);
}

.legend-color.medium-wait {
    background-color: var(--heatmap-medium);
}

.legend-color.high-wait {
    background-color: var(--heatmap-high);
}

.legend-color.very-high-wait {
    background-color: var(--heatmap-very-high);
}

.legend-color.outside-hours {
    background-color: var(--accent-light);
    border: 1px dashed var(--text-light);
}

.legend-color.no-data {
    background-color: #eee;
}

/* Debug button and error display - removing debug link styles */
.error {
    background-color: #feeceb;
    color: #db3a34;
    padding: 20px;
    border-radius: var(--card-radius);
    margin: 20px 0;
    text-align: center;
    border-left: 4px solid #db3a34;
    box-shadow: var(--card-shadow);
}

.retry-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 18px;
    margin: 10px 5px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color var(--transition-speed) ease;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3);
}

.retry-button:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.4);
}

/* Ad placeholder styles */
.ad-container {
    width: 100%;
    background-color: #f5f5f5;
    border: 1px dashed var(--border-color);
    text-align: center;
    padding: 1.5rem 1rem;
    margin: 1.5rem 0;
    border-radius: var(--card-radius);
    color: var(--text-light);
    font-size: 0.9rem;
}

.ad-container.horizontal {
    min-height: 90px;
}

.ad-container.sidebar {
    min-height: 250px;
}

.ad-sidebar {
    position: sticky;
    top: 2rem;
}

/* Adjusting layout for ad placement */
@media (min-width: 992px) {
    .content-with-sidebar {
        display: grid;
        grid-template-columns: 3fr 1fr;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%; /* Ensure this doesn't overflow the container */
    }

    .content-with-sidebar > div:first-child {
        width: 100%;
        max-width: 100%; /* Ensure first column respects parent width */
        overflow: hidden; /* Hide overflow */
    }
}

/* Add new full-width content style for historical trends */
.content-full-width {
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* Prevent overflow issues */
}

/* Make heatmap container take full width when in full-width layout */
.content-full-width .heatmap-container {
    width: 100%;
    max-width: 100%;
}

/* Improved mobile heatmap table styling */
@media (max-width: 768px) {
    /* Make sure the table container takes full width */
    .content-full-width,
    .content-full-width .heatmap-container {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    header .container {
        padding-left: 20px; /* Increased left padding */
    }
    
    /* More prominent scroll indicator */
    .scroll-indicator {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 0 15px 0;
        padding: 12px;
        color: var(--primary-color);
        font-weight: 500;
        font-size: 15px;
        background-color: var(--accent-light);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .scroll-indicator i {
        margin-left: 10px;
        animation: slideRight 1.5s ease-in-out infinite;
        font-size: 30px; /* Increased font-size for larger arrow */
    }
    
    @keyframes slideRight {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(10px); }
    }
    
    /* Table wrapper with scroll shadows */
    .heatmap-table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 0 20px 0;
        padding: 0;
        border-radius: 8px;
        border: 1px solid var(--border-color);
        position: relative;
        background-color: white;
    }
    
    /* Force table to take necessary space */
    .heatmap-table {
        border-collapse: separate;
        border-spacing: 0;
        width: auto;
        table-layout: fixed;
    }
    
    /* Set explicit sizes for cells */
    .heatmap-table th, 
    .heatmap-table td {
        min-width: 40px;  /* Much larger minimum width */
        height: 55px;     /* Taller cells */
        padding: 8px 8px;
        font-size: 15px;  /* Larger font */
        font-weight: 600; /* Bolder text */
        text-align: center;
        border: 1px solid var(--border-color);
        position: relative;
    }
    
    /* Hour headers styling */
    .heatmap-table thead th {
        position: sticky;
        top: 0;
        z-index: 6;
        background-color: var(--accent-light);
        font-weight: 600;
        min-width: 40px;
        height: 45px;
        white-space: nowrap;
        box-shadow: 0 2px 3px rgba(0,0,0,0.1);
    }
    
    /* Day names column */
    .heatmap-table tbody th {
        position: sticky;
        left: 0;
        z-index: 5;
        min-width: 60px;
        background-color: var(--accent-light);
        font-weight: 600;
        text-align: center;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    }
    
    /* When a day name cell is at intersection with header row */
    .heatmap-table tbody th:first-child {
        z-index: 7;
    }
    
    /* "Full" text styling */
    .heatmap-table .very-high-wait {
        font-weight: 700;
        letter-spacing: 0.5px;
    }
    
    /* Ensure the heatmap container padding is appropriate */
    .heatmap-container {
        padding: 15px 10px;
    }
    
    /* Make sure the title is readable */
    .heatmap-title {
        font-size: 18px;
        font-weight: 600;
        padding: 0 10px 15px 10px;
        text-align: center;
    }
    
    /* Keep the timezone info prominent */
    .hours-info {
        margin-bottom: 15px;
        padding: 0px 15px;
        font-size: 14px;
        text-align: center;
    }
}

/* Mobile Header Layout Fixes */
@media (max-width: 768px) {
    /* Fix for language selector being cut off */
    .language-selector {
        width: 100%;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .language-selector button {
        min-width: 110px; /* Ensure buttons are wide enough for text */
        padding: 8px 15px;
        font-size: 14px;
    }
    
    /* Fix last updated section layout */
    .last-updated {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        padding: 10px 15px;
        margin: 10px 0 15px 0;
        gap: 5px;
    }
    
    .last-updated i {
        margin-right: 5px;
    }
    
    /* Fix tab container layout */
    .tabs-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .tabs {
        width: 100%;
        display: flex;
        justify-content: space-between; /* Spread tabs evenly */
    }
    
    .tab-btn {
        flex: 1;
        text-align: center;
        padding: 10px 5px;
        margin: 0;
        font-size: 15px;
        white-space: nowrap;
    }
    
    /* Fix for dropdowns being cut off */
    .chart-controls {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .chart-controls select {
        width: 100%;
        min-width: unset;
        max-width: 100%;
        font-size: 14px;
        padding: 12px;
        white-space: normal;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    
    /* Fix for service dropdown text being cut off */
    #service-select {
        text-align: left;
        padding-left: 20px;
    }
    
    #time-range {
        text-align: left;
        padding-left: 20px;
    }
    
    /* Make sure dropdown option text doesn't get cut off */
    .chart-controls select option {
        white-space: normal;
    }
    
    /* Fix for heatmap title that might be cut off */
    .heatmap-title {
        font-size: 16px;
        padding: 0 5px 15px 5px;
        word-wrap: break-word;
        line-height: 1.4;
    }
    
    /* Ensure container provides enough space */
    .container {
        padding: 0 10px;
    }
}

/* Extra adjustments for very small screens */
@media (max-width: 375px) {
    .tab-btn {
        font-size: 14px;
        padding: 8px 2px;
    }
    
    .language-selector button {
        min-width: 100px;
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .chart-controls select {
        font-size: 13px;
        padding: 10px;
    }
    
    .heatmap-title {
        font-size: 15px;
    }
    
    .last-updated {
        font-size: 13px;
    }
}

/* Further adjustments for very small screens */
@media (max-width: 375px) {
    .heatmap-table th, 
    .heatmap-table td {
        min-width: 40px;
        font-size: 14px;
    }
    
    .scroll-indicator {
        font-size: 13px;
        padding: 10px;
    }
    
    .heatmap-title {
        font-size: 16px;
    }
    
    .hours-info {
        font-size: 13px;
    }
}


@media (max-width: 992px) {
    .content-with-sidebar {
        grid-template-columns: 1fr; /* Switch to single column on smaller screens */
    }
}

/* Style for the new description section */
.heatmap-description {
    margin: 1rem 0;
    padding: 1rem;
    background-color: var(--accent-light);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
    border-left: 4px solid var(--primary-color);
}

.heatmap-description p {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.heatmap-description p:last-child {
    margin-bottom: 0;
}

/* Adjust spacing between description and legend */
.heatmap-description + .heatmap-legend {
    margin-top: 1rem;
}

/* Add these styles to your existing CSS file */

/* Error styling */
.error {
    background-color: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.error p {
    margin: 8px 0;
    color: #d32f2f;
}

.error-help {
    background-color: #f5f5f5;
    border-radius: 4px;
    padding: 12px;
    margin: 12px 0;
    text-align: left;
}

.error-help p {
    color: #333;
    font-weight: bold;
    margin: 0 0 8px 0;
}

.error-help ul {
    margin: 0;
    padding-left: 24px;
}

.error-help li {
    color: #555;
    margin: 4px 0;
}

.retry-button {
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
}

.retry-button:hover {
    background-color: #0d47a1;
}

/* Cache notification */
.cache-notice {
    background-color: #fff9c4;
    border: 1px solid #ffd600;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
    color: #5d4037;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.cache-notice i {
    margin-right: 8px;
    color: #ff6f00;
}

/* Editorial content */
.homepage-editorial {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--accent-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
  }
  .homepage-editorial h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
  }
  .homepage-editorial p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1rem;
  }
  .homepage-editorial ul {
    padding-left: 1.5rem;
    margin-left: 0;
    list-style-position: outside;
  }
