/* -------------------------Navigation bar css-------------------------------------------------------------------------------------*/
.md-tabs__link {
  font-weight: bold;
  padding: 0rem 0.6rem;
  font-size: 0.75rem; /* I think default is 0.7 rem for mkdocs material, but I made it slightly bigger */
}

/* -------------------------General all pages css stuff-------------------------------------------------------------------------------------*/
/* make all level‑3 (###) headings use a bold font-weight */
.md-typeset h3 {
  font-weight: 700 !important;
}

/* -------------------------Pages-------------------------------------------------------------------------------------*/

/* Justify regular content */
.md-content {
  text-align: justify;
}

/* Remove footer mkdocs material */
.md-footer__generator {
  display: none !important;
}

/* Increase logo size in the header */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  width: auto;
  height: 2.5rem;
  margin-right: +0.6rem;
  /* Adjust this value (e.g., 2.5rem, 3rem) */
}


/* CSS of images on starterkit and other pages  */
.img-border {
  border: 2px solid #000 !important;
  padding: 0.05px;
  border-radius: 0;
  /* Remove if you want rounded corners */
}

/* IMAGE CSS (starterkit page for now) */
.float-right {
  float: right;
  margin: 0.5em 1em 1em 1em;
}

/* MOBILE IMAGE TWEAKS for starterit for ex */
@media (max-width: 768px) {

  /* 1) Give all bordered images a bit more breathing room */
  .img-border {
    max-width: 90% !important;
    /* don’t overflow */
    height: auto !important;
    display: block;
    margin: 1em auto !important;
    /* center & separate each image */
  }

  .float-right {
    float: none !important;
    display: block !important;
    margin: 1em auto !important;
    width: 90%;
  }

  /* Prevent interference with lists */
  ol,
  ul {
    clear: both;
  }
}


/*Increase size of site name */
.md-header__topic {
  font-size: 1.1rem !important;
  /* Adjust as needed */
  font-weight: bold;
}

/* Image caption styling */
.image-caption {
  font-size: 0.7rem;
  color: #666;
  text-align: center;
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* Card-style header - looks good, keep as is */
.tools-header {
  background-color: #e8f5e9;
  padding: 8px 15px;
  border-left: 4px solid #2a8000;
  border-radius: 0 4px 4px 0;
  display: inline-block;
  /* Keep this */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.75rem;
  /* Add some space below the header */
  font-weight: bold;
}

[data-md-color-scheme="slate"] .tools-header {
  background-color: #1e3a1e;  /* Dark green background */
  border-left: 4px solid #4caf50;  /* Lighter green border */
  color: #e8f5e9;  /* Light text color */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
  .tools-header {
    /* shrink the text a bit */
    font-size: 1rem;
    /* adjust to taste */
    padding: 6px 12px;
    /* tighter padding */
    /* never hyphenate on mobile */
    hyphens: none !important;
    /* keep it left-aligned */
    text-align: left !important;
    /* ensure it wraps only between words */
    white-space: normal;
    overflow-wrap: break-word;
  }
}

/* Card-style header - looks good, keep as is */
.stradegy-header {
  background-color: #e8f5e9;
  padding: 6px 14px;
  border-left: 10px solid #6d0f06;
  border-radius: 0 4px 4px 0;
  display: inline-block;
  /* Keep this */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.75rem;
  /* Add some space below the header */
  font-weight: bold;
}
[data-md-color-scheme="slate"] .stradegy-header {
  background-color: #1e3a1e;  /* Dark green background */
  border-left: 4px solid #4caf50;  /* Lighter green border */
  color: #e8f5e9;  /* Light text color */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 480px) {
  .tools-header {
    /* shrink the text a bit */
    font-size: 1rem;
    /* adjust to taste */
    padding: 6px 12px;
    /* tighter padding */
    /* never hyphenate on mobile */
    hyphens: none !important;
    /* keep it left-aligned */
    text-align: left !important;
    /* ensure it wraps only between words */
    white-space: normal;
    overflow-wrap: break-word;
  }

  .stradegy-header {
  background-color: #e8f5e9;
  padding: 6px 14px;
  border-left: 10px solid #6d0f06;
  border-radius: 0 4px 4px 0;
  display: inline-block;
  /* Keep this */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.75rem;
  /* Add some space below the header */
  font-weight: bold;
  text-align: left
  }
}

/* --------------------------------------------------------------------------------------------------------------*/

/* Titles of pages*/
.page-headers {
  margin: 0.5rem 0 1rem;
  /* drop it below the nav and give breathing room */
  text-align: left;
}

.page-headers>h1 {
  position: relative;
  display: inline-block;
  font-size: 2.25rem;
  font-weight: 700;
  color: #2A6D3C;
  /* dark green text */
  padding-bottom: 0.25rem;
  /* space for underline */
  margin: 0;
}

/* 1) Bold underline accent */
.page-headers>h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40%;
  /* underline spans 40% of the title width */
  height: 4px;
  background-color: #54A36A;
  /* brand green */
  border-radius: 2px;
}

