/* ===================================
   BeSa.dev – Site styles
   =================================== */

/* 0. Fonts (self-hosted Poppins, latin subset) */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/poppins-400.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/poppins-500.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/poppins-600.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/poppins-700.woff2) format('woff2'); }

/* 1. Theme tokens – dark is the default, light via [data-theme="light"].
   All text/background pairs meet WCAG AA (>= 4.5:1). */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --accent:      #38f9d7;   /* button/badge backgrounds */
  --accent-dark: #0b3e4a;   /* text on accent backgrounds */
  --link:        #38f9d7;   /* links and icons on page backgrounds */

  --bg:          #0d1117;
  --bg-alt:      #161b22;
  --text:        #e6edf3;
  --text-muted:  #8b949e;
  --border:      #30363d;
  --card-bg:     #1c2128;
  --nav-bg:      linear-gradient(to right, #091419 0%, #174d43 100%);
  --nav-mobile:  linear-gradient(to bottom, #091419, #174d43);
  --footer-bg:   #091419;
  --footer-text: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] {
  color-scheme: light;
  --link:        #0a6e60;

  --bg:          #ffffff;
  --bg-alt:      #f4f6f7;
  --text:        #121212;
  --text-muted:  #5f6368;
  --border:      #dee2e6;
  --card-bg:     #ffffff;
  --nav-bg:      linear-gradient(to right, #0b3e4a 0%, #0f6e62 100%);
  --nav-mobile:  linear-gradient(to bottom, #0b3e4a, #0f6e62);
  --footer-bg:   #0b3e4a;
  --footer-text: rgba(255, 255, 255, 0.8);
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

a { color: var(--link); text-decoration: none; transition: opacity 0.2s; }
a:hover { color: var(--link); opacity: 0.85; }

/* Links inside running text are underlined, not identified by colour alone */
main p a,
.legal-card a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2000;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--accent-dark); }

/* 3. Navbar */
#mainNav {
  background: var(--nav-bg);
  padding: 10px 0;
  transition: background 0.3s ease;
  z-index: 1000;
}

#mainNav .navbar-brand img { max-height: 40px; width: auto; }

#mainNav .nav-link {
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 8px 14px !important;
  border-radius: 5px;
  transition: background 0.2s;
}
#mainNav .nav-link:hover,
#mainNav .nav-link.active-link { background: rgba(255, 255, 255, 0.18); }

#mainNav .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.4);
}
#mainNav .navbar-toggler-icon {
  filter: brightness(0) invert(1);
}

@media (max-width: 991px) {
  #navbarMain {
    background: var(--nav-mobile);
    border-radius: 0 0 8px 8px;
    padding: 10px 8px;
    margin-top: 6px;
  }
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.2s;
}
.theme-toggle:hover,
.theme-toggle:focus { background: rgba(255, 255, 255, 0.3); color: #fff; box-shadow: none; }

/* 4. Hero / Carousel */
.hero-section .carousel-item {
  height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@media (max-width: 767px) {
  .hero-section .carousel-item { height: 380px; }
}

.hero-slide-1 { background-image: url(../img/hero-1.webp); }
.hero-slide-2 { background-image: url(../img/hero-2.webp); }
.hero-slide-3 { background-image: url(../img/hero-3.webp); }
@media (max-width: 767px) {
  .hero-slide-1 { background-image: url(../img/hero-1-800.webp); }
  .hero-slide-2 { background-image: url(../img/hero-2-800.webp); }
  .hero-slide-3 { background-image: url(../img/hero-3-800.webp); }
}

.hero-section .carousel-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11, 62, 74, 0.55);
  z-index: 1;
}

.hero-section .carousel-control-prev,
.hero-section .carousel-control-next { z-index: 10; }

.hero-section .carousel-indicators { z-index: 10; }

.carousel-caption-custom {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  z-index: 2;
}

.carousel-caption-custom .hero-title {
  color: #fff;
  font-size: 2.6rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
  margin: 0;
}
.carousel-caption-custom p {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.1rem;
  max-width: 520px;
  margin-top: 14px;
  line-height: 1.6;
}
@media (max-width: 767px) {
  .carousel-caption-custom .hero-title { font-size: 1.6rem; }
  .carousel-caption-custom p  { font-size: 0.95rem; }
}

