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

/* ==========================================
   1. 글로벌 변수 및 리셋
   ========================================== */
:root {
  --ink: #172f4f;
  --muted: #68788b;
  --green: #2f6fae;
  --deep: #245383;
  --mint: #dbeaf7;
  --cream: #f7f9fc;
  --line: #e2e9f1;
  --serif: Georgia, 'Noto Sans KR', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #f8f9fa;
  color: var(--ink);
  font-family: 'DM Sans', 'Noto Sans KR', sans-serif;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }

/* ==========================================
   2. 상단 네비게이션 (Topbar)
   ========================================== */
.topbar {
  background: #fff;
  padding: 0 max(calc((100% - 980px)/2), 20px);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 5px rgba(30, 55, 90, .08);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  font-size: 19px;
  color: #1a237e;
  letter-spacing: -1px;
}
.brand-mark {
  height: 32px;
  width: 32px;
  border-radius: 7px;
  background: #2f6fae;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
}
.brand-light { font-weight: 500; color: #6d8eae; }
.topbar nav { display: flex; gap: 30px; color: #61758e; font-size: 13px; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.login-button {
  border: 0;
  background: transparent;
  color: #315d86;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 4px;
}
.header-cta {
  font-size: 12px;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 10px 16px;
}
.header-cta span { color: var(--green); padding-left: 6px; }

/* ==========================================
   3. 메인 히어로 섹션 (Hero)
   ========================================== */
.hero {
  max-width: 980px;
  margin: auto;
  padding: 34px 16px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}
.hero-copy { padding: 10px 0; z-index: 2; }
.eyebrow, .section-kicker { font-size: 11px; letter-spacing: 1.6px; color: #587da2; font-weight: 700; }
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #72a9d7;
  margin-right: 8px;
  box-shadow: 0 0 0 4px #e4eff9;
}
.hero h1 { font-size: 42px; line-height: 1.28; letter-spacing: -2px; margin: 18px 0 14px; font-weight: 700; color: #172f4f; }
.hero h1 em, .section-heading h2 em, .how h2 em { font-style: normal; color: #367ab8; }
.hero-description { font-size: 14px; line-height: 1.8; color: #52687d; margin-bottom: 24px; }
.primary-button, .submit-button {
  background: #2f6fae;
  color: white;
  border-radius: 6px;
  display: inline-flex;
  gap: 20px;
  align-items: center;
  padding: 14px 22px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(47, 111, 174, .18);
}
.social-proof { display: flex; align-items: center; gap: 12px; margin-top: 28px; }
.avatar-stack { display: flex; padding-left: 3px; }
.avatar-stack span {
  margin-left: -4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #e6d9ce;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.social-proof p { font-size: 11px; color: #6a7c8e; margin: 0; }
.social-proof strong { color: #2f6fae; }

/* 히어로 우측 배너 상자 스타일 */
.hero-art {
  background: linear-gradient(145deg, #edf5fc, #d8e8f7);
  border-radius: 16px;
  height: 280px;
  border: 1px solid #d1e0ee;
  box-shadow: 0 18px 40px rgba(35, 83, 131, .08);
  position: relative;
  overflow: hidden;
}

/* 내부 자식 태그들 겹침 방지 (숨김) */
.hero-art > * {
  display: none !important;
}

/* 배너 내부 타이틀 (\A 뒤에 한 칸 공백 부여하여 유니코드 오류 해결) */
.hero-art:before {
  content: 'TAX\A CONSULTING';
  white-space: pre;
  position: absolute;
  left: 35px;
  top: 45px;
  color: #1f568b;
  font-size: 26px;
  line-height: 1.35;
  letter-spacing: 2px;
  font-weight: 800;
}
.hero-art:after {
  content: '정확한 세무 진단\A신뢰할 수 있는 전문가 상담';
  white-space: pre;
  position: absolute;
  left: 37px;
  top: 140px;
  color: #5c7996;
  font-size: 14px;
  line-height: 1.9;
  font-weight: 600;
}

/* 스크롤 안내 하단 레일 숨김 */
.hero-bottom { display: none !important; }

/* ==========================================
   4. 배너 및 신뢰 스트립 (Banners)
   ========================================== */
.notice-banner {
  max-width: 948px;
  margin: 16px auto 0;
  background: #1a237e;
  color: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.notice-label { background: #fff; color: #1a237e; border-radius: 2px; padding: 2px 6px; font-size: 10px; font-weight: 700; }
.notice-banner a { margin-left: auto; color: #dbe8ff; font-size: 11px; }

.promotion-card {
  max-width: 948px;
  margin: 16px auto 0;
  background: #f0f4ff;
  border: 1px solid #dce6ff;
  border-radius: 12px;
  padding: 18px 20px;
}
.promotion-card span { font-size: 10px; color: #1e88e5; font-weight: 700; letter-spacing: 1px; }
.promotion-card h3 { font-size: 15px; margin: 8px 0 5px; color: #182438; }
.promotion-card p { font-size: 11px; color: #66758a; margin: 0; }

.trust-strip {
  max-width: 948px;
  margin: 16px auto 42px;
  background: #fff;
  border: 1px solid #edf0ec;
  border-radius: 10px;
  display: flex;
  justify-content: space-around;
  padding: 16px;
}
.trust-strip > div { display: flex; align-items: center; gap: 12px; }
.trust-icon { width: 38px; height: 38px; border-radius: 12px; background: #e6f0fa; color: #367ab8; display: grid; place-items: center; font-size: 18px; }
.trust-strip p { margin: 0; }
.trust-strip strong { font-size: 12px; }
.trust-strip small { font-size: 9px; color: #84928c; margin-top: 3px; display: block; }

/* ==========================================
   5. 마이 세무 대시보드 & 동적 달력
   ========================================== */
.section-wrap { max-width: 980px; margin: 0 auto 60px; padding: 0 16px; }
.dashboard-heading, .section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.section-heading h2, .how h2 { font-size: 26px; line-height: 1.4; margin: 10px 0 0; }
.outline-button {
  border: 1px solid #c8d9e8;
  background: #fff;
  color: #37658b;
  border-radius: 4px;
  padding: 9px 13px;
  font: inherit;
  font-size: 10px;
  cursor: pointer;
}

/* 대시보드 달력 단독 100% 레이아웃 */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr; /* 퀵메뉴 제거 후 달력이 가로 전체 차지 */
  width: 100%;
}

.schedule-card, .quick-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
  width: 100%;
  box-sizing: border-box;
}

/* 달력 헤더 */
.schedule-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.schedule-top strong { font-size: 1.2rem; color: #1e293b; font-weight: bold; }
.month-nav { display: flex; gap: 6px; }
.month-nav button {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  color: #64748b;
}

/* 달력 7열 그리드 */
.schedule-days, .schedule-dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  width: 100%;
}
.schedule-days {
  font-weight: 600;
  color: #64748b;
  font-size: 0.85rem;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 8px;
}
.schedule-dates span {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 38px;
  font-size: 0.9rem;
  color: #334155;
  margin: 2px 0;
}
.schedule-days .sat, .schedule-dates .sat { color: #2563eb; }
.schedule-days .sun, .schedule-dates .sun { color: #dc2626; }
.schedule-dates .other-month { color: #cbd5e1; }

.schedule-dates span.due {
  background-color: #fef2f2;
  color: #dc2626;
  font-weight: bold;
  border-radius: 50%;
}
.schedule-dates span.due::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 8px;
  width: 5px;
  height: 5px;
  background-color: #dc2626;
  border-radius: 50%;
}
.schedule-dates span.today {
  background-color: #22c55e;
  color: #ffffff !important;
  font-weight: bold;
  border-radius: 50%;
}

.schedule-notice {
  margin-top: 16px;
  padding: 12px 16px;
  background-color: #f8fafc;
  border-left: 4px solid #dc2626;
  border-radius: 6px;
}
.schedule-notice b { display: block; font-size: 0.85rem; color: #dc2626; }
.schedule-notice p { margin: 2px 0 0 0; font-size: 0.9rem; color: #334155; }

/* 퀵 메뉴 카드 */
.quick-card { display: block; }
.quick-card .section-kicker { display: block; margin-bottom: 18px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-grid a {
  border: 1px solid #edf1f5;
  border-radius: 8px;
  padding: 16px 12px;
  color: #526f89;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fafbfc;
}
.quick-grid b {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eaf3fb;
  color: #367ab8;
  display: grid;
  place-items: center;
  font-size: 16px;
}

/* ==========================================
   6. 전문가 목록 및 카드
   ========================================== */
.expert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.expert-card { background: #fff; border: 1px solid #edf0ed; border-radius: 10px; padding: 18px; }
.expert-top { display: flex; justify-content: space-between; align-items: flex-start; }
.portrait { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; font-size: 32px; background: #e8f2fb; }
.specialty { border-radius: 99px; background: #edf5fc; color: #3672a5; font-size: 9px; padding: 6px 10px; }
.expert-card h3 { font-size: 15px; margin: 14px 0 6px; }
.expert-desc { font-size: 10px; color: #84918b; margin: 0 0 12px; }
.expert-meta { display: flex; gap: 14px; font-size: 10px; }
.expert-meta span:first-child { color: #ba9148; }
.tags { display: flex; gap: 6px; margin: 12px 0; }
.tags span { background: #f7f8f6; border-radius: 4px; padding: 5px 8px; font-size: 9px; color: #75877e; }
.card-link { border-top: 1px solid #edf0ed; padding-top: 12px; display: flex; justify-content: space-between; color: #2f6fae; font-weight: 700; font-size: 10px; }

/* ==========================================
   7. 칼럼 및 Q&A 미리보기 영역
   ========================================== */
.content-preview { margin-top: 26px; margin-bottom: 35px; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.preview-heading h2 { font-size: 18px; margin: 0; }
.toggle-buttons { display: flex; }
.toggle-buttons button { border: 1px solid #dfe6ee; background: #fff; color: #6f8092; padding: 7px 12px; font-size: 10px; cursor: pointer; }
.toggle-buttons button:first-child { border-radius: 4px 0 0 4px; }
.toggle-buttons button:last-child { border-radius: 0 4px 4px 0; }
.toggle-buttons button.active { background: #1e88e5; color: #fff; border-color: #1e88e5; }
.preview-list { background: #fff; border: 1px solid #e5ebf1; border-radius: 99px; overflow: hidden; }
.preview-list a { display: flex; justify-content: space-between; gap: 15px; padding: 15px 16px; border-bottom: 1px solid #edf1f5; font-size: 11px; }
.preview-list a:last-child { border-bottom: 0; }
.preview-list b { font-weight: 600; color: #31465d; }
.preview-list span { color: #8a9aaa; font-size: 9px; white-space: nowrap; }

/* ==========================================
   8. 이용 방법 (How) 및 푸터 (Footer)
   ========================================== */
.how { text-align: center; padding-top: 68px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps article { position: relative; padding: 15px 10px; }
.step-number { position: absolute; top: 0; left: calc(50% + 24px); color: #8fb09c; font-size: 9px; font-weight: 700; }
.step-icon { margin: 0 auto 15px; width: 55px; height: 55px; border-radius: 18px; background: #e6f0fa; color: #367ab8; display: grid; place-items: center; font-size: 22px; }
.steps h3 { font-size: 13px; margin: 0 0 8px; }
.steps p { font-size: 10px; line-height: 1.7; color: #829089; margin: 0; }

footer { border-top: 1px solid #e7ece7; padding: 30px 20px; text-align: center; color: #839089; font-size: 10px; }

/* ==========================================
   9. 모달창 (로그인/마이페이지/상담)
   ========================================== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(19, 42, 69, .42); z-index: 20; display: grid; place-items: center; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.login-modal, .mypage-modal { position: relative; width: min(100%, 400px); background: #fff; border-radius: 14px; padding: 30px; box-shadow: 0 24px 70px rgba(20, 54, 88, .25); }
.modal-close { position: absolute; right: 16px; top: 12px; border: 0; background: transparent; color: #8395a5; font-size: 24px; cursor: pointer; }

/* ==========================================
   10. 반응형 모바일 (Max-width: 760px)
   ========================================== */
@media(max-width: 760px) {
  .topbar nav, .header-cta { display: none; }
  .hero { grid-template-columns: 1fr; padding: 20px 16px; }
  .hero-art { height: 200px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .expert-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}


/* ==========================================
   인증 버튼 & 모달 디자인
   ========================================== */

/* 헤더 인증 버튼 구역 */
.header-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-login {
  padding: 8px 16px;
  background-color: transparent;
  border: 1px solid #1a73e8;
  color: #1a73e8;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-login:hover {
  background-color: #f1f5fe;
}

.btn-signup {
  padding: 8px 16px;
  background-color: #1a73e8;
  border: none;
  color: #ffffff;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-signup:hover {
  background-color: #1557b0;
}

/* 모달 오버레이 (배경) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* 모달 대화상자 박스 */
.modal-content {
  position: relative; /* ⚠️ 필수! X 버튼이 모달 상자 내부 오른쪽 위에 고정되도록 기준점 설정 */
  background: #ffffff;
  padding: 32px 24px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}


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

/* 닫기 (X) 버튼 스타일 - 클릭 가능 레이어 최상단 설정 */
.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 24px;
  font-weight: bold;
  color: #888888;
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover {
  color: #111111;
}


/* 탭 스타일 */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid #eee;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #888888;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-btn.active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
}

/* 폼 요소 */
.auth-form .form-group {
  margin-bottom: 16px;
  text-align: left;
}

.auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444444;
  margin-bottom: 6px;
}

.auth-form input,
.auth-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cccccc;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: #1a73e8;
}

/* 제출 버튼 */
.btn-submit {
  width: 100%;
  padding: 12px;
  background-color: #1a73e8;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.2s;
}

.btn-submit:hover {
  background-color: #1557b0;
}

/* ==========================================
   상단 네비게이션(Topbar) 공통 디자인
   ========================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.topbar .brand {
  font-size: 20px;
  font-weight: bold;
  color: #111827;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar .brand-mark {
  background-color: #1a73e8;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 16px;
}

.topbar nav {
  display: flex;
  gap: 24px;
}

.topbar nav a {
  color: #4b5563;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.topbar nav a:hover {
  color: #1a73e8;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 📱 모바일 화면(가로 768px 이하) 대응 반응형 스타일 */
@media (max-width: 768px) {
  /* 1. 칼럼 & Q&A 제목 모바일 줄바꿈 허용 (글자 잘림 원천 차단) */
  .preview-title,
  #columnPreview span,
  #qnaPreview span {
    white-space: normal !important;      /* 한 줄 강제 유지 해제 */
    word-break: keep-all !important;     /* 단어 단위로 깔끔하게 줄바꿈 */
    font-size: 15px !important;          /* 모바일 비율에 맞춰 폰트 미세 조정 */
    line-height: 1.4 !important;
  }

  /* 2. 리스트 아이템 모바일 여백 및 레이아웃 최적화 */
  .preview-item,
  #columnPreview > div,
  #qnaPreview > div {
    padding: 12px 14px !important;
    min-width: 0 !important;             /* Flex 박스 내부 잘림 방지 필수 속성 */
    box-sizing: border-box !important;
  }

  /* 3. 전문가 카드 제목 및 본문 모바일 자동 줄바꿈 */
  .expert-card h3 {
    font-size: 18px !important;
    white-space: normal !important;
    word-break: keep-all !important;
  }

  .expert-card p {
    font-size: 14px !important;
    white-space: normal !important;
    word-break: keep-all !important;
  }

  /* 4. 상단 탭 버튼 모바일 크기 최적화 (버튼 짤림 방지) */
  .expert-tab-btn {
    padding: 8px 14px !important;
    font-size: 13px !important;
  }
}
/* 💡 1. 헤더 상단 전체 영역 정렬 및 여백 보정 */
.topbar {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 12px 16px !important;
  gap: 8px !important;
}

/* 💡 2. 로고 브랜드 글자 줄바꿈 원천 차단 */
.topbar .brand {
  white-space: nowrap !important;
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

/* 💡 3. 우측 인증 구역(마이페이지, 사용자명, 로그아웃 버튼) 줄바꿈 완전 차단 */
.header-auth {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.header-auth a,
.header-auth span,
.header-auth button,
.btn-logout,
.btn-login,
.btn-signup {
  white-space: nowrap !important;  /* 글자 세로 꺾임 원천 차단 */
  word-break: keep-all !important;
}

/* 📱 4. 좁은 모바일 화면(480px 이하) 폰트 & 버튼 패딩 자동 축소 */
@media (max-width: 480px) {
  .topbar {
    padding: 8px 10px !important;
  }
  .topbar .brand span {
    font-size: 16px !important;
  }
  .header-auth {
    gap: 6px !important;
  }
  .header-auth span,
  .header-auth a {
    font-size: 13px !important;
  }
  .btn-logout,
  .btn-login,
  .btn-signup {
    padding: 5px 9px !important;
    font-size: 12px !important;
  }
}

/* 💡 1. 상단 제목 구역: 공간 부족 시 엇갈리지 않고 아래로 자동 이동 */
.section-heading {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
}

/* 💡 2. 제목 글자 쪼개짐 원천 차단 ("전문가 목록" 1줄 유지) */
.section-heading h2 {
  word-break: keep-all !important;
  white-space: normal !important;
  line-height: 1.3 !important;
}

/* 💡 3. 버튼 탭 감싸는 틀 */
.toggle-buttons,
.expert-tabs {
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

/* 💡 4. 버튼 글자 세로 꺾임 방지 및 크기 확대 */
.expert-tab-btn,
.toggle-buttons button {
  white-space: nowrap !important; /* "회계사·세무사" 세로 줄바꿈 절대 금지 */
  word-break: keep-all !important;
  font-size: 15px !important;     /* 글자 크기 확대 */
  font-weight: 700 !important;
  padding: 10px 18px !important;  /* 버튼 상하좌우 여백 확대 */
  line-height: 1.2 !important;
  height: auto !important;
}

/* 📱 5. 모바일/좁은 화면(768px 이하): 제목과 버튼을 위아래 2줄로 배치 */
@media (max-width: 768px) {
  .section-heading {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .toggle-buttons,
  .expert-tabs {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .expert-tab-btn,
  .toggle-buttons button {
    padding: 8px 14px !important;
    font-size: 14px !important;
  }
}

/* 💡 전체 페이지 가로 잘림/넘침 원천 차단 */
html, body {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* 박스 크기 계산 표준화 */
*, *::before, *::after {
  box-sizing: border-box !important;
}

/* 📱 Q&A 툴바 모바일 반응형 자동 핏 (화면 밖 튕김 방지) */
.qna-toolbar-wrap {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 8px !important;
  margin-bottom: 20px !important;
  box-sizing: border-box !important;
  flex-wrap: wrap !important; /* 모바일에서 폭이 부족할 경우 안전하게 줄바꿈 */
}

@media (max-width: 600px) {
  .qna-toolbar-wrap .expert-tab-btn {
    padding: 6px 10px !important;
    font-size: 13px !important;
  }

  .qna-toolbar-wrap #openQnaModalBtn {
    padding: 6px 12px !important;
    font-size: 13px !important;
  }
}

/* 📱 Q&A 게시판 상단 툴바 모바일 반응형 최적화 */
@media (max-width: 768px) {
  .qna-toolbar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
  }

  /* 1. 좌측 [전체 | 세무 | 노무] 버튼 패딩/폰트 미세 축소 (한 줄 유지) */
  #qnaFilterTabs {
    gap: 2px !important;
  }
  
  #qnaFilterTabs .expert-tab-btn {
    padding: 7px 11px !important;
    font-size: 13px !important;
  }

  /* 2. 우측 [✏️ 질문하기] 버튼 패딩/폰트 미세 축소 */
  #openQnaModalBtn {
    padding: 7px 12px !important;
    font-size: 13px !important;
    flex-shrink: 0 !important;
  }
}

/* 📱 초소형 모바일 화면(가로 360px 이하) 대응 */
@media (max-width: 360px) {
  .qna-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  #openQnaModalBtn {
    width: 100% !important;
    text-align: center !important;
  }
}

/* 모바일 화면 양옆 최소 안전 여백(16px) 보장 */
.container, main, .section-wrap {
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box !important;
}

/* 💡 qna.html 모바일 탭 너비 100% 강제 확장 해제 */
#qnaFilterTabs {
  width: auto !important;
}

.qna-toolbar-wrap {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

/* 💡 메인 페이지 전문가 카드 가로 스크롤(스와이프) 슬라이드 스타일 */
.expert-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch;
  gap: 14px !important;
  padding-bottom: 12px !important; /* 스크롤바 영역 여백 */
  margin-top: 10px !important;
}

/* 카드 1개의 너비를 고정하여 스크롤 시 예쁘게 멈추도록 설정 */
.expert-grid .expert-card {
  flex: 0 0 260px !important; /* 카드 가로 폭 260px 고정 */
  width: 260px !important;
  scroll-snap-align: start !important;
  box-sizing: border-box !important;
}

/* 모바일/데스크톱 스크롤바 디자인 다듬기 */
.expert-grid::-webkit-scrollbar {
  height: 6px;
}
.expert-grid::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.expert-grid::-webkit-scrollbar-track {
  background: #f1f5f9;
}

/* 💡 히어로 슬라이더 삐져나옴 방지 CSS */
.hero-slider-container {
  width: 100%;
  overflow: hidden; /* 외부 잘림 처리 */
  border-radius: 20px;
}

.hero-slide {
  width: 25%; /* 4개 슬라이드 기준 */
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden; /* 💡 핵심: 옆 슬라이드의 요소나 그림자가 삐져나오지 않도록 차단 */
}
.slide-nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.slide-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s ease;
}

.slide-tab-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.tax-dot { background: #2563eb; }
.labor-dot { background: #166534; }

.hero-slider-container {
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
}

.hero-slide-track {
  display: flex;
  width: 200%; /* 2개 슬라이드 (각 100%) */
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-slide {
  width: 50%; /* 200% 트랙 기준 50% = 화면의 100% */
  flex-shrink: 0;
  box-sizing: border-box;
}

/* 카드 박스 스타일 */
.hero-banner-card {
  margin-top: 20px;
  padding: 24px;
  border-radius: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.hero-banner-card.tax-bg {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.hero-banner-card.labor-bg {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.card-kicker {
  font-size: 13px;
  font-weight: 800;
  color: #1e40af;
  letter-spacing: 0.5px;
}

.card-kicker.labor-kicker {
  color: #166534;
}

.hero-banner-card h3 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 6px 0 4px 0;
}

.hero-banner-card p {
  font-size: 14px;
  color: #475569;
  margin: 0;
  font-weight: 500;
}

.primary-button.labor-btn {
  background: #166534 !important;
}

.eyebrow.labor-eyebrow {
  color: #166534 !important;
}

.live-dot.labor-dot {
  background: #166534 !important;
}

