:root {
  --sharp-prussian-blue: #001241;
  --sharp-pure-blue: #0052cc;
  --sharp-sky-blue: #9bcbeb;
  --sharp-steel-gray: #53565a;
  --color-dark: #222;
  --color-light: #fff;
  --color-accent: #fff700;
  --color-submenu: #333;
  --color-submenu-hover: #444;
  --transition-speed: 0.3s;
  --nav-height: 70px;
  --nav-bar: rgba(10, 25, 47, 0.92);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
}

h2 {
  font-size: 3rem;
  color: #001241;
  font-weight: 700;
  text-align: center;
  padding: 30px;
  margin-top: 180px;
}

body {
  font-family: Arial, sans-serif;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  padding: 0 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: nowrap;
  z-index: 9999;
  width: 100%;
  height: auto;
  background: rgba(0, 0, 0, 0.5);
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-light);
  align-items: center;
  padding: 14px;
  text-decoration: none;
  display: inline-flex;
}

.nav__menu {
  display: flex;
  list-style: none;
}

.nav__menu > li {
  position: relative;
}

.nav__menu > li > a {
  color: var(--color-light);
  text-decoration: none;
  padding: 18px;
  display: block;
  cursor: pointer;
  position: relative;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.nav__menu > li > a:hover {
  color: #fff700;
  background-color: var(--sharp-pure-blue);
}

/* 서브메뉴 (데스크톱) */
.nav__submenu {
  height: 0;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
  transform: translateY(-5px);
  transition: max-height 1s ease-in, opacity 1s ease-in, transform 1s ease-in;
}

.nav__submenu.active {
  height: 300px;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: max-height 2s ease-out, opacity 2s ease-out, transform 2s ease-out;
}

.nav__submenu > li > a {
  position: relative;
  display: inline-block;
  padding: 12px 26px;
  color: var(--color-light);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
}

.nav__submenu > li > a:hover {
  color: #fff700;

}
.nav__submenu > li > a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: #fff700;
  transform: translateX(-50%);
  transition: width 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.nav__submenu > li > a:hover::after {
  width: 100%;
  opacity: 1;
}

.nav__phone {
  font-weight: 600;
  font-size: 28px;
  display: inline-flex;
  align-items: center;
  padding-top: 12px;
}

.nav__phone a {
  font-family: Helvetica, Arial, sans-serif;
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  color: yellow;
}

.nav__phone i {
  color: red;
  margin-right: 8px;
}

/* 토글 버튼 (햄버거) */
.nav__toggleBtn {
  display: none;
}

.nav__toggleBtn .bar {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--color-light);
  border-radius: 2px;
  transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease,
    background-color var(--transition-speed) ease;
}

.nav__toggleBtn .bar + .bar {
  margin-top: 6px;
}

.nav__toggleBtn:hover .bar,
.nav__toggleBtn:focus-visible .bar {
  background: var(--color-accent);
}

.nav__toggleBtn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: 8px;
}

/* 활성 상태 X 모핑 */
.nav__toggleBtn.is-active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav__toggleBtn.is-active .bar:nth-child(2) {
  opacity: 0;
}
.nav__toggleBtn.is-active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
.nav__toggleBtn.is-active .bar {
  background: var(--color-accent);
}

/* 모션 최소화 대응 */
@media (prefers-reduced-motion: reduce) {
  .nav__toggleBtn .bar {
    transition: none;
  }
}

/* 하단 고정 네비 (nav__under) */
.nav__under {
  position: fixed;
  display: flex;
  margin: 0;
  padding: 0;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--sharp-pure-blue);
  top: 65px;
  width: 100%;
}

.nav__under a {
  position: relative;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 10px 30px;
  color: white;
}

.nav__under a:hover {
  background: var(--sharp-prussian-blue);
}

/* 슬라이드 이미지 (데스크톱) */
.sl-images {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  background: linear-gradient(90deg, #000000, #333333);
  transition: background 2s ease-in-out;
  margin: 0 auto;
}

.sl-images img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  transform: scale(1.1);
  transition: opacity 2s cubic-bezier(0.42, 0, 0.58, 1),
    transform 2.5s cubic-bezier(0.42, 0, 0.58, 1);
}

.sl-images img.active {
  opacity: 1;
  display: block;
  position: relative;
  transform: scale(1);
}

/* 모바일용 슬라이드 (초기 숨김) */
.mobile-images {
  display: none;
}

