:root {
  --primary-color: #0a0f16;
  --secondary-color: #121922;
  --accent-color: #e6b872;
  --accent-dark: #c59b58;
  --bg-color: #06090d;
  --card-bg: rgba(255, 255, 255, 0.03);
  --text-color: #e2e8f0;
  --text-muted: #94a3b8;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glass-bg: rgba(18, 25, 34, 0.7);
  --glass-border: rgba(230, 184, 114, 0.1);
}

[data-theme="light"] {
  --primary-color: #ffffff;
  --secondary-color: #f9fafb;
  --bg-color: #ffffff;
  --card-bg: #ffffff;
  --text-color: #1f2937;
  --text-muted: #6b7280;
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .service-card {
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.04);
}
[data-theme="light"] .contact-section, [data-theme="light"] .modal-content {
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
[data-theme="light"] .top-bar {
  background: var(--secondary-color);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--text-color);
  font-weight: 600;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeInUp 0.8s ease-out forwards; }

/* Top Bar */
.top-bar {
  background: var(--secondary-color);
  padding: 0.5rem 5%;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
}
.top-bar a { color: var(--text-muted); text-decoration: none; transition: var(--transition); margin-right: 1rem; }
.top-bar a:hover { color: var(--accent-color); }
.top-bar .social-icons a { margin-left: 1rem; margin-right: 0; font-size: 1rem; }

/* Header */
header {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
  min-height: 80px;
}
.logo-wrapper {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.logo {
  color: var(--accent-color);
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  font-family: 'Playfair Display', serif;
  display: flex;
  align-items: center;
  z-index: 101; /* Above mobile menu */
  line-height: 1;
}
.logo img {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

nav ul { list-style: none; display: flex; gap: 2rem; align-items: center;}
nav a { color: var(--text-color); text-decoration: none; font-size: 0.95rem; transition: var(--transition); font-weight: 500; }
nav a:hover { color: var(--accent-color); }

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--accent-color);
    cursor: pointer;
    z-index: 101;
}
.mobile-only { display: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
  color: #000;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px rgba(230, 184, 114, 0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 184, 114, 0.4);
}

/* Hero Section */
.hero {
  padding: 8rem 5%;
  text-align: center;
  background: radial-gradient(circle at center, var(--secondary-color) 0%, var(--bg-color) 100%);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg opacity="0.03" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50 0 L100 50 L50 100 L0 50 Z" fill="%23e6b872"/></svg>') repeat;
  background-size: 100px;
  z-index: 0;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: 3.5rem; margin-bottom: 1.5rem; line-height: 1.2; }
.hero h1 span { color: var(--accent-color); }
.hero p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 2.5rem; }

/* Sections */
section { 
    padding: 6rem 5%; 
    border-bottom: 1px solid var(--glass-border);
}
section:last-of-type {
    border-bottom: none;
}
.section-title { font-size: 2.5rem; margin-bottom: 0.5rem; text-align: center; }
.section-subtitle { color: var(--accent-color); font-size: 1.1rem; margin-bottom: 4rem; text-align: center; font-weight: 500; text-transform: uppercase; letter-spacing: 2px; }

/* Advantages Grid */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 3rem;
}
.advantage-item { text-align: center; }
.adv-number {
  font-size: 2.5rem; color: var(--accent-color); margin-bottom: 0.5rem; font-family: 'Playfair Display', serif; font-weight: bold;
}
.adv-text {
  color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px;
}

@media (max-width: 900px) {
  .advantages-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .advantages-grid { grid-template-columns: 1fr; }
}

/* Services Grid */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}
.service-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(230,184,114,0.1) 0%, transparent 100%);
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover { transform: translateY(-5px); border-color: rgba(230, 184, 114, 0.4); }
.service-card:hover::before { opacity: 1; }
.service-icon {
  width: 60px; height: 60px;
  background: rgba(230, 184, 114, 0.1);
  color: var(--accent-color);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}
.service-title { font-size: 1.4rem; margin-bottom: 1rem; position: relative; z-index: 1; }
.service-desc { color: var(--text-muted); font-size: 0.95rem; position: relative; z-index: 1; margin-bottom: 1.5rem; }
.service-link { color: var(--accent-color); font-weight: 500; display: inline-flex; align-items: center; gap: 0.5rem; }

/* Features / Warum wir */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.feature-item { text-align: center; padding: 2rem; }
.feature-icon { font-size: 2.5rem; color: var(--accent-color); margin-bottom: 1rem; }
.feature-item h3 { margin-bottom: 1rem; }
.feature-item p { color: var(--text-muted); }

/* Work Items */
.work-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

/* Base sizing for 5+ items (3 columns) */
.service-card {
  flex: 0 0 calc(33.333% - 2rem);
  max-width: calc(33.333% - 2rem);
  min-width: 320px;
}
.work-item {
  flex: 0 0 calc(33.333% - 1.5rem);
  max-width: calc(33.333% - 1.5rem);
  min-width: 300px;
  cursor: pointer;
}
.work-img-wrapper {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  height: 300px;
}

/* Exactly 4 items or fewer: 4 columns */
.services-grid:not(:has(> :nth-child(5))) > .service-card {
  flex: 0 0 calc(25% - 2rem);
  max-width: calc(25% - 2rem);
}
.work-grid:not(:has(> :nth-child(5))) > .work-item {
  flex: 0 0 calc(25% - 1.5rem);
  max-width: calc(25% - 1.5rem);
}