/* 2) Subtle highlight behind first word or two */
.page-headers>h1 span {
  position: relative;
  z-index: 1;
  padding: 0 0.25rem;
  background: rgba(233, 245, 233, 0.6);
  border-radius: 0.25rem;
  margin-right: 0.5rem;
}

/* --------------------------------------------------------------------------------------------------------------*/
/* PROGRESS BAR ON CONTRIBUTING PAGE */
.progress-section {
  margin: 2rem 0;
}

.progress-item {
  margin-bottom: 1.5rem;
}

.progress-item label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* --- Styling for the outer container of the bar --- */
.progress {
  background-color: #e9ecef;
  /* Lighter grey background */
  border-radius: 0.5rem;
  /* More rounded corners */
  overflow: hidden;
  /* Keep the inner bar contained */
  height: 0.6rem;
  /* Make it a bit taller */
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  /* Subtle inner shadow for depth */
}

/* --- Styling for the inner fill bar --- */
.progress-bar {
  height: 100%;
  /* Use a nicer green or your theme's primary color */
  background-color: #28a745;
  /* A common 'success' green */
  /* Add a subtle gradient/stripe effect */
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-size: 1rem 1rem;
  /* Control the size of the stripes */

  width: 0;
  /* Initial width */
  border-radius: 0.5rem;
  /* Match outer radius - adjust if it looks odd */
  /* Ensure smooth transition */
  transition: width 0.6s ease;

  /* Optional: Add animation to make stripes move */
  /* animation: progress-bar-stripes 1s linear infinite; */
}

/* --- Styling for the count number next to the bar --- */
.progress-item span {
  display: inline-block;
  margin-left: 0.75rem;
  /* Slightly more space */
  font-weight: bold;
  vertical-align: middle;
  /* Align better with the taller bar */
  line-height: 1.25rem;
  /* Match progress bar height */
}

/* --- Styling for the Refresh Button --- */
#refresh-btn {
  /* Button Base Styles */
  display: inline-block;
  /* Behave like a button */
  padding: 0.5rem 0.5rem;
  /* Comfortable padding */
  margin-bottom: 1rem;
  /* Keep the margin (moved from inline) */
  font-size: 0.6rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  /* White text */
  background-color: #007bff;
  /* A standard blue */
  border: 1px solid #007bff;
  border-radius: 0.25rem;
  /* Slightly rounded corners */
  cursor: pointer;
  /* Hand cursor on hover */
  user-select: none;
  /* Prevent selecting text */
  vertical-align: middle;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  /* Smooth transitions */
}

/* Hover State */
#refresh-btn:hover {
  background-color: #0056b3;
  /* Darker blue */
  border-color: #0056b3;
  color: #ffffff;
  text-decoration: none;
}

/* Active State (when clicked) */
#refresh-btn:active {
  background-color: #004085;
  /* Even darker blue */
  border-color: #00376e;
  transform: translateY(1px);
  /* Subtle "push" effect */
}

/* Focus State (for accessibility) */
#refresh-btn:focus {
  outline: 0;
  /* Remove default outline */
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
  /* Add a blue glow */
}

/* --------------------------------------------------------------------------------------------------------------*/
/* Hide ### from logbook */
.md-nav__item a[href$="#success-stories"],
.md-nav__item a[href$="#key-numbers"] {
  display: none;
}

/* -------------------------------------------Heatmaps (progress.md)-------------------------------------------------------------------*/
/* Heatmap images container - responsive layout */
.heatmap-container {
  display: flex;

  gap: 20px;
  margin: 20px 0;
}

.heatmap-container img {
  width: 300px;
  max-width: 100%;
  height: auto;
}

/* Mobile adjustments for heatmap images */
@media (max-width: 768px) {
  .heatmap-container {
    flex-direction: column !important;
    align-items: center;
    gap: 1px;
  }

  .heatmap-container img {
    width: 200px !important;
    /* Slightly smaller on mobile */
    max-width: 90% !important;
  }
}

