h3 {
  text-align: center;
}
h4 {
  letter-spacing: .1rem; }
.container {
  max-width: 800px; }
.header {
  margin-top: 60px;
  margin-bottom: 60px; 
  text-align: left; }
.main-description h1 {
  margin-bottom: 0px; }
.main-description p {
  margin-bottom: 0px; }
.main-description .fa {
  font-size: 22px;
  margin-top: 5px; }
.paper {
  margin-bottom: 20px }
.paper .title {
  /*text-transform: uppercase; */}
.paper p {
  margin-bottom: 2px }
.paper-buttons {
  margin-top: 5px }
.paper .button {
  display: inline-block;
  height: 25px;
  padding: 0 25px;
  font-weight: 100;
  line-height: 25px;
  text-transform: none; }
.section-header {
  text-transform: uppercase;
  font-size: 1.5rem;
  letter-spacing: .2rem;
  font-weight: 600; }
.docs-section {
  border-top: 1px solid #eee;
  padding: 4rem 0;
  margin-bottom: 0;}
.footer {
  text-align: center;
  color: rgba(0, 0, 0, 0.4);
  border-top: 1px solid #eee;
  padding: 15px 0 40px 0;
  margin-bottom: 0;}
.navbar {
  display: none; }
.title-subtitle h3 {
  margin-bottom: 0px; }
.title-subtitle h5 {
  color: rgba(0, 0, 0, 0.60); }
.image {
  text-align: center; }

/*  ================ Project styling  ================ */
.project-container {
  margin-bottom: 30px;
}
.project-image-container {
  border: 1px solid rgba(0,0,0,0.2);
  padding: 3px;
  transition: 0.3s;
}
.project-image-container:hover {
  transition: 0.3s;
}
.project-image-container:hover img {
  opacity: 0.4;
}
.project-caption {
  padding: 3px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem; /* match your navbar height */
}

.navbar {
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 179, 186, 0.3) 10%,
    rgba(255, 223, 186, 0.4) 30%,
    rgba(255, 255, 186, 0.4) 50%,
    rgba(186, 255, 201, 0.4) 70%,
    rgba(186, 225, 255, 0.3) 90%,
    rgba(255, 255, 255, 1) 100%
  );
  backdrop-filter: blur(5px);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease;
  border: none;          /* removes both top & bottom borders */
  margin-left: -2vw;
  margin-right: -2vw;
  padding-left: 2vw;
  padding-right: 2vw;
}

/* Show navbar on small screens */
@media (max-width: 749px) {
  .navbar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 179, 186, 0.3) 10%,
      rgba(255, 223, 186, 0.4) 30%,
      rgba(255, 255, 186, 0.4) 50%,
      rgba(186, 255, 201, 0.4) 70%,
      rgba(186, 225, 255, 0.3) 90%,
      rgba(255, 255, 255, 1) 100%
    );
    position: static;
    top: 0;
    z-index: 2000;
    padding: 0.5rem 1rem;
  }

  .navbar-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .navbar-link {
    text-transform: uppercase;
    font-size: 14px;
    color: #222;
    text-decoration: none;
  }
}

/* Larger than phone */
@media (min-width: 550px) {
  .header {
    margin-top: 5rem; }
}

