* {margin:0; padding:0; box-sizing:border-box;}
body, html {height: 100%; font-family: sans-serif;}

/* 네비게이션 */
nav {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 60px;
  color: white; display: flex; align-items: center;
  padding: 0 20px; z-index: 3000;
  background: linear-gradient(270deg, #003366, #0066cc, #ff6600, #9900cc);
  background-size: 800% 800%;
  animation: gradientShift 20s ease infinite;
}
@keyframes gradientShift {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}

nav .logo {display: flex; align-items: center; font-weight: bold; font-size: 18px; margin-right: 80px;}
nav .logo a {display:flex; align-items:center; color:white; text-decoration:none;}
nav .logo img {margin-right: 5px; width:60px;}
nav ul {list-style: none; display: flex; margin-left:auto;}
nav ul li {position: relative; margin-right: 20px;}
nav ul li a {color: white; text-decoration: none; font-size: 15px; padding: 8px; display: block;}
nav ul li a:hover {background: rgba(255,255,255,0.2); border-radius: 5px;}
nav ul li ul {display: none; position: absolute; top: 100%; left: 0; background: white; min-width: 180px; border-radius: 4px; border:1px solid #ddd;}
nav ul li:hover > ul {display: block;}
nav ul li ul li a {padding: 10px; font-size: 14px; color: black;}
nav ul li ul li a:hover {background:#f0f0f0; color:black;}

.menu-toggle {display:none; flex-direction: column; cursor:pointer; margin-left:auto;}
.menu-toggle span {width:25px; height:3px; background:white; margin:4px 0;}

/* 기본 (라이트 모드) 푸터 스타일 */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: #f2f2f2; /* 밝은 배경색 */
  color: #333; /* 어두운 글씨색 */
  font-size: 13px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid #ccc; /* 밝은 경계선 */
  z-index: 3000;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s; /* 부드러운 전환 효과 */
}

.main-header {
  position: fixed;
  top: 60px; /* nav 높이 보정 */
  left: 0;
  width: 100%;
  height: 300px;
  background: 
    linear-gradient(270deg, rgba(0,51,102,0.6), rgba(0,102,204,0.6), rgba(255,102,0,0.6), rgba(153,0,204,0.6)),
    url("images/header-bg.jpg") center/cover no-repeat;
  background-size: 800% 800%, cover;
  animation: gradientShift 20s ease infinite;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  z-index: 1000;

  transition: top 0.2s ease;   /* 부드럽게 숨김/표시 */
}


.main-header .header-content h1 {font-size: 36px; margin-bottom: 10px;}
.main-header .header-content p {font-size: 18px;margin-bottom:10px;}
.main-header .header-content a {color:white; text-decoration:none;}
.main-header .header-content span {align-items:center; font-size: 20px; border:solid 1px; padding:5px 20px; margin:30px auto;}

.iframe_cover {display:none;}

/* 본문 프레임 */
#frame_wraper {
  position: relative;
  width: 100%;
  height: calc(100vh - 120px); /* nav(60) + footer(60) 보정 */
  margin-top: 315px; /* nav(60) + header(300) */
}

#myframe {
  width: 100%;
  height: 2000px;
  border: none;
  transition: height 0.6s ease; /* 부드럽게 늘어나도록 */  
  display: block;
}

/* 반응형 */
@media (max-width: 800px) {
  nav ul {display:none; position:absolute; top:60px; left:0; width:100%; background:white; flex-direction:column;}
  nav ul li {width:100%; border-bottom:1px solid #ddd;}
  nav ul > li > a {color:#222; font-weight:bold; font-size:16px; padding:14px; background:#f9f9f9;}
  nav ul li ul {position:static; border:none; box-shadow:none;}
  nav ul li ul li a {padding:10px 14px 10px 30px; font-size:14px; background:white; color:#444;}
  nav ul li ul li a:hover {background:#f0f0f0;}
  .menu-toggle {display:flex;}
  nav.active ul {display:flex;}
}

@media (max-width: 500px) {

  .iframe_cover {
  position:fixed;
  top:350px;
  width:100%;
  height:30%;
  display:inline-block;
  z-index:1001;
  background-color: transparent;
  }
}

/* 다크 모드일 때 적용될 스타일 */
@media (prefers-color-scheme: dark) {
  body, footer {
    background: #191919; /* 어두운 배경색 */
    color: #f2f2f2; /* 밝은 글씨색 */
    border-top: 1px solid #555; /* 어두운 경계선 */
  }
}
