/* (1) Sticky Footer & Layout Flex 설정 */
html, body {
  margin: 0;
  padding: 0;
  height: 100%; /* 브라우저 창 높이를 100%로 */
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif;
  line-height: 1.65;
  color: var(--txt);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
main, 
section, 
.page-container, 
.custom-section {
    margin: 0 !important;
    padding: 0 !important;
}
.footer-scope {
  flex-shrink: 0;
}

/* (2) 테마 변수 선언 */
:root {
  --pri:          #ff6b35;
  --pri-dark:     #c64f1f;
  --bg:           #f9fafb;
  --txt:          #333;
  --card-bg:      #ffffff;
  --card-shadow:  0 6px 16px rgba(0,0,0,.08);
  --radius:       14px;
  --speed:        0.25s;
}

/* (3) Reset + 공통 스타일 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--speed);
}

/* 세부페이지 히어로섹션 */
.hero-section {
  width: 100%;
  min-height: clamp(100px, 40vh, 250px);
  background: #1a73e8
    url('/make_test/uploads/img/hero_default.jpg')
    center center / cover
    no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #ffffff;
  margin-bottom: 30px;
  padding: clamp(1rem, 5vw, 2rem) 1rem;
}
.hero-section h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-section p {
  font-size: clamp(1rem, 3vw, 1.25rem);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}
@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 1.5rem;
  }
  .hero-section p {
    font-size: 0.95rem;
  }
}

/* (4) Hero(메인 배너) 영역 */
.ind-hero {
  position: relative;
  width: 100%;
  min-height: 50vh;
  background: url('<?=htmlspecialchars($mainImage)?>') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.ind-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.55), rgba(0,0,0,.3));
}
.mask {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  border-radius: var(--radius);
  padding: clamp(1rem, 4vh, 2.8rem);
}
.mask h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 700;
}
.mask p {
  margin-top: 0.5rem;
  font-size: clamp(1rem, 3vw, 1.2rem);
  opacity: 0.9;
}
.ind-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.6rem;
  font-size: clamp(0.9rem, 3vw, 1rem);
  font-weight: 700;
  padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2.1rem);
  color: #fff;
  background: var(--pri);
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transition: background var(--speed), transform var(--speed);
}
.ind-btn:hover {
  background: var(--pri-dark);
  transform: translateY(-2px);
}

/* (5) Section 공통 */
section {
  padding: clamp(1rem, 5vw, 2.5rem) 1rem;
  text-align: center;
}
section > h2 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  margin-bottom: clamp(1rem, 3vw, 1.4rem);
  font-weight: 700;
}

/* (6) Board Preview */
.board-preview-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.board-item:nth-child(3):nth-last-child(1) {
  grid-column: 1 / 3;
}
.board-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: clamp(1rem, 3vw, 1.4rem) clamp(1.2rem, 3vw, 1.7rem);
  display: flex;
  flex-direction: column;
  transition: transform var(--speed), box-shadow var(--speed);
}
.board-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.board-item h3 {
  font-size: clamp(1.05rem, 3vw, 1.15rem);
  margin-bottom: 1rem;
  color: var(--pri);
  border-bottom: 1px solid #eee;
  padding-bottom: 0.6rem;
}
.board-item ul {
  list-style: none;
}
.board-item li {
  margin-bottom: 0.55rem;
  font-size: clamp(0.9rem, 2.5vw, 0.95rem);
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
.board-item li a:hover {
  color: var(--pri-dark);
}
.board-item small {
  color: #889;
  white-space: nowrap;
}
@media (max-width: 992px) {
  .board-preview-lists {
    grid-template-columns: 1fr;
  }
  .board-item:nth-child(3):nth-last-child(1) {
    grid-column: initial;
  }
}
.board-preview-lists.single {
  grid-template-columns: 1fr;
  max-width: 600px;
  margin: 0 auto;
}

/* (7) Custom Section */
.custom-section {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  max-width: 1080px;
  margin: clamp(1.5rem, 4vw, 2.5rem) auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) 2rem;
}

