@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --color-primary: #D4AF37; /* Gold */
  --color-primary-light: #F4DE9C;
  --color-primary-dark: #AA8721;
  --color-secondary: #8A1A19; /* Traditional Red */
  --color-accent: #006B6B; /* Dancheong Teal */
  --color-bg: #0F0E0E; /* Dark Ink */
  --color-bg-alt: #181615; /* Lighter Dark */
  --color-text: #F2EBE5; /* Hanji Off-white */
  --color-text-muted: #AFA8A0;
  --color-border: #332D29;
  
  --font-heading: 'Noto Serif KR', serif;
  --font-body: 'Noto Sans KR', sans-serif;
  
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  
  /* Container sizes */
  --container-width: 1200px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.3;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography Utilities */
.text-gold {
  color: var(--color-primary);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  margin-bottom: 4rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background-color: var(--color-secondary);
  margin: 20px auto 0;
}

/* Helper spacing */
.py-5 { padding-top: 5rem; padding-bottom: 5rem; }
.my-5 { margin-top: 5rem; margin-bottom: 5rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border: 1px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn:hover {
  background: var(--color-primary);
  color: var(--color-bg);
}

.btn-solid {
  background: var(--color-primary);
  color: var(--color-bg);
}

.btn-solid:hover {
  background: var(--color-primary-light);
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: var(--transition);
  background: transparent;
}

header.scrolled {
  background: rgba(15, 14, 14, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-size: 1.05rem;
  font-weight: 400;
  position: relative;
  font-family: var(--font-heading);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-primary);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--color-text);
  cursor: pointer;
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transform: scale(1.05); /* slightly scaled for init effect */
  filter: blur(6px) brightness(0.6) saturate(0.5);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(15,14,14,0.6) 0%, rgba(15,14,14,0.95) 100%);
  -webkit-backdrop-filter: blur(5px) brightness(0.8) saturate(0.5);
  backdrop-filter: blur(5px) brightness(0.8) saturate(0.5);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  margin-bottom: 20px;
  display: block;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  line-height: 1.2;
}

/* Section: About Summary */
.about-summary {
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0 L50 50 L100 0 Z" fill="rgba(212, 175, 55, 0.03)"/></svg>') repeat;
  background-size: 60px 60px;
}

.about-summary p {
  text-align: center;
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 30px;
  font-family: var(--font-heading);
  line-height: 2;
}

/* Section: Programs */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.program-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  height: 350px;
  group: hover;
  border: 1px solid var(--color-border);
}

.program-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.program-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 14, 14, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  text-align: center;
  transition: background 0.4s ease;
}

.program-card:hover img {
  transform: scale(1.1);
}

.program-card:hover .program-card-overlay {
  background: rgba(15, 14, 14, 0.6);
}

.program-card h3 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 15px;
  transform: translateY(20px);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.program-card p {
  font-size: 1rem;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s ease 0.1s, opacity 0.4s ease 0.1s;
}

.program-card:hover h3 {
  transform: translateY(0);
}

.program-card:hover p {
  transform: translateY(0);
  opacity: 1;
}

/* Gallery Section */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item::after {
  content: '+';
  position: absolute;
  inset: 0;
  background: rgba(212, 175, 55, 0.8);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  font-weight: 300;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Information / Notice Box */
.info-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  background: var(--color-bg-alt);
  padding: 60px 40px;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
}

.info-box h3 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 15px;
}

.notice-list li {
  padding: 15px 0;
  border-bottom: 1px dashed var(--color-border);
  display: flex;
  justify-content: space-between;
}

.notice-list li a:hover {
  color: var(--color-primary);
}

.notice-date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.map-placeholder {
  width: 100%;
  height: 250px;
  background: #2a2a2a;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

/* Footer */
footer {
  background-color: #050505;
  padding: 60px 0 30px;
  border-top: 1px solid var(--color-primary-dark);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
}

.footer-info h2 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.footer-info p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  gap: 40px;
}

.footer-links h4 {
  color: var(--color-text);
  margin-bottom: 20px;
}

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.footer-links ul li a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 30px;
  border-top: 1px solid var(--color-border);
  color: #666;
  font-size: 0.85rem;
}

/* Subpage Heroes */
.sub-hero {
  height: 40vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  margin-bottom: 60px;
}

.sub-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 14, 0.85);
  -webkit-backdrop-filter: blur(8px) brightness(0.6) saturate(0.5);
  backdrop-filter: blur(8px) brightness(0.6) saturate(0.5);
  border-bottom: 1px solid var(--color-primary-dark);
}

.sub-hero h1 {
  position: relative;
  z-index: 10;
  font-size: 3rem;
  color: white;
}

/* Inner Page layouts */
.content-section {
  padding: 60px 0;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-primary-dark);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  width: 50%;
  padding-right: 40px;
}

.timeline-item:nth-child(even) {
  margin-left: 50%;
  padding-right: 0;
  padding-left: 40px;
}

.timeline-dot {
  position: absolute;
  right: -6px;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-primary);
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -6px;
}

