/*
  Custom Theme Styles for "Ayhan Arif Sensoy Transporte"
  Farben: Dunkelblau (#003366), Weiß, Grau (#f8f9fa)
*/

:root {
  /* Bootstrap 5 Farbvariable anpassen */
  --bs-primary: #003366;
  /* Dynamischer Offset für fixe Navbar (per JS gesetzt) */
  --nav-offset: 56px;
  /* Für .bg-primary (Bootstrap nutzt die RGB-Variante) */
  --bs-primary-rgb: 0, 51, 102;
  /* Akzentfarbe für Highlights */
  --accent: #2d6db5;              /* passt zum Hero-Verlauf */
  --accent-rgb: 45, 109, 181;
}

html {
  scroll-behavior: smooth;
}
/* Prevent horizontal overflow on small screens */
html, body { max-width: 100%; overflow-x: hidden; }

/* Ensure media never overflow viewport */
img, svg { max-width: 100%; height: auto; }

body {
  /* Platz für die fixe Navbar – dynamisch entsprechend der tatsächlichen Höhe */
  padding-top: var(--nav-offset);
  /* Sticky footer layout */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hauptinhalt füllt verbleibende Höhe, damit Footer unten steht */
main { flex: 1 0 auto; }
footer { margin-top: auto; }

/* Navbar */
#mainNav .nav-link {
  font-weight: 500;
  opacity: 0.9;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: .5rem .75rem;
  background: #ffffff;
  color: #000000;
  z-index: 1050; /* über Navbar */
  border-radius: .25rem;
  box-shadow: 0 .25rem .75rem rgba(0,0,0,.2);
}
#mainNav {
  border-bottom: 0 !important; /* Sicherheitsnetz gegen feine Border-Linie */
  overflow-x: hidden; /* Verhindert, dass die Navbar breiter als der Viewport wird */
}
#navbarSupportedContent { overflow-x: hidden; }
#mainNav .nav-link:hover {
  opacity: 1;
}
#mainNav .nav-link.active {
  color: #fff !important;
  opacity: 1;
}

/* Branding: Logo-Größen in Navbar & Footer */
.brand-logo {
  height: 30px;
  width: auto;
  display: block;
}
.footer-logo {
  height: 22px;
  width: auto;
  display: block;
  opacity: .95;
}
@media (min-width: 992px) { .brand-logo { height: 34px; } }

/* Hero Section */
.hero-section {
  position: relative;
  overflow: hidden; /* schneidet evtl. überstehende Effekte sauber ab */
  background: radial-gradient(1100px 500px at 80% 20%, rgba(255,255,255,0.09), transparent 60%),
              linear-gradient(135deg, #003366 0%, #0f4f9c 60%, #2d6db5 100%);
}
.hero-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: auto;
  max-width: clamp(220px, 30vw, 480px);
  mix-blend-mode: normal;
  filter: saturate(1.05) contrast(1.05);
}
/* Feine weiße Outline für transparente Logos */
.hero-logo.outline {
  filter: drop-shadow(0 0 1px #ffffff) drop-shadow(0 0 2px rgba(255,255,255,.7));
  mix-blend-mode: normal;
}
.hero-section .hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  background: radial-gradient(50% 120% at 50% -20%, rgba(255,255,255,0.35), transparent 70%);
  opacity: 0.35;
  pointer-events: none;
}

/* Abschnitts-Offset für Ankerlinks */
section, header {
  /* Anker-Offset etwas größer als die Navbar, damit Überschriften nicht anstoßen */
  scroll-margin-top: calc(var(--nav-offset) + 20px);
}

/* Karten & Icons */
.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background-color: rgba(var(--accent-rgb), 0.08);
}
.icon-badge .icon { width: 1.5rem; height: 1.5rem; }

/* Inline SVG Icons */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  fill: currentColor;
  vertical-align: -.125em;
}

/* Akzent-Utilities */
.text-accent { color: var(--accent) !important; }
.btn-accent {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: rgba(var(--accent-rgb), 0.9);
  --bs-btn-hover-border-color: rgba(var(--accent-rgb), 0.9);
  --bs-btn-active-bg: rgba(var(--accent-rgb), 0.85);
  --bs-btn-active-border-color: rgba(var(--accent-rgb), 0.85);
  --bs-btn-color: #fff;
}
.btn-outline-accent {
  --bs-btn-color: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-bg: var(--accent);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-hover-color: #fff;
}

/* Abschnitts-Titel Deko */
.section-title {
  position: relative;
}
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin-top: .5rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(var(--accent-rgb),0.4));
}

/* Service-Karten Feinschliff */
.service-card {
  border-top: 3px solid rgba(var(--accent-rgb), 0.35);
}

/* Kontaktboxen */
#kontakt .bg-white {
  border: 1px solid rgba(0,0,0,0.05);
}

/* Karten Hover-Effekt */
.card.shadow-sm {
  transition: transform .2s ease, box-shadow .2s ease;
}
.card.shadow-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 .75rem 1.5rem rgba(0,0,0,0.08);
}

/* Lesbarkeit Hero-Text */
.hero-section .lead {
  opacity: .95;
}

/* Kontakt-CTA Buttons */
#kontakt .btn {
  padding-top: .75rem;
  padding-bottom: .75rem;
}

/* Footer */
footer .nav-link:hover {
  color: #fff;
}

/* Scroll Reveal Animations (Keyframes-basiert, robust) */
.reveal { opacity: 0; }
.reveal[data-animate="fade-up"] { transform: translateY(24px); }
.reveal[data-animate="fade-in"] { transform: none; }
.reveal[data-animate="zoom-in"] { transform: scale(.92); }
.reveal.reveal-visible { will-change: auto; }
.reveal.reveal-visible[data-animate="fade-up"] {
  animation: fade-up .8s cubic-bezier(.2,.65,.3,1) forwards;
}
.reveal.reveal-visible[data-animate="fade-in"] {
  animation: fade-in .7s ease forwards;
}
.reveal.reveal-visible[data-animate="zoom-in"] {
  animation: zoom-in .8s cubic-bezier(.2,.65,.3,1) forwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes zoom-in {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  /* Nur deaktivieren, wenn explizit gewünscht: <html data-respect-reduced-motion> */
  html[data-respect-reduced-motion] .reveal,
  html[data-respect-reduced-motion] .reveal.reveal-visible {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