/* 5. Buttons */
.btn-accent {
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
  border: none;
  border-radius: 50px;
  padding: 10px 30px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
}
.btn-accent:hover,
.btn-accent:focus {
  background: var(--accent);
  color: var(--accent-dark);
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(56, 249, 215, 0.38);
}

/* 6. Sections */
.section-padding { padding: 80px 0; }

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

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}
@media (max-width: 767px) { .section-title { font-size: 1.5rem; } }

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0;
}

.about-illustration { max-width: 180px; }

/* 7. Feature cards (about section) */
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 26px;
  border: 1px solid var(--border);
  height: 100%;
  transition: box-shadow 0.3s, transform 0.3s;
}
.feature-card:hover {
  box-shadow: 0 8px 30px rgba(56, 249, 215, 0.15);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  color: var(--link);
  min-width: 44px;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

/* 8. Service cards */
.service-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 36px 24px;
  border: 1px solid var(--border);
  height: 100%;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.service-card:hover {
  background: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(56, 249, 215, 0.28);
}
.service-card:hover h3,
.service-card:hover p      { color: var(--accent-dark) !important; }
.service-card:hover .service-icon { color: var(--accent-dark); }

.service-icon {
  font-size: 2.5rem;
  color: var(--link);
  margin-bottom: 20px;
  display: block;
  transition: color 0.3s;
}
.service-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.service-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* 9. Team card */
.team-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 44px 36px;
  border: 1px solid var(--border);
}

.team-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
}

.team-card h3 { color: var(--text); font-weight: 700; font-size: 1.25rem; }

.team-role {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 16px;
  border-radius: 50px;
}

.text-muted-custom { color: var(--text-muted); font-size: 0.9rem; line-height: 1.75; }

/* 10. Contact */
.contact-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-info-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
}
.contact-info-list li:last-child { border-bottom: none; }
.contact-info-list i { color: var(--link); font-size: 1.1rem; flex-shrink: 0; }
.contact-info-list a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.contact-info-list a:hover { color: var(--link); opacity: 1; }

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px 32px;
}
@media (max-width: 575px) {
  .contact-card { padding: 20px 20px 24px; }
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.contact-actions .btn {
  flex: 1 1 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-outline-accent {
  background: transparent;
  color: var(--link);
  font-weight: 700;
  border: 2px solid var(--link);
  border-radius: 50px;
  padding: 8px 28px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.btn-outline-accent:hover,
.btn-outline-accent:focus {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-dark);
  opacity: 1;
  transform: translateY(-2px);
}

/* 11. Legal pages (Impressum, Datenschutz) */
.page-header {
  background: var(--nav-bg);
  color: #fff;
  padding: 56px 0 48px;
}
.page-header h1 { font-size: 2rem; font-weight: 700; margin: 0; }
.page-header p { color: rgba(255, 255, 255, 0.85); margin: 8px 0 0; }

.legal-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 20px;
  color: var(--text);
  line-height: 1.75;
}
.legal-card h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.legal-card h3 { font-size: 1rem; font-weight: 600; margin: 16px 0 6px; }
.legal-card p,
.legal-card address,
.legal-card ul { margin-bottom: 0.75rem; }
.legal-card p:last-child,
.legal-card ul:last-child { margin-bottom: 0; }
.legal-card ul { padding-left: 1.2rem; }

/* 12. Footer */
.site-footer {
  background: var(--footer-bg);
  padding: 60px 0 30px;
}
.footer-text { color: var(--footer-text); font-size: 0.875rem; line-height: 1.6; }

.footer-heading {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--footer-text); font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: #38f9d7; opacity: 1; }

.footer-divider { border-color: rgba(255, 255, 255, 0.15); opacity: 1; margin: 30px 0 20px; }
.footer-copyright { color: var(--footer-text); font-size: 0.8rem; margin: 0; }
.footer-copyright a { color: #38f9d7; text-decoration: underline; text-underline-offset: 3px; }

/* 13. Back to top */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: var(--accent-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 999;
}
.back-to-top:hover { color: var(--accent-dark); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* 14. Fade-in on scroll */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
}

/* 15. Scrollbar (mouse devices only; touch devices keep their native overlay scrollbars) */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg-alt); }
  ::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
}
