:root {
  /* Primary Colors */
  --color-primary-dark: #064e3b;    /* green-900 - darker green */
  --color-primary: #15803d;         /* green-700 - base green */
  --color-primary-light: #22c55e;   /* green-500 - lighter green */
  --color-primary-subtle: #f0fdf4;  /* green-50 - very light green */

  /* Gradients */
  --gradient-primary: linear-gradient(to right, var(--color-primary) 0%, var(--color-primary-dark) 100%);

  /* Background colors with opacity */
  --color-primary-10: rgba(21, 128, 61, 0.1);  /* green-700 with 10% opacity */
  --color-primary-20: rgba(21, 128, 61, 0.2);  /* green-700 with 20% opacity */

  /* Text colors */
  --color-primary-text: #ffffff;
  --color-primary-text-muted: rgba(255, 255, 255, 0.7);
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    /*overflow: hidden; */
    font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-style: normal;
  background-color: #f0f0f0;
  color: #333; /* Darker gray for text */
}

body.details-page {
    overflow: auto !important;
    height: auto !important;
}

/*body:not(.details-page) {*/
/*    overflow: hidden;*/
/*}*/

.info-box {
    position: absolute;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 8px;
    border-radius: 4px;
    display: none;
    pointer-events: none;
    z-index: 200;
    border: 2px solid #202020;
    border-radius: 0px;
}

path {
    cursor: pointer;
    transition: fill 0.3s ease;
    vector-effect: non-scaling-stroke;
    shape-rendering: geometricPrecision;
}

.hover-box {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px;
    border-radius: 3px;
    pointer-events: none;
    font-size: 12px;
    display: none;
    z-index: 1000;
}

/*#map-container {*/
/*    position: relative;*/
/*    width: 100vw;*/
/*    height: calc(100vh - 73px); !* Subtract the height of top menu + divider *!*/
/*    overflow: hidden;*/
/*    display: flex;*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*}*/

svg {
    width: 100%;
    height: 100%;
    transform-origin: center;
    transition: transform 0.2s ease;
}


h1 {
    margin-top: 0;
    color: #333; 
}

#top-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    position: relative; /* Чтобы кнопка переключателя темы была справа */
    /* margin-bottom: 15px; */
    flex-direction: row;
    background: none;
    height: 50px;
}

.divider {
    height: 3px;
    width: 100%;
    background-color: var(--color-primary);
    margin-bottom: 10px;
}

.theme-switcher button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 50px;
}

.theme-switcher svg {
    width: 44px; /* Здесь задай желаемый размер иконки */
    height: 44px;
}

#search-input {
    padding: 4px;
    padding-left: 16px;
    border: none;
    outline: none;
    width: 300px;
    font-size: 16px;
    background-color: transparent;
    transition: width 0.3s;
    color: var(--color-primary);
}

#search-input::placeholder {
    color: var(--color-primary); /* Измените на нужный цвет */
    font-size: 16px; /* Изменение размера шрифта */
    opacity: 1; /* Прозрачность текста, 1 - полностью видимый */
}


#search-input:focus {
    width: 500px;
    transition: width 0.3s;
}

.search-container {
    position: relative; /* Ensure the container is positioned relative to its normal position */
    display: flex;
    align-items: center;
    border: 2px solid #78887b;
    border-radius: 5px;
    padding: 5px;
    background-color: #fff;
    transition: box-shadow 0.3s;
}

.search-container:hover,
.search-container:focus-within {
    border-width: 3px;
    border-color: var(--color-primary);
    box-shadow: 3.1px 3.1px var(--color-primary);
}


.suggestions {
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    position: absolute;
    background-color: white;
    width: 100%;
    z-index: 1000;
    top: 100%; /* Position the suggestions below the search container */
    left: 0;
    display: none; /* Hide by default */
}

.suggestions::-webkit-scrollbar {
    display: none;
}

.suggestions.visible {
    display: block; /* Show when the 'visible' class is added */
}

.suggestion {
    padding: 10px;
    cursor: pointer;
}

.suggestion:hover {
    background-color: #f0f0f0;
}

.suggestion.highlight {
    background-color: #e0e0e0;
}

#map-container {
    position: relative;
    width: 100vw;
    height: calc(100vh - 73px);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    touch-action: none; /* Disable browser's built-in touch actions */
    -webkit-tap-highlight-color: transparent;
}

#world-map {
    position: absolute;
    width: 100%;
    height: 100%;
    shape-rendering: crispEdges;
    max-width: none; /* Add this */
    max-height: none; /* Add this */
    object-fit: contain; /* Add this */
    display: block;
}



