/* ============================================
   SECS/GEM Manual - Modern Enhancement Theme
   Compatible with MkDocs Material 9.x
   Gathertech Co., Ltd.
   ============================================ */

/* ---------- Color Variables ---------- */
:root {
  --gst-primary: #0891b2;
  --gst-primary-light: #22d3ee;
  --gst-primary-dark: #0e7490;
  --gst-accent: #3b82f6;
  --gst-success: #10b981;
  --gst-warning: #f59e0b;
  --gst-error: #f43f5e;
  --gst-slate-50: #f8fafc;
  --gst-slate-100: #f1f5f9;
  --gst-slate-200: #e2e8f0;
  --gst-slate-700: #334155;
  --gst-slate-800: #1e293b;
  --gst-slate-900: #0f172a;
}

/* ---------- Theme Color Override ---------- */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: var(--gst-primary);
  --md-primary-fg-color--light: var(--gst-primary-light);
  --md-primary-fg-color--dark: var(--gst-primary-dark);
  --md-accent-fg-color: var(--gst-primary-light);
}

/* ---------- Header Enhancement ---------- */
.md-header {
  background: linear-gradient(135deg, var(--gst-slate-900) 0%, var(--gst-slate-800) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.md-tabs {
  background: var(--gst-slate-800);
}

/* ---------- Navigation Enhancement ---------- */
.md-nav__link:hover {
  color: var(--gst-primary);
}

.md-nav__link--active {
  color: var(--gst-primary);
  font-weight: 600;
}

/* ---------- Content Typography ---------- */
.md-typeset h1 {
  color: var(--gst-slate-900);
  font-weight: 700;
  border-bottom: 3px solid var(--gst-primary);
  padding-bottom: 0.5rem;
}

.md-typeset h2 {
  color: var(--gst-slate-800);
  border-bottom: 1px solid var(--gst-slate-200);
  padding-bottom: 0.4rem;
}

.md-typeset a {
  color: var(--gst-primary);
}

.md-typeset a:hover {
  color: var(--gst-primary-dark);
}

/* ---------- Table Enhancement ---------- */
.md-typeset table:not([class]) {
  border: 1px solid var(--gst-slate-200);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.md-typeset table:not([class]) thead {
  background: linear-gradient(180deg, var(--gst-slate-800) 0%, var(--gst-slate-900) 100%);
}

.md-typeset table:not([class]) th {
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 0.875rem 1rem;
}

.md-typeset table:not([class]) td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gst-slate-100);
}

.md-typeset table:not([class]) tbody tr:hover {
  background: var(--gst-slate-50);
}

/* ---------- Code Block Enhancement ---------- */
.md-typeset code {
  background: var(--gst-slate-100);
  border: 1px solid var(--gst-slate-200);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  color: var(--gst-primary-dark);
}

.md-typeset pre {
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.md-typeset pre > code {
  background: transparent;
  border: none;
  padding: 0;
}

/* ---------- Admonition Enhancement ---------- */
.md-typeset .admonition {
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.md-typeset .admonition-title {
  font-weight: 600;
}

/* ---------- Search Enhancement ---------- */
.md-search__input {
  border-radius: 8px;
}

/* ---------- Footer Enhancement ---------- */
.md-footer {
  background: var(--gst-slate-900);
}

.md-footer-meta {
  background: var(--gst-slate-900);
}

/* ---------- Mermaid Diagram ---------- */
.mermaid {
  background: var(--gst-slate-50);
  border: 1px solid var(--gst-slate-200);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

/* ---------- Custom Hero Section (for index.md) ---------- */
.hero-section {
  background: linear-gradient(135deg, var(--gst-slate-900) 0%, var(--gst-slate-800) 100%);
  padding: 3rem 2rem;
  margin: -0.5rem -0.5rem 2rem -0.5rem;
  border-radius: 0 0 16px 16px;
  text-align: center;
}

.hero-section h1,
.hero-section .hero-title {
  color: white !important;
  border: none !important;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero-section p,
.hero-subtitle {
  color: var(--gst-slate-200) !important;
  font-size: 1.1rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--gst-primary-light);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-equipment {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .hero-stats {
    gap: 1.5rem;
  }
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gst-primary-light);
}

.hero-stat-label {
  font-size: 0.65rem;
  color: var(--gst-slate-200);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ---------- Stats Grid ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: white;
  border: 1px solid var(--gst-slate-200);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gst-primary);
  white-space: nowrap;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--gst-slate-700);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 0.25rem;
  white-space: nowrap;
}

/* ---------- Feature Cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
  max-width: 100%;
}

@media (max-width: 960px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: white;
  border: 1px solid var(--gst-slate-200);
  border-radius: 12px;
  padding: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gst-slate-800);
  margin-bottom: 0.5rem;
}

.feature-description {
  font-size: 0.85rem;
  color: var(--gst-slate-700);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}

.feature-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gst-primary);
  text-decoration: none;
}

.feature-link:hover {
  color: var(--gst-primary-dark);
}

.feature-card h3 {
  color: var(--gst-slate-800);
  margin-top: 0;
}

/* ---------- Standards Grid ---------- */
.standards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 2rem 0;
  max-width: 100%;
}

@media (max-width: 600px) {
  .standards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.standard-card {
  background: white;
  border: 1px solid var(--gst-slate-200);
  border-radius: 8px;
  padding: 1rem 0.5rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.standard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--gst-primary);
}

.standard-id {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gst-primary);
}

