/* Modern CSS for LinuxLabs Static Site */

:root {
  --color-primary: #0066cc;
  --color-primary-dark: #0052a3;
  --color-secondary: #28a745;
  --color-text: #2c3e50;
  --color-text-light: #6c757d;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-border: #e9ecef;
  --color-code-bg: #f6f8fa;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --container-width: 1200px;
  --content-width: 800px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #4da3ff;
    --color-primary-dark: #0066cc;
    --color-secondary: #52c41a;
    --color-text: #e4e6eb;
    --color-text-light: #b0b3b8;
    --color-bg: #18191a;
    --color-bg-alt: #242526;
    --color-border: #3a3b3c;
    --color-code-bg: #2d2d2d;
  }
}

/* Base styles */
* {
  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-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation */
.nav {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.95);
}

@media (prefers-color-scheme: dark) {
  .nav {
    background: rgba(24,25,26,0.95);
  }
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 40px;
  width: auto;
  margin-right: 0.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@media (prefers-color-scheme: dark) {
  .nav-logo img {
    filter: drop-shadow(0 2px 4px rgba(255,255,255,0.1));
  }
}

.nav-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.nav-logo a:hover {
  color: var(--color-primary-dark);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu a:hover {
  color: var(--color-primary);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 50%;
  background: var(--color-primary);
  transition: all 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
  left: 0;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.language-switch span {
  color: var(--color-border);
}

.language-link {
  color: var(--color-text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.language-link:hover {
  color: var(--color-primary);
}

.language-link.is-active {
  color: var(--color-primary);
}

/* Main content */
main, .content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 2rem;
  flex: 1;
}

/* Hero section */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 2rem;
  color: white;
  background: linear-gradient(135deg, rgba(0, 38, 76, 0.85), rgba(0, 102, 204, 0.8));
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  transform: scale(1.05);
  filter: saturate(1.1);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 38, 76, 0.45));
}

.hero-inner {
  position: relative;
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 1;
}

.hero-content {
  max-width: 600px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 2.85rem;
  line-height: 1.1;
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: inherit;
}

.hero p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.1rem;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  text-decoration: none;
  transform: translateY(-2px);
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; border-bottom: 2px solid var(--color-border); padding-bottom: 0.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

strong, b {
  font-weight: 600;
  color: var(--color-text);
}

em, i {
  font-style: italic;
}

/* Lists */
ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Media block layout */
.media-block {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  margin: 2.5rem 0;
}

.media-text {
  flex: 1 1 50%;
}

.media-figure {
  flex: 1 1 40%;
}

.media-figure img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

@media (max-width: 900px) {
  .media-block {
    flex-direction: column-reverse;
    gap: 1.5rem;
  }

  .media-figure {
    width: 100%;
  }
}

/* Code blocks */
pre {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  background: var(--color-code-bg);
  border-radius: 3px;
}

pre code {
  padding: 0;
  background: transparent;
  font-size: inherit;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--color-text-light);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  display: block;
}

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

th {
  font-weight: 600;
  background: var(--color-bg-alt);
}

tr:hover {
  background: var(--color-bg-alt);
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 2px solid var(--color-border);
  margin: 3rem 0;
}

/* Table of contents */
#table-of-contents {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

#table-of-contents h2 {
  margin-top: 0;
  font-size: 1.25rem;
  border-bottom: none;
}

#table-of-contents ul {
  margin-bottom: 0;
}

#table-of-contents a {
  color: var(--color-text);
}

#table-of-contents a:hover {
  color: var(--color-primary);
}

/* Footer */
.footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.footer p {
  margin-bottom: 0.5rem;
  color: var(--color-text-light);
}

.footer-meta {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

/* Cards / Boxes */
.box, .card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.box:hover, .card:hover {
  box-shadow: var(--shadow-lg);
}

/* Services */
.service-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 2rem 0;
}

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.service-card img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.service-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--color-bg-alt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow);
}

.service-card h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.service-card ul {
  margin-bottom: 0;
  padding-left: 1.1rem;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

/* Case studies */
.case-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin: 2rem 0;
}

.case-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.case-card strong {
  font-size: 1.05rem;
}

.case-card .case-meta {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.case-card p {
  margin-bottom: 0;
  color: var(--color-text-light);
}

/* USP section */
.usp-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 2rem 0;
}

.usp-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.usp-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.usp-card p {
  margin-bottom: 0;
  color: var(--color-text-light);
}

.usp-card span {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

/* Contact imagery */
.contact-image {
  display: block;
  max-width: 360px;
  width: 100%;
  margin: 2.5rem auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

/* Buttons */
.button, button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.button:hover, button:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: white;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Responsive design */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .language-switch {
    justify-content: center;
  }

  main, .content {
    padding: 2rem 1rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  table {
    font-size: 0.875rem;
  }

  .hero {
    padding: 4rem 1.5rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-secondary {
    width: 100%;
    justify-content: center;
  }

  .service-grid, .case-grid, .usp-grid {
    grid-template-columns: 1fr;
  }
}

/* Print styles */
@media print {
  .nav, .footer {
    display: none;
  }

  main, .content {
    max-width: 100%;
  }

  a {
    color: inherit;
    text-decoration: underline;
  }

  pre {
    white-space: pre-wrap;
  }
}