/* Add these styles for better touch support */
@media (hover: none) and (pointer: coarse) {
    #map-container {
        touch-action: none;
    }
}

#side-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 66.666vw;
    max-width: 900px;
    max-height: 80vh;
    background: #f9fafb;
    color: var(--color-primary-dark);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    box-sizing: border-box;
    z-index: 1000;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
    overflow: auto;
    border-bottom: 5px solid var(--color-primary);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;
}

#side-menu::-webkit-scrollbar {
    display: none;
}

#side-menu.open {
    opacity: 1;
    pointer-events: auto;
    /*transform: translate(-50%, -50%) scale(1);*/
}

#side-menu h1 {
    color: var(--color-primary-dark);
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#side-menu h1 .flag {
    font-size: 2rem;
    line-height: 1;
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    cursor: pointer;
    font-size: 28px;
    background: none;
    border: none;
    outline: none;
    color: var(--color-primary-dark);
    opacity: 0.8;
    transition: opacity 0.2s ease;
    padding: 0.5rem;
}

.close-btn:hover {
    opacity: 1;
}

.country-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background-color: var(--color-primary-subtle);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: var(--color-primary-dark);
    border-left: 4px solid var(--color-primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-title {
    font-size: 1rem;
    color: var(--color-primary-dark);
    margin: 0;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

.stat-change {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change .positive {
    color: #4ade80; /* Lighter green for positive changes */
}

.stat-change .negative {
    color: #f87171; /* Light red for negative changes */
}

.view-details-link {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.875rem 1.75rem;
    background-color: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    align-self: flex-start;
    box-shadow: 0 4px 6px var(--color-primary-10);
}

.view-details-link:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--color-primary-10);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    z-index: 999;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Extra Large Loading bar container with bottom fade */
.loading-bar-container {
  position: fixed;
  top: 76px; /* Right below the header */
  left: 0;
  width: 100%;
  height: 6px; /* Significant height */
  background-color: rgba(0, 0, 0, 0.15);
  z-index: 999;
  display: none; /* Initially hidden */
  overflow: visible; /* Changed from hidden to allow the gradient to extend below */
  opacity: 1;
  transition: opacity 0.6s ease;
}

.loading-bar-container.hiding {
  opacity: 0;
}

/* The actual loading bar with bottom fade */
.loading-bar {
  height: 100%;
  width: 0%; /* Initially 0% width */
  background: linear-gradient(to right, #4ade80, #10b981); /* Bright green gradient */
  /*box-shadow: 75px 75px 75px rgba(74, 222, 128, 0.95); !* Maximum glow *!*/
  transition: width 0.3s ease-out;
  position: relative;
  /*border-radius: 0 6px 6px 0; !* Rounded right edge *!*/
}

/* Adding bottom fade effect */
.loading-bar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 10px;
  background: linear-gradient(to bottom, rgba(74, 222, 128, 0.7), transparent);
  border-radius: 0 0 8px 8px;
}

/* Animation for the loading bar to make it look more dynamic */
@keyframes pulse {
  0% { opacity: 1; ); }
  50% { opacity: 0.85; ); }
  100% { opacity: 1; ); }
}

.loading-bar.active {
  animation: pulse 1.5s infinite;
}

/* Add a subtle glow to make the loading bar more visible */
.loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px; /* Very wide shimmer effect */
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.7));
  transform: translateX(100%);
  animation: shimmer 1.5s infinite;
}

/* Add these to your existing style.css */

/* Header and Logo styles */
.page-header {
    background: var(--gradient-primary);
    color: var(--color-primary-text);
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.page-header-content {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 30px;
    width: auto;
}

.breadcrumb {
    color: #9cb5a3;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Button styles */
.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-primary-text);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

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

.btn-secondary {
    background-color: #71917a;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #b3c7b9;
}

/* Card styles */
.card {
    border: 1px solid #e5e9e7;
    border-radius: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: white;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px var(--color-primary-10);
}

/* Chart styles */
.chart-container {
    border: 1px solid #e5e9e7;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: white;
    margin-bottom: 2rem;
}

/* Stats section styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: #f8faf9;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e9e7;
}

.stat-label {
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Filter section styles */
.filter-section {
    background-color: #f8faf9;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e9e7;
}

.select-input {
    border: 1px solid #9cb5a3;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background-color: white;
    color: #1a1a1a;
    min-width: 200px;
}

.select-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-10);
}

/* Update info styles */
.update-info {
    background-color: #f8faf9;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
    border: 1px solid #e5e9e7;
    font-size: 0.875rem;
    color: #666;
}

