:root {
  --brand-main: #ffffff;
  --brand-accent: #2c3e50;
  --brand-accent-light: #ff812d7a;
  --brand-bg: #fafafa;
  --text-light: #7f8c8d;
  --text-dark: #2c3e50;
  --text-muted: #95a5a6;
  --shadow-light: rgba(44, 62, 80, 0.1);
  --shadow-medium: rgba(44, 62, 80, 0.15);
}

body {
  background-color: var(--brand-bg);
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* --- Navigation & Buttons --- */
.brand-navbar {
  background-color: var(--brand-main);
  box-shadow: 0 2px 6px var(--shadow-light);
}

.brand-navbar .nav-link {
  color: var(--text-dark);
  font-weight: 600;
  margin-right: 1.5rem;
  padding-bottom: 6px;
  position: relative;
  text-decoration: none;
  transition: color 0.3s ease;
}

.brand-navbar .nav-link.active,
.brand-navbar .nav-link:hover {
  color: var(--brand-accent-light);
}

.brand-navbar .nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2.5px;
  left: 0;
  bottom: 0;
  background-color: var(--brand-accent-light);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.brand-navbar .nav-link:hover::after,
.brand-navbar .nav-link.active::after {
  width: 100%;
}

.sticky-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.sticky-navbar.scrolled {
  box-shadow: 0 4px 10px var(--shadow-medium);
}

.navbar-brand img {
  margin-right: 12px;
}

.navbar .btn-brand,
.btn-brand {
  background-color: var(--brand-accent-light);
  color: var(--brand-main);
  border-radius: 25px;
  font-weight: 600;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.navbar .btn-brand:hover,
.btn-brand:hover {
  background-color: #d4ac0d;
  box-shadow: 0 4px 15px var(--shadow-medium);
}


/* ----------------------------------------------------- */
/* 히어로 섹션 (최종 레이아웃) */
/* ----------------------------------------------------- */

.hero {
  height: 70vh;
  background-color: var(--brand-accent); 
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--brand-main);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  overflow: hidden; 
}

#hero-bg-slider {
  position: absolute;
  inset: 0; 
  z-index: 0; 
}

.hero-bg-slide {
  position: absolute;
  inset: 0; 
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.0s ease-in-out;
  transform: scale(1.1);
  transition: opacity 1.0s ease-in-out, transform 6s linear;
}

.hero-bg-slide.active {
  opacity: 1;
  transform: scale(1.0);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6); 
  z-index: 1;
}

/* 컨텐츠 영역 (너비 확보) */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%; /* 부모(.hero) 너비 100% 확보 */
  max-width: 1000px; /* 텍스트가 너무 길어지지 않도록 최대 너비 제한 */
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* 버튼이 234px로 좁히는 것을 막기 위해 min-width를 추가 */
  min-width: 300px;
}

/* 텍스트 컨테이너 */
#hero-phrase-container {
  position: relative;
  width: 100%; /* 부모(.hero-content) 너비 100% 확보 */
  margin-bottom: 1.8rem; 
  min-height: 11.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 프레이즈 텍스트 (폰트 크기 3.0rem으로 조정) */
.hero-content .hero-phrase { /* 👈 [변경] h1 선택자 제거 */
  /* 👈 [추가] div는 기본 폰트 크기가 작으므로 3.0rem을 명시적으로 적용 */
  font-size: 3.0rem; 
  line-height: 1.3;
  letter-spacing: 0.04em;
  margin: 0; 
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 1.0s ease-in-out;
}

/* === [추가] 활성화된 프레이즈 === */
.hero-content .hero-phrase.active { /* 👈 [변경] h1 선택자 제거 */
  opacity: 1;
}

/* === [추가] 마지막 '조아' 프레이즈 (선택적) === */
.hero-content .hero-phrase.final-phrase { /* 👈 [변경] h1 선택자 제거 */
  font-weight: 700; 
}

.hero-content .btn {
  font-size: 1.3rem;
  padding: 0.85rem 2.5rem;
  border-radius: 30px;
  font-weight: 700;
}

/* --- Cards & Global --- */
.card {
  background-color: var(--brand-main);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 14px var(--shadow-light);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 24px var(--shadow-medium);
}

.card-title {
  color: var(--brand-accent);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

/* 데스크탑 기본 */
.navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* --- 모바일 대응 (768px 이하) --- */
@media (max-width: 768px) {

  body {
    font-size: 14px;
    padding: 8px;
  }

  .container {
    width: 100%;
    padding: 0 10px;
  }
  
  /* Hero 컨테이너가 너무 좁아지지 않도록 최소 너비 설정 */
  .hero-content {
    min-width: 90%;
  }

  .hero-content .hero-phrase {
    font-size: 1.8rem; /* 👈 1.8rem으로 최종 확정 */
    letter-spacing: normal;
    line-height: 1.4;
  }

  #hero-phrase-container {
    min-height: 5.5rem; 
  }

  .hero-content .btn {
    font-size: 1rem; 
    padding: 0.7rem 2rem;
  }
  
  /* ... (나머지 모바일 스타일은 동일) ... */
  .navbar-nav {
    flex-direction: column !important;
    align-items: flex-start;
    gap: 4px;
  }

  .navbar-nav .nav-item {
    margin: 2px 0;
  }

  .navbar-nav .nav-link {
    font-size: 14px;
    padding: 4px 6px;
  }

  .navbar-nav .btn-brand {
    font-size: 13px;
    padding: 4px 8px;
    white-space: nowrap;
  }

  .navbar .btn-sm {
    font-size: 13px;
    padding: 4px 8px;
    white-space: nowrap;
  }

  .navbar form input.form-control-sm {
    width: 100px;
    font-size: 13px;
    padding: 3px 5px;
    margin-bottom: 4px;
  }

  .navbar .d-flex.align-items-center {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 6px;
  }

}

/* --- 초소형 모바일 (480px 이하) --- */
@media (max-width: 480px) {
  /* ... (기존 초소형 모바일 스타일은 동일) ... */
  .navbar-brand img {
    height: 45px;
    margin-right: 8px;
  }

  .navbar-nav .nav-link {
    font-size: 12px;
    padding: 3px 5px;
  }

  .navbar-nav .btn-brand {
    font-size: 12px;
    padding: 3px 8px;
  }

  .navbar .btn-sm {
    font-size: 12px;
    padding: 3px 6px;
  }

  .navbar form input.form-control-sm {
    width: 90px;
    font-size: 12px;
    padding: 3px 5px;
    margin-bottom: 4px;
  }
}