@import url("https://fonts.googleapis.com/css2?family=Mooli&display=swap");

:root {
  --primary-color: #52489c;
  --secondary-color: #59c3c3;
  --accent-color: #f45b69;
  --text-dark: #333;
  --text-light: #ebebeb;
  --primary-font: Arial, Helvetica, sans-serif;
  --secondary-font: 'Mooli', sans-serif;
}

body {
  font-family: var(--primary-font);
  font-size: 1.2em;
  margin: 0;
  color: var(--text-dark);
}

header, footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 1em;
  text-align: center;
}

h1, h2 {
  font-family: var(--secondary-font);
  text-align: center;
  margin: 0.5em 0;
}

/* Hide class for menu toggle */
.hide {
  display: none;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav li {
  margin: 0.5em 0;
}

.menu-button {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1em;
  cursor: pointer;
  padding: 0.5em 1em;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1em;
  padding: 1em;
}

.gallery figure {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border: 8px solid var(--secondary-color);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery img:hover {
  transform: scale(1.02);
}

a:link, a:visited {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Image Viewer Modal Styles */
.viewer {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  border: none;
  padding: 0;
  margin: 0;
}

.viewer::backdrop {
  background-color: rgba(128, 128, 128, 0.5);
}

.viewer img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  max-width: 90%;
  max-height: 85vh;
  border: none;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-viewer {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: white;
  color: black;
  border: 2px solid #333;
  padding: 0.3em 0.7em;
  font-size: 1.5em;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  z-index: 1000;
}

.close-viewer:hover {
  background-color: #f0f0f0;
}

/* Tablet breakpoint */
@media screen and (min-width: 700px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop breakpoint */
@media (min-width: 1000px) {
  nav ul {
    display: flex !important;
    justify-content: center;
    gap: 2em;
  }

  .menu-button {
    display: none;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}