/* =============================================
   한솔치과기공소 - Main Stylesheet
   ============================================= */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1a4a7a;
  --primary-dark: #0d2b4e;
  --primary-light: #2563a8;
  --accent: #c8a96e;
  --accent-dark: #a88848;
  --naver: #03c75a;
  --bg: #f5f7fa;
  --bg2: #eef1f6;
  --white: #ffffff;
  --text: #2d3748;
  --text-light: #718096;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* =============================================
   HEADER
   ============================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.header.scrolled {
  border-color: var(--border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  height: 46px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.logo-sub {
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

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

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-btn span {
  display: block;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #0a2040 0%, #1a4a7a 45%, #1e5fa0 70%, #2a3f6e 100%);
  z-index: 0;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(200,169,110,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(30,95,160,0.4) 0%, transparent 60%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: 0 24px;
  max-width: 820px;
}

.hero-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  padding: 6px 18px;
  border: 1px solid rgba(200,169,110,0.4);
  border-radius: 40px;
}

.hero-content h1 {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 24px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.3);
}

.hero-desc {
  font-size: clamp(16px, 2.5vw, 21px);
  color: rgba(255,255,255,0.82);
  line-height: 1.8;
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hero-scroll span {
  display: block;
  width: 24px; height: 36px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 12px;
  position: relative;
}

.hero-scroll span::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  80% { transform: translateX(-50%) translateY(10px); opacity: 0; }
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  border: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,169,110,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.8);
  transform: translateY(-2px);
}

.btn-naver {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  background: var(--naver);
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.22s ease;
}

.btn-naver:hover {
  background: #02a84b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(3,199,90,0.4);
}

/* =============================================
   SECTIONS COMMON
   ============================================= */
.section { padding: 110px 0; }

.section-title {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.title-line {
  width: 52px; height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  margin: 0 auto 16px;
  border-radius: 2px;
}

.section-sub {
  color: var(--text-light);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto;
}

/* =============================================
   ABOUT
   ============================================= */
.about-section { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 40px;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px 32px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.about-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--accent);
}

.about-icon {
  font-size: 52px;
  margin-bottom: 20px;
  display: block;
}

.about-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.about-card p {
  color: var(--text-light);
  font-size: 15px;
  line-height: 1.75;
}

.about-director { display: flex; justify-content: center; }

.director-info {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  padding: 20px 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
}

.director-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
}

.director-info strong {
  font-size: 18px;
  color: var(--primary);
  font-weight: 700;
}

/* =============================================
   GALLERY
   ============================================= */
.gallery-section { background: var(--white); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  box-shadow: var(--shadow);
  background: var(--bg2);
}

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

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

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,43,78,0.85) 0%, rgba(13,43,78,0.1) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.35s ease;
}

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

.gallery-label {
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.gallery-zoom {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 40px;
  cursor: pointer;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.gallery-zoom:hover { background: rgba(255,255,255,0.32); }

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(5, 15, 30, 0.95);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.lightbox.active { display: flex; }

.lightbox-img-wrap {
  max-width: min(90vw, 900px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 64px rgba(0,0,0,0.6);
}

.lightbox-caption {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.lightbox-close {
  position: absolute;
  top: 24px; right: 28px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 18px;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover { background: rgba(255,255,255,0.22); }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 22px;
  width: 52px; height: 52px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.22); }

/* =============================================
   CONTACT
   ============================================= */
.contact-section { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 52px;
  align-items: start;
}

.contact-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon-wrap {
  font-size: 22px;
  width: 44px; height: 44px;
  background: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.contact-list strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 4px;
}

.contact-list p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

.contact-list a {
  color: var(--primary-light);
  transition: color 0.2s;
}

.contact-list a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Map */
.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.map-placeholder {
  background: linear-gradient(135deg, #e8f0f8 0%, #dce8f5 100%);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px 32px;
  position: relative;
  text-align: center;
}

.map-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
}

.map-address-card {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 400px;
}

.map-pin { font-size: 36px; flex-shrink: 0; }

.map-addr-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.map-addr-text strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.map-addr-text span {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.5;
}

.map-open-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--naver);
  color: var(--white);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(3,199,90,0.35);
  transition: all 0.22s ease;
}

.map-open-btn:hover {
  background: #02a84b;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(3,199,90,0.45);
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 0;
}

.footer-content {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.footer-logo {
  height: 52px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.footer-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

.footer-eng {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-top: 3px;
}

.footer-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 1.7;
}

.footer-details a {
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
}

.footer-details a:hover { color: var(--white); }

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .menu-btn { display: flex; }

  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--white);
    padding: 24px 28px 32px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  }

  .nav.open .nav-links li { border-bottom: 1px solid var(--border); }
  .nav.open .nav-links a { display: block; padding: 16px 0; font-size: 17px; }
  .nav.open .nav-links a::after { display: none; }

  .about-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .section { padding: 80px 0; }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }

  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; max-width: 280px; }

  .footer-content { flex-direction: column; gap: 24px; }
  .footer-brand { flex-direction: column; text-align: center; }

  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }

  .map-address-card { flex-direction: column; text-align: center; }
  .map-addr-text { text-align: center; }
}
