:root {
  --text-dark: hsl(141, 41%, 5%);
  --text-light: hsl(141, 41%, 95%);
  --bg-light: hsl(51, 100%, 5%);
  --bg-dark: #000;
  --water-400: hsl(210, 58%, 71%);
  --nature-200: hsl(159, 27%, 63%);
  --nature-300: hsl(159, 27%, 53%);
  --nature-400: hsl(159, 27%, 43%);
  --nature-500: hsl(159, 27%, 43%);
  --nature-600: hsl(159, 27%, 33%);
  --infra-200: hsl(0, 0%, 79%);
  --urban-300: hsl(345, 43%, 83%);
  --urban-400: hsl(345, 43%, 73%);
  --urban-500: hsl(345, 43%, 63%);
  --agriculture-300: hsl(51, 100%, 90%);
  --agriculture-350: hsl(51, 100%, 85%);
  --agriculture-400: hsl(51, 100%, 80%);
  --agriculture-450: hsl(51, 100%, 75%);
  --agriculture-500: hsl(51, 100%, 70%);
  --agriculture-600: hsl(51, 100%, 60%);
  --agriculture-650: hsl(51, 100%, 55%);
  --agriculture-700: hsl(51, 100%, 50%);
  --agriculture-750: hsl(51, 100%, 45%);
  --agriculture-775: hsl(51, 100%, 42%);
  --agriculture-800: hsl(51, 100%, 40%);
  --agriculture-825: hsl(51, 100%, 38%);
  --agriculture-850: hsl(51, 100%, 35%);
  --agriculture-900: hsl(51, 100%, 30%);
  --agriculture-920: hsl(51, 100%, 28%);
  --agriculture-950: hsl(51, 100%, 25%);
  --bare-200: hsl(0, 0%, 85%);
  --bare-300: hsl(0, 0%, 75%);
  --bare-400: hsl(0, 0%, 65%);
  --bare-500: hsl(0, 0%, 55%);

  /* Standardized UI control sizing - matches hamburger menu height (50px) */
  /* Desktop values */
  --ui-padding-y: 15px;
  --ui-padding-x: 16px;
  --ui-font-size: 16px;
  --ui-border-radius: 8px;
  --ui-border-width: 2px;

  /* Tablet values (768px) - matches hamburger menu height (45px) */
  --ui-padding-y-tablet: 13.5px;
  --ui-padding-x-tablet: 12px;
  --ui-padding-x-narrow-tablet: 10px;
  --ui-font-size-tablet: 14px;

  /* Mobile values (480px) - matches hamburger menu height (40px) */
  --ui-padding-y-mobile: 11.5px;
  --ui-padding-x-mobile: 10px;
  --ui-font-size-mobile: 13px;
}

* {
  box-sizing: border-box;
}

html {
  background: linear-gradient(to bottom, var(--bg-dark), var(--bg-light));
  font-family:
    "IBM Plex Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
}

html,
body {
  min-height: 100vh;
  min-width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Sticky Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 40px;
  min-height: 60px;
}

h1 {
  margin: 0;
  font-size: 24px;
  text-align: center;
  flex: 1;
}

h2 {
  margin: 0;
  font-size: 24px;
  text-align: center;
}

.homepage-header,
#countryHeader {
  display: contents;
}

.back-button {
  background: var(--bg-dark);
  color: var(--text-light);
  border: var(--ui-border-width) solid rgba(255, 255, 255, 0.2);
  padding: var(--ui-padding-y) 20px;
  border-radius: var(--ui-border-radius);
  font-size: var(--ui-font-size);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.back-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.back-button:active {
  transform: scale(0.98);
}

.back-button:focus {
  outline: none;
  border-color: var(--text-light);
}

/* Text variants for responsive design */
.back-text-short,
.title-short {
  display: none;
}

.back-text-full,
.title-full,
.title-prefix {
  display: inline;
}

a {
  text-decoration: underline;
  color: var(--text-light);
}

/* Page footer */
.page-footer {
  padding: 20px;
  margin-top: 40px;
  text-align: center;
}

.footer-content {
  font-size: 12px;
  color: var(--text-light);
  opacity: 0.7;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-content a {
  color: var(--text-light);
  text-decoration: underline;
  transition: opacity 0.2s;
}

.footer-content a:hover {
  opacity: 0.8;
}

/* Utility Classes */
.spacer {
  width: 50px;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .navbar {
    padding: 10px 20px;
    min-height: 50px;
  }

  h1 {
    font-size: 18px;
  }

  h2 {
    font-size: 16px;
  }

  .spacer {
    width: 45px;
  }

  .back-button {
    font-size: var(--ui-font-size-tablet);
    padding: var(--ui-padding-y-tablet) var(--ui-padding-x-narrow-tablet);
    min-width: 45px;
  }

  .back-text-full {
    display: none;
  }

  .back-text-short {
    display: inline;
    font-size: 16px;
  }

  .page-footer {
    padding: 16px;
    margin-top: 32px;
  }

  .footer-content {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 8px 16px;
    min-height: 45px;
  }

  h1 {
    font-size: 16px;
  }

  h2 {
    font-size: 14px;
  }

  .title-prefix {
    display: none;
  }

  .title-full {
    display: none;
  }

  .title-short {
    display: inline;
  }

  .back-button {
    font-size: var(--ui-font-size-mobile);
    padding: var(--ui-padding-y-mobile) var(--ui-padding-x-mobile);
    min-width: 40px;
  }

  .back-text-short {
    font-size: 15px;
  }

  .spacer {
    width: 40px;
  }

  .page-footer {
    padding: 14px;
    margin-top: 24px;
  }

  .footer-content {
    font-size: 10px;
  }
}
