/**
 * Daon Academy Training Center
 * Design System - Reference: training.kyowon.co.kr/GJ
 * Color Theme: Navy/Charcoal (#1a2a4e)
 */

/* ========================================
   Dynamic Image Loader - Pre-hide
   (prevents flash of default image)
======================================== */
[data-menu][data-slot][data-bg] {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}
[data-menu][data-slot][data-bg].img-loaded {
  opacity: 1;
}

/* ========================================
   CSS Variables & Design Tokens
======================================== */
:root {
  /* Colors - Navy/Charcoal Theme */
  --color-primary: #1a2a4e;
  --color-primary-light: #2c3e6f;
  --color-primary-dark: #0f1829;
  --color-secondary: #4a5f8a;
  --color-accent: #5b7ab8;

  /* Neutral Colors */
  --color-white: #ffffff;
  --color-bg: #f8f9fa;
  --color-bg-secondary: #e9ecef;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #dee2e6;
  --color-gray-light: #f1f3f5;

  /* Typography */
  --font-primary: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-secondary: 'Noto Serif KR', serif;

  /* Spacing */
  --header-height: 80px;
  --container-width: 1200px;
  --section-padding: 60px;
  --grid-gap: 30px;

  /* Breakpoints */
  --breakpoint-mobile: 768px;
  --breakpoint-tablet: 1024px;

  /* Transitions */
  --transition-speed: 0.3s;
  --transition-ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(26, 42, 78, 0.1);
  --shadow-md: 0 4px 12px rgba(26, 42, 78, 0.15);
  --shadow-lg: 0 8px 24px rgba(26, 42, 78, 0.2);
}

/* ========================================
   Reset & Base Styles
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-speed) var(--transition-ease);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ========================================
   Typography
======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: 1rem;
}

/* ========================================
   Layout Containers
======================================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--section-padding) 0;
}

/* ========================================
   Header & Navigation (Training Center Style)
======================================== */

/* Top Bar */
.top-bar {
  background-color: var(--color-primary);
  color: var(--color-white);
  font-size: 0.875rem;
  padding: 0.5rem 0;
}

.top-bar__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.top-bar__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  padding-left: 2rem;
}

.top-bar__item i {
  font-size: 0.9rem;
}

.top-bar__right {
  display: flex;
  gap: 1rem;
}

.top-bar__social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-bar__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--color-white);
  transition: all var(--transition-speed);
}

.top-bar__social-link:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Main Header */
.header {
  position: fixed;
  top: 36px;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: all var(--transition-speed);
}

.header.scrolled {
  top: 0;
  box-shadow: var(--shadow-md);
}

.header__container {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo img {
  max-height: 50px;
  width: auto;
}

.header__nav {
  display: flex;
  gap: 5rem;
  align-items: center;
}

.header__nav-item {
  position: relative;
}

.header__nav-item > a {
  display: block;
  padding: 0.75rem 0;
  color: var(--color-text);
  font-weight: 500;
  font-size: 1rem;
  transition: color var(--transition-speed);
  position: relative;
}

.header__nav-item:hover > a {
  color: var(--color-primary);
}

.header__nav-item > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background-color: var(--color-primary);
  transition: width var(--transition-speed) var(--transition-ease);
}

.header__nav-item:hover > a::after {
  width: 100%;
}

/* Dropdown Menu */
.header__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-white);
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  padding: 1.5rem;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed) var(--transition-ease);
  margin-top: 0.5rem;
  z-index: 1001;
}

.header__nav-item:hover .header__dropdown {
  opacity: 1;
  visibility: visible;
  margin-top: 1rem;
}

.header__dropdown-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.header__dropdown-item {
  margin-bottom: 0.5rem;
}

.header__dropdown-item:last-child {
  margin-bottom: 0;
}

.header__dropdown-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--color-text);
  font-size: 0.95rem;
  border-radius: 6px;
  transition: all var(--transition-speed);
  white-space: nowrap;
}

.header__dropdown-link:hover {
  background-color: var(--color-bg);
  color: var(--color-primary);
  padding-left: 1.25rem;
}

.header__dropdown-link i {
  margin-right: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-accent);
}

/* Reservation Button Area */
.header__reservation {
  display: flex;
  align-items: center;
  margin-left: 2rem;
}

.header__reservation-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-speed);
  box-shadow: 0 2px 8px rgba(26, 42, 78, 0.2);
  white-space: nowrap;
}

.header__reservation-btn:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 42, 78, 0.3);
}