/* 히어로 섹션 */
.hero-section {
  background: var(--sharp-pure-blue) no-repeat center center / cover;
  color: white;
  height: 10vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.wide-text {
  display: flex;
  gap: 50px;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: bold;
  overflow: hidden;
}

.wide-text span {
  opacity: 0;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
  animation-delay: calc(var(--i) * 2s);
  animation-duration: calc(0.3s + var(--i) * 0.5s);
}

.slide-right {
  transform: translateX(-100%);
  animation-name: slideInRight;
}
@keyframes slideInRight {
  to { transform: translateX(0); opacity: 1; }
}

.slide-up {
  transform: translateY(100%);
  animation-name: slideInUp;
}
@keyframes slideInUp {
  to { transform: translateY(0); opacity: 1; }
}

.slide-left {
  transform: translateX(100%);
  animation-name: slideInLeft;
  animation-duration: 0.3s;
  animation-delay: calc(var(--i) * 1s);
}
@keyframes slideInLeft {
  to { transform: translateX(0); opacity: 1; }
}

#text-block {
  text-align: center;
  margin-top: 50px;
}

#text-block span {
  display: inline-block;
  letter-spacing: 20px;
  margin: 0 30px;
  font-size: 2rem;
  font-weight: bold;
  opacity: 1;
}

.project-table-section {
  padding: 1rem;
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0 auto;
}

.table-wrapper {
  width: 50%;
  overflow-x: auto;
  margin: 0 auto;
}

.project-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  table-layout: auto;
}

.project-table th,
.project-table td {
  border: 1px solid #ccc;
  padding: 0.75rem;
  font-size: 1rem;
  word-break: keep-all;
}

.project-table th {
  background-color: #e6f0ff;
  color: #003366;
  font-weight: bold;
}

.project-table td {
  color: #333;
}

.align-right {
  text-align: right;
  padding-right: 30px;
}

.project-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* 안전 이미지 */
.the__safe {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #003366;
  box-sizing: border-box;
  border-radius: 15px;
  padding: 50px;
  width: 1000px;
  margin: 50px auto;
}

/* 위로 가기 버튼 */
#toTopBtn {
  position: fixed;
  bottom: 40px;
  right: 150px;
  width: 50px;
  height: 50px;
  font-size: 22px;
  color: white;
  background-color: var(--sharp-prussian-blue);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 9999;
}

#toTopBtn.show {
  opacity: 1;
  pointer-events: auto;
}

#toTopBtn:hover {
  background-color: #048153;
  transform: translateY(-3px);
}

#toTopBtn i {
  pointer-events: none;
}

/* pri 섹션 */
.pri {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

.pri img {
  max-width: 100%;
  height: auto;
  flex: 1 1 45%;
  object-fit: contain;
}

/* dansp (4개 이미지) */
.dansp {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.dansp img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

/* 데스크탑에서 가로 정렬 - screen 명시 */
@media screen and (min-width: 768px) {
  .dansp {
    flex-direction: row;
  }
  .dansp img {
    width: calc((970px - 60px) / 4);
  }
}

/* dansp__jo (2열 그리드) */
.dansp__jo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin: 50px auto;
  max-width: 970px;
}

.dansp__jo img {
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.4s ease;
  cursor: pointer;
}

/* 힐 예약 섹션 */
#hill__reserve {
  display: flex;
  justify-content: center;
  max-width: 1920px;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

#hill__reserve iframe {
  display: flex;
  width: 100%;
  height: 100%;
}



.unit img {
  display: flex;
  width: 100%;
}



/* 이미지 갤러리 */
.img_container {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
}

