/* ===================================================
   Sahabet Protection — Global Stylesheet
   Source Integrity & Brand Reference Resource
   =================================================== */

/* --- CSS Custom Properties --- */
:root {
  --color-bg: #f8f7f5;
  --color-bg-alt: #ffffff;
  --color-surface: #f1f0ed;
  --color-border: #ddd9d3;
  --color-text: #2c2c2c;
  --color-text-secondary: #5a5a5a;
  --color-text-muted: #8a8a8a;
  --color-heading: #1e2a3a;
  --color-primary: #34495e;
  --color-primary-dark: #2c3e50;
  --color-accent: #4a6785;
  --color-accent-light: #e8edf2;
  --color-link: #3a6b8c;
  --color-link-hover: #2c5068;
  --color-success: #4a7c59;
  --color-warning: #8b6914;
  --color-danger: #8b3a3a;
  --font-primary: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Consolas', 'Monaco', monospace;
  --max-width: 1100px;
  --radius: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.10);
  --transition: 0.2s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

ul, ol {
  padding-left: 1.5rem;
}

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

h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; margin-top: 2rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
}

/* --- Layout Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3rem 0;
}

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

.section--surface {
  background-color: var(--color-surface);
}

/* --- Header / Navigation --- */
.site-header {
  background-color: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.site-logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.site-logo span {
  white-space: nowrap;
}

/* Desktop nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.main-nav a {
  padding: 0.4rem 0.7rem;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  background-color: var(--color-accent-light);
  color: var(--color-primary-dark);
  text-decoration: none;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    box-shadow: var(--shadow-md);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 0.6rem 0.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
  }

  .main-nav a:last-child {
    border-bottom: none;
  }
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #3d566e 100%);
  color: #ffffff;
  padding: 4rem 0 3.5rem;
  text-align: center;
}

.hero h1 {
  color: #ffffff;
  font-size: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.hero .badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  color: rgba(255,255,255,0.9);
}

/* Page hero (inner pages) */
.page-hero {
  background: linear-gradient(135deg, #2c3e50 0%, #3a5068 100%);
  color: #ffffff;
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.page-hero h1 {
  color: #ffffff;
  font-size: 1.9rem;
  margin-bottom: 0.6rem;
}

.page-hero p {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

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

.card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 {
  margin-top: 0;
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  color: var(--color-accent);
}

/* --- Content Blocks --- */
.content-block {
  max-width: 800px;
  margin: 0 auto;
}

.content-block h2 {
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border);
}

.content-block ul, .content-block ol {
  margin-bottom: 1rem;
}

.content-block li {
  margin-bottom: 0.4rem;
  color: var(--color-text-secondary);
}

/* --- Info Boxes --- */
.info-box {
  background: var(--color-accent-light);
  border-left: 4px solid var(--color-accent);
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}

.info-box p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.info-box--warning {
  background: #fdf6e3;
  border-left-color: var(--color-warning);
}

.info-box--danger {
  background: #fdf0f0;
  border-left-color: var(--color-danger);
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

/* --- Quick Links --- */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.quick-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background var(--transition);
  text-decoration: none;
}

.quick-link:hover {
  background: var(--color-primary-dark);
  color: #ffffff;
  text-decoration: none;
}

.quick-link svg {
  width: 16px;
  height: 16px;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.3rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
  color: var(--color-heading);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg-alt);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(74,103,133,0.12);
}

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

.form-group .hint {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.btn-submit {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

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

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

.contact-card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.contact-card h3 {
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

.contact-card a {
  font-size: 0.95rem;
  word-break: break-all;
}

.contact-card .contact-icon {
  width: 36px;
  height: 36px;
  color: var(--color-accent);
  margin: 0 auto;
}

/* --- Reference Table --- */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.93rem;
}

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

.ref-table th {
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-heading);
}

.ref-table tr:hover td {
  background: var(--color-accent-light);
}

/* --- Warning Patterns List --- */
.pattern-list {
  list-style: none;
  padding: 0;
}

.pattern-list li {
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-alt);
  margin-bottom: 0.8rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pattern-list li strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--color-heading);
}

/* --- Checklist --- */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  padding: 0.6rem 0;
  padding-left: 2rem;
  position: relative;
  border-bottom: 1px solid var(--color-border);
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-accent);
  border-radius: 3px;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  font-size: 0.88rem;
  margin-top: 3rem;
}

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

.footer-about p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
  color: #ffffff;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  margin-top: 0;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-contact p {
  margin-bottom: 0.3rem;
}

.footer-contact a {
  color: rgba(255,255,255,0.7);
}

.footer-contact a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.82rem;
}

.footer-bottom a {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
}

@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

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

.not-found h1 {
  font-size: 5rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.not-found h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

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

.not-found a {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius);
  font-weight: 500;
}

.not-found a:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.8rem;
}

.breadcrumb a {
  color: rgba(255,255,255,0.7);
}

.breadcrumb a:hover {
  color: #ffffff;
}

/* --- Scroll to Top --- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 42px;
  height: 42px;
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: opacity var(--transition), background var(--transition);
  z-index: 50;
}

.scroll-top:hover {
  background: var(--color-primary-dark);
}

.scroll-top.visible {
  display: flex;
}

.scroll-top svg {
  width: 20px;
  height: 20px;
}

/* --- Print Styles --- */
@media print {
  .site-header, .site-footer, .scroll-top, .nav-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero, .page-hero {
    background: #eee !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
  }
}
