/* ==========================================================================
   INS Corp. Modern Responsive Stylesheet
   ========================================================================== */

:root {
  --bg-primary: #0b1120;
  --bg-secondary: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-hover: #334155;
  --border-color: #334155;
  --border-light: rgba(255, 255, 255, 0.1);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --brand-blue: #0284c7;
  --brand-blue-light: #38bdf8;
  --brand-blue-dark: #0369a1;
  --brand-gold: #f59e0b;
  
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container-max-width: 1200px;
  --header-height: 80px;
  --transition-normal: 0.25s ease;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-normal);
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo img {
  height: 40px;
  width: auto;
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
}

/* Desktop Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.nav-link:hover,
.nav-item:hover > .nav-link,
.nav-link.active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.06);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 110;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition-normal);
}

.dropdown-link:hover {
  color: #ffffff;
  background-color: var(--bg-surface-hover);
  padding-left: 1.5rem;
}

/* Mobile Toggle Button */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: #ffffff;
  position: relative;
  z-index: 1001;
}

.hamburger {
  width: 24px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* 햄버거 -> X 아이콘 전환 */
.mobile-toggle.active .hamburger span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.mobile-toggle.active .hamburger span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* 모바일 메뉴 열림 시 배경 오버레이 (딤 처리) */
.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.nav-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==========================================================================
   Hero Section (Main Landing)
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 5rem 0 4rem;
  background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.15) 0%, transparent 70%);
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.hero-content {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--brand-blue-light);
  background-color: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin-bottom: 1.25rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hero-title span {
  background: linear-gradient(135deg, #ffffff 40%, var(--brand-blue-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.25rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--brand-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--brand-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: var(--border-light);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Values Banner */
.values-banner {
  margin-top: 3.5rem;
  padding: 1.25rem 2rem;
  background-color: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.value-dot {
  width: 8px;
  height: 8px;
  background-color: var(--brand-blue-light);
  border-radius: 50%;
}

/* ==========================================================================
   Section Common
   ========================================================================== */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-blue-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 1rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Grid & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: rgba(2, 132, 199, 0.12);
  color: var(--brand-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.75rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.card-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-blue-light);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
}

.card-link:hover {
  color: #ffffff;
  gap: 0.6rem;
}

/* Assurex Global Banner */
.partner-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
}

.partner-info {
  max-width: 650px;
}

.partner-tag {
  color: var(--brand-gold);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.partner-title {
  font-size: 1.5rem;
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 0.75rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.partner-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.partner-logo-box img {
  max-height: 55px;
  width: auto;
}

/* ==========================================================================
   Subpage Specific Layouts
   ========================================================================== */
.page-header {
  padding: 4rem 0 3rem;
  background: radial-gradient(circle at 50% 0%, rgba(2, 132, 199, 0.12) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}

.page-category {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-blue-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.page-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.page-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Subpage Nav Tabs */
.subpage-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.tab-link {
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 9999px;
  color: var(--text-secondary);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.tab-link:hover,
.tab-link.active {
  color: #ffffff;
  background-color: var(--brand-blue);
  border-color: var(--brand-blue);
}

/* Content Box */
.content-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem;
  margin-top: 2rem;
}

.content-box p {
  color: #e2e8f0;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.content-box p:last-child {
  margin-bottom: 0;
}

/* Service & Contribution Descs */
.service-desc,
.contrib-desc,
.dept-desc {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.ceo-sign-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.ceo-sign-box span {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.ceo-sign-box img {
  height: 40px;
  width: auto;
}

/* Timeline / History */
.timeline {
  position: relative;
  padding-left: 2.5rem;
  margin-top: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  width: 2px;
  height: 100%;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--brand-blue-light);
  border: 3px solid var(--bg-surface);
}

.timeline-year {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-blue-light);
  margin-bottom: 0.5rem;
}

.timeline-content {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

/* Contact List */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.5rem;
}

.contact-dept {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.contact-email {
  color: var(--brand-blue-light);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-email:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: #070c17;
  border-top: 1px solid var(--border-light);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand img {
  height: 38px;
  width: auto;
  margin-bottom: 1.25rem;
}

.footer-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition-normal);
}

.footer-link:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 1200px) {
  :root {
    --header-height: 70px;
  }

  /* backdrop-filter가 fixed 자식 요소를 가두는 버그 방지 및 z-index 상향 */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-color: var(--bg-primary);
    z-index: 1000;
  }

  .mobile-toggle {
    display: block;
    z-index: 1002;
  }

  /* 사이드 슬라이드 드로어 (Side Drawer) */
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background-color: #0f172a !important;
    border-left: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.25rem 2.5rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 0.5rem;
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #f8fafc;
    border-radius: 8px;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.05);
  }

  .nav-link:hover,
  .nav-item.open > .nav-link {
    background-color: rgba(2, 132, 199, 0.25);
    color: #ffffff;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 1px solid var(--border-color);
    background-color: rgba(11, 17, 32, 0.85);
    border-radius: 8px;
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    display: none;
  }

  .nav-item.open .dropdown-menu {
    display: block;
  }

  .dropdown-link {
    padding: 0.65rem 0.75rem;
    font-size: 0.95rem;
    color: #cbd5e1;
  }

  .dropdown-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
  }

  .hero-title {
    font-size: 2.75rem;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }

  .hero-desc {
    font-size: 1.05rem;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .partner-banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .content-box {
    padding: 1.75rem;
  }

  .ceo-sign-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