.timeline-date {
  color: var(--color-primary);
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

/* Tabs */
.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--color-border);
}

.tab-btn {
  padding: 15px 30px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
}

.tab-btn:hover, .tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.form-group {
  margin-bottom: 25px;
}

.form-label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-heading);
  color: var(--color-primary-light);
}

.form-control {
  width: 100%;
  padding: 15px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
}

textarea.form-control {
  resize: vertical;
  height: 150px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Detail UI Components (Pricing, Process) */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
}

.price-table th, .price-table td {
  padding: 20px;
  border: 1px solid var(--color-border);
  text-align: center;
}

.price-table th {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.process-steps {
  display: flex;
  justify-content: space-between;
  text-align: center;
  position: relative;
  margin: 50px 0;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  height: 1px;
  background: dashed 1px var(--color-border);
  z-index: 1;
}

.step-item {
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--color-bg);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.step-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--color-primary-light);
}

/* Course / Program Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--color-primary-dark);
}

.card-img {
  height: 200px;
  background: #333;
  overflow: hidden;
  position: relative;
}

.card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 14, 0.7);
  pointer-events: none;
  transition: background 0.4s ease;
}

.card:hover .card-img::after {
  background: rgba(15, 14, 14, 0.4);
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img img {
  transform: scale(1.05);
}

.card-body {
  padding: 30px;
  text-align: center;
}

.card-title {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 15px;
}

.badge {
  display: inline-block;
  padding: 5px 12px;
  background: var(--color-primary-dark);
  color: #fff;
  font-size: 0.8rem;
  border-radius: 20px;
  margin-bottom: 15px;
}

/* AI Service Warning */
.ai-overlay {
  position: relative;
  text-align: center;
  padding: 100px 20px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0 L50 50 L100 0 Z" fill="rgba(212, 175, 55, 0.05)"/></svg>') repeat;
  border: 1px dashed var(--color-primary);
}

.ai-overlay i {
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-title { font-size: 3rem; }
  .programs-grid { gap: 20px; }
  .info-section { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem; }
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(15, 14, 14, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }
  .nav-links.active { left: 0; }
  .mobile-menu-btn { display: block; }
  .programs-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 20px; }
  .timeline-item { width: 100%; padding-left: 50px; padding-right: 0; }
  .timeline-item:nth-child(even) { margin-left: 0; padding-left: 50px; }
  .timeline-dot { left: 14px; top: 5px; }
  .timeline-item:nth-child(even) .timeline-dot { left: 14px; }
  .process-steps { flex-direction: column; gap: 30px; }
  .process-steps::before { display: none; }
  .footer-inner { flex-direction: column; gap: 40px; }
  .tabs-nav { flex-wrap: wrap; }
}

/* ========= Form field errors ========= */
.field-error {
  display: none;
  margin-top: 6px;
  font-size: 0.85rem;
  color: #E85C5C;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.field-error.is-visible {
  display: block;
  animation: fieldErrorFadeIn 0.2s ease-out;
}

.form-control.has-error,
input[type="checkbox"].has-error + label {
  border-color: var(--color-secondary) !important;
}

.form-control.has-error {
  box-shadow: 0 0 0 1px var(--color-secondary);
}

input[type="checkbox"].has-error + label {
  color: #E85C5C !important;
}

@keyframes fieldErrorFadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========= Success Modal ========= */
.success-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.success-modal.is-open {
  display: flex;
  animation: modalBackdropFadeIn 0.3s ease-out;
}

.success-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 14, 14, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.success-modal__card {
  position: relative;
  max-width: 480px;
  width: 100%;
  padding: 56px 40px 44px;
  background: linear-gradient(180deg, #1b1816 0%, #14110f 100%);
  border: 1px solid var(--color-primary-dark);
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.15) inset,
    0 24px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
  animation: modalCardRise 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.success-modal__card::before,
.success-modal__card::after {
  content: '';
  position: absolute;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary) 50%, transparent);
  opacity: 0.6;
}

.success-modal__card::before { top: 14px; }
.success-modal__card::after { bottom: 14px; }

.success-modal__ornament {
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 18px;
  letter-spacing: 0.3em;
}

.success-modal__title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--color-primary);
  margin: 0 0 18px;
  letter-spacing: 0.05em;
}

.success-modal__divider {
  width: 60px;
  height: 1px;
  background: var(--color-primary);
  margin: 0 auto 24px;
  opacity: 0.7;
}

.success-modal__message {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 2;
  margin: 0 0 22px;
  letter-spacing: 0.02em;
}

.success-modal__message strong {
  color: var(--color-primary-light);
  font-weight: 600;
}

.success-modal__signature {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  margin: 0 0 32px;
}

.success-modal__close {
  min-width: 160px;
  padding: 12px 32px;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

@keyframes modalBackdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalCardRise {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
  .success-modal__card { padding: 44px 24px 32px; }
  .success-modal__title { font-size: 1.4rem; }
  .success-modal__message { font-size: 0.95rem; line-height: 1.9; }
}
