/* ============================================
   PIOTECH - Common Stylesheet
   회사명: (주)피오텍 / PIOTECH
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand Colors - 신뢰감 있는 블루 계열 (IST 톤보다 약간 모던하게 조정) */
  --color-primary: #0B5FA6;          /* PIO Blue - 메인 */
  --color-primary-dark: #074478;     /* 헤더/푸터 강조 */
  --color-primary-light: #2E89D6;    /* Sub */
  --color-sky: #5FB6E8;              /* PIO Skyblue */
  --color-accent: #00B8D4;           /* 포인트 시안 */

  /* Neutrals */
  --color-text: #222;
  --color-text-sub: #555;
  --color-text-muted: #888;
  --color-line: #e5e7eb;
  --color-line-dark: #d1d5db;
  --color-bg: #ffffff;
  --color-bg-soft: #f7f8fa;
  --color-bg-gray: #f1f3f5;
  --color-footer-bg: #2b2f33;
  --color-footer-text: #c8cbd0;

  /* Layout */
  --container: 1200px;
  --header-h: 120px;

  /* Typography */
  --font-sans: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont,
               'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-display: 'Pretendard', 'Noto Sans KR', sans-serif;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --radius: 4px;
  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Pretendard 폰트 (CDN) ---------- */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   TOP UTILITY BAR (로그인 / 회원가입)
   ============================================ */
.topbar {
  background: #f7f8fa;
  border-bottom: 1px solid var(--color-line);
  font-size: 12px;
  color: var(--color-text-sub);
}
.topbar .container {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  height: 32px;
  align-items: center;
}
.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition);
}
.topbar a:hover { color: var(--color-primary); }
.topbar svg { width: 12px; height: 12px; }

/* ============================================
   HEADER / GNB
   ============================================ */
.header {
  background: #fff;
  border-bottom: 1px solid var(--color-line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-mark {
  width: 40px;
  height: 44px;
  position: relative;
}
.logo-mark svg { width: 100%; height: 100%; }
.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.logo-text .paren { color: var(--color-text-sub); font-weight: 500; }

/* GNB */
.gnb {
  display: flex;
  height: 100%;
}
.gnb > li {
  position: relative;
}
.gnb > li > a {
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 28px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  transition: color var(--transition);
  position: relative;
}
.gnb > li > a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--color-primary);
  transform: translateX(-50%);
  transition: width var(--transition);
}
.gnb > li:hover > a,
.gnb > li.active > a {
  color: var(--color-primary);
}
.gnb > li:hover > a::after,
.gnb > li.active > a::after {
  width: 100%;
}

/* Mega Submenu */
.gnb .submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-top: none;
  padding: 14px 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
  box-shadow: var(--shadow-md);
}
.gnb > li:hover .submenu {
  opacity: 1;
  visibility: visible;
}
.submenu li a {
  display: block;
  padding: 8px 22px;
  font-size: 14px;
  color: var(--color-text-sub);
  white-space: nowrap;
  text-align: center;
  transition: all var(--transition);
}
.submenu li a:hover {
  color: var(--color-primary);
  background: var(--color-bg-soft);
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: var(--transition);
}

/* ============================================
   SUB PAGE HERO
   ============================================ */
.sub-hero {
  position: relative;
  height: 140px;
  background: linear-gradient(135deg, #0B5FA6 0%, #1a3a5c 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sub-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(95, 182, 232, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(0, 184, 212, 0.2) 0%, transparent 50%);
}
.sub-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.sub-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
}
.sub-hero-content h1 {
  font-size: 38px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.sub-hero-content p {
  font-size: 16px;
  opacity: 0.85;
  margin: 0;
}

/* ============================================
   SUB NAVIGATION (탭)
   ============================================ */
.subnav {
  background: #fff;
  border-bottom: 1px solid var(--color-line);
}
.subnav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 20px;
  gap: 0;
}
.subnav a {
  min-width: 130px;
  padding: 12px 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-sub);
  border: 1px solid var(--color-line);
  border-right: none;
  background: #fff;
  transition: all var(--transition);
}
.subnav a:last-child { border-right: 1px solid var(--color-line); }
.subnav a:hover {
  color: var(--color-primary);
  background: var(--color-bg-soft);
}
.subnav a.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  max-width: var(--container);
  margin: 0 auto;
  padding: 20px;
  text-align: right;
  font-size: 13px;
  color: var(--color-text-muted);
}
.breadcrumb .sep { margin: 0 8px; color: var(--color-line-dark); }
.breadcrumb .current { color: var(--color-primary); font-weight: 500; }

/* ============================================
   PAGE CONTENT
   ============================================ */
.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 20px 80px;
}
.page-title {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 40px;
  color: var(--color-text);
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 16px;
}
.page-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 36px;
  height: 3px;
  background: var(--color-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer-utility {
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  background: #fff;
}
.footer-utility-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  justify-content: center;
  gap: 60px;
  font-size: 13px;
}
.footer-utility a {
  color: var(--color-text-sub);
  transition: color var(--transition);
}
.footer-utility a:hover { color: var(--color-primary); }
.footer-utility .accent { color: var(--color-primary); font-weight: 500; }

.footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 30px 20px;
  font-size: 12px;
  line-height: 1.8;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
}
.footer-info {
  margin: 0;
}
.footer-info span { margin-right: 14px; }
.footer-copy {
  margin: 6px 0 0;
  opacity: 0.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .gnb > li > a { padding: 0 18px; font-size: 15px; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .topbar { display: none; }
  .menu-toggle { display: flex; }

  .gnb {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    background: #fff;
    height: auto;
    transform: translateX(-100%);
    transition: transform var(--transition);
    border-top: 1px solid var(--color-line);
    overflow-y: auto;
  }
  .gnb.open { transform: translateX(0); }
  .gnb > li { width: 100%; }
  .gnb > li > a {
    height: 50px;
    padding: 0 20px;
    width: 100%;
    border-bottom: 1px solid var(--color-line);
  }
  .gnb > li > a::after { display: none; }
  .gnb .submenu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    background: var(--color-bg-soft);
    padding: 0;
    min-width: 100%;
    display: none;
  }
  .gnb > li.expanded .submenu { display: block; }
  .submenu li a {
    text-align: left;
    padding: 10px 36px;
  }

  .logo-text { font-size: 18px; }
  .logo-mark { width: 32px; height: 36px; }

  .sub-hero { height: 100px; }
  .sub-hero-content h1 { font-size: 26px; }
  .sub-hero-content p { font-size: 14px; }

  .subnav-inner { padding: 14px 10px; gap: 0; }
  .subnav a { min-width: auto; padding: 10px 14px; font-size: 13px; }

  .page-title { font-size: 24px; margin-bottom: 30px; }

  .footer-utility-inner { gap: 20px; flex-wrap: wrap; padding: 14px 20px; font-size: 12px; }
  .footer-info span { display: block; margin: 2px 0; }
}
