@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

@font-face {
  font-family: '양진체';
  src: url('https://fastly.jsdelivr.net/gh/supernovice-lab/font@0.9/yangjin.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'GmarketSansMedium';
  src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'SBAggroB';
  src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/SBAggroB.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'S-CoreDream-3Light';
  font-family: 'S-CoreDream-3Light';src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/S-CoreDream-3Light.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

:root{
  --first-color: #05202bf1;
  --second-color: #aac9cbde;
  --third-color: #ffffffbd;

  --text-shadow: 0 5px 25px rgba(14, 13, 13, 0.1);
  --bpx-shadow: 0 5px 25px rgb(0, 0, 0 / 20%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'S-CoreDream-3Light';
}

html,
body {
  background: #fff;
  color: var(--first-color);
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Header */
header {
  z-index: 999;
  position: fixed;
  width: 100%;
  height: calc(5rem + 1rem);
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
}

header .nav-bar {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 80px;
  transition: 0.3s ease;
}

.nav-close-btn, .nav-menu-btn {
  display: none;
}

.logo {
  display: inline-block;
  padding: 5px 0;
  height: 85px;
  line-height: 85px;
  cursor: pointer;
}

.header-logo {
  height: 60px;
  vertical-align: middle;
  margin-bottom: 4px;
}

.navigation .nav-items a {
  font-weight: bold;
  color: var(--first-color);
  font-size: 1em;
  font-weight: 600;
  text-decoration: none;
  text-shadow: var(--text-shadow);
  padding: 2px 15px;
  border-radius: 10px;
  transition: .3s ease;
  transition-property: background;
  background: var(--third-color);
}

.navigation .nav-items a i {
  display: none;
}

.navigation .nav-items a:not(:last-child) {
  margin-right: 45px;
}

.navigation .nav-items a:hover {
  font-size: 1.15em;
}

/* Gallery Section */
.container {
  max-width: 1500px;
  margin: 100px auto;
  padding: 2rem;
}

h1 {
  font-family: "PT Serif", serif;
  font-size: 3em;
  text-align: center;
  margin-bottom: 0.7rem;
}

h2 {
  font-family: 'GmarketSansMedium';
  font-size: 1em;
  text-align: center;
  margin-bottom: 4rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 5rem 1rem;
  align-items: center;
}


.item {
  position: relative;
  cursor: pointer;
}

.item-img {
  overflow: hidden;
  height: 175px;
}

.item-img img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.item:hover .item-img img {
  transform: scale(1.05);
}

.item-name {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
}

/* Image Modal */
.img-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 0);
  pointer-events: none;
  z-index: 9999;
  transition: clip-path 0.5s ease;
  overflow: hidden; /* Prevents overflow of content */
}

.img-modal .img {
  width: 80%;
  height: 80%;
  display: flex;
  justify-content: center;
  align-items: center;
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 0);
}

.img-modal .img img {
  max-width: 100%;
  max-height: 95%;
  object-fit: contain;
}

.modal-item {
  position: absolute;
  color: #fff;
  font-size: 1rem;
  text-align: center;
}

.modal-item p {
  margin: 0;
}

.modal-item.item-name {
  top: 40px;
  background: none;
}

.close-btn {
  position: absolute;
  bottom: 3rem;
  font-size: 1rem;
  cursor: pointer;
  color: #ffffff;
}


@media screen and (max-width: 1080px){
  header .nav-bar{
    padding: 0 20px;
  }

  /*navigation menu*/
  .nav-menu-btn{
    display: block;
    color: var(--first-color);
    font-size: 1.5em;
    cursor: pointer;
  }

  .nav-close-btn{
    display: block;
    color: var(--first-color);
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1.3em;
    margin: 10px;
    cursor: pointer;
    transition: 0.3s ease;
  }

  .navigation{
    z-index: 99999;
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s ease;
  }

  .navigation.active{
    visibility: visible;
    opacity: 1;
  }

  .navigation .nav-items{
    position: relative;
    background: #ffffffee;
    width: 400px;
    max-width: 400px;
    display: grid;
    place-content: center;
    margin: 20px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--bpx-shadow);
    transform: translateY(-200px);
    transition: 0.3s ease;
  }

  .navigation.active .nav-items{
    transform: translateY(0);
  }

  .navigation .nav-items a{
    color: var(--first-color);
    font-size: 1em;
    margin: 15px 50px;
    transition: 0.3s ease;
    background: none;
  }

  .navigation .nav-items a i{
    display: inline-block;
    font-size: 1.3em;
    margin-right: 10px;
  }

  .modal-item {
    font-size: 0.9rem;
  }

}


@media screen and (max-width: 700px){
  header .nav-bar{
    padding: 0 20px;
  }

  /*navigation menu*/
  .nav-menu-btn{
    display: block;
    color: var(--first-color);
    font-size: 1.5em;
    cursor: pointer;
  }

  .nav-close-btn{
    display: block;
    color: var(--first-color);
    position: absolute;
    top: 0;
    right: 0;
    font-size: 1.3em;
    margin: 10px;
    cursor: pointer;
    transition: 0.3s ease;
  }

  .navigation{
    z-index: 99999;
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s ease;
  }

  .navigation.active{
    visibility: visible;
    opacity: 1;
  }

  .navigation .nav-items{
    position: relative;
    background: #ffffffee;
    width: 400px;
    max-width: 400px;
    display: grid;
    place-content: center;
    margin: 20px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--bpx-shadow);
    transform: translateY(-200px);
    transition: 0.3s ease;
  }

  .navigation.active .nav-items{
    transform: translateY(0);
  }

  .navigation .nav-items a{
    color: var(--first-color);
    font-size: 1em;
    margin: 15px 50px;
    transition: 0.3s ease;
    background: none;
  }

  .navigation .nav-items a i{
    display: inline-block;
    font-size: 1.3em;
    margin-right: 10px;
  }


  .modal-item {
    font-size: 0.8rem;
  }
}