/* Kontaktformular Popup */
.form-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10,36,99,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: background 0.3s;
}

.form-popup-content {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem 2rem 2rem;
  min-width: 320px;
  max-width: 90vw;
  position: relative;
  text-align: center;
  animation: popup-fade-in 0.4s cubic-bezier(0.4,0,0.2,1);
}

.form-popup-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  font-size: 1.7rem;
  color: var(--color-primary);
  cursor: pointer;
  font-weight: 700;
  background: none;
  border: none;
  outline: none;
  transition: color 0.2s;
  z-index: 2;
}
.form-popup-close:hover, .form-popup-close:focus {
  color: var(--color-accent);
}

.form-popup-message h4 {
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.form-popup-message p {
  color: var(--color-text-light);
  font-size: 1.1rem;
}

@keyframes popup-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

body.popup-open {
  overflow: hidden;
}
:root {
  --color-primary: #0a2463;
  --color-primary-light: #1e4fa8;
  --color-accent: #d4af37;
  --color-accent-dark: #b8941f;
  --color-dark: #0f1419;
  --color-text: #1a1a1a;
  --color-text-light: #666;
  --color-bg: #ffffff;
  --color-bg-light: #f8f9fa;
  --color-bg-dark: #0a0e14;
  
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, sans-serif;
  
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding:0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navigation */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.main-nav.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

/* Hide nav when scrolling down, show on scroll up */
.main-nav.hidden {
  transform: translateY(-100%);
  pointer-events: none;
  will-change: transform;
}

/* Utility: offset content below fixed nav */
.page-offset {
  margin-top: 100px;
}

@media (max-width: 1024px) {
  .page-offset { margin-top: 80px; }
}

@media (max-width: 768px) {
  .page-offset { margin-top: 70px; }
}

@media (max-width: 600px) {
  .page-offset { margin-top: 75px; }
}

@media (max-width: 480px) {
  .page-offset { margin-top: 80px; }
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: -0.5px;
  text-decoration: none;
}

.logo-img {
  height: 50px;
  width: 50px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.8rem;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-text .baro {
  font-weight: 900;
  color: var(--color-primary);
}

.logo-text .fliesenleger {
  font-weight: 800;
  color: #000000;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  position: relative;
  transition: var(--transition);
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 38vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a2463 0%, #1e4fa8 50%, #0f3a7d 100%);
  background-attachment: fixed;
  color: white;
  overflow: hidden;
  padding-top: 40px;
  margin-top: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(30, 79, 168, 0.2) 0%, transparent 50%);
  animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeInUp 1s ease-out;
}

@media (max-width: 768px) {
  .hero-content {
    padding: 1.5rem 1rem;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .nav-container {
    padding: 0.8rem 1rem;
  }
  
  .hero {
    padding-top: 40px;
    margin-top: 0;
  }
  
  .page-header {
    margin-top: 100px;
    padding: 4rem 1.5rem;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -2px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-text p {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin-bottom: 3rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 300;
  letter-spacing: 0.5px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-social {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.social-link:hover {
  background: rgba(255,255,255,0.35);
  box-shadow: 0 4px 16px rgba(212,175,55,0.15);
}
.social-link svg {
  width: 48px;
  height: 48px;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 50px;
  transition: var(--transition);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.btn-large {
  padding: 1.25rem 3rem;
  font-size: 1.1rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-indicator span {
  display: block;
  width: 2px;
  height: 40px;
  background: rgba(255, 255, 255, 0.5);
  animation: scrollAnimation 2s infinite;
}

@keyframes scrollAnimation {
  0%, 100% { 
    opacity: 0.3;
    height: 40px;
  }
  50% { 
    opacity: 1;
    height: 60px;
  }
}

/* Section Styling */
section {
  padding: 6rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  text-align: center;
  padding: 6rem 2rem;
  margin-top: 80px;
}

.page-header-content {
  max-width: 1000px;
  margin: 0 auto;
}

.page-header .section-label {
  color: var(--color-accent);
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* Scroll-to-top button */
.scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 1200;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-top:focus {
  outline: 3px solid rgba(212, 175, 55, 0.25);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top, .scroll-top.visible { transition: none; }
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.page-header p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.section-description {
  font-size: 1.15rem;
  color: var(--color-text-light);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Services Grid */
.services {
  background: var(--color-bg-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.service-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: var(--delay);
}

.service-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.service-image {
  position: relative;
  height: 280px;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.service-card:hover .service-image img {
  transform: scale(1.08);
}

.service-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 36, 99, 0.7) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.service-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1;
}

.service-content {
  padding: 2rem;
}

.service-content h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.service-content p {
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.service-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.service-link:hover {
  color: var(--color-accent-dark);
  transform: translateX(5px);
}

/* Why Choose Section */
.why-choose {
  background: var(--color-primary);
  color: white;
  position: relative;
  overflow: hidden;
}

.why-choose::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.why-choose-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.why-choose-content .section-label {
  color: var(--color-accent);
}

.why-choose-content h2 {
  color: white;
  margin-bottom: 2.5rem;
}

.features {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.feature-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  opacity: 0;
  transform: translateX(-20px);
}

.feature-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateX(5px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  color: var(--color-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.feature-item h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.feature-item p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.why-choose-visual {
  position: relative;
  height: 500px;
}

.visual-card {
  position: absolute;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.visual-card-1 {
  width: 300px;
  height: 350px;
  top: 0;
  left: 0;
  animation: float 6s ease-in-out infinite;
}

.visual-card-2 {
  width: 250px;
  height: 300px;
  bottom: 0;
  right: 0;
  animation: float 6s ease-in-out infinite 3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
  text-align: center;
  padding: 8rem 2rem;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 50%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  font-weight: 700;
  color: white;
}

.cta-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Footer */
footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 2rem 2rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--color-accent);
}

.footer-social {
  display: flex;
  gap: 1.2rem;
  margin-top: 0.7rem;
}
.footer-social .social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.footer-social .social-link:hover {
  background: rgba(255,255,255,0.35);
  box-shadow: 0 4px 16px rgba(212,175,55,0.15);
}
.footer-social .social-link svg {
  width: 28px;
  height: 28px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .why-choose-container {
    grid-template-columns: 1fr;
  }
  
  .why-choose-visual {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    gap: 0;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-links a {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .nav-links a:last-child {
    border-bottom: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .hero-text h1 {
    font-size: 3rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  .hero-social {
    gap: 1.5rem;
    margin-top: 2rem;
  }
  .social-link {
    width: 56px;
    height: 56px;
  }
  .social-link svg {
    width: 40px;
    height: 40px;
  }
  .btn-primary,
  .btn-secondary {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  section {
    padding: 4rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
  .hero-social {
    gap: 1.2rem;
    margin-top: 1.2rem;
  }
  .social-link {
    width: 48px;
    height: 48px;
  }
  .social-link svg {
    width: 32px;
    height: 32px;
  }
}

/* Extra small / phone tweaks */
@media (max-width: 600px) {
  /* avoid fixed background on mobile for performance */
  .hero {
    background-attachment: scroll;
    min-height: 48vh;
    padding: 3rem 1rem;
  }

  .hero-content {
    padding: 1.5rem;
  }

  /* make service images shorter and keep aspect */
  .service-image {
    height: 200px;
  }

  .service-detail-image {
    height: 220px;
  }

  /* reduce CTA and footer spacing */
  .cta-section {
    padding: 2rem 1rem;
    margin-top: 1rem;
  }

  .cta-content h2 {
    font-size: 1.75rem;
  }

  .cta-content p {
    font-size: 1rem;
  }

  footer {
    padding: 2rem 1rem 1rem;
  }

  .footer-content {
    gap: 1.5rem;
  }

  /* tighten hero text spacing */
  .hero-text h1 {
    margin-bottom: 1rem;
  }

  .hero-text p {
    margin-bottom: 1.5rem;
  }
}
