/* ============================================
   Brand Documentation Archive — Core Styles
   Version 1.0 | sahabet-protection.tech
   ============================================ */

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

:root {
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-border: #e2e4e8;
  --color-border-light: #eef0f3;
  --color-text: #2c3e50;
  --color-text-secondary: #5a6a7a;
  --color-text-muted: #8896a6;
  --color-navy: #1a2744;
  --color-navy-light: #243352;
  --color-graphite: #3d4f5f;
  --color-blue-gray: #6b8299;
  --color-accent: #3a6fa0;
  --color-accent-light: #e8f0f8;
  --color-accent-hover: #2d5a85;
  --color-sidebar-bg: #f4f5f7;
  --color-code-bg: #f0f2f5;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --max-width: 1120px;
  --sidebar-width: 260px;
  --header-height: 60px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --transition: 0.2s ease;
}

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--color-accent-hover);
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-navy);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 1.85rem; letter-spacing: -0.02em; }
h2 { font-size: 1.45rem; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }

/* --- Header --- */
.site-header {
  background: var(--color-navy);
  height: var(--header-height);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.header-brand svg {
  width: 22px;
  height: 22px;
  opacity: 0.9;
}

.header-brand span {
  opacity: 0.55;
  font-weight: 400;
  margin: 0 0.15rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.header-nav a {
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius);
  transition: all var(--transition);
  font-weight: 450;
}

.header-nav a:hover,
.header-nav a.active {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.4rem;
}

/* --- Layout --- */
.page-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  min-height: calc(100vh - var(--header-height));
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-sidebar-bg);
  border-right: 1px solid var(--color-border);
  padding: 1.5rem 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.sidebar-section {
  padding: 0 1rem;
  margin-bottom: 1.5rem;
}

.sidebar-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.84rem;
  color: var(--color-text-secondary);
  border-radius: var(--radius);
  transition: all var(--transition);
  margin-bottom: 1px;
}

.sidebar-nav a:hover {
  background: rgba(0,0,0,0.04);
  color: var(--color-text);
}

.sidebar-nav a.active {
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 500;
}

.sidebar-nav a svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
  flex-shrink: 0;
}

.sidebar-nav a.active svg {
  opacity: 0.9;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 2rem 2.5rem 3rem;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb .sep {
  opacity: 0.5;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header .page-desc {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 640px;
}

.page-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.page-meta .badge {
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-weight: 500;
  font-size: 0.7rem;
}

/* --- Content Sections --- */
.content-section {
  margin-bottom: 2.5rem;
}

.content-section h2 {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.content-section h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.content-section p {
  color: var(--color-text-secondary);
  font-size: 0.92rem;
  line-height: 1.75;
}

.content-section ul,
.content-section ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
  font-size: 0.92rem;
}

.content-section li {
  margin-bottom: 0.4rem;
  line-height: 1.65;
}

/* --- Cards Grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

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

.doc-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.doc-card .card-icon {
  width: 36px;
  height: 36px;
  background: var(--color-accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.doc-card .card-icon svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}

.doc-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  margin-top: 0;
}

.doc-card p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  flex: 1;
}

.doc-card .card-link {
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* --- Info Box --- */
.info-box {
  background: var(--color-accent-light);
  border-left: 3px solid var(--color-accent);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.25rem 0;
}

.info-box p {
  color: var(--color-graphite);
  font-size: 0.88rem;
  margin-bottom: 0;
}

.info-box.warning {
  background: #fef9e7;
  border-left-color: #d4a017;
}

.info-box.warning p {
  color: #6b5a00;
}

.info-box.neutral {
  background: #f4f5f7;
  border-left-color: var(--color-graphite);
}

/* --- Table --- */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.88rem;
}

.doc-table th,
.doc-table td {
  padding: 0.65rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.doc-table th {
  background: var(--color-sidebar-bg);
  font-weight: 600;
  color: var(--color-navy);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.doc-table td {
  color: var(--color-text-secondary);
}

.doc-table tr:hover td {
  background: rgba(0,0,0,0.01);
}

/* --- Form --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.35rem;
}

.form-group .label-hint {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-surface);
  transition: border-color var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(58,111,160,0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
}

.btn-secondary {
  background: var(--color-sidebar-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border-light);
}

/* --- Procedure Steps --- */
.procedure-steps {
  counter-reset: step;
  margin: 1.25rem 0;
}

.procedure-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-light);
}

.procedure-step:last-child {
  border-bottom: none;
}

.step-number {
  counter-increment: step;
  width: 32px;
  height: 32px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}

.step-content p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* --- Contact Items --- */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: var(--color-accent-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}

.contact-details h4 {
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.contact-details p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.contact-details a {
  font-size: 0.85rem;
  font-weight: 500;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 1.5rem 0;
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.footer-links a:hover {
  color: var(--color-accent);
}

/* --- 404 Page --- */
.not-found {
  text-align: center;
  padding: 4rem 1.5rem;
}

.not-found h1 {
  font-size: 4rem;
  color: var(--color-border);
  margin-bottom: 0.5rem;
}

.not-found h2 {
  margin-bottom: 1rem;
}

.not-found p {
  color: var(--color-text-muted);
  max-width: 420px;
  margin: 0 auto 1.5rem;
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: 2rem 0;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .sidebar.open {
    display: block;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 280px;
    height: calc(100vh - var(--header-height));
    z-index: 99;
    background: var(--color-sidebar-bg);
    box-shadow: 4px 0 12px rgba(0,0,0,0.1);
  }

  .mobile-toggle {
    display: block;
  }

  .main-content {
    padding: 1.5rem 1.25rem 2rem;
  }

  .header-nav {
    display: none;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
