/* ============================================
   Berger-IT Website Styles
   Font: CoreSansC | Accent: #0A7AFF
   Dark Mode default, Light Mode via toggle
   ============================================ */

/* Fonts */
@font-face {
  font-family: 'CoreSansC';
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/CoreSansC-45Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'CoreSansC';
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/CoreSansC-65Bold.ttf') format('truetype');
}

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

:root {
  --blue: #0A7AFF;
  --blue-dark: #0560CC;
  --blue-light: rgba(10,122,255,0.12);
  --font: 'CoreSansC', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --radius: 12px;
  --transition: 0.3s ease;

  /* Dark mode (default) */
  --bg: #0d1117;
  --bg-alt: #161b22;
  --bg-card: #1c2128;
  --bg-elevated: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-hover: 0 8px 32px rgba(10,122,255,0.2);
  --nav-bg: rgba(13,17,23,0.92);
  --nav-scrolled-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

/* Light mode */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --bg-card: #ffffff;
  --bg-elevated: #f0f2f5;
  --border: #dee2e6;
  --text: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --blue-light: #E8F2FF;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 32px rgba(10,122,255,0.12);
  --nav-bg: rgba(255,255,255,0.95);
  --nav-scrolled-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.7;
  background: var(--bg);
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--blue-dark);
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo switching */
.nav-logo-light { display: none; }
.nav-logo-dark { display: block; }
[data-theme="light"] .nav-logo-light { display: block; }
[data-theme="light"] .nav-logo-dark { display: none; }

/* ============================================
   Theme Toggle
   ============================================ */
.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}
.navbar.scrolled {
  box-shadow: var(--nav-scrolled-shadow);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--blue) !important;
  color: #fff !important;
  padding: 10px 24px !important;
  border-radius: 8px;
  font-weight: 700;
}
.nav-cta::after {
  display: none !important;
}
.nav-cta:hover {
  background: var(--blue-dark) !important;
}

/* Mobile Menu Button */
.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0;
  position: relative;
  flex-shrink: 0;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  z-index: 1001;
}
.hamburger:hover,
.hamburger:focus {
  border-color: var(--blue);
  outline: none;
}
.hamburger span {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  pointer-events: none;
}
.hamburger span:nth-child(1) { top: 14px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 28px; }

.hamburger.active {
  background: var(--blue);
  border-color: var(--blue);
}
.hamburger.active span {
  background: #fff;
}
.hamburger.active span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 140px 0 100px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 50%, rgba(10,122,255,0.06) 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(10,122,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  display: flex;
  align-items: center;
  gap: 60px;
}

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

.hero-badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  margin-bottom: 20px;
}
.hero h1 span {
  color: var(--blue);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover {
  background: var(--blue-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10,122,255,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-outline:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stat {
  text-align: center;
}
.hero-stat .number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--blue);
  display: block;
}
.hero-stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo-large {
  width: 320px;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(10,122,255,0.2));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

/* ============================================
   Section Base
   ============================================ */
.section {
  padding: 100px 0;
}
.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}
.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 16px;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}
.section-header .accent-line {
  width: 48px;
  height: 3px;
  background: var(--blue);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ============================================
   Services / Leistungen
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px 28px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.service-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--blue-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   About / Über mich
   ============================================ */
.about-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.about-text {
  flex: 1;
}
.about-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 20px;
}
.about-text > p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.about-features {
  list-style: none;
  display: grid;
  gap: 16px;
}
.about-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.about-features li .check {
  width: 24px;
  height: 24px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.about-features li .check svg {
  width: 14px;
  height: 14px;
  color: var(--blue);
}

.about-image {
  flex: 0 0 380px;
  position: relative;
}
.about-image-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-light) 0%, rgba(10,122,255,0.06) 100%);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 1px solid var(--border);
}
.about-image-wrapper img {
  width: 80%;
  filter: drop-shadow(0 10px 30px rgba(10,122,255,0.2));
}
/* In dark mode, invert the black logo to white */
[data-theme="light"] .about-image-wrapper img {
  filter: drop-shadow(0 10px 30px rgba(10,122,255,0.2));
}

/* ============================================
   Digitale Souveränität
   ============================================ */
.sovereignty-content {
  max-width: 800px;
  margin: 0 auto 48px;
  text-align: center;
}
.sovereignty-intro p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 16px;
  line-height: 1.8;
}
.sovereignty-intro strong {
  color: var(--text);
}