.header__reservation-btn i {
  font-size: 1.1rem;
}

/* Legacy support for old class */
.header__cta {
  padding: 0.875rem 2rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-speed);
  box-shadow: 0 2px 8px rgba(26, 42, 78, 0.2);
}

.header__cta:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 42, 78, 0.3);
}

/* Mobile Menu Toggle */
.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 30px;
  height: 24px;
  cursor: pointer;
}

.header__toggle-bar {
  width: 100%;
  height: 3px;
  background-color: var(--color-primary);
  transition: all var(--transition-speed);
  border-radius: 2px;
}

.header__toggle.active .header__toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.header__toggle.active .header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.header__toggle.active .header__toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ========================================
   Main Visual Slider (bxSlider Style)
======================================== */
.hero {
  margin-top: var(--header-height);
  position: relative;
  height: calc(82vh - var(--header-height));
  min-height: 500px;
  overflow: hidden;
}

/* bxSlider specific styles for hero */
.hero .bxslider {
  margin: 0;
  padding: 0;
  list-style: none;
  height: 100%;
}

.hero .bxslider li {
  position: relative;
  width: 100%;
  height: calc(82vh - var(--header-height));
  min-height: 500px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero .bxslider li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(26, 42, 78, 0.4), rgba(26, 42, 78, 0.6));
}

.hero .bx-wrapper {
  position: relative;
  margin: 0 !important;
  padding: 0;
  border: none !important;
  box-shadow: none !important;
  background: none !important;
  height: 100%;
}

.hero .bx-wrapper .bx-viewport {
  height: 100% !important;
  border: none !important;
  left: 0 !important;
}

.hero .bx-wrapper .bx-controls-direction a {
  z-index: 10;
}

.hero__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--color-white);
  z-index: 1;
  width: 90%;
  max-width: 800px;
}

.hero__title {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero__cta {
  display: none;
  padding: 1rem 2.5rem;
  background-color: var(--color-white);
  color: var(--color-primary);
  border-radius: 4px;
  font-weight: 600;
  transition: all var(--transition-speed);
}

.hero__cta:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Grid Layout (Reference: 4 Columns)
======================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

/* ========================================
   Card Component (Reference Style)
======================================== */
.card {
  background-color: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition-speed);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card__image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform var(--transition-speed);
}

.card:hover .card__image {
  transform: scale(1.05);
}

.card__image-wrapper {
  overflow: hidden;
}

.card__content {
  padding: 1.5rem;
}

.card__title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.card__text {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

.card__link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--color-accent);
  font-weight: 500;
}

.card__link:hover {
  color: var(--color-primary);
}

/* ========================================
   Section Titles
======================================== */
.section__title {
  text-align: center;
  margin-bottom: 3rem;
}

