/* =========================================================
   율안 국제 법률사무소 — YULAN INTERNATIONAL LAW OFFICE
   skin/css/style.css
   ========================================================= */

:root {
  --accent: #639DF2;              /* 브랜드 블루 (rgb 99,157,242) */
  --accent-soft: rgba(99, 157, 242, 0.12);
  --dark: #1a1a1a;
  --gray-text: #333;
  --line: rgba(77, 74, 74, 0.45);
  --kakao: #FEE500;
  --white: #ffffff;
  --header-h: 74px;
  --container: 1140px;
  --font-stack: 'Pretendard', 'Noto Sans KR', 'Apple SD Gothic Neo',
                'Malgun Gothic', 'Segoe UI', 'Arial', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; border: 0; background: none; cursor: pointer; }

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

.hr {
  border: 0;
  border-top: 1px solid var(--line);
}

/* =========================================================
   헤더
   ========================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; }
.logo img { height: 70px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  font-size: 17px;
  font-weight: 500;
  color: var(--dark);
  letter-spacing: 0.01em;
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s ease;
}
.main-nav a:hover,
.main-nav a.active { color: var(--accent); }
.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

/* 햄버거 */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--dark);
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 모바일 드로어 */
.mobile-nav {
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.mobile-nav.open { max-height: 320px; }
.mobile-nav a {
  display: block;
  padding: 15px 24px;
  font-size: 17px;
  font-weight: 500;
  color: var(--dark);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a:active { background: var(--accent-soft); color: var(--accent); }

/* =========================================================
   히어로 슬라이더 (문구는 이미지에 포함되어 있음)
   ========================================================= */
.hero {
  position: relative;
  margin-top: var(--header-h);
  height: 450px;                       /* 모바일: 배너 문구가 모두 보이도록 높이/위치 조정 */
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 16% center;    /* 모바일: 좌측 문구 영역 표시 */
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, visibility .8s ease;
}
.hero-slide-1 { background-image: url('../images/hero_yulan_1.png'); }
.hero-slide-2 { background-image: url('../images/hero_yulan_2.png'); }
.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

/* 컨트롤 */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--dark);
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background .2s ease;
}
.hero-arrow:hover { background: var(--white); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }

.hero-dots {
  position: absolute;
  bottom: 22px;
  left: 0; right: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dots button {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: background .25s ease, transform .25s ease;
}
.hero-dots button.active {
  background: var(--white);
  transform: scale(1.25);
}

/* =========================================================
   메인 소개 텍스트
   ========================================================= */
.section { padding: 30px 0; }
.section-intro { padding: 44px 0 34px; }
section[id], footer[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.intro-lines h3 {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 8px;
}
.intro-lines .hl {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-size: 21px;
  font-weight: 700;
  padding: 0 8px;
  line-height: 1.5;
  margin-bottom: 10px;
}
.intro-tagline {
  font-size: 18px;
  margin-top: 18px;
  font-weight: 400;
  color: #555;
}

/* =========================================================
   서브페이지 공통
   ========================================================= */
.section-sub {
  padding-top: calc(var(--header-h) + 34px);
  padding-bottom: 56px;
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 26px;
}
.page-sub {
  font-size: 14px;
  line-height: 1.7;
  color: var(--dark);
}
.page-note {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
  margin-bottom: 26px;
}

/* =========================================================
   업무분야
   ========================================================= */
.tasks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
}
.task-item h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  line-height: 1.3;
}
.task-item p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--gray-text);
}
.task-item p + p { margin-top: 6px; }

/* =========================================================
   구성원
   ========================================================= */
.member-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
}
.member-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.member-photo {
  width: 100%;
  max-width: 100%;
}
.member-photo img {
  width: 100%;
  aspect-ratio: 3 / 5;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
}
.member-info { width: 100%; }
.member-info h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--dark);
}
.member-role {
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 12px;
  border-radius: 4px;
  margin: 8px 0 14px;
}
.member-info p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--gray-text);
}
.member-info p + p { margin-top: 8px; }

/* =========================================================
   지도
   ========================================================= */
.section-map { padding: 0; }
.map-placeholder {
  position: relative;
  height: 340px;
  background: #dde4ea url('../images/map_yulan.png') no-repeat center / cover;
  overflow: hidden;
}
.map-hint {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  text-align: center;
  font-size: 12px;
  color: #333;
  background: rgba(255, 255, 255, 0.82);
  padding: 4px 10px;
  width: fit-content;
  margin: 0 auto;
  border-radius: 4px;
  z-index: 2;
}