.sovereignty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-bottom: 60px;
}

.sovereignty-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px 24px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.sovereignty-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #00b4d8);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.sovereignty-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.sovereignty-card:hover::before {
  transform: scaleX(1);
}

.sovereignty-icon {
  width: 56px;
  height: 56px;
  background: var(--blue-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.sovereignty-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}
.sovereignty-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* European Alternatives Examples */
.sovereignty-examples {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}
.sovereignty-examples h3 {
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 32px;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.example-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
}
.example-item:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.example-category {
  display: block;
  font-weight: 700;
  color: var(--blue);
  font-size: 1rem;
  margin-bottom: 6px;
}

.example-instead {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================
   Contact / Kontakt
   ============================================ */
.contact-section {
  background: linear-gradient(135deg, #080c14 0%, #0d1520 50%, rgba(10,122,255,0.05) 100%);
  color: #e6edf3;
  padding: 100px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .contact-section {
  background: linear-gradient(135deg, #1A1A2E 0%, #16213e 100%);
}

.contact-inner {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.contact-inner h2 {
  color: #e6edf3;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 16px;
}
.contact-inner > p {
  color: rgba(230,237,243,0.6);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

.contact-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 32px 36px;
  text-align: center;
  min-width: 240px;
  transition: all var(--transition);
}
.contact-card:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
  border-color: rgba(10,122,255,0.3);
}

.contact-card-icon {
  width: 48px;
  height: 48px;
  background: rgba(10,122,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.contact-card-icon svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
}

.contact-card h3 {
  color: #e6edf3;
  font-size: 1rem;
  margin-bottom: 8px;
}
.contact-card a {
  color: var(--blue);
  font-size: 1.1rem;
  font-weight: 700;
}
.contact-card a:hover {
  color: #5AADFF;
}

.contact-card p {
  color: rgba(230,237,243,0.6);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: #010409;
  color: rgba(230,237,243,0.5);
  padding: 60px 0 0;
}
[data-theme="light"] .footer {
  background: #212529;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand img {
  height: 40px;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  color: #e6edf3;
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 10px;
}
.footer-col ul a {
  color: rgba(230,237,243,0.5);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col ul a:hover {
  color: var(--blue);
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* ============================================
   Impressum / Datenschutz Pages
   ============================================ */
.legal-page {
  padding: 120px 0 80px;
}
.legal-page h1 {
  font-size: 2rem;
  margin-bottom: 32px;
}
.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 32px;
  margin-bottom: 12px;
}
.legal-page h3 {
  font-size: 1.1rem;
  margin-top: 24px;
  margin-bottom: 8px;
}
.legal-page p, .legal-page li {
  margin-bottom: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.legal-page ul {
  padding-left: 24px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 992px) {
  .hero .container {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero p {
    max-width: 100%;
  }
  .hero-buttons {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-logo-large {
    width: 220px;
  }
  .about-content {
    flex-direction: column;
    text-align: center;
  }
  .about-image {
    flex: 0 0 auto;
    width: 280px;
  }
  .about-features {
    text-align: left;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ============================================
   Mobile Overlay Backdrop (always in DOM, hidden by default)
   ============================================ */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-backdrop.visible {
  display: block;
  opacity: 1;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  /* Slide-in panel: hidden off-screen, visible when .open */
  .nav-links {
    display: flex;
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 40px rgba(0,0,0,0.4);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 0;
    z-index: 999;
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  }
  .nav-links.open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
  }

  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    display: block;
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
  }
  .nav-links a::after {
    display: none;
  }
  .nav-links a:hover,
  .nav-links a:active {
    background: var(--blue-light);
    color: var(--blue);
  }

  /* CTA button in mobile menu */
  .nav-links .nav-cta {
    display: block !important;
    text-align: center;
    border-radius: 10px !important;
    padding: 16px 24px !important;
    margin: 16px 20px 0;
    border-bottom: none;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  /* Layout adjustments */
  .hero {
    padding: 120px 0 60px;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .contact-cards {
    flex-direction: column;
    align-items: center;
  }
  .sovereignty-grid {
    grid-template-columns: 1fr;
  }
  .examples-grid {
    grid-template-columns: 1fr 1fr;
  }
}
