* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
}

body, main {
  color: #b9ca00;
}

@font-face {
  font-family: "typo";
  src: url("Baby Monsta.otf");
}

main {
  min-height: 100vh;
  background-image: url("bg tphv new.jpg");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

header {
  background: #b9ca00;
  position: relative;
  top: 0;
  z-index: 10;
  height: 90px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
}

.logo {
  position: absolute;
  visibility: hidden;
}

.burger {
  position: absolute;
  right: 16px;
  top: 24px;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
  color: #e1302f;
}

nav {
  position: absolute;
  top: 90px;
  width: 100%;
  display: none;
  flex-direction: column;
  background: #b9ca00;
  z-index: 1000;
}

nav a {
  padding: 12px 16px;
  color: white;
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,0.2);
}

nav a:hover,
.submenu-toggle:hover {
  color: #f6ff98;
}

.submenu-toggle {
  background: none;
  border: none;
  color: white;
  padding: 12px 16px;
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.submenu {
  display: none;
  flex-direction: column;
  background: #8fb000;
}

.submenu a {
  padding: 10px 30px;
  color: white;
  text-decoration: none;
  font-size: 15px;
}

.has-submenu.open .submenu {
  display: flex;
}

h1 {
  position: absolute;
  font-size: 27px;
  left: 16px;
  top: 6px;
  font-family: "typo";
  color: #e1302f;
}

.courses {
  position: absolute;
  top: 36px;
  left: 16px;
  font-weight: bold;
  font-size: 14px;
  color: #646464;
}

.date {
  position: absolute;
  top: 54px;
  left: 16px;
  font-size: 18px;
  font-weight: bold;
  color: white;
}

.photo-page {
  min-height: 100vh;
  padding: 120px 20px 80px;
  background-image: url("bg tphv new.jpg");
  background-size: cover;
  background-position: center;
}

.gallery-top {
  width: 100%;
  max-width: 1300px;
  margin: auto;
  margin-bottom: 40px;
}

.gallery-top h2 {
  font-family: "typo";
  font-size: 56px;
  color: #e1302f;
  margin-bottom: 20px;
  text-align: center;
}

#searchInput {
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  background: rgba(255,255,255,0.92);
  overflow: unset;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 1300px;
  margin: auto;
}

.photo-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  height: 180px;
  cursor: zoom-in;
  background: #111;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
  transition: 0.25s;
}

.photo-item:hover img {
  filter: brightness(1);
  transform: scale(1.04);
}

.photo-item::after {
  content: "＋";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 44px;
  opacity: 0;
  transition: 0.25s;
}

.photo-item:hover::after {
  opacity: 1;
}

.photo-grid.active::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 1000;
}

.photo-item.zoomed {
  position: fixed;
  inset: 50%;
  width: min(92vw, 1300px);
  height: min(86vh, 900px);
  transform: translate(-50%, -50%);
  z-index: 1001;
  cursor: default;
}

.photo-item.zoomed img {
  object-fit: contain;
  filter: brightness(1);
  background: #111;
}

.photo-item.zoomed::after {
  display: none;
}
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1002;
  display: none;
  border: none;
  background: rgba(0,0,0,0.6);
  color: white;
  width: 60px;
  height: 60px;
  font-size: 35px;
  cursor: pointer;
  border-radius: 50%;
}

.nav-btn.visible {
  display: block;
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

.nav-btn:hover {
  background: rgba(0,0,0,0.9);
}
.back-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1002;
  display: none;
  border: none;
  background: #b9ca00;
  color: white;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
}

.back-btn.visible {
  display: block;
}

footer {
  text-align: center;
  padding: 20px;
  background: #333;
  color: white;
  font-size: 14px;
}

footer p {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

footer a {
  color: white;
}

@media (min-width: 768px) {
  .has-submenu {
    position: relative;
  }

  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    z-index: 20;
  }

  .has-submenu:hover .submenu {
    display: flex;
  }

  .burger {
    display: none;
  }

  header {
    height: 84px;
    background-image: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.35)), url("ban.jpg");
    background-size: cover;
    background-position: center;
  }

  .logo {
    width: 60px;
    height: auto;
    top: 12px;
    left: 60px;
    visibility: visible;
    z-index: 10000;
  }

  nav {
    top: 6px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    background-color: transparent;
  }

  nav a {
    border: none;
    font-size: 24px;
  }

  .submenu-toggle {
    font-size: 24px;
  }

 h1,
.courses,
.date {
  display: none;
}

  .galeries {
    padding: 70px 40px 90px;
  }

  .galeries-intro h2 {
    font-size: 64px;
  }

  .galeries-grid {
    grid-template-columns: repeat(3, 1fr);
  }
.photo-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
  }

  .photo-item {
    height: 220px;
  }
}

  footer p {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 35px;
  }


@media (min-width: 1200px) {
  .photo-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1600px) {
  .photo-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1800px) {
  .photo-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}