/* Larger than tablet */
@media (min-width: 750px) {
  /* Navbar */
  .navbar + .docs-section {
    border-top-width: 0; }
  .navbar,
  .navbar-spacer {
    display: block;
    width: 100%;
    height: 6.5rem;
    z-index: 99;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee; }
  .navbar-spacer {
    display: none; }
  .navbar > .container {
    width: 100%; }
  .navbar-list {
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    gap: 2rem; /* adds spacing between items */
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .navbar-item {
    position: relative;
    float: none;
    margin-bottom: 0; }
  .navbar-link {
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .2rem;
    margin-right: 35px;
    text-decoration: none;
    line-height: 6.5rem;
    color: #222; }
  .navbar-link.active {
    color: #33C3F0; }
  .has-docked-nav .navbar {
    position: fixed;
    top: 0;
    left: 0; }
  .has-docked-nav .navbar-spacer {
    display: block; }
  /* Re-overiding the width 100% declaration to match size of % based container */
  .has-docked-nav .navbar > .container {
    display: flex;
    justify-content: center; /* centers items horizontally */
    align-items: center;     /* centers vertically */
    width: 80%;
  }

  /* Popover */
  .popover.open {
    display: block;
  }
  .popover {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    top: 92%;
    left: -50%;
    -webkit-filter: drop-shadow(0 0 6px rgba(0,0,0,.1));
       -moz-filter: drop-shadow(0 0 6px rgba(0,0,0,.1));
            filter: drop-shadow(0 0 6px rgba(0,0,0,.1)); }
  .popover-item:first-child .popover-link:after, 
  .popover-item:first-child .popover-link:before {
    bottom: 100%;
    left: 50%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none; }
  .popover-item:first-child .popover-link:after {
    border-color: rgba(255, 255, 255, 0);
    border-bottom-color: #fff;
    border-width: 10px;
    margin-left: -10px; }
  .popover-item:first-child .popover-link:before {
    border-color: rgba(238, 238, 238, 0);
    border-bottom-color: #eee;
    border-width: 11px;
    margin-left: -11px; }
  .popover-list {
    padding: 0;
    margin: 0;
    list-style: none; }
  .popover-item {
    padding: 0;
    margin: 0; }
  .popover-link {
    position: relative;
    color: #222;
    display: block;
    padding: 8px 20px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.0rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: .1rem; }
  .popover-item:first-child .popover-link {
    border-radius: 4px 4px 0 0; }
  .popover-item:last-child .popover-link {
    border-radius: 0 0 4px 4px;
    border-bottom-width: 0; }
  .popover-link:hover {
    color: #fff;
    background: #33C3F0; }
  .popover-link:hover,
  .popover-item:first-child .popover-link:hover:after {
    border-bottom-color: #33C3F0; }
}


/* RECIPE PAGE STYLES */

body.recipes-page .navbar-link[href*="recipes"] {
  color: hotpink !important;
  font-weight: 600;
}

.recipe-title {
  text-align: center;
  margin: 50px 0 10px 0;
}

.recipes-intro {
  text-align: center;
  margin-bottom: 2em;
}

#recipeSearch {
  padding: 0.6em 1em;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 80%;
  max-width: 400px;
  font-size: 1em;
}

.recipe-category {
  font-size: 0.8em;
  color: #303030;
  margin-bottom: 1em;
  margin-top: 1em;
  text-align: center;
  overflow: hidden;
}

.recipe-category h3 {
  position: relative;
  padding-bottom: 0.2em;
}

/* Animated expanding underline */
.recipe-category h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 2px;
  background-color: #ddd;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.recipe-category h3.category-header.collapsed:hover::after {
  width: 100%;
}

.recipe-category h3.category-header:not(.collapsed)::after {
  width: 800px;
  max-width: 90vw;
  left: 50%;
  transform: translateX(-50%);
}

.recipe-grid {
  display: grid;
  padding-top: 1em;
  margin-bottom: 0em;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.3em;
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
  opacity: 1;
}

/* Extra padding when grid is expanded */
.recipe-grid:not(.collapsed) {
  margin-bottom: 3em;
}

.recipe-grid.collapsed {
  max-height: 0;
  opacity: 0;
}

.recipe-tile {
  font-size: 1.2em;
  display: block;
  background-color: #888888;
  padding: 1em;
  text-align: center;
  border-radius: 12px;
  text-decoration: none;
  color: ghostwhite;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.recipe-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  background-color: #333333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: white;
}


/* RECIPE COLLAPSIBLE VIEW ADDON */
.category-header {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 2.5em;
}

.category-header:hover {
  opacity: 0.7;
}

.toggle-icon {
  transition: transform 0.3s ease, color 0.3s ease;
  display: inline-block;
  font-size: 1.2em;
}

.category-header:not(.collapsed) .toggle-icon::before {
  content: '';
}
.category-header.collapsed .toggle-icon::before {
  content: '';
}
/* END RECIPE COLLAPSIBLE VIEW ADDON */


body.gpx-page .navbar-link[href*="gpx"] {
  color: hotpink !important;
  font-weight: 600;
}

/* Ingredients tile styles */

.recipe-title2 {
  text-align: center;
  margin: 40px 0 10px 0;
}

.ingredients-tile {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  background-color: #fffbf8;
  border: 1px solid #e4e0da;
  border-radius: 12px;
  border-radius: 12px;
  padding: 1.5em;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
  margin-bottom: 2em;
  flex-wrap: wrap; /* ensures mobile responsiveness */
}

.ingredients-list {
  flex: 2;
  min-width: 250px;
}

.ingredients-list h4 {
  margin-top: 0.8em;
  color: #333333;
}

.ingredients-list ul {
  margin-top: 0.2em;
  margin-bottom: 1em;
  padding-left: 2em;
  list-style-position: outside;
}

.ingredients-image {
  flex: 1;
  width: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 150px;
}

.ingredients-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 6em;
  margin-right: 2em;
}

.ingredients-image-transparent {
  flex: 1;
  width: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 150px;
}

.ingredients-image-transparent img {
  max-width: 100%;
  height: auto;
  margin-top: 6em;
  margin-right: 2em;
}

.ingredients-images-stack {
  display: flex;
  flex-direction: column;      /* Stack images vertically */
  gap: 0.05em;                    /* Optional: vertical space between images */
  min-width: 150px;
  align-items: end;
}

.ingredients-image-large {
  flex: 1; /* take half the space */
  position: relative;
  min-width: 300px;
  overflow: hidden;
  border-radius: 12px;
}

.ingredients-image-large img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fill the area proportionally */
  border-radius: 0 12px 12px 0;
  object-position: center;
  display: block;
  margin-top: 3em;
  filter: brightness(1.05); /* slightly brighten */
}

/* fade from image (right) into text (left) */
.ingredients-image-large::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 150%; /* adjust for fade strength */
  height: 100%;
  background: linear-gradient(to right, #fffbf8 0%, transparent 100%);
  pointer-events: none;
}

/* Instruction image: default (desktop/tablet) */
.ingredients-image-instruction {
  display: flex;             /* use flex for easy centering */
  justify-content: center;   /* center horizontally */
  align-items: center;       /* center vertically if needed */
  width: 50%;                /* half the width in non-mobile */
  margin: 1em auto;          /* vertical spacing + horizontal centering */
}

.ingredients-image-instruction img {
  width: 100%;               /* fill container */
  height: auto;
  display: block;            /* remove inline spacing */
}

/* modbile: stack vertically */
@media (max-width: 700px) {
  .ingredients-tile {
    flex-direction: column; /* stack text and image vertically */
  }

  .ingredients-image {
    flex: none;             /* prevent it from stretching */
    width: 100%;            /* optional: full width */
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical centering if height is constrained */
    align-items: center;     /* horizontal centering */
    margin-top: 1em;         /* optional spacing from text */
  }

  .ingredients-image img {
    margin: 0;               /* remove previous margins */
    max-width: 80%;          /* responsive width */
    height: auto;
    display: block;
  }

  .ingredients-image-transparent {
    flex: none;             /* prevent it from stretching */
    width: 100%;            /* optional: full width */
    display: flex;
    flex-direction: column;
    justify-content: center; /* vertical centering if height is constrained */
    align-items: center;     /* horizontal centering */
    margin-top: 1em;         /* optional spacing from text */
  }

  .ingredients-image-transparent img {
    margin: 0;               /* remove previous margins */
    max-width: 80%;          /* responsive width */
    height: auto;
    display: block;
  }

  .ingredients-image-large {
    min-width: 100%;
  }

  .ingredients-image-large img {
    width: 100%;
    height: auto;
    margin-top: 0;
  }

  .ingredients-image::after {
    display: none; /* remove fade effect on mobile */
  }

  .ingredients-image-instruction {
    width: 100%;             /* full width */
  }

  .ingredients-image-instruction img {
    width: 100%;             /* fill container */
  }
}

/* --- Global link color --- */
a {
  color: hotpink;
  text-decoration: none;
}

a:hover,
a:focus {
  color: deeppink;
}


/* GPX page styles */

.gpx-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2rem;
  margin: 2em auto;
  max-width: 900px;
  flex-wrap: wrap; /* ensures it works on smaller screens */
}