.standard-name {
  font-size: 0.6rem;
  color: var(--gst-slate-700);
  margin-top: 0.2rem;
  white-space: nowrap;
}

/* ---------- Tech Stack ---------- */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
  margin: 1.5rem 0;
  max-width: 100%;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  background: white;
  border: 1px solid var(--gst-slate-200);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gst-slate-700);
  transition: all 0.2s;
  white-space: nowrap;
}

.tech-badge:hover {
  border-color: var(--gst-primary);
  background: var(--gst-slate-50);
}

.tech-badge-icon {
  font-size: 0.9rem;
}

/* ---------- Info Box ---------- */
.info-box {
  background: var(--gst-slate-50);
  border: 1px solid var(--gst-slate-200);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

/* ---------- Status Badges ---------- */
.badge {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-required {
  background: rgba(8, 145, 178, 0.1);
  color: var(--gst-primary-dark);
}

.badge-supported {
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
}

.badge-optional {
  background: rgba(139, 92, 246, 0.1);
  color: #6d28d9;
}

/* ---------- Dark Mode Support ---------- */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: var(--gst-primary-light);
  --gst-text-color: #e2e8f0;
  --gst-text-muted: #94a3b8;
}

[data-md-color-scheme="slate"] .md-typeset h1,
[data-md-color-scheme="slate"] .md-typeset h2,
[data-md-color-scheme="slate"] .md-typeset h3 {
  color: #f1f5f9;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) td {
  background: var(--gst-slate-800);
  color: var(--gst-text-color);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: var(--gst-slate-900);
}

[data-md-color-scheme="slate"] .feature-card,
[data-md-color-scheme="slate"] .stat-card,
[data-md-color-scheme="slate"] .standard-card,
[data-md-color-scheme="slate"] .info-box {
  background: var(--gst-slate-800);
  border-color: var(--gst-slate-700);
}

[data-md-color-scheme="slate"] .tech-badge {
  background: var(--gst-slate-800);
  border-color: var(--gst-slate-700);
  color: var(--gst-text-color);
}

[data-md-color-scheme="slate"] .feature-title,
[data-md-color-scheme="slate"] .stat-number {
  color: var(--gst-primary-light);
}

[data-md-color-scheme="slate"] .feature-description,
[data-md-color-scheme="slate"] .stat-label,
[data-md-color-scheme="slate"] .standard-name {
  color: var(--gst-text-muted);
}

[data-md-color-scheme="slate"] .standard-id {
  color: var(--gst-primary-light);
}

[data-md-color-scheme="slate"] .badge {
  color: white;
}

[data-md-color-scheme="slate"] .badge-required {
  background: rgba(34, 211, 238, 0.2);
  color: var(--gst-primary-light);
}

[data-md-color-scheme="slate"] .badge-supported {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

[data-md-color-scheme="slate"] .badge-optional {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

[data-md-color-scheme="slate"] .mermaid {
  background: var(--gst-slate-800);
  border-color: var(--gst-slate-700);
}

[data-md-color-scheme="slate"] .md-typeset code {
  background: var(--gst-slate-700);
  border-color: var(--gst-slate-600);
  color: var(--gst-primary-light);
}

/* ---------- Print Styles ---------- */
@media print {
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer {
    display: none !important;
  }

  .hero-section {
    background: white;
    color: black;
  }

  .hero-section h1 {
    color: black !important;
  }
}
