@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@200;300;400;500;600;700;800;900&family=Questrial&family=Rajdhani:wght@500;700&display=swap');

@font-face {
  font-family: "Sulphur Point";
  src: url("https://janalumi.github.io/fonts/SulphurPoint-Regular.ttf") format("truetype");
/*  font-weight: normal;
  font-style: normal; */
  font-display: swap;
}

@font-face {
  font-family: "Montserrat Alts";
  src: url("https://janalumi.github.io/fonts/MontserratAlternates-Regular.ttf") format("truetype");
/*  font-weight: normal;
  font-style: normal; */
  font-display: swap;
}

:root {
  --header-h: 5rem;
  --footer-h: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  z-index: 0;
  margin: 10px 0 0 0;
}

body {
  font-family: "Mulish", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  padding: var(--header-h) 1rem 50px 1rem;
  background: #95E799;
  color: #000;
  overflow-x: visible;
}

header {
  position: fixed;
  top: 5px;
  left: 5px;
  right: 5px;
  height: var(--header-h);
  text-align: center;
  display: flex;
  align-items: center; /* vertical centring */
  justify-content: center; /* horizontal centring */
  margin-bottom: 2rem;
  border-radius: 35rem;
  color: #CEFED1;
  background: #258D3C;
/*  border: 2px solid #000; */
  z-index: 1000;
  max-width: 100%;
  overflow: hidden;
}

header, header * {
  box-sizing: border-box;
}

footer {
/*  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--footer-h);
  text-align: center;
  margin-top: 2rem;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  background: #CEFED1;
  z-index: 1000; */
}

.nav-links {
  position: fixed;
  bottom: 1px;
  left: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: space-around;
  padding: 0;
  z-index: 1000;
  gap: 2px;
}

.nav-links a {
  flex: 1;
  text-align: center;
  font-size: 1.2rem;
  color: #CEFED1;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center; /* vertical centring */
  justify-content: center; /* horizontal centring */
  height: 50px;
  border-radius: 15px;
/*  border: 2px solid #000; */
  background: #258D3C;
  transition: all 0.2s ease-in-out;
/*  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); */
}

.nav-links a:hover {
  background: #98cc9c;
}

.nav-links a:active {
  background: #98cc9c;
}

main#main-content {
  padding: 5px 0;
  flex-grow: 1;
  overflow-y: auto;
  z-index: 0;
  width: 100%;
}

#description {
  font-family: "Mulish", Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  padding: 1rem;
}

header h1 {
  font-family: "Montserrat Alts", Tahoma, Geneva, Verdana, sans-serif;
  color: #000;
  font-size: 2rem; /* clamp(1.5rem, 5%, 3.5rem); */
}

.app-header {
  display: flex;
  margin: auto;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #CEFED1;
/*  font-size: 2rem; */ /* Adjust as needed */
  line-height: 1.2;
  max-width: 100%;
}

.app-header .visrep {
  height: 1.5rem;  /* or 1.2em for a little extra space */
  vertical-align: middle;
}

header p {
  margin: 0.2rem 0;
  color: #448c8c;
}

h1 {
  font-family: "Montserrat Alts", Tahoma, Geneva, Verdana, sans-serif;
  margin-bottom: 1.4rem;
}

h2 {
  font-family: "Sulphur Point", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 2rem;
  margin-top: 1.2rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

h3 {
  font-family: "Sulphur Point", Tahoma, Geneva, Verdana, sans-serif;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.2rem;
}

section + section {
  margin-top: 2rem;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
/*  padding-inline: 0;*/
/*  padding: 0.5rem 0.5rem; */
  max-width: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}

.project-card {
  text-align: center;
  background: #CEFED1;
  padding: 1rem 1rem;
  border-radius: 2rem;
/*  border: 2px solid #000; */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
  margin-top: 10px;
}

.project-card p {
  color: #888;
  font-size: 1.2rem;
  letter-spacing: 1.6px;
}

.gather p {
  font-weight: 600;
  font-style: italic;
  line-height: 1rem;
  font-size: 1rem;
}

.project-card:hover {
  transform: translateY(-5px);
}

.project-card img {
  max-width: 100%;
  aspect-ratio: auto;
  border-radius: 1.8rem;
/*  border: 3px solid #000; */
}

.project-card h3 {
  font-weight: 800;
  font-size: 1.5rem;
  margin-top: 0.5rem;
  color: #666;
  letter-spacing: 1.8px;
}

.project-card a {
  display: inline-block;
  color: #007acc;
  text-decoration: none;
}

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

.mat-final-test, .final-test {
  border-radius: 2rem;
  background: #258D3C;
/*  border: 2px solid #000; */
  color: #CEFED1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: fit-content;
}

.mat-final-test h3 {
  font-size: 1.4rem;
  margin: 0;
  padding: 3px;
  letter-spacing: 1.5px;
}

.final-test h3 {
  font-size: 2.5rem;
  margin: 0;
  padding: 3px;
  letter-spacing: 2px;
}

.map-view {
  display: flex; /*block*/
  position: relative;
  width: 100%;
  height: 600px;  /* fix height to control scroll and clipping */
  overflow: hidden;
}

.map-view.hidden {
  display: none;
}

#overview-map svg {
  display: inline-block;           /* remove inline gap */
  margin: 0 auto;           /* centre horizontally */
  justify-content: center;
  max-width: none;         /* scale down on narrow viewports */
  max-height: none;
  width: 1200px;       /* or fixed width */
  height: 1200px;      /* fixed height */
  position: absolute;
  margin-top: -80px;
  pointer-events: auto; /* optional: disable interaction if you don’t need click inside SVG */
}

#back-to-overview {
  margin-bottom: 1rem;
}

#overview-map {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;   /* prevent scroll from extra content */
  width: 100%;
  height: 100%;
  position: relative;
  margin: 0 auto; /* to centre */
  background: #eef4ec; /* Optional */
}

.map-section { 
  flex: 1;
  position: relative;
  height: 60vh;
  width: 100%;  /* or fixed width if you prefer */
  max-width: 600px;  /* or whatever fits your design */
  margin: 0 auto;
  overflow: hidden;  /* hide anything that flows outside */
}

#library-map { width: 100%; height: 100%; background: linear-gradient(#d4e6d4, #b5ccb5); touch-action: manipulation; max-height: 100%; object-fit: contain; }



@media screen and (max-width: 650px) and (orientation: portrait) {

  header h1 {
    font-size: clamp(1.4rem, 4%, 3.3rem);
    white-space: nowrap;
    overflow-x: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    width: fit-content;
    padding: 0.2rem;
  }
  
  .app-header {
  /*  font-size: 2rem; */
    gap: 0.4rem;
  }

  .project-list {
     margin: auto 0;
     gap: 2.2rem;
     max-width: 100%;
     overflow-x: hidden;
  }

  .project-card {
     width: 100%;
     box-sizing: border-box;
  }
}


@media (min-width: 600px) and (orientation: landscape) {
  body {
    max-width: 900px;
    margin: auto;
  }

  header {
    height: 6rem;
  }
  
  header h1 {
    font-size: 3rem;
  }
}

@media (min-width: 1100px) and (orientation: landscape) {
  body {
    max-width: 900px;
    margin: auto;
  }

  header {
    height: 4.5rem;
  }
  
  header h1 {
    font-size: 3rem;
    letter-spacing: 5px;
  }
}