.img_box {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.img__list {
  list-style: none;
  position: relative;
  width: 100%;
  height: 500px;
}

.img__list li {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.img__list li[tabindex='0'] {
  opacity: 1;
}

.img__list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img_thumb_list {
  display: flex;
  justify-content: center;
  gap: 10px;
  list-style: none;
  margin-top: 15px;
  flex-wrap: wrap;
}

.img_thumb_list li {
  width: 80px;
  height: 60px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.img_thumb_list li.on {
  border-color: #333;
}

.img_thumb_list img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 푸터 */
.nav-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  background-color: rgba(10, 25, 47, 0.92);
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 1000;
}

footer {
  background-color: #0a192f;
  color: #fff;
  padding: 40px 20px;
  text-align: center;
  font-size: 14px;
}

footer p:first-of-type {
  font-size: 35px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #fff;
}

.project-info {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 15px;
}

.footer-separator {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin: 20px auto;
  width: 80%;
}

.footer-meta-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.footer-meta-text a {
  text-decoration: none;
}

.footer-meta-text a:hover {
  text-decoration: underline;
}

.footer-meta-txt {
  font-size: 8px;
  font-weight: 300;
}

/* 판매 이미지 */
.sell__im {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  flex-direction: column;
  margin-left: 15px;
  margin-right: 15px;
  margin-bottom: 100px;
}

.sell__im img {
  max-width: 1000px;
  width: 100%;
  margin: 30px 30px;
  border: solid 1px #124680;
  padding: 15px;
  border-radius: 20px;
}

/* 로고 배지 */
.b__logo {
  position: absolute;
  top: 90px;
  left: 40px;
  width: 200px;
}

/* 통계 배너 */
.stats__banner {
  background: #ff5500;
  text-align: center;
  padding: 15px;
}

.stats__text {
  color: white;
  font-size: 60px;
  font-weight: 700;
}

/* 애니메이션 키프레임 */
@keyframes ani-floatUp {
  0% { transform: translateY(100px) scale(0.8); opacity: 0; }
  20% { opacity: 1; }
  50% { transform: translateY(0) scale(1.1); }
  80% { opacity: 1; }
  100% { transform: translateY(-50px) scale(1); opacity: 1; }
}

@keyframes ani-pulseWidth {
  0% { letter-spacing: 3px; }
  50% { letter-spacing: 20px; }
  100% { letter-spacing: 10px; }
}

/* 애니메이션 컨테이너 */
#animation-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 90%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 10;
  pointer-events: none;
  /* 필요시 초기 투명도 보장: opacity: 0; animation: fadeInContainer 0.1s 2s forwards; */
}

#animation-wrapper {
  text-align: center;
  width: 100%;
  max-width: 1200px;
}

/* 메인 텍스트 애니메이션 - 명시적 분리 */
#animation-text {
  font-size: 5.5rem;
  font-weight: 900;
  color: #FFD700;
  font-family: 'Black Han Sans', sans-serif;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  opacity: 0;  /* 초기 숨김 */

  /* 애니메이션 개별 속성으로 분리 */
  animation-name: ani-floatUp, ani-pulseWidth;
  animation-duration: 2s, 3s;
  animation-timing-function: ease, ease;
  animation-delay: 0s, 0s;
  animation-iteration-count: 1, infinite;
  animation-fill-mode: forwards, none;  /* 첫 번째 애니메이션은 마지막 상태 유지 */
}

/* ===== 통합 모바일 스타일 (max-width: 768px) ===== */
@media screen and (max-width: 768px) {
  h2 {
    font-size: 28px !important;
    color: #001241 !important;
    font-weight: 500 !important;
    text-align: center !important;
    padding: 30px !important;
    margin-top: 100px !important;
  }

  body {
    padding-left: 5px;
    padding-right: 5px;
    padding: 0;
    margin: 0;
  }

  /* 네비게이션 */
  .nav {
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
  }

  .nav__logo {
    font-size: 22px;
    padding-left: 3px;
  }

  .nav__menu {
    position: fixed;
    top: 65px;
    left: 0;
    width: 80%;
    max-width: 200px;
    height: calc(95% - var(--nav-height));
    background-color: var(--nav-bar);
    border-radius: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    padding-top: 16px;
    transform: translateX(-100%);
    transition: transform var(--transition-speed) ease;
    z-index: 999;
    overflow-y: auto;
  }

  .nav__menu.active {
    transform: translateX(0);
    background-color: rgba(0, 0, 0, .6);
    backdrop-filter: blur(10px);
  }

  .nav__menu > li {
    width: 100%;
  }

  .nav__menu > li > a {
    padding: 16px 12px;
    font-weight: 400;
    font-size: 19px;
  }

  .nav__menu > li > a::after {
    content: none;
  }

  .nav__phone {
    display: none;
  }

  .nav__toggleBtn {
    display: block;
    position: absolute;
    right: 16px;
    top: 10px;
    z-index: 1001;
    background: none;
    border: none;
    color: var(--sharp-pure-blue);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
  }

  .nav__submenu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    width: 100%;
    font-size: 14px;
  }

  .nav__submenu.active {
    display: block;
  }

  .nav__submenu > li > a::after {
    display: none;
  }

  .nav__under {
    font-size: 14px;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .nav__under a {
    padding: 10px 15px;
  }

  /* 슬라이드 이미지 */
  .sl-images {
    display: none;
  }

  .mobile-images {
    display: block;
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #000000, #333333);
    transition: background 2s ease-in-out;
  }

  .mobile-images img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(1.1);
    transition: opacity 2s cubic-bezier(0.42, 0, 0.58, 1),
      transform 2.5s cubic-bezier(0.42, 0, 0.58, 1);
  }

  .mobile-images img.active {
    display: block;
    opacity: 1;
    position: relative;
    transform: scale(1);
  }

  /* 데스크탑/모바일 이미지 전환 */
  .desktop-img {
    display: none;
  }
  .mobile-img {
    display: block;
  }

  /* 히어로 섹션 */
  .hero-section {
    height: 5vh;
  }
  .wide-text {
    gap: 5px;
    font-size: clamp(0.8rem, 4vw, 3rem);
  }

  /* 프로젝트 테이블 */
  .project-table-section {
    padding: 0.5rem;
  }
  .table-wrapper {
    width: 100%;
  }
  .project-table th,
  .project-table td {
    font-size: 0.85rem;
    padding: 0.5rem;
  }
  .align-right {
    padding-right: 10px;
  }
  .project-table {
    min-width: 100%;
    max-width: 100%;
  }

  /* 안전 이미지 */
  .the__safe {
    padding: 10px;
    margin: 10px;
    border-radius: 5px;
    width: 95%;
  }

  /* 위로 가기 버튼 */
  #toTopBtn {
    width: 30px;
    height: 30px;
    font-size: 18px;
    bottom: 60px;
    right: 20px;
  }

  /* pri 섹션 */
  .pri {
    flex-direction: column;
    gap: 1.5rem;
  }
  .pri img {
    flex: none;
    width: 100%;
  }

  /* dansp (모바일에서는 세로) */
  .dansp {
    flex-direction: column;
    align-items: center;
  }
  .dansp img {
    width: calc(100% - 30px);
    margin: 10px 0;
  }

  /* dansp__jo */
  .dansp__jo {
    padding: 0 10px;
  }
  .dansp__jo img {
    border-radius: 5px;
  }