/* Ensure body styles are preserved */
html, body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    background-color: #f0f0f0;
    color: #333;
}

body.details-page {
    overflow: auto !important;
    height: auto !important;
}

.page-header a {
    text-decoration: none;
    color: white;
    transition: color 0.2s;
    font-size: 24px;
}

.page-header a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/*!* Updated search container styles for header *!*/

/*    background-color: rgba(255, 255, 255, 0.1);*/
/*    border: 1px solid rgba(255, 255, 255, 0.2);*/
/*    padding: 0.5rem;*/
/*    border-radius: 0.5rem;*/
/*    width: 300px;*/
/*    transition: width 0.3s, background-color 0.3s;*/
/*}*/

.page-header .search-container:hover,
.page-header .search-container:focus-within {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.page-header #search-input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    padding: 0.25rem 0.5rem;
}

.page-header #search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.page-header #search-input:focus {
    outline: none;
}

.page-header .suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Adjust map container for new header */
#map-container {
    height: calc(100vh - 64px); /* Adjust based on header height */
    margin-top: 0;
}

/* Remove old top-menu and divider as they're no longer needed */
#top-menu, .divider {
    display: none;
}

/* Base body styles */
html, body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    background-color: #f0f0f0;
    color: #333;
    height: 100%;
}

/* Disable scrolling for main page */
body.main-page {
    overflow: hidden;
}

/* Enable scrolling for details pages */
body.details-page {
    overflow: auto !important;
    height: auto !important;
}

.page-header-content {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header a.site-title {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    height: 40px; /* Match logo height */
    line-height: 40px; /* Match logo height */
    /*margin-left: 2rem;*/
}

.logo-container {
    display: flex;
    align-items: center;
}

/* Search container styles */
.page-header .search-container {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 0.5rem;
    width: 300px;
    transition: width 0.3s, background-color 0.3s;
    position: relative; /* Add this to properly position suggestions */
}

.page-header .search-container:hover,
.page-header .search-container:focus-within {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.page-header #search-input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    padding: 0.25rem 0.5rem;
}

.page-header #search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.page-header #search-input:focus {
    outline: none;
}

/* Updated suggestions styles */
.suggestions {
    position: absolute;
    top: calc(100% + 8px); /* Add some space between input and suggestions */
    left: 0;
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e5e9e7;
}

.suggestion {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #333;
    font-size: 0.95rem;
}

.suggestion:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.suggestion:hover {
    background-color: #f8faf9;
}

.suggestion.highlight {
    background-color: #edf2ef;
}

/* Style the scrollbar */
.suggestions::-webkit-scrollbar {
    width: 8px;
}

.suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0.5rem 0.5rem 0;
}

.suggestions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.suggestions::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Ensure z-index hierarchy is correct */
.page-header {
    position: relative;
    z-index: 1000;
}

#map-container {
    z-index: 1;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px solid #78887b;
    border-radius: 5px;
    padding: 8px;
    background-color: #fff;
    transition: all 0.3s ease;
    width: 300px;
    z-index: 1100;
}

.search-container:hover,
.search-container:focus-within {
    border-width: 3px;
    box-shadow: 3.1px 3.1px #416348;
    border-color: #416348;
    width: 400px;
}

#search-input {
    width: 100%;
    padding: 8px;
    padding-left: 16px;
    border: none;
    outline: none;
    font-size: 16px;
    background-color: transparent;
    color: #416348;
    z-index: 1100;
}

#search-input::placeholder {
    color: #416348;
    font-size: 16px;
    opacity: 1;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #e5e9e7;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1100;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
}

.suggestion {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #333;
}

.suggestion:hover,
.suggestion.highlight {
    background-color: #f8faf9;
}

/* Ensure top menu has proper z-index and positioning */
#top-menu {
    position: relative;
    z-index: 1000;
    background: transparent;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Adjust map container to prevent overlap */
#map-container {
    position: relative;
    z-index: 1;
}

.page-header {
    background-color: #416348;
    padding: 1rem 2rem;
    position: relative;
    z-index: 1000;
}

.page-header-content {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}


.site-title {
    color: var(--color-primary-text);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: bold;
    margin-left: 1rem;
}


.search-container {
    position: relative;
    width: 300px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    padding: 6px 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent; /* Add transparent border by default */
    box-sizing: border-box; /* Ensure padding and border are included in element's total size */
    height: 44px; /* Set fixed height */
    display: flex;
    align-items: center;
}