/* =========================================================
   연락처
   ========================================================= */
.section-contact { padding: 34px 0 44px; }
.contact-aside { display: none; }
.contact-main .c-block { padding: 18px 0 26px; }
.contact-main .c-block + .c-block { border-top: 1px solid var(--line); }
.contact-main h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
}
.contact-main p {
  font-size: 18px;
  line-height: 1.75;
}

/* =========================================================
   상담문의 폼
   ========================================================= */
.contact-form-wrap { max-width: 860px; }

.contact-form .form-group { margin: 26px 0; }
.contact-form .form-group > label:first-child,
.contact-form .form-group > .form-label {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}
.icon-required {
  font-style: normal;
  color: #d0021b;
  font-weight: 700;
  margin-left: 2px;
}
.contact-form input[type="text"],
.contact-form textarea,
.contact-form .phone-part {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--dark);
  background: var(--white);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form textarea { resize: vertical; line-height: 1.6; }
.contact-form input[type="text"]:focus,
.contact-form textarea:focus,
.contact-form .phone-part:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.phonenumber-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.phonenumber-wrap .phone-part { flex: 1; text-align: center; }
.phone-line { color: #999; font-size: 18px; }

.privacy-box {
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fafafa;
  padding: 16px;
  max-height: 280px;
  overflow: auto;
}
.privacy-box p {
  font-size: 13px;
  line-height: 1.75;
  color: #444;
  margin-bottom: 8px;
  word-break: break-word;
}
.privacy-box p:last-child { margin-bottom: 0; }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--dark);
  cursor: pointer;
}
.check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.btn-submit {
  display: inline-block;
  background: #363636;
  color: var(--white);
  border: 0;
  border-radius: 4px;
  padding: 13px 52px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s ease;
}
.btn-submit:hover { background: var(--accent); }

/* =========================================================
   푸터
   ========================================================= */
.site-footer {
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 30px 0 40px;
}
.site-footer p {
  font-size: 14px;
  color: var(--dark);
  line-height: 1.9;
  text-align: left;
}

/* =========================================================
   플로팅 상담문의 버튼
   ========================================================= */
.floating-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  height: 52px;
  padding: 0 24px;
  border-radius: 26px;
  background: var(--kakao);
  color: #3a2d00;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  transition: transform .2s ease, box-shadow .2s ease;
}
.floating-btn svg { width: 22px; height: 22px; flex: none; }
.floating-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28); }

/* =========================================================
   토스트
   ========================================================= */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(16px);
  z-index: 1100;
  background: rgba(26, 26, 26, 0.92);
  color: var(--white);
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  white-space: nowrap;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================================
   데스크톱 (≥992px)
   ========================================================= */
@media (min-width: 992px) {
  :root { --header-h: 82px; }

  .logo img { height: 80px; }

  .nav-toggle { display: none; }
  .mobile-nav { display: none; }

  /* 히어로 */
  .hero { height: 812px; }
  .hero-slide { background-position: center; }

  /* 메인 소개 */
  .section-intro { padding: 66px 0 50px; }
  .intro-lines h3 { font-size: 40px; margin-bottom: 6px; }
  .intro-lines .hl { font-size: 40px; line-height: 1.35; }
  .intro-tagline { font-size: 20px; margin-top: 26px; }

  /* 서브페이지 */
  .section-sub { padding-top: calc(var(--header-h) + 60px); padding-bottom: 70px; }

  /* 업무분야 2열 */
  .tasks-grid { grid-template-columns: 1fr 1fr; gap: 44px 60px; }

  /* 구성원 2열 */
  .member-grid { grid-template-columns: 1fr 1fr; gap: 54px 60px; }
  .member-card { flex-direction: row; gap: 30px; }
  .member-photo { width: 220px; flex: none; }
  .member-info h3 { font-size: 30px; }

  /* 지도 */
  .map-placeholder { height: 430px; }

  /* 연락처 */
  .section-contact { padding: 50px 0 60px; }
  .contact-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 30px;
  }
  .contact-aside { display: block; margin-bottom: 0; }
  .contact-aside h2 { font-size: 48px; text-align: center; }
  .contact-main .c-block { padding: 26px 0 30px; }

  .site-footer { padding: 36px 0 46px; }
}

/* =========================================================
   작은 모바일: 본문·입력 크기 보장
   ========================================================= */
@media (max-width: 767px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
}