@media (max-width: 992px) {
  /* 전역 폰트 크게 -> 모든 텍스트 확대 */
  html {
    font-size: 180%;
  }
  .page-container {
    flex-direction: column;
    padding: 1rem;
    border-radius: 0;
  }
  .sidebar {
    flex: 0 0 auto;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 0;
    /* 여기서 높이 및 스크롤 속성 제거/재정의 */
    height: auto !important;
    overflow-y: visible !important;
  }
  .page-content {
    width: 100%;
    border-radius: 0;
    padding: 1rem;
    font-size: 0.95rem;
  }
}

/* (8) Contact Section */
.contact-section {
  padding: clamp(3rem, 6vw, 4rem) 1rem;
  color: #fff;
  background: linear-gradient(135deg, <?=htmlspecialchars($contactColor1)?> 0%, <?=htmlspecialchars($contactColor2)?> 100%);
}
.contact-wrap {
  background: #fff;
  color: var(--txt);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: clamp(1.5rem, 4vw, 2.2rem) clamp(2rem, 5vw, 3.5rem);
  margin: 0 auto;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.contact-wrap h3 {
  color: var(--pri);
  font-size: clamp(1.1rem, 3vw, 1.3rem);
}
.contact-wrap .phone {
  font-size: clamp(1.5rem, 5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.contact-wrap .time {
  font-size: clamp(0.9rem, 2vw, 0.93rem);
  color: #666;
}
@media(max-width: 480px) {
  .ind-btn {
    width: 100%;
  }
}

/* (9) 헤더 범위 (header-footer-darkneon.css) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

.header-scope * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 🔥 헤더 배경을 완전 블랙, 글자 화이트로 변경 */
.header-scope {
  background: #000000;   /* 기존 그라데이션 → 블랙 */
  color: #ffffff;        /* 텍스트 화이트 */
  font-family: 'Montserrat', "Helvetica Neue", Arial, sans-serif;
}

/* 데스크톱 헤더 */
.header-scope .site-header {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  position: relative;
}

/* 로고 */
.header-scope .site-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #ffffff;   /* 로고 텍스트도 화이트 */
}
.header-scope .site-header h1 a {
  color: inherit;
  text-decoration: none;
}

/* 메뉴(nav) - 데스크톱 기본 */
.header-scope .site-header nav {
  position: relative;
}
.header-scope .site-header nav ul {
  display: inline-flex;
  list-style: none;
  gap: 2rem;
}
.header-scope .site-header nav li {
  position: relative;
}
.header-scope .site-header nav a {
  color: #ffffff;              /* 메뉴 글씨 화이트 */
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: .5rem 0;
  position: relative;
  transition: color 0.3s;
}
.header-scope .site-header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: #ffffff;         /* underline도 화이트 */
  transition: width 0.25s ease;
}
.header-scope .site-header nav a:hover {
  color: #ffffff;              /* hover도 화이트 유지 */
}
.header-scope .site-header nav a:hover::after {
  width: 100%;
}

/* 데스크톱 2뎁스 */
.header-scope .site-header nav li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: #000000;          /* 드롭다운도 블랙 */
  border: 1px solid #333;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.7);
  list-style: none;
  padding: 0.5rem 0;
  z-index: 999;
}
.header-scope .site-header nav li ul li a {
  display: block;
  color: #ffffff;               /* 2뎁스 메뉴 글씨 화이트 */
  font-weight: 500;
  text-align: left;
  padding: 0.5rem 1rem;
  transition: background 0.2s, color 0.2s;
}
.header-scope .site-header nav li ul li a:hover {
  background: #222;             /* hover 시 약간 밝은 블랙 */
  color: #ffffff;
}
.header-scope .site-header nav li:hover > ul {
  display: block;
}

