/* ===========================
   renewal.css — web-renewal(Next.js) 디자인을 순수 CSS로 이식
   globals.css의 plain-CSS 부분 + 헤더/푸터 BEM 클래스
   Tailwind에 의존하지 않는다. base.html에서 가장 마지막에 로드되어
   기존 스타일을 덮어쓸 수 있다.
   =========================== */

/* ── globals.css에서 그대로 가져온 base 규칙 ── */

@media (max-width: 1488px) {
  main section {
    padding-left: var(--content-padding) !important;
    padding-right: var(--content-padding) !important;
  }
}

/* ── Base component classes ── */

.section-label {
  font-size: 14px;
  font-weight: 700;
  color: #FF7900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 16.8px;
  font-family: 'Pretendard', sans-serif;
}

.section-title {
  font-size: clamp(34px, 3vw, 42px);
  font-weight: 700;
  color: #0D1B3E;
  letter-spacing: -0.8px;
  line-height: 1.24;
  font-family: 'Pretendard', sans-serif;
  margin: 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background-color: #0D1B3E;
  border-radius: 37.71px;
  padding: 12.86px 25px;
  font-size: 24px;
  font-weight: 700;
  color: white;
  gap: 12px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-pill:hover { opacity: 0.9; }

/* ===========================
   사이트 헤더 / 메가 네비게이션
   Header.tsx의 Tailwind/inline 스타일을 BEM 클래스로 추출
   =========================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(17, 24, 39, 0.07);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.035);
  font-family: 'Pretendard', sans-serif;
}

.site-header__inner {
  margin: 0 auto;
  max-width: 1440px;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
}

.site-header__logo {
  width: 120px;
  height: auto;
  display: block;
}

@media (min-width: 768px) {
  .site-header__logo { width: 167px; }
}

/* ── 데스크톱 내비게이션 ── */

.site-nav-desktop {
  display: none;
}

.site-nav-desktop__list {
  display: flex;
  align-items: center;
  gap: clamp(26px, 3vw, 42px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav-desktop__item {
  position: relative;
}

.site-nav-desktop__link {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.2px;
  color: #222222;
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav-desktop__link:hover,
.site-nav-desktop__item[data-open="true"] > .site-nav-desktop__link {
  color: #FF7900;
}

/* ── 우측 액션 버튼 ── */

.site-header__actions {
  display: none;
  align-items: center;
  gap: 15px;
}

@media (min-width: 768px) {
  .site-nav-desktop { display: block; }
  .site-header__actions { display: flex; }
}

.site-header__btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #222222;
  text-decoration: none;
  border-radius: 9px;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.site-header__btn--outline {
  border: 1px solid #D7DBE0;
  padding: 0 16px;
}
.site-header__btn--outline:hover { border-color: #FF7900; color: #E56D00; transform: translateY(-1px); }

.site-header__btn--filled {
  background-color: #111827;
  color: #FFFFFF;
  padding: 0 15px;
}
.site-header__btn--filled:hover { background-color: #273247; transform: translateY(-1px); }

/* 키보드 사용자가 모든 인터랙션의 현재 위치를 확인할 수 있게 한다. */
:where(a, button, summary, [role="button"], [role="checkbox"]):focus-visible {
  outline: 3px solid rgba(13, 141, 246, 0.34);
  outline-offset: 3px;
}

/* ── 햄버거 버튼 (모바일) ── */

.site-header__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 6px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.site-header__hamburger:hover { background-color: #F5F5F5; }

@media (min-width: 768px) {
  .site-header__hamburger { display: none; }
}

.site-header__hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: #222222;
  transition: transform 0.3s, opacity 0.3s;
}

.site-header__hamburger.is-open .site-header__hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 6px);
}
.site-header__hamburger.is-open .site-header__hamburger-line:nth-child(2) {
  opacity: 0;
}
.site-header__hamburger.is-open .site-header__hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -6px);
}

/* ── 메가 메뉴 드롭다운 ── */

.nav-mega {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid #EBEBEB;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  z-index: 40;
}

.nav-mega.is-open {
  display: block;
}

@media (max-width: 767px) {
  /* 모바일에서는 메가 메뉴 비활성화 */
  .nav-mega { display: none !important; }
}

.nav-mega__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 0 40px 54px;
  display: flex;
  align-items: flex-start;
}

/* 드롭다운 좌측 카드 컬럼 (교육은 카드 2개 세로 배치) */
.nav-mega__cards {
  display: flex;
  flex-direction: column;
  gap: 61px;
}

/* 드롭다운 컬럼 사이 스페이서 */
.nav-mega__spacer {
  flex-shrink: 0;
}
.nav-mega__spacer--lg { width: 182px; }
.nav-mega__spacer--sm { width: 47px; }

/* ── NavCard ── */

.nav-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-card__title {
  font-size: 34px;
  font-weight: 700;
  color: #FF7900;
  letter-spacing: -0.8px;
  line-height: 52px;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.nav-card__desc {
  font-size: 18px;
  color: #686868;
  line-height: 28.56px;
  margin: 0;
}

.nav-card__btn {
  background-color: #FF7900;
  color: #FFFFFF;
  border-radius: 8px;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

/* ── NavLinkGroup ── */

.nav-link-group {
  width: 350px;
}

.nav-link-group__head {
  padding-bottom: 20px;
}

.nav-link-group__title {
  font-size: 28px;
  font-weight: 700;
  color: #222222;
  letter-spacing: -0.8px;
  line-height: 52px;
  text-decoration: none;
  display: inline-block;
}

.nav-link-group__item {
  border-top: 1px solid #C7CBCE;
}

.nav-link-group__link {
  display: block;
  padding: 10px 0;
  font-size: 22px;
  font-weight: 700;
  color: #222222;
  text-decoration: none;
  line-height: 52px;
  letter-spacing: -0.8px;
}

/* 컨설팅/개발 드롭다운의 단일 레퍼런스 링크 */
.nav-mega__ref-link {
  font-size: 28px;
  font-weight: 700;
  color: #222222;
  letter-spacing: -0.8px;
  line-height: 52px;
  text-decoration: none;
}

/* ── 모바일 메뉴 패널 ── */

.mobile-menu {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  z-index: 40;
  background: #FFFFFF;
  flex-direction: column;
  padding: 32px 24px;
  font-family: 'Pretendard', sans-serif;
}

.mobile-menu.is-open {
  display: flex;
}

@media (min-width: 768px) {
  .mobile-menu { display: none !important; }
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu__link {
  font-size: 18px;
  font-weight: 800;
  color: #222222;
  text-decoration: none;
  display: block;
  padding: 4px 0;
  transition: color 0.2s;
}
.mobile-menu__link:hover { color: #FF7900; }

.mobile-menu__actions {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu__btn--text {
  font-size: 16px;
  font-weight: 800;
  color: #222222;
  text-decoration: none;
  display: block;
  padding: 4px 0;
  transition: color 0.2s;
}
.mobile-menu__btn--text:hover { color: #FF7900; }

.mobile-menu__btn--filled {
  font-size: 13px;
  font-weight: 800;
  color: #222222;
  background-color: #C7CBCE;
  border-radius: 6px;
  padding: 12px 24px;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: background-color 0.2s;
}
.mobile-menu__btn--filled:hover { background-color: #B0B4B8; }

/* ===========================
   사이트 푸터
   Footer.tsx의 Tailwind/inline 스타일을 BEM 클래스로 추출
   =========================== */

.site-footer {
  background-color: #1B1B1B;
  font-family: 'Pretendard', sans-serif;
}

.site-footer__inner {
  margin: 0 auto;
  max-width: 1440px;
  padding: 52px 24px 46px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── 네비게이션 컬럼 ── */

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(36px, 8vw, 120px);
  padding-top: 36px;
  padding-bottom: 36px;
  border-top: 0.88px solid rgba(255, 255, 255, 0.20);
  border-bottom: 0.88px solid rgba(255, 255, 255, 0.20);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.footer-col__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  color: #FFFFFF;
  margin: 0;
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col__link {
  font-size: 15px;
  font-weight: 500;
  color: #FFFFFF;
  line-height: 26px;
  opacity: 0.62;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col__link:hover { color: #CCCCCC; }

/* ── 하단: 로고 + 회사 정보 ── */

.site-footer__bottom {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}

.site-footer__logo-link {
  opacity: 0.3;
  display: inline-block;
}

.site-footer__logo {
  width: 180px;
  height: auto;
  display: block;
}

.site-footer__company {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* 사업자 정보 행 (구분선 포함) */
.site-footer__company-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.site-footer__company-cell {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  opacity: 0.5;
  line-height: 24px;
}

.site-footer__company-cell--first {
  padding-right: 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.20);
}

.site-footer__company-cell--mid {
  padding-left: 15px;
  padding-right: 15px;
  border-right: 1px solid rgba(255, 255, 255, 0.20);
}

.site-footer__company-cell--last {
  padding-left: 15px;
}

/* 주소/연락처/카피라이트 */
.site-footer__details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.site-footer__detail {
  font-size: 13px;
  font-weight: 400;
  color: #FFFFFF;
  opacity: 0.5;
  line-height: 22px;
  margin: 0;
}

.site-footer__detail a,
.site-footer__detail a:visited {
  color: inherit;
  text-decoration: none;
}

.site-footer__detail a:hover {
  text-decoration: underline;
}

/* ===========================
   globals.css의 모바일 반응형 유틸리티 (max-width:767px)
   plain CSS 그대로 복사
   =========================== */
@media (max-width: 767px) {
  .section-title { font-size: 28px !important; line-height: 36px !important; }
  .btn-pill { font-size: 16px !important; padding: 10px 20px !important; }
  .r-stack { flex-direction: column !important; }
  .r-hide { display: none !important; }
  .r-full-width { width: 100% !important; min-width: 0 !important; }
  .r-grid-1 { grid-template-columns: 1fr !important; }
  .r-grid-2 { grid-template-columns: repeat(2, 1fr) !important; }
  .r-text-hero { font-size: 36px !important; line-height: 44px !important; letter-spacing: -0.8px !important; }
  .r-text-h2 { font-size: 28px !important; line-height: 36px !important; }
  .r-text-h3 { font-size: 24px !important; line-height: 32px !important; }
  .r-text-lg { font-size: 18px !important; line-height: 28px !important; }
  .r-text-base { font-size: 16px !important; line-height: 24px !important; }
  .r-pad-section { padding-top: 60px !important; padding-bottom: 60px !important; }
  .r-pad-sm { padding: 24px 16px !important; }
  .r-gap-sm { gap: 16px !important; }
  .r-gap-md { gap: 24px !important; }
  .r-h-auto { height: auto !important; min-height: 0 !important; }
  .r-w-auto { width: auto !important; }
  .r-nowrap-off { white-space: normal !important; }
  .r-relative { position: relative !important; transform: none !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; padding: 24px !important; }
  .r-overflow-x { overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }

  /* Footer nav: 2-column grid on mobile */
  .r-footer-nav { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
  /* Remove border-right dividers on mobile */
  .r-no-border { border: none !important; }

  /* ServicesSection card content gap */
  .r-gap-card { gap: 40px !important; }

  /* Target audience: flex → 2-column grid on mobile */
  .r-flex-to-grid { display: grid !important; }

  /* StatsSection number font sizes */
  .r-text-stat-xl { font-size: 80px !important; line-height: 90px !important; }
  .r-text-stat-lg { font-size: 60px !important; line-height: 70px !important; }
  .r-text-stat-md { font-size: 40px !important; line-height: 50px !important; }

  /* Insights tab bar: horizontal scroll with reduced padding */
  .r-tab-bar { padding: 0 16px !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; justify-content: flex-start !important; }
  /* Tab buttons: prevent shrinking for horizontal scroll */
  .r-no-shrink { flex-shrink: 0 !important; }

  /* References: section horizontal padding */
  .r-pad-x { padding-left: 24px !important; padding-right: 24px !important; }

  /* CTA cards: absolute-positioned content becomes relative */
  .r-cta-content { position: relative !important; left: auto !important; top: auto !important; transform: none !important; padding: 32px 24px !important; gap: 32px !important; }

  /* Hero inner content: add horizontal padding on mobile */
  .r-hero-pad { padding: 60px 24px !important; }

  /* CTA contact info row: wrap items on mobile */
  .r-cta-contacts { flex-wrap: wrap !important; gap: 8px 16px !important; justify-content: center !important; }

  /* Team grid row → column on mobile */
  .r-team-row { flex-direction: column !important; gap: 24px !important; }

  /* FAQ question font size */
  .r-text-faq { font-size: 18px !important; line-height: 26px !important; }

  /* Contact hero banner content: override absolute positioning */
  .r-contact-hero { padding: 30px 24px !important; width: 100% !important; }

  /* Override flex-basis:0 in column context so cards size to content */
  .r-flex-auto { flex: 0 0 auto !important; }

  /* Absolute-positioned bottom bar → normal flow on mobile */
  .r-bar-flow { position: relative !important; bottom: auto !important; left: auto !important; right: auto !important; width: 100% !important; }

  /* Stats cards: stack title/number vertically in relative flow */
  .r-stats-card { min-height: 120px !important; display: flex !important; flex-direction: column !important; justify-content: center !important; padding: 20px 24px !important; gap: 8px !important; }
  .r-stats-title { position: relative !important; left: auto !important; top: auto !important; }
  .r-stats-number { position: relative !important; right: auto !important; bottom: auto !important; top: auto !important; transform: none !important; }

  /* Education carousel: narrower cards on mobile */
  .r-edu-card { width: 300px !important; height: auto !important; min-height: 280px !important; }
  .r-edu-content { position: relative !important; left: auto !important; top: auto !important; width: auto !important; padding: 24px !important; }
  .r-edu-icon { left: auto !important; right: 16px !important; top: auto !important; bottom: 16px !important; width: 100px !important; height: 100px !important; }
  .r-edu-tags { position: relative !important; left: auto !important; top: auto !important; max-width: none !important; padding: 0 24px 24px !important; }

  .site-footer__inner { padding: 42px 20px 36px; gap: 28px; }
  .site-footer__nav { padding: 30px 0; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; gap: 24px; }
  .site-footer__logo { width: 150px; }
  .site-footer__company { align-items: flex-start; width: 100%; }
  .site-footer__company-row { align-items: flex-start !important; gap: 2px !important; }
  .site-footer__company-cell { padding: 0 !important; font-size: 13px; line-height: 22px; }
  .site-footer__details { align-items: flex-start; }
  .site-footer__detail { font-size: 12px; line-height: 20px; }
}