@media (max-width: 1024px) {
  .service-card, .services-grid:not(:has(> :nth-child(5))) > .service-card {
    flex: 0 0 calc(50% - 2rem);
    max-width: calc(50% - 2rem);
  }
  .work-item, .work-grid:not(:has(> :nth-child(5))) > .work-item {
    flex: 0 0 calc(50% - 1.5rem);
    max-width: calc(50% - 1.5rem);
  }
}
@media (max-width: 768px) {
  .service-card, .services-grid:not(:has(> :nth-child(5))) > .service-card {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .work-item, .work-grid:not(:has(> :nth-child(5))) > .work-item {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
.work-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.work-item:hover img { transform: scale(1.1); }
.work-content {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 22, 0.8);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  opacity: 0;
  transition: var(--transition);
  text-align: center;
  padding: 2rem;
}
.work-item:hover .work-content { opacity: 1; }
.work-content h3 { color: var(--accent-color); margin-bottom: 0.5rem; }
.work-external-title {
  text-align: center;
  color: var(--accent-color);
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 1rem;
}

/* Contact Section */
.contact-section {
  background: var(--secondary-color);
  border-radius: 20px;
  margin: 5rem 5%;
  padding: 4rem;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  border: 1px solid var(--glass-border);
}
.contact-info h2 { margin-bottom: 2rem; }
.contact-item {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem;
}
.contact-icon {
  width: 50px; height: 50px;
  background: rgba(230, 184, 114, 0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-color); font-size: 1.2rem;
}
.contact-form {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--accent-color); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 1px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 1rem;
  color: var(--text-color);
  font-family: inherit;
  transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--accent-color); background: rgba(0,0,0,0.4); }

/* Modals */
.modal {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
  padding: 1rem;
}
.modal.active { display: flex; animation: fadeInUp 0.3s ease-out; }
.modal-content {
  background: var(--secondary-color);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  width: 100%; max-width: 600px;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.5rem; cursor: pointer; transition: var(--transition);
}
.modal-close:hover { color: var(--text-color); }
.modal-body h3 { color: var(--accent-color); font-size: 2rem; margin-bottom: 1rem; }
.modal-body p { margin-bottom: 1.5rem; font-size: 1.1rem; line-height: 1.8; color: var(--text-color); }
.modal-image { width: 100%; border-radius: 12px; margin-bottom: 1.5rem; max-height: 50vh; object-fit: contain; }

/* Floating Action Buttons */
.fab-container { position: fixed; bottom: 2rem; right: 2rem; display: flex; flex-direction: column; gap: 1rem; z-index: 99; }
.fab {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.8rem;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: var(--transition);
}
.fab-whatsapp { background: #25D366; }
.fab-email { background: var(--accent-color); color: #000; }
.fab:hover { transform: scale(1.1); }

/* Footer */
footer {
  background: var(--secondary-color); border-top: 1px solid var(--glass-border);
  padding: 4rem 5%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.footer-col h4 { margin-bottom: 1.5rem; color: var(--text-color); font-size: 1.2rem; }
.footer-col p { color: var(--text-muted); margin-bottom: 0.8rem; font-size: 0.95rem; }
.footer-col a { color: var(--text-muted); text-decoration: none; transition: var(--transition); line-height: 1.8; }
.footer-col a:hover { color: var(--accent-color); }
.brand-col .logo { margin-bottom: 1rem; display: inline-block; font-size: 1.5rem; }
.brand-text { margin-top: 1rem; font-size: 0.9rem !important; line-height: 1.6; }

.footer-bottom {
    background: var(--bg-color);
    padding: 1.5rem 5%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--glass-border);
}

.legal-content {
  max-width: 800px; margin: 0 auto; padding: 4rem 5%; background: var(--secondary-color); border-radius: 12px; margin-top: 2rem; margin-bottom: 2rem; border: 1px solid var(--glass-border);
}
.legal-content h1 { color: var(--accent-color); margin-bottom: 2rem; }
.legal-content h2 { margin-top: 2rem; margin-bottom: 1rem; font-size: 1.5rem; }
.legal-content p { margin-bottom: 1rem; color: var(--text-muted); }

/* Responsive / Mobile */
@media (max-width: 900px) {
  .contact-section { grid-template-columns: 1fr; padding: 2rem; }
  .top-bar { flex-direction: column; align-items: center; gap: 0.5rem; text-align: center;}
  .top-bar .social-icons a { margin: 0 0.5rem; }
  .hero h1 { font-size: 2.5rem; }
  
  header { justify-content: center; position: relative; }
  .menu-toggle { display: block; position: absolute; right: 5%; }
  .desktop-only { display: none; }
  .mobile-only { display: block; margin-top: 1rem; }
  
  nav#main-nav {
      position: fixed;
      top: 70px;
      left: 0;
      width: 100%;
      background: var(--secondary-color);
      border-bottom: 1px solid var(--glass-border);
      padding: 2rem;
      transform: translateY(-150%);
      transition: transform 0.4s ease-in-out;
      z-index: 100;
  }
  nav#main-nav.active {
      transform: translateY(0);
      box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  }
  nav ul {
      flex-direction: column;
      gap: 1.5rem;
      align-items: center;
  }
  nav a { font-size: 1.2rem; }
}
/* Social Icons Beautiful Style */
.social-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 0.2rem;
}

.social-icons a:hover {
    color: #fff;
    transform: translateY(-3px) scale(1.1);
    text-shadow: 0 0 10px rgba(230, 184, 114, 0.6);
}
