/* ======================================
   OO BOS Security Company - Main Stylesheet
   ====================================== */

/* ======================================
   1. CSS CUSTOM PROPERTIES (Variables)
   ====================================== */

:root {
  /* Colors */
  --primary-dark: #1a3a52;
  --primary-light: #2980b9;
  --accent: #e74c3c;
  --success: #27ae60;
  --white: #ffffff;
  --gray-light: #f5f7fa;
  --gray-medium: #bdc3c7;
  --gray-dark: #34495e;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Courier New', monospace;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  
  /* Spacing (8px base) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  
  /* Container */
  --container-max-width: 1200px;
  --container-padding: var(--space-md);
}

/* ======================================
   2. RESET & NORMALIZE
   ====================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Remove default link styles */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

/* Remove list markers */
ul, ol {
  list-style: none;
}

/* Form elements */
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  border: none;
  outline: none;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ======================================
   3. TYPOGRAPHY
   ====================================== */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--primary-dark);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

h4 {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

h5 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
}

h6 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: 700;
  color: var(--primary-dark);
}

em {
  font-style: italic;
}

/* ======================================
   4. CONTAINER & LAYOUT
   ====================================== */

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Utility spacing classes */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.py-3xl { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; align-items: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Grid utilities */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Text utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ======================================
   5. HEADER & NAVIGATION (Sticky)
   ====================================== */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--primary-dark);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
}

/* Logo */
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.logo:hover {
  color: var(--accent);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Navigation */
nav {
  display: flex;
  gap: var(--space-2xl);
  align-items: center;
}

nav a {
  color: var(--white);
  font-weight: 500;
  padding: var(--space-sm) 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition-fast);
}

nav a:hover,
nav a.active {
  border-bottom-color: var(--accent);
}

/* Mobile menu toggle button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  padding: var(--space-sm);
}

.menu-toggle span {
  width: 24px;
  height: 3px;
  background-color: var(--white);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ======================================
   6. MAIN CONTENT
   ====================================== */

main {
  min-height: calc(100vh - 250px);
}

/* Section styling */
section {
  padding: var(--space-2xl) 0;
}

section.bg-light {
  background-color: var(--gray-light);
}

section.bg-dark {
  background-color: var(--primary-dark);
  color: var(--white);
}

section.bg-dark h2,
section.bg-dark h3 {
  color: var(--white);
}

/* ======================================
   7. BREADCRUMBS
   ====================================== */

.breadcrumbs {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--primary-light);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  color: var(--text-light);
}

/* ======================================
   8. FOOTER
   ====================================== */

footer {
  background-color: var(--primary-dark);
  color: var(--white);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-3xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

footer h4 {
  color: var(--white);
  margin-bottom: var(--space-md);
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  display: block;
  margin-bottom: var(--space-sm);
}

footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.social-links a:hover {
  background-color: var(--accent);
}

/* ======================================
   9. RESPONSIVE DESIGN
   ====================================== */

/* Tablet (768px and up) */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: var(--space-md);
    background-color: var(--primary-dark);
    padding: var(--space-lg) var(--container-padding);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  nav.active {
    display: flex;
  }

  nav a {
    padding: var(--space-md) 0;
  }

  .menu-toggle {
    display: flex;
  }

  .grid-cols-2,
  .grid-cols-3 {
    grid-template-columns: 1fr;
  }

  section {
    padding: var(--space-lg) 0;
  }

  section.py-3xl {
    padding: var(--space-2xl) 0;
  }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
  :root {
    --font-size-base: 14px;
    --container-padding: var(--space-md);
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  .flex-between {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  footer .container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
  .container {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }
}

/* ======================================
   10. PRINT STYLES
   ====================================== */

@media print {
  header, footer, .menu-toggle, form {
    display: none;
  }

  a {
    text-decoration: underline;
  }

  body {
    background-color: var(--white);
    color: var(--text-dark);
  }
}

/* ======================================
   11. ACCESSIBILITY
   ====================================== */

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background-color: var(--primary-light);
  color: var(--white);
  padding: 8px 16px;
  z-index: 10000;
}

.skip-link:focus {
  top: 0;
}

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