.section__title-main {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.section__title-sub {
  color: var(--color-text-light);
  font-size: 1.1rem;
  font-weight: 400;
}

/* ========================================
   Footer (Reference Style - Kyowon)
======================================== */
.footer {
  background-color: #f5f5f5;
  color: #333;
  padding: 0;
}

/* Footer Menu */
.footMenu {
  width: 100%;
  float: none;
}

.footMenuList {
  height: 55px;
  line-height: 55px;
  border-bottom: 1px solid #ddd;
  text-align: center;
  background-color: #eee;
}

.footMenuList ul {
  list-style: none;
  display: inline-flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.footMenuList li {
  position: relative;
  height: 55px;
  line-height: 55px;
  color: #333;
  margin: 0;
  box-sizing: border-box;
}

.footMenuList li:not(:first-child)::before {
  content: '|';
  color: #ccc;
  padding: 0 15px;
}

.footMenuList li > a {
  color: #333;
  font-size: 14px;
  transition: color 0.3s;
}

.footMenuList li > a:hover {
  color: var(--color-primary);
}

/* Footer Copy Section */
.footCopy {
  display: flex;
  align-items: flex-start;
  padding: 30px 0;
  gap: 30px;
}

.footLogo {
  flex-shrink: 0;
}

.footLogo img {
  height: 47px;
}

.footCont {
  flex: 1;
}

/* Privacy Info Links */
.footCont .pInfo {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
}

.footCont .pInfo a {
  color: #333;
  font-size: 13px;
  font-weight: 500;
  margin-right: 20px;
}

.footCont .pInfo a:first-child {
  color: #e74c3c;
}

.footCont .pInfo a:hover {
  text-decoration: underline;
}

/* Info Section */
.footCont .info {
  margin-bottom: 15px;
}

.footCont .info .item {
  margin-bottom: 8px;
}

.footCont .info dl {
  display: inline-block;
  margin: 0 15px 5px 0;
  font-size: 13px;
}

.footCont .info dt {
  display: inline;
  color: #666;
  margin-right: 5px;
}

.footCont .info dt::after {
  content: ':';
}

.footCont .info dd {
  display: inline;
  color: #444;
  margin: 0;
}

/* Copyright Section */
.footCont .copyright {
  font-size: 12px;
  color: #666;
  line-height: 1.8;
}

.footCont .copyright .cr {
  display: block;
  margin-top: 10px;
  color: #888;
}

/* ========================================
   Utilities
======================================== */
.text-center {
  text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.hidden {
  display: none;
}

/* ========================================
   Responsive Design
======================================== */

/* Tablet (1024px) */
@media (max-width: 1024px) {
  :root {
    --section-padding: 60px;
    --grid-gap: 20px;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__main {
    grid-template-columns: repeat(2, 1fr);
  }

  .header__nav {
    gap: 1.5rem;
  }
}

/* Mobile (768px) */
@media (max-width: 768px) {
  :root {
    --section-padding: 40px;
    --header-height: 60px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  /* Top Bar Mobile */
  .top-bar {
    padding: 0.4rem 0;
    font-size: 0.75rem;
  }

  .top-bar__left {
    gap: 1rem;
  }

  .top-bar__item {
    font-size: 0.75rem;
  }

  .top-bar__social-link {
    width: 24px;
    height: 24px;
  }

  /* Header Mobile */
  .header {
    top: 32px;
  }

  .header.scrolled {
    top: 0;
  }

  .header.scrolled ~ .top-bar {
    display: none;
  }

  .header__logo img {
    max-height: 40px;
  }

  .header__nav {
    position: fixed;
    top: calc(var(--header-height) + 32px);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height) - 32px);
    background-color: var(--color-white);
    flex-direction: column;
    padding: 2rem;
    gap: 0;
    transition: left var(--transition-speed);
    box-shadow: var(--shadow-md);
  }

  .header__nav.active {
    left: 0;
  }

  .header__nav-item {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
  }

  /* Mobile Dropdown */
  .header__dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    padding: 0;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) var(--transition-ease);
  }

  .header__nav-item:hover .header__dropdown {
    margin-top: 0;
  }

  .header__nav-item.active .header__dropdown {
    max-height: 500px;
    padding: 0.5rem 0 0 1rem;
  }

  .header__dropdown-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .header__dropdown-link:hover {
    padding-left: 1rem;
  }

  /* Mobile: Hide header reservation button */
  .header__reservation {
    display: none;
  }

  .header__cta {
    margin-top: 1rem;
    padding: 1rem 2rem;
    text-align: center;
  }

  .header__toggle {
    display: flex;
  }

  .header__toggle.active .header__toggle-bar:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
  }

  .header__toggle.active .header__toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .header__toggle.active .header__toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
  }

  /* Footer Mobile */
  .footCopy {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footLogo {
    text-align: center;
  }

  .footCont .pInfo {
    text-align: center;
  }

  .footCont .pInfo a {
    display: block;
    margin: 5px 0;
  }

  .footCont .info {
    text-align: left;
  }

  .footCont .info dl {
    display: block;
    margin-bottom: 8px;
  }

  .footCont .copyright {
    text-align: center;
  }

  .hero {
    height: 60vh;
    min-height: 350px;
    max-height: 500px;
  }

  .hero .bxslider li {
    height: 60vh;
    min-height: 350px;
    max-height: 500px;
  }

  .hero__title {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    line-height: 1.4;
  }

  .hero__subtitle {
    font-size: clamp(0.85rem, 3vw, 1rem);
    margin-bottom: 1.5rem;
  }

  .hero__content {
    padding: 0 1.5rem;
    width: 95%;
  }

}

/* ========================================
   Theme Options (Optional Monochrome)
======================================== */
body.mono-theme {
  filter: grayscale(1) contrast(1.05);
}

body.mono-theme .hero .bxslider li::before {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
}

/* ========================================
   Animations
======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.8s ease-out;
}

/* Mobile Floating Reservation Button */
.floating-reservation {
  display: none;
}

@media (max-width: 768px) {
  .floating-reservation {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(26, 42, 78, 0.4);
    transition: all 0.3s ease;
  }

  .floating-reservation:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 42, 78, 0.5);
  }

  .floating-reservation i {
    font-size: 1rem;
  }
}