/* -----------------------------------------nav bar colour---------------------------------------------------------------------*/
:root>* {
  --md-primary-fg-color: #036d7a;
  --md-primary-fg-color--light: #036d7a;
  --md-primary-fg-color--dark: #036d7a;
}

/* -----------------------------------------announce banner at top---------------------------------------------------------------------*/
aside.md-banner {
  background-color: #037a4c !important;
  color: #ffffff !important;
}


aside.md-banner a,
aside.md-banner a>div {
  background: transparent !important;
  color: #fff !important;
}

@media (max-width: 768px) {
  /* Banner Text Font Size Adjustment for Mobile */
  aside.md-banner a strong {
    font-size: 0.9em; /
  }
}


/* -----------------------------------------frame around repo link top right---------------------------------------------------------------------*/
.md-source {
  background-color: transparent !important;
  border: 1.3px solid #fff !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  color: #ffff !important;
  max-width: 160px !important;
  /* Limit the maximum width */
  width: auto !important;
  overflow: hidden !important;
}

/* removes the releases icon top right*/
.md-source__fact--version {
  display: none !important;
}

@media (max-width: 768px) {
  .md-source {
    background-color: initial !important;
    border: none !important;
    border-radius: 0 !important;
    padding: initial !important;
    box-shadow: none !important;
    margin: initial !important;
    max-width: initial !important;
    width: initial !important;
    overflow: initial !important;
  }
}

/* --------------------------------------------------------------------------------------------------------------*/

.no-toc h2,
.no-toc h3,
.no-toc h4 {
  display: block;
}

.no-toc .md-nav__link {
  display: none;
}

/* -----------------------------------------make the title (Mapyourgrid) of page bigger in the topbar---------------------------------------------------------------------*/
.md-header-nav__title .md-ellipsis,
.md-header__title .md-ellipsis {
  font-size: 1.4rem !important;      /* your larger size */
}

@media (max-width: 1220px) {
  .md-header-nav__title .md-ellipsis,
  .md-header__title .md-ellipsis {
    font-size: 1rem !important;      /* smaller than laptop */
    margin-left: 0.75rem !important;
  }  
}
/* ---------------------------------make the title (Mapyourgrid) of page stay and not change when scrolling-------------------------------------------------------*/
/* Disable the header title animation completely */
.md-header__title[data-md-component="header-title"] {
  pointer-events: none;
  margin-left: -0.6rem !important;
}

@media (max-width: 768px) {
  .md-header__title[data-md-component="header-title"] {
    margin-left: 0 !important;
  }
}