.responsive-container img {
  max-width: 100%;
  height: auto;
  display: block;
  border: #0052cc 1px solid;
  border-radius: 1rem;
  padding: 100px;
}

@media screen and (max-width: 768px) {
  .responsive-container img {
    border-radius: 0.5rem;
    padding: 15px;
  }
}

  .img__list {
    height: 350px;
  }
  .img_thumb_list li {
    width: 60px;
    height: 45px;
  }

  /* 푸터 */
  footer {
    padding: 30px 15px;
    font-size: 13px;
  }
  footer p:first-of-type {
    font-size: 20px;
    margin-bottom: 15px;
  }
  .project-info {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 14px;
  }
  .footer-separator {
    width: 90%;
    margin: 15px auto;
  }
  .footer-meta-text {
    font-size: 9px;
    line-height: 1.5;
  }
  .footer-meta-text a {
    word-break: break-word;
    font-size: 12px;
  }

  /* 로고 배지 */
  .b__logo {
    width: 100px;
    left: auto;
    right: 30px;
  }

  /* 통계 배너 */
  .stats__banner {
    padding: 10px;
  }
  .stats__text {
    font-size: 27px;
  }
}

/* ===== 초소형 모바일 (480px 이하) ===== */
@media screen and (max-width: 480px) {
  .img__list {
    height: 250px;
  }
  .img_thumb_list {
    gap: 5px;
  }
  .img_thumb_list li {
    width: 50px;
    height: 38px;
  }
  #animation-container {
    display: none;
  }
}

/* ===== 중간 크기 대응 (1024px 이하) ===== */
@media screen and (max-width: 1024px) {
  #animation-text {
    animation: none;        /* 애니메이션 제거 */
    opacity: 1;             /* 바로 보이게 */
    font-size: 2.3rem;
    white-space: normal;
    letter-spacing: normal;
  }
}

  .mobile-only {
    display: none;
    display: flex;
    text-align: center;
    background-color: orangered;
    color: white;
    font-weight: 500;
    padding: 10px;
    font-size: 2rem;
  }


@media screen and (max-width: 768px) {
  .mobile-only {
    display: block;
  }
  .desktop-only {
    display: none;
  }
}

.pri img {
    border: #001241 1px solid;
    border-radius: 15px;
    padding: 15px;
}

.responsive-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}
.responsive-container img {
    border: #0052cc 1px solid;
    border-radius: 1rem;
    padding: 100px;
    margin: 0 auto;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 50px;
}

@media screen and (max-width: 768px) {
    .responsive-container img {
        border-radius: 0.5rem;
        padding: 15px;
        margin-bottom: 30px;
    }
}

#text-sp {
  text-align: center;
  font-size: 2rem;
  background-color: var(--sharp-pure-blue);
  color: white;
}
