/**
 * Base CSS
 * Contains CSS reset, variables, typography, and base styles
 */

/* ===========================
   CSS Reset
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===========================
   CSS Variables
   =========================== */
:root {
  /* Colors */
  --primary: #1e3a5f;
  --primary-dark: #0f2744;
  --primary-light: #2d4a6f;
  --secondary: #0f2744;
  --accent: #c9a227;
  --accent-light: #d4b84a;
  --accent-red: #c53030;
  --success: #2f855a;
  --warning: #c05621;
  --error: #c53030;

  /* Text Colors */
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-tertiary: #718096;
  --text-light: #a0aec0;
  --text-inverse: #ffffff;

  /* Background Colors */
  --bg-base: #ffffff;
  --bg-secondary: #f7f9fc;
  --bg-tertiary: #eef2f7;

  /* Border Colors */
  --border-primary: #e2e8f0;
  --border-secondary: #cbd5e1;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(30, 58, 95, 0.05);
  --shadow-md: 0 4px 12px rgba(30, 58, 95, 0.08);
  --shadow-lg: 0 8px 24px rgba(30, 58, 95, 0.12);
  --shadow-xl: 0 16px 40px rgba(30, 58, 95, 0.16);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
}

/* ===========================
   Base Typography
   =========================== */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-base);
  overflow-x: hidden;
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;

}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ===========================
   Links
   =========================== */
a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--primary-dark);
}

/* ===========================
   Images
   =========================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

/* ===========================
   Lists
   =========================== */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ===========================
   Tables
   =========================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-primary);
}

th {
  font-weight: 600;
  background-color: var(--bg-secondary);
}

/* ===========================
   Form Elements
   =========================== */
input,
textarea,
select,
button {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

button {
  cursor: pointer;
}

/* ===========================
   Selection
   =========================== */
::selection {
  background-color: rgba(30, 58, 95, 0.2);
  color: var(--text-primary);
}

::-moz-selection {
  background-color: rgba(30, 58, 95, 0.2);
  color: var(--text-primary);
}

/* ===========================
   Scrollbar
   =========================== */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 6px;
  transition: var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ===========================
   Utility Classes
   =========================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.break-words {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }
.d-inline { display: inline !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Flexbox */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.justify-around { justify-content: space-around !important; }
.align-start { align-items: flex-start !important; }
.align-center { align-items: center !important; }
.align-end { align-items: flex-end !important; }
.align-stretch { align-items: stretch !important; }

/* Width */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

/* Height */
.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

/* Font Weight */
.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* Text Color */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-tertiary { color: var(--text-tertiary) !important; }
.text-light { color: var(--text-light) !important; }
.text-white { color: var(--text-inverse) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-error { color: var(--error) !important; }

/* Background Color */
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }
.bg-tertiary { background-color: var(--bg-tertiary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-error { background-color: var(--error) !important; }

/* Border */
.border-0 { border: 0 !important; }
.border { border: 1px solid var(--border-primary) !important; }
.border-top { border-top: 1px solid var(--border-primary) !important; }
.border-right { border-right: 1px solid var(--border-primary) !important; }
.border-bottom { border-bottom: 1px solid var(--border-primary) !important; }
.border-left { border-left: 1px solid var(--border-primary) !important; }

/* Border Radius */
.rounded-0 { border-radius: 0 !important; }
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Shadow */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

/* Overflow */
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll { overflow: scroll !important; }

/* Position */
.position-static { position: static !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* ===========================
   Responsive Utilities
   =========================== */
@media (max-width: 768px) {
  .sm-hide { display: none !important; }
  .sm-show { display: block !important; }
}

@media (max-width: 480px) {
  .xs-hide { display: none !important; }
  .xs-show { display: block !important; }
}

@media (min-width: 769px) {
  .md-hide { display: none !important; }
  .md-show { display: block !important; }
}

@media (min-width: 1024px) {
  .lg-hide { display: none !important; }
  .lg-show { display: block !important; }
}
/* ===========================
   Dark Background Sections
   =========================== */
.hero h1, .hero h2, .hero h3, .hero h4, .hero p, .hero .section-title,
.hero-title, .hero-subtitle,
.phone-hero h1, .phone-hero h2, .phone-hero p,
.phone-hero-title {
  color: var(--text-inverse);
}