.page-header .search-container {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-container:hover,
.search-container:focus-within {
    width: 400px;
    background-color: white;
    border-color: #416348;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-header .search-container:hover,
.page-header .search-container:focus-within {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

#search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    padding: 4px 0;
}

#search-input::placeholder {
    color: #666;
}

.suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.suggestions.visible {
    display: block;
}

.suggestion {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion:hover,
.suggestion.highlight {
    background-color: #f5f5f5;
}

/* Update map container to work with the new header */
#map-container {
    height: calc(100vh - 72px); /* Adjust based on header height */
    margin-top: 0;
}

.header-link {
    text-decoration: none;
    color: var(--color-primary-text-muted);
    font-size: 16px !important;
    margin-left: 2rem;
    transition: color 0.2s ease;
    position: relative;
}

.header-link:hover {
    color: var(--color-primary-text);
}

.header-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: ghostwhite;
    transition: width 0.3s ease;
}

.header-link:hover:after {
    width: 100%;
}

.page-header #search-input {
    color: var(--color-primary-text);
}

.page-header #search-input::placeholder {
    color: var(--color-primary-text-muted);
}

/* Header navigation links */
.page-header a {
    color: var(--color-primary-text);
    transition: color 0.2s;
}

.page-header a:hover {
    color: var(--color-primary-text-muted);
}

.gradient-header {
    background: var(--gradient-primary);
    color: var(--color-primary-text);
}


/* Footer styles - add to your style.css file */
.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 2.5rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-left, .footer-center, .footer-right {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 2rem;
    width: auto;
}

.footer-logo-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-left: 0.75rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 20rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
    position: relative;
    width: fit-content;
}

.footer-link:hover {
    color: white;
}

.footer-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-primary-light);
    transition: width 0.3s ease;
}

.footer-link:hover:after {
    width: 100%;
}