/* 햄버거 버튼 */
.header-scope .menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;               /* 햄버거 아이콘도 화이트 */
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s;
}
.header-scope .menu-toggle:hover {
  color: #dddddd;
}

/* (10) 모바일 구간(<=992px) */
@media (max-width: 992px) {
  .header-scope .site-header {
    height: 80px;
    padding: 1rem 1.5rem;
  }

  /* 로고 조금 작게 */
  .header-scope .site-header h1 {
    font-size: 1.6rem;
  }

  /* 햄버거 버튼 활성화 */
  .header-scope .menu-toggle {
    display: block;
    font-size: 2.4rem;
    margin-left: auto;
  }

  /* 모바일 nav */
  .header-scope .site-header nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    text-align: left;
    z-index: 999;
  }

  .header-scope .site-header nav ul {
    display: none;
    flex-direction: column;
    background: #000000;        /* 모바일 메뉴 배경도 블랙 */
    border: 1px solid #333;
    border-radius: 4px;
    padding: 0.5rem 0;
    width: 100%;
  }

  .header-scope .site-header nav ul.show {
    display: flex;
  }

  .header-scope .site-header nav li ul {
    display: none;
    position: static;
    transform: none;
    margin-left: 1rem;
    box-shadow: none;
    border: none;
    background: #111;           /* 모바일 2뎁스 slightly dark */
  }

  .header-scope .site-header nav li.active > ul {
    display: block;
  }

  .header-scope .site-header nav li:hover > ul {
    display: none;
  }

  .header-scope .site-header nav li a {
    display: block;
    text-align: left;
    border-bottom: 1px solid #222;
    padding: 1rem;
    font-size: 1rem;
    color: #ffffff;             /* 모바일 메뉴 글씨도 화이트 */
  }
}

/* (10) 푸터 범위 (footer-scope) */
.footer-scope * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 🔥 푸터 전체 블랙 + 화이트 텍스트로 변경 */
.footer-scope {
  font-family: 'Montserrat', "Helvetica Neue", Arial, sans-serif;
  background: #000000;   /* 기존 #0b0e11 → 블랙 */
  color: #ffffff;        /* 텍스트 화이트 */
}

/* 메인 푸터 영역 */
.footer-scope .site-footer {
  background-color: #000000;  /* 기존 #1a1f26 → 블랙 */
  text-align: center;
  padding: 1.5rem;
  font-size: .9rem;
  border-top: 1px solid #222; /* 블랙과 자연스러운 구분선 */
}

/* 푸터 링크 */
.footer-scope .site-footer a {
  color: #ffffff;              /* 링크도 화이트 */
  text-decoration: none;
  transition: color .2s ease;
}

/* hover 효과 */
.footer-scope .site-footer a:hover {
  color: #cccccc;              /* hover 시 은은한 회색빛 */
}


/* (11) Page Layout (sidebar + page-content) - [연한 그레이 톤] */
.page-container {
  max-width: clamp(320px, 95%, 1200px);
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: #f2f2f2;  /* 밝은 그레이 */
  color: #333;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.sidebar {
  flex: 0 0 240px;
  background: #fff;    /* 화이트 박스 */
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.2rem;
  color: #333;
  font-size: 1rem;
  line-height: 1.6;
  /* PC에서만 높이와 스크롤을 적용하고, 모바일에서는 아래에서 덮어씀 */
  height: 700px;
  overflow-y: auto;
}
.sidebar h3 {
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--pri);
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar li {
  margin-bottom: 0.5rem;
}
.sidebar li a {
  display: block;
  text-decoration: none;
  color: #333;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.sidebar li a:hover {
  background: #eee;
  color: var(--pri);
}

.board-preview {
  padding: 0 !important;
  margin: 0 !important;
}

.board-preview img {
  display: block;
  width: 100vw !important;   /* 뷰포트 전체 폭 */
  max-width: 100vw !important;
  height: auto;
}