/* =========================================================
   울산 정한의원 공통 스타일
   - 색상/폰트 변수, 헤더(GNB), 푸터, 버튼, 메인 페이지 섹션
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
  --primary: #2f5e4b;        /* 딥 그린 (브랜드 배너 톤) */
  --primary-dark: #1f4335;
  --primary-light: #e8f0ec;
  --accent: #b8975a;         /* 골드 포인트 */
  --ivory: #f6f3ec;          /* 섹션 구분 배경 */
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --line: #e3e0d8;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(31, 67, 53, 0.10);
  --header-h: 84px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.75;
  font-size: 16px;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; }
p { margin: 0 0 1em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: all .2s ease; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-outline:hover { background: #fff; color: var(--primary); }
.btn-outline-dark { border-color: var(--primary); color: var(--primary); }
.btn-outline-dark:hover { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(.93); }

/* ---------- 헤더 / GNB ---------- */
.gnb-header {
  position: sticky; top: 0; z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--line);
  /* 주의: backdrop-filter/transform 을 헤더에 주면 모바일 메뉴(position:fixed)의 기준이 바뀌어 깨집니다 */
}
html, body { overflow-x: hidden; }
.gnb-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 20px;
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.gnb-logo img { height: 46px; width: auto; }
.gnb-menu { display: flex; align-items: center; gap: 4px; }
.gnb-menu > li { position: relative; }
.gnb-menu > li > a {
  display: block; padding: 30px 16px; font-weight: 500; font-size: 16px; color: var(--text);
  transition: color .2s;
}
.gnb-menu > li:hover > a, .gnb-menu > li.active > a { color: var(--primary); }
.gnb-submenu {
  position: absolute; top: calc(100% - 12px); left: 50%; transform: translateX(-50%) translateY(8px);
  min-width: 190px; background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  padding: 10px 0; opacity: 0; visibility: hidden; transition: all .2s ease;
  border: 1px solid var(--line);
}
.gnb-submenu::before {
  content: ""; position: absolute; top: -7px; left: 50%; margin-left: -7px;
  border: 7px solid transparent; border-top: 0; border-bottom-color: #fff;
}
.gnb-menu > li:hover .gnb-submenu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.gnb-submenu a {
  display: block; padding: 10px 22px; font-size: 14.5px; color: var(--text); white-space: nowrap;
}
.gnb-submenu a:hover, .gnb-submenu li.active a { background: var(--primary-light); color: var(--primary); }
.gnb-cta > a {
  margin-left: 12px; padding: 11px 22px !important; border-radius: 999px;
  background: var(--primary); color: #fff !important; font-weight: 700;
}
.gnb-cta > a:hover { background: var(--primary-dark); }
.gnb-tel { display: none; }
.gnb-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px; padding: 8px;
}
.gnb-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: all .25s; }

/* ---------- 히어로 (메인) ---------- */
.hero {
  position: relative; min-height: 620px; display: flex; align-items: center;
  background: url('/assets/img/hero/main-hero.jpg') center 30% / cover no-repeat; color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,45,36,.82) 0%, rgba(20,45,36,.55) 55%, rgba(20,45,36,.25) 100%);
}
.hero-content { position: relative; max-width: var(--container); margin: 0 auto; padding: 90px 20px; width: 100%; }
.hero-eyebrow { display: inline-block; font-size: 14px; letter-spacing: .12em; color: #d9c9a3; font-weight: 500; margin-bottom: 18px; }
.hero h1 { font-size: 46px; font-weight: 900; line-height: 1.3; margin-bottom: 18px; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.hero p { font-size: 19px; opacity: .95; max-width: 620px; margin-bottom: 34px; font-weight: 300; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 빠른 안내 스트립 ---------- */
.quick-strip { background: var(--white); position: relative; z-index: 2; }
.quick-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: -54px; margin-bottom: 20px;
}
.quick-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px;
  display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--line);
}
.quick-card .q-icon { font-size: 26px; line-height: 1; padding-top: 4px; }
.quick-card h4 { font-size: 14px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.quick-card p { margin: 0; font-weight: 700; font-size: 17px; line-height: 1.5; }
.quick-card small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }

/* ---------- 공통 섹션 ---------- */
.section { padding: 90px 0; }
.section-alt { background: var(--ivory); }
.section-dark { background: var(--primary-dark); color: #fff; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-eyebrow { display: block; color: var(--accent); font-weight: 700; letter-spacing: .1em; font-size: 13px; margin-bottom: 10px; }
.section-title { font-size: 34px; font-weight: 900; line-height: 1.3; }
.section-desc { color: var(--muted); margin: 14px auto 0; max-width: 680px; }
.section-dark .section-desc { color: rgba(255,255,255,.8); }

/* 진료과목 카드 */
.dept-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.dept-card {
  background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  transition: all .25s; display: flex; flex-direction: column;
}
.dept-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.dept-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; }
.dept-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.dept-card:hover .thumb img { transform: scale(1.05); }
.dept-card .body { padding: 22px 22px 26px; }
.dept-card h3 { font-size: 20px; margin-bottom: 8px; color: var(--primary-dark); }
.dept-card p { font-size: 14px; color: var(--muted); margin-bottom: 12px; min-height: 48px; }
.dept-card .tags { font-size: 13px; color: var(--primary); font-weight: 500; line-height: 1.7; }

/* 왜 정한의원 */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 34px 30px; }
.feature .num { font-size: 13px; color: #d9c9a3; letter-spacing: .15em; font-weight: 700; }
.feature h3 { font-size: 22px; margin: 10px 0 12px; }
.feature p { color: rgba(255,255,255,.82); font-size: 15px; margin: 0; }

/* 원장 소개 */
.doctor-section { display: grid; grid-template-columns: 380px 1fr; gap: 56px; align-items: center; }
.doctor-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.doctor-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.doctor-info h3 { font-size: 30px; font-weight: 900; margin-bottom: 6px; }
.doctor-info .role { color: var(--accent); font-weight: 700; margin-bottom: 20px; }
.doctor-info .quote { font-size: 19px; font-weight: 500; color: var(--primary-dark); border-left: 4px solid var(--accent); padding-left: 16px; margin-bottom: 22px; }
.doctor-info ul { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; margin-bottom: 26px; }
.doctor-info li { font-size: 15px; color: var(--muted); padding-left: 14px; position: relative; }
.doctor-info li::before { content: ""; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* 갤러리 */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-grid a { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; position: relative; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-grid a:hover img { transform: scale(1.06); }
.gallery-grid a span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; color: #fff; font-size: 13px;
  background: linear-gradient(transparent, rgba(0,0,0,.55));
}
.gallery-grid a.tall { grid-row: span 2; aspect-ratio: auto; }

/* 진료시간 + 오시는 길 (메인 하단) */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
.info-box { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 36px; }
.info-box h3 { font-size: 22px; margin-bottom: 18px; color: var(--primary-dark); display: flex; align-items: center; gap: 10px; }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { padding: 11px 6px; border-bottom: 1px solid var(--line); text-align: left; font-size: 15px; vertical-align: top; }
.hours-table th { width: 42%; font-weight: 700; color: var(--primary-dark); }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }
.hours-note { font-size: 13.5px; color: var(--muted); margin-top: 14px; }
.hours-note strong { color: #b0413e; }
.map-embed { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.addr-line { font-size: 17px; font-weight: 700; margin: 16px 0 4px; }
.addr-sub { color: var(--muted); font-size: 14px; margin: 0; }

/* CTA 밴드 */
.cta-band { background: linear-gradient(120deg, var(--primary-dark), var(--primary)); color: #fff; padding: 64px 0; }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { font-size: 30px; font-weight: 900; margin-bottom: 6px; }
.cta-band p { margin: 0; opacity: .85; }
.cta-band .tel { font-size: 34px; font-weight: 900; letter-spacing: .02em; }
.cta-band .tel small { display: block; font-size: 14px; font-weight: 400; opacity: .8; letter-spacing: 0; }

/* ---------- 푸터 ---------- */
.site-footer { background: #1b2a24; color: #cfd8d3; padding: 60px 0 30px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.site-footer p { margin: 0 0 6px; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-logo img { height: 44px; width: auto; background: #fff; padding: 6px 12px; border-radius: 8px; margin-bottom: 16px; }
.footer-tel { font-size: 24px; font-weight: 900; color: #fff; margin: 6px 0 10px !important; }
.footer-sns li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #90a099; }
.footer-bottom .notice { font-size: 12px; }

/* 플로팅 버튼 */
.floating { position: fixed; right: 20px; bottom: 22px; z-index: 900; display: flex; flex-direction: column; gap: 10px; }
.floating a {
  width: 60px; height: 60px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700; line-height: 1.15; box-shadow: 0 6px 18px rgba(0,0,0,.22); text-align: center;
}
.floating .f-tel { background: var(--primary); }
.floating .f-kakao { background: #fee500; color: #3c1e1e; }
.floating .f-naver { background: #03c75a; }
.floating .f-blog { background: #03c75a; }
.floating .f-top { background: #fff; color: var(--text); border: 1px solid var(--line); }

/* 자리표시(임시) 표시용 */
.todo-note { background: #fff6c2; padding: 8px 12px; border-radius: 6px; font-size: 13px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1100px) {
  .gnb-menu > li > a { padding: 30px 10px; font-size: 15px; }
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .doctor-section { grid-template-columns: 300px 1fr; gap: 36px; }
}
@media (max-width: 1024px) {
  :root { --header-h: 66px; }
  .gnb-logo img { height: 38px; }
  .gnb-toggle { display: flex; }
  .gnb-header.is-open .gnb-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .gnb-header.is-open .gnb-toggle span:nth-child(2) { opacity: 0; }
  .gnb-header.is-open .gnb-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .gnb-menu {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: #fff;
    flex-direction: column; align-items: stretch; gap: 0; overflow-y: auto; padding: 8px 0 40px;
    transform: translateX(100%); transition: transform .3s ease;
  }
  .gnb-header.is-open .gnb-menu { transform: translateX(0); }
  .gnb-menu > li { border-bottom: 1px solid var(--line); }
  .gnb-menu > li > a { padding: 16px 24px; font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
  .gnb-menu > li.has-sub > a::after { content: "+"; font-size: 20px; color: var(--muted); transition: transform .2s; }
  .gnb-menu > li.is-expanded > a::after { transform: rotate(45deg); }
  .gnb-submenu {
    position: static; transform: none; opacity: 1; visibility: hidden; box-shadow: none; border: 0; border-radius: 0;
    background: var(--ivory); padding: 0; max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .gnb-submenu::before { display: none; }
  .gnb-menu > li.is-expanded .gnb-submenu { visibility: visible; max-height: 400px; padding: 6px 0; }
  .gnb-submenu a { padding: 11px 36px; font-size: 15px; }
  .gnb-cta { padding: 16px 24px; border-bottom: 0 !important; }
  .gnb-cta > a { margin: 0; display: block; text-align: center; padding: 14px !important; }
  .gnb-tel { display: block; padding: 0 24px 10px; text-align: center; color: var(--muted); font-size: 14px; }
  .hero { min-height: 520px; }
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 16px; }
  .quick-grid { grid-template-columns: 1fr; margin-top: 24px; }
  .section { padding: 64px 0; }
  .section-title { font-size: 28px; }
  .feature-grid { grid-template-columns: 1fr; }
  .doctor-section { grid-template-columns: 1fr; }
  .doctor-photo { max-width: 360px; }
  .info-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .hero { min-height: 460px; background-position: 62% center; }
  .hero-content { padding: 60px 20px; }
  .hero h1 { font-size: 28px; }
  .dept-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .doctor-info ul { grid-template-columns: 1fr; }
  .doctor-info h3 { font-size: 24px; }
  .cta-band h2 { font-size: 24px; }
  .cta-band .tel { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .floating a { width: 54px; height: 54px; font-size: 11px; }
}

/* FAQ (메인 페이지에서도 사용) */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 18px 40px 18px 44px; font-weight: 700; font-size: 16px; position: relative; list-style: none; color: var(--primary-dark);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; position: absolute; left: 6px; top: 16px; color: var(--accent); font-weight: 900; font-size: 18px; }
.faq summary::after { content: "+"; position: absolute; right: 10px; top: 14px; font-size: 22px; color: var(--muted); font-weight: 300; }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 20px 20px 44px; color: #555; font-size: 15px; position: relative; }
.faq .a::before { content: "A"; position: absolute; left: 6px; top: -2px; color: var(--primary); font-weight: 900; font-size: 18px; }

#faq .faq { max-width: 860px; margin: 0 auto; }

/* 공지 띠 (어드민 홈페이지 설정에서 켜고 끔) */
.notice-bar { background: var(--accent, #b8975a); color: #fff; text-align: center; font-size: 14px; padding: 9px 16px; }
.notice-bar a, .notice-bar span { color: #fff; text-decoration: none; }
.notice-bar a:hover { text-decoration: underline; }
