:root {
  --ct-green: #4CAF50;
  --ct-green-soft: #81C784;
  --bg-dark: #0d0f10;
  --glass: rgba(17, 25, 40, 0.35);
  --line: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  color: #eef3ef;
  background:
    radial-gradient(circle at top right, rgba(76,175,80,0.12), rgba(13,15,16,0) 45%),
    linear-gradient(160deg, #0d0f10 0%, #101417 40%, #0b0c0d 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

a { color: inherit; }

/* --- Header & Hero --- */
header {
  position: relative;
  height: 100vh;
  min-height: 580px;
  overflow: hidden;
  z-index: 0;
}

#heroVideo {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  top: 0;
  left: 0;
  z-index: 1;
  filter: brightness(40%);
}

header::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(76,175,80,0.18), rgba(0,0,0,0) 60%),
    linear-gradient(to bottom, rgba(5,10,10,0.25), rgba(0,0,0,0.85));
  z-index: 2;
}

.topbar {
  position: absolute;
  top: 0.8rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, 95vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
  padding: 0.6rem 1rem;
  background: rgba(3,6,6,0.25);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 999px;
}

.topbar .logo-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.topbar img {
  width: 42px;
  filter: drop-shadow(0 0 8px rgba(76,175,80,0.7));
}

.topbar small {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.7);
}

.topbar nav a {
  margin-left: 1rem;
  font-size: 0.85rem;
  text-decoration: none;
  color: rgba(255,255,255,0.8);
  transition: 0.2s;
}

.topbar nav a:hover {
  color: #fff;
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

/* --- Glossy Hero Panel --- */
.hero-panel {
  background: linear-gradient(145deg, rgba(18,18,18,0.55), rgba(18,18,18,0.3));
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 26px;
  padding: 3.5rem 2.5rem 3rem;
  max-width: 820px;
  width: min(94vw, 820px);
  box-shadow:
    0 12px 30px rgba(0,0,0,0.35),
    inset 0 1px 8px rgba(255,255,255,0.08);
  animation: fadeUp 1.1s ease forwards;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}

.hero-panel img {
  width: 110px;
  margin-bottom: 1.2rem;
  filter: drop-shadow(0 0 12px rgba(76,175,80,0.9));
}

.hero-panel h1 {
  font-size: clamp(1.6rem, 3vw + 1rem, 2.2rem);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.hero-panel h1 span {
  color: var(--ct-green-soft);
  font-size: 1.1rem;
  display: block;
  margin-top: 0.3rem;
  font-weight: 500;
}

.hero-panel p {
  font-size: 1.05rem;
  color: rgba(243,244,245,0.85);
  margin-bottom: 2rem;
}

.button {
  background: var(--ct-green);
  color: #fff;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 0 18px rgba(76,175,80,0.35);
  transition: 0.3s ease;
}

.button:hover {
  background: linear-gradient(90deg, #4CAF50, #43A047);
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(76,175,80,0.55);
}

/* --- Sections --- */
section {
  width: min(1200px, 95vw);
  margin: 0 auto;
  padding: 4.5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.section-title p {
  color: rgba(230,232,231,0.6);
  max-width: 560px;
  margin: 0.4rem auto 0;
}

/* --- About --- */
#about {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

#about .about-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 30px rgba(0,0,0,0.25);
  animation: fadeUp 1s ease 0.2s forwards;
  opacity: 0;
}

#about img {
  width: min(270px, 60vw);
  border-radius: 50%;
  border: 3px solid rgba(129,199,132,0.6);
  box-shadow: 0 0 25px rgba(129,199,132,0.35), 0 14px 35px rgba(0,0,0,0.25);
  justify-self: center;
  animation: float 6s ease-in-out infinite;
  object-fit: cover;
}

/* --- Cards --- */
#services .cards,
#network .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.7rem;
}

.card {
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 1.7rem 1.5rem;
  text-align: left;
  box-shadow:
    0 10px 25px rgba(0,0,0,0.25),
    inset 0 0 20px rgba(255,255,255,0.04);
  transition: all 0.35s ease;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.card:nth-child(2) { animation-delay: .1s; }
.card:nth-child(3) { animation-delay: .2s; }
.card:nth-child(4) { animation-delay: .3s; }

.card i {
  font-size: 2rem;
  display: inline-flex;
  width: 3rem; height: 3rem;
  align-items: center; justify-content: center;
  border-radius: 1rem;
  background: rgba(76,175,80,0.12);
  color: #A5D6A7;
  margin-bottom: 1.2rem;
}

.card h3 {
  margin: 0 0 0.7rem 0;
  font-size: 1.25rem;
}

.card p {
  color: rgba(235,235,235,0.6);
  line-height: 1.5;
}

.card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(129,199,132,0.5);
  box-shadow:
    0 0 28px rgba(76,175,80,0.2),
    inset 0 0 30px rgba(255,255,255,0.06);
}

/* --- Blog preview --- */
#blog-preview {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: url('../images/blog-header-2.png') center center / cover no-repeat;
  padding: 6rem 1.5rem;
  margin-top: 4rem;
  backdrop-filter: blur(10px) brightness(0.9) saturate(130%);
  box-shadow:
    inset 0 0 100px rgba(0,0,0,0.5),
    0 10px 35px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
}

#blog-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0.75));
  backdrop-filter: blur(4px);
}

#blog-preview .inner {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #f0f4f0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* --- Kontakt --- */
#contact .form-wrap {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(10px);
  max-width: 540px;
  margin: 0 auto;
  box-shadow: 0 15px 30px rgba(0,0,0,0.25);
}

input, textarea {
  width: 100%;
  background: rgba(5,5,5,0.35);
  border: 1px solid rgba(129,199,132,0.18);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  color: #fff;
  font-family: inherit;
}

input:focus, textarea:focus {
  outline: none;
  border-color: rgba(76,175,80,1);
  box-shadow: 0 0 14px rgba(76,175,80,0.18);
  background: rgba(3,4,4,0.65);
}

textarea { min-height: 130px; resize: vertical; }

footer {
  background: rgba(2,3,3,0.8);
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(76,175,80,0.25);
  color: rgba(240,241,241,0.6);
}

footer a {
  color: #81C784;
  text-decoration: none;
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* --- Responsive --- */
@media (max-width: 980px) {
  #about { grid-template-columns: 1fr; }
  .hero-panel { padding: 2.5rem 1.4rem; }
  .topbar { border-radius: 18px; }
  .topbar nav { display: none; }
  section { width: 92vw; }
}

@media (max-width: 560px) {
  .hero-panel h1 { font-size: 1.8rem; }
  .hero-panel { padding: 2rem 1.1rem; }
  #contact .form-wrap { padding: 2rem 1.2rem; }
}

/* OS Dark Mode */
@media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(160deg, #0d0f10 0%, #0a0a0b 80%);
  }
}

/* --- Blog Navigation: Abstand-Fix --- */
#auto-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.8rem;
  margin: 3rem 0;
  text-align: center;
}

#auto-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ct-green);
  color: #fff;
  text-decoration: none;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 0 14px rgba(76,175,80,0.35);
  transition: background 0.25s, transform 0.25s;
}

#auto-nav a:hover {
  background: linear-gradient(90deg, #4CAF50, #43A047);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(76,175,80,0.55);
}

@media (max-width: 600px) {
  #auto-nav {
    flex-direction: column;
    gap: 1rem;
  }
}
