:root {
  --main-color: rgb(2, 36, 10); /* 헤더, 푸터 컬러 */
  --background-color: rgb(255, 255, 255); /* 전체 배경 색 */
  --header-title-color : rgb(255, 255, 255); /*해더 기업명, 제목 문구 컬러 */
  --over-color: rgb(245, 229, 7); /*상단 메뉴 오버 컬러 */
  --h2-color: rgb(2, 36, 10); /*  타이틀 컬러 */
  
  --font-color: rgba(75, 67, 67, 0.95); /*  내용 문구 색상 */

  /*게시판 테이블 색상*/
  
  --main-text-color: #ffffff;      /* 버튼 내 흰색 텍스트 */
  --table-header-bg: rgb(2, 36, 10);      /* 테이블 헤더 배경 */
  --table-row-border: #bebebe;     /* 테이블 행 구분선 */

   /*기타 홈페이지 배경 색상*/
   --links-background: #e9f3ed;     /* 링크버튼 백그라운드 */
  
   /*그림자 효과 색상 */
   --shadow-color: rgba(0, 0, 0, 0.08);     /* 그림자 효과 */

   /*로그인 관련 배경 */
   --logback-color: #f9fafb; /* 로그인 배경 색 */
}


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

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
  overflow-x: hidden; /* ✅ 추가 */
}

body {
  font-family: 'Pretendard', sans-serif;
  font-weight: bold;
  color: var(--font-color);  /* 문구 색상 */
  background-size: cover;
  overflow-x: hidden; /* ✅ 추가 */
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: var(--main-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.header a.header-title {
  font-size: 30px;
  font-weight: bold;
  color: var(--header-title-color);
  text-decoration: none;

}

.header ul {
  display: flex;
  gap: 30px;
  list-style: none;
  max-width: 100%;         /* ✅ 추가 */
  overflow-x: hidden;      /* ✅ 추가 */
}

/* 햄버거 메뉴 아이콘 */
.menu-toggle {
  display: none;
  font-size: 28px;
  color: var(--header-title-color);
  cursor: pointer;
}

/* 데스크탑 화면 (768px 이상): 메뉴는 한 줄로 보임, 햄버거 숨김 */
@media (min-width: 1201px) {
  .header ul {
    display: flex !important;
    flex-direction: row;
    gap: 30px;
    list-style: none;
  }

  .menu-toggle {
    display: none !important;
  }
}

/* 모바일 화면 (768px 이하): 메뉴 숨기고 햄버거로 전환 */
@media (max-width: 1200px) {
  .header {
    flex-wrap: wrap;
    height: auto;
    padding: 20px;
  }

  .menu-toggle {
    display: block;
  }

  .header ul {
    display: none;
    flex-direction: column;
    width: 100vw;              /* ✅ 수정 */
    margin-top: 10px;
    overflow-x: hidden;        /* ✅ 추가 */
  }

  .header ul.active {
    display: flex;
  }

  .header ul li {
    margin: 10px 0;
  }
}

.header ul li a {
  color: var(--header-title-color);  /* 메뉴색상 */
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
}

.header ul li a:hover {
  color: var(--over-color);  /* 메뉴 오버 색상 */
  transition: color 0.3s;
}

main {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  display: block;
  margin-top: 100px;
  min-height: calc(100vh - 160px);
}

.main-links {
  max-width: 700px;
  margin: 100px auto;
  padding: 20px;
  min-height: calc(100vh - 160px);
}

.hero {
  height: 100vh;
  padding-top: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: 48px;
  padding: 20px 40px;
  border-radius: 12px;
  color: var(--main-color);
  z-index: 10;
}

section {
  scroll-margin-top: 100px;
  border: none;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.links-section {
  max-width: 1300px;
  display: block;
  padding: 60px 10px;
  margin: 0 auto;
}

section#about,
section#projects,
section#location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  flex-direction: row;
  max-width: 1300px;
  margin: 0 auto;
  padding: 60px 0;
}

section#about {
  margin-bottom: 60px;
}

section#projects {
  margin-bottom: 60px;
}

section#about > div,
section#projects > div,
section#location > div {
  flex: 1;
  min-width: 300px;
}

section#about img,
section#projects img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 12px;
}

section h2 {
  font-size: 28px;
  font-weight: bold;
  color:var(--h2-color);
  text-align: center;
  padding: 10px 0 14px;
  margin: 0 0 20px 0;
  border-top: 2px solid var(--h2-color);
  border-bottom: 2px solid var(--h2-color);
  width: 100%;
  line-height: 1.4;
}

body.links-page::after {
  content: '';
  display: block;
  height: 100px;
}

@media (max-width: 768px) {
  section#about,
  section#projects,
  section#location {
    flex-direction: column;
    text-align: center;
    padding: 40px 0;
  }

  section#about img,
  section#projects img {
    width: 90%;
  }

  section#about .about-text,
  section#projects .project-text {
    padding: 0 20px;
  }

  section#about h2,
  section#projects h2,
  section#location h2 {
    font-size: 24px;
    order: 1;
  }

  section#about img,
  section#projects img {
    order: 2;
  }

  section#about p,
  section#about a,
  section#projects p {
    order: 3;
  }

  section#about p,
  section#projects p,
  section#location p {
    font-size: 15px;
  }
}

.alert-box {
  font-family: 'Pretendard', sans-serif;
  padding: 40px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  margin: auto;
  color: var(--main-color);
  line-height: 1.6;
}

a {
  color: var(--font-color);
  text-decoration: none;
}

a:hover {
  color: var(--main-color);
}

@media (max-width: 1200px) {
  section#projects > div:nth-child(1) {
    order: 2;
  }

  section#projects > div:nth-child(2) {
    order: 1;
  }
}

/* 🎆 폭죽용 캔버스 스타일 */
canvas#fireworks {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
}



/* 이미지 삽입. 페이지 상단 */
.intro-image {
  width: 100%;
  height: 600px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-title {
  color: rgb(255, 255, 255);
  font-size: 48px;
  font-weight: bold;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