/* Keep only the first topic (site name) visible */
.md-header__title .md-header__topic:first-child {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

/* Hide the second topic (navpage title) */
.md-header__title .md-header__topic:last-child {
  transform: translateY(2.5rem) !important;
  opacity: 0 !important;
}

.section-title {
  color: #2a6d3c; /* or match your h2 color */
  font-weight: bold;
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
}

.starter-kit-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* ----------------------------starterkit buttons mobile(a bit different than landing page)-------------------------------*/
@media (max-width: 768px) {
  .starter-kit-buttons .btn {
    white-space: normal !important; /* Allow text wrapping */
    line-height: 1.3; /* Adjust line spacing */
    text-align: center; /* Keep text centered */
  }
}

/* ----------------------------tools section smaller buttons-------------------------------*/
@media (min-width: 769px) {
  .tools-buttons-small {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: left;

  }
  .tools-buttons-small .btn {
    flex: 0 0 auto;
    max-width: 500px;
    padding: 0.4rem 0.8rem; /* Thinner padding */
    font-size: 0.8rem; /* Slightly smaller font */
    min-width: 180px; /* Minimum width to prevent too narrow */
    width: auto !important;
    min-width: auto !important;
    max-width: none !important;
  }
}

/* ----------------------------technical mapping strategies buttons-------------------------------*/
.tool-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.tool-buttons .btn {
  flex: 0 0 auto;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  width: auto !important;
  min-width: auto !important;
  max-width: none !important;
}

@media (max-width: 768px) {
  .tool-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .tool-buttons .btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

/* ----------------------------progress buttons are too big-------------------------------*/
.progress-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: left;
}

@media (min-width: 769px) {
  .progress-buttons {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  
  .progress-buttons .btn {
    flex: 0 0 auto;
    max-width: 500px;
    padding: 0.4rem 0.8rem; /* Thinner padding */
    font-size: 0.8rem; /* Slightly smaller font */
    min-width: 180px; /* Minimum width to prevent too narrow */
    width: auto !important;
    min-width: auto !important; 
    max-width: none !important;
  }
}

@media (max-width: 768px) {
  .progress-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .progress-buttons .btn {
    width: 100%;
    max-width: 380px;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* Scoped to only affect the grid section */
.grid-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.country-card {
  background: var(--md-default-bg-color);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--md-shadow-z1);
  transition: transform 0.2s ease;
  text-align: center; 
}

.country-card:hover {
  transform: translateY(-3px);
}

.country-card img {
  width: 60px;
  height: auto;
  margin-bottom: 0.1rem;
}

.country-card a {
  font-weight: 500;
  color: var(--md-primary-fg-color);
  text-decoration: none;
  justify-content: center;
  align-items: center;
}

.country-card a:hover {
  text-decoration: underline;
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
  max-width: 80%;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* --- Team members grid on Blog page --- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  justify-items: center;
  margin-bottom: 40px;
}

.team-member {
  text-align: center;
}
.team-member img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 10px;
}

.company-logo {
  margin-top: 8px;
}

.company-logo img {
  max-height: 30px;
  object-fit: contain;
  opacity: 0.8;
  border-radius: 0;
  transition: opacity 0.3s;
  vertical-align: middle;
}

.company-logo a:hover img {
  opacity: 1;
}

.social-icons {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.social-icons img {
  width: 22px;
  height: 22px;
  opacity: 0.75;
  border-radius:0;
  transition: opacity 0.3s;
}

.social-icons a:hover img {
  opacity: 1;
}

/* --- Impact page - Responsible Mapping - Image Galery --- */
.gallery {
  max-width: 960px;
  margin: 1rem auto;
  font-family: system-ui, sans-serif;
}

.viewer {
  margin-left: auto;
  margin-right: auto;
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: .75rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  aspect-ratio: 1 / 1;
  max-width: 600px;
  width: 100%;
  padding: 60px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.viewer, .viewer .main-image {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent; /* mobile */
}

.viewer .main-image {
  max-width: 100%;
  width: auto;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: transparent;
  border-radius: 10px;
}

.viewer .main-image:focus { outline: none; }

.viewer .main-image:focus-visible {
  outline: 2px solid #246d7a;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: #246d7a;
  width : 2.2rem;
  height: 2.2rem;
  display:flex;
  align-items:center;
  justify-content:center;
  color: #e8f5e9;
  padding: .5rem .5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}

.nav:hover {
  background: #e8f5e9;
  color: #246d7a;
}

.prev { left: .5rem; }
.next { right: .5rem; }

.thumbs-gallery {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items:center;
  position:relative;
  z-index: 1;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: .25rem;
}

.thumb-gallery {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  opacity: .55;
  border: 2px solid transparent;
  transition: transform .15s, opacity .15s, border-color .15s;
  scroll-snap-align: center;
}

.thumb-gallery:hover {
  opacity: 1;
  transform: scale(1.04);
}

.thumb-gallery.active {
  opacity: 1;
  border-color: #246d7a;
}

.thumb-gallery a { pointer-events: none; }

.thumbs-gallery .thumb-gallery {
  pointer-events: auto;
  flex: 0 0 auto;
  width: 92px;
  height:92px;
  max-width: none;
}

.gallery .thumbs-gallery a { pointer-events: none; }
.gallery .thumbs-gallery .thumb-gallery { pointer-events: auto; }

@media (max-width: 640px){
  .thumb-gallery {
    width: 76px;
    height: 52px;
  }
  .viewer {
    padding: 10px;
  }
}


 /* Leaderboard on progrss page */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
}

.leaderboard-table th, .leaderboard-table td {
  padding: 12px 15px;
  text-align: left;
}

.leaderboard-table thead tr {
  background-color: #28a745; /* This remains green as requested */
  color: #ffffff;
  font-weight: 600;
}

.leaderboard-table tbody tr {
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.2s ease-in-out;
}

.leaderboard-table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

.leaderboard-table tbody tr:last-of-type {
    border-bottom: 2px solid #28a745;
}

.leaderboard-table tbody tr:hover {
    background-color: #f1f1f1;
}

.leaderboard-table td:first-child {
    font-weight: 700;
    width: 50px;
    text-align: center;
}

/* Last Updated Text */
#last-updated {
    text-align: right;
    font-size: 0.85em;
    color: #6c757d;
    margin-top: 1rem;
}

/* Loading State */
.loader {
    text-align: center;
    padding: 2rem;
    font-style: italic;
    color: #6c757d;
}