.footer-author {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.author-link {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
    margin-left: 0.5rem;
}

.author-link:hover {
    opacity: 0.9;
}

.author-logo {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    margin-left: 0.5rem;
    border: 2px solid white;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Make sure the footer stays at the bottom */
html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Sample Data Notification */
.notification-bar {
    background-color: #fff3cd;
    border: 2px dashed #ffeeba;
    padding: 0.75rem 0;
    width: 100%;
    position: relative;
    z-index: 900;
}

.notification-container {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.notification-icon {
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

.notification-icon img {
    width: 24px;
    height: 24px;
}

.notification-text {
    flex: 1;
    color: #856404;
    font-size: 0.95rem;
}

.notification-text p {
    margin: 0;
}

.notification-close {
    background: none;
    border: none;
    color: #856404;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

/* Notification link */
.notification-link {
    color: #664d03;
    text-decoration: underline;
    font-weight: 600;
    margin-left: 4px;
    cursor: pointer;
    transition: color 0.2s;
}

.notification-link:hover {
    color: #856404;
}

/* Explanation popup */
.explanation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1500;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.explanation-overlay.active {
    display: block;
    opacity: 1;
}

.explanation-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 550px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1600;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    /*margin: 20px;*/
}

.explanation-popup.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    /*margin: 20px;*/
}

.explanation-content {
    padding: 25px;
}

.explanation-content h3 {
    margin-top: 0;
    color: #15803d;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.explanation-content p {
    margin-bottom: 15px;
    line-height: 1.5;
    color: #333;
}

.explanation-close-btn {
    background-color: #15803d;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.explanation-close-btn:hover {
    background-color: #166534;
}

/* Update existing notification styles */
.notification-bar {
    background-color: #fff3cd;
    border: 2px dashed #ffeeba;
    padding: 0.75rem 0;
    width: 100%;
    position: relative;
    z-index: 900;
}

.notification-container {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.notification-icon {
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

.notification-icon img {
    width: 24px;
    height: 24px;
}

.notification-text {
    flex: 1;
    color: #856404;
    font-size: 0.95rem;
}

.notification-text p {
    margin: 0;
}

.notification-close {
    background: none;
    border: none;
    color: #856404;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

@media (max-width: 815px) {
    /* Header container */
    .explanation-popup {
        width: 95%;
        max-width: none;
    }

    .explanation-content {
        padding: 20px;
    }

    .explanation-content h3 {
        font-size: 1.3rem;
    }

    .notification-container {
        padding: 0 1rem;
    }

    .notification-text {
        font-size: 0.85rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 2rem;
        padding: 0 1.5rem;
    }

    .footer-left, .footer-center, .footer-right {
        width: 100%;
    }

    .footer-links {
        margin-bottom: 1.5rem;
    }

    .page-header {
        padding: 0;
    }

    .loading-bar-container {
        top: 70px;
    }

    .page-header-content {
        position: relative;
        height: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hide non-mobile elements */
    .site-title, .header-link {
        display: none;
    }

    /* Center logo */
    .logo-container {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo {
        height: 30px;
        margin: 0;
        margin-left: 0.1rem;
    }

    /* Position menu button at left EDGE */
    .menu-icon-button {
        position: absolute;
        left: 0;
        height: 50px;
        width: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    /* Position search button at right EDGE */
    .search-icon-button {
        position: absolute;
        right: 0;
        height: 50px;
        width: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    /* Icon styling */
    .menu-icon-button img,
    .search-icon-button img {
        width: 24px;
        height: 24px;
        filter: brightness(0) invert(1); /* Make icons white */
    }

    /* Hide desktop search */
    .page-header .search-container {
        display: none;
    }

    /* Map container adjustment */
    #map-container {
        height: calc(100vh - 50px);
        width: 100vw;
        overflow: hidden;
    }

    /* ---- The rest of your mobile styles remain the same ---- */

    /* Mobile side menu grid */
    .country-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Mobile side menu size */
    #side-menu {
        margin-top: 1rem;
        width: 90%;
        max-width: none;
        padding: 1.5rem;
        max-height: 90vh; /* Limit height on mobile */
        overflow-y: auto; /* Ensure scrollable */
    }

    /* Search overlay */
    .search-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: white;
        z-index: 2000;
        display: none;
        flex-direction: column;
        padding: 1rem;
    }

    .search-overlay.active {
        display: flex;
    }

    .search-overlay-header {
        display: flex;
        align-items: center;
        margin-bottom: 1rem;
        position: relative;
    }

    .search-overlay .search-container {
        display: block !important;
        width: 100%;
        margin: 0;
        border: 1px solid var(--color-primary);
        background-color: white;
    }

    .search-overlay-close {
        background: none;
        border: none;
        font-size: 24px;
        padding: 8px;
        margin-left: 8px;
        cursor: pointer;
    }

    /*.modal-overlay {*/
    /*    opacity: 0;*/
    /*}*/

    .modal-overlay.open {
        opacity: 0;
        pointer-events: auto;
        background: none;
    }

    /* Mobile search input and suggestions */
    .search-overlay #mobile-search-input {
        width: 100%;
        padding: 3px;
        font-size: 16px;
        color: #333;
        display: block;
        background-color: white;
    }

    .search-overlay #mobile-search-input::placeholder {
        color: #666;
    }

    .search-overlay #mobile-suggestions {
        position: static;
        max-height: calc(100vh - 120px);
        margin-top: 1rem;
        border: 1px solid #e5e9e7;
        overflow-y: auto;
        width: 100%;
        display: block;
        background-color: white;
        border-radius: 5px;
    }

    #mobile-suggestions .suggestion {
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
        color: #333;
    }

    #mobile-suggestions .suggestion:last-child {
        border-bottom: none;
    }

    /* Mobile menu panel */
    .mobile-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        height: 100%;
        background-color: white;
        z-index: 2000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .mobile-menu.active {
        transform: translateX(0);
    }

    .mobile-menu-header {
        background: var(--gradient-primary);
        color: var(--color-primary-text);
        padding: 1.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: none;
    }

    .mobile-menu-close {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
    }

    .mobile-menu-content {
        padding: 0;
    }

    .mobile-menu-link {
        display: block;
        padding: 1rem;
        color: var(--color-primary-dark);
        text-decoration: none;
        border-bottom: 1px solid #f0f0f0;
        font-size: 16px;
    }

    .mobile-menu-link:hover {
        background-color: #f8f8f8;
    }

    .mobile-menu-link:hover::before {
        transform: scale(1.2);
    }

    .mobile-menu-link:last-child {
        border-bottom: none;
    }

    .mobile-menu-link::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background-color: var(--color-primary);
        margin-right: 12px;
        transition: transform 0.2s;
    }

    .mobile-menu-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        display: none;
    }

    .mobile-menu-backdrop.active {
        display: block;
    }

    .mobile-menu-logo-container {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-menu-title {
        color: var(--color-primary-text);
        font-size: 20px;
        font-weight: 600;
        letter-spacing: 0.5px;
        margin-left: 7px;
    }
}

/* Desktop styles (screens over 815px) */
@media (min-width: 816px) {
    /* Hide mobile elements on desktop */
    .search-icon-button,
    .menu-icon-button,
    .search-overlay,
    .mobile-menu,
    .mobile-menu-backdrop {
        display: none !important;
    }
}


body.main-page .site-footer {
    display: none;
}