
/* General Layout */

html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  background: linear-gradient(135deg, #1b912b 25%, #057A41 50%, #023B1F 75%);
  background-size: 400% 400%;
  animation: gradientFlow 8s ease infinite;
  color: #fff;
  padding-top: 80px;
  overflow-x: hidden;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 0%;
  }
  25% {
    background-position: 50% 50%;
  }
  50% {
    background-position: 100% 100%;
  }
  75% {
    background-position: 50% 50%;
  }
  100% {
    background-position: 0% 0%;
  }
}

/* Header */
.main-header {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 1);
  padding: 1rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  height: 50px;
  margin-left: 110px;
}

.main-nav ul {
  margin-right: 110px;
  display: flex;
  gap: 2rem;
  list-style: none;
}

.main-nav a {
  text-decoration: none;
  color: #000000;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: white;
}

/* About Content */
.about-content {
  max-width: 804px;
  margin: 70px auto 70px auto;
  padding: 0 1rem;
  text-align: left;
  color: #fff;
}

.about-content h1 {
  font-size: 48px;
  line-height: 66px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 7px 14px rgba(0, 0, 0, 0.4);
  margin-bottom: 2rem;
}

.about-content p {
  font-size: 18px;
  line-height: 30px;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 1.5rem;
  color: #fff;
}

/* Image Gallery */
.about-gallery {
  max-width: 1220px;
  margin: 100px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-title p {
  font-size: 1.1rem;
  color: #1a1a1a;
  margin-bottom: 3rem;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  width: 100%;
  margin-bottom: 6rem;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

/* 짝수 번째 이미지에만 아래로 offset 줌 */
.gallery-grid img:nth-child(even) {
  transform: translateY(80px); /* 💡 위치만 아래로 이동 */
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

/* 짝수 이미지는 hover 시에도 같은 위치 유지 + 확대만 적용 */
.gallery-grid img:nth-child(even):hover {
  transform: translateY(80px) scale(1.05);
}

/* Footer */
footer {
  color: white;
  border-top: 1px solid rgba(255, 255, 255, 1);
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

footer hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .about-content h1 {
    font-size: 42px;
    line-height: 54px;
  }
  .about-gallery img {
    width: 45%;
    height: auto;
  }
}

@media (max-width: 600px) {
    .main-nav ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-items: center;
    padding: 0;
  }

  .main-nav ul li:nth-child(1),
  .main-nav ul li:nth-child(3) {
    justify-self: center;
    padding-left: 4rem;
  }

  .main-nav ul li:nth-child(2),
  .main-nav ul li:nth-child(4) {
    justify-self: end;
    padding-left: 4rem;
  }

  .main-header {
    flex-direction: column;
    align-items: center;
  }

  .logo {
    margin-left: 0;
  }

  .main-nav a {
    font-size: 1rem;
  }

  .about-gallery img {
    width: 100%;
  }

    /* 모바일에서는 짝수 이미지 offset 제거하고 아래 간격 확보 */
  .about-gallery .gallery-grid img:nth-child(even) {
    transform: none;         /* 내려주지 않음 */
    margin-top: 1.5rem;       /* 이미지 사이 간격 추가 */
  }
}