.gpxpage-title {
  font-size: 3.5em;
  margin: 20px 80px 10px 0;
  flex: 2;
  min-width: 180px;
  text-align: left;
}


.gpx-intro {
  margin: 1rem auto 1.5rem; /* centered, below header */
  text-align: left;
  font-size: 1.8em;
}

.gpx-descr{
  margin: 1rem auto 1.5rem; /* centered, below header */
  text-align: left;
  font-size: 1em;
  max-width: 400px;
}

.filters-tile {
  flex: 1;
  background-color: lavender;
  border-radius: 12px;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
  padding: 1.5rem;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
}

.filters-tile h4 {
  font-size: 1.5em;
  margin-top: 0;
  margin-bottom: 2.5rem;
  /* color: #333333; */
}

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

.filters label {
  font-weight: bold;
  text-align: left;
}

/* ---------- Sort + location row ---------- */

.filter-row {
  display: flex;
  gap: 20px;
}

.filter-row > div {
  flex: 1;
}

.sort-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-direction {
  cursor: pointer;
  font-size: 14px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

/* ---------- Buttons ---------- */

.filters button {
  background-color: #333333;   /*hotpink;*/
  color: white;
  border: none;
  border-radius: 5px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.filters button:hover {
  background-color: blueviolet;  /*deeppink*/
}

.gpx-item:hover {
  background: #ffe6f2;
}

.gpx-item a {
  color: hotpink;
  font-weight: 500;
}


.gpx {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
  min-height: 300px;
}

.course-map {
  height: 200px;
  min-height: 200px;
  min-width: 250px;
  flex: 1 1 300px;
  border-radius: 10px;
  overflow: hidden;
  background-color: #e0e0e0;
}


.course-card {
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  background-color: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 1.5rem;
  gap: 0rem;
}


.course-card h3 {
  text-align: left;
  font-size: 2.1rem;
  margin-bottom: 2.3rem;   /* more space below the title */
  line-height: 1.2;
  font-weight: 600;
}

.course-info {
  flex: 1 1 250px;
  margin: 2px 0;
  line-height: 0.5;
  /* font-size: 0.95rem;*/
}

.course-card .course-info p:first-of-type {
  font-weight: 500;
}

.filters {
  gap: 1rem 1rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.leaflet-container {
  z-index: 0 !important;
}

.navbar {
  z-index: 2000 !important;
}


.aligned-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.aligned-list li {
  position: relative;
  padding-left: 1.5em;
}

.aligned-list li::before {
  content: "➢";
  position: absolute;
  left: 0;
}

.map-wrapper {
  align-items: center;
  margin-top: 30px;
  margin-bottom: 30px;
}

#visitedMap {
  width: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border: 1px solid #ccc;
  border-radius: 6px;
}


@media (max-width: 700px) {
    .gpx-container {
      display: flex;
      flex-direction: column;
    }

    .course-card .course-info p {
      margin: 1rem 0;         /* less vertical spacing between lines */
      line-height: 1.1;         /* tighter line spacing */
    }

    .gpx-descr {
      max-width: 100%;
      margin: 1rem 0 1.5rem;
      text-align: left;
    }

    .filter-row {
      flex-direction: column;
      align-items: stretch;
    }
    .filter-row label {
      display: block;
      text-align: center;
    }

    .gpx-header {
      display: contents; /* This makes children act as direct children of gpx-container */
    }

    .gpx-title-block {
      order: 1;
    }

    .map-wrapper {
      order: 2;
      width: 100%;
    }

    .filters-tile {
      order: 4;
      width: 100%;
      box-sizing: border-box;
      margin-bottom: 3rem;
    }

    .course-map {
      margin-top: 1rem;
    }
}

/* ---------- Dual range slider ---------- */
.dual-range {
  position: relative;
  height: 40px;
  width: 85%;
  margin: 0 auto;
}

.range-track {
  position: absolute;
  top: 0%;
  transform: translateY(-50%);
  height: 4px;
  width: 100%;
  background: #ccc;
  border-radius: 2px;
}

.range-fill {
  position: absolute;
  top: 0%;
  transform: translateY(-50%);
  height: 4px;
  background: blueviolet;
  border-radius: 2px;
}

.dual-range input[type="range"] {
  position: absolute;
  left: 0;
  top: -50%;
  width: 100%;
  height: 40px;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  z-index: 2;
}

/* slider thumbs */
.dual-range input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: black;
  border-radius: 50%;
  cursor: pointer;
}

.dual-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 14px;
  height: 14px;
  background: black;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* hide default tracks */
.dual-range input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
}
.dual-range input[type="range"]::-moz-range-track {
  background: transparent;
}

.range-values {
  margin-top: -4rem;
  margin-bottom: 1rem;
  font-weight: bold;
  text-align: center;
}

#gpxList {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}