/* ==========================================================================
   ZoomKlick - Custom Styles
   ========================================================================== */

/* CSS Custom Properties (Variables) */
:root {
  --color-primary: #4d815d;
  --color-primary-light: #5d9a6e;
  --color-primary-dark: #3a6247;
  --color-background: #000;
  --color-background-alt: #111;
  --color-text: #fff;
  --color-text-muted: #b3b3b3;
  --color-icon-muted: rgba(255, 255, 255, 0.8);
  --font-body: "Roboto", sans-serif;
  --font-heading: "Raleway", sans-serif;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-weight: 300;
  background-color: var(--color-background);
  color: var(--color-text);
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 1px;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(0, 0, 0, 0.8);
}

.navbar .nav-link {
  color: var(--color-text);
}

.navbar .nav-link:hover {
  color: var(--color-primary);
}

.navbar-brand img {
  height: 40px;
  width: auto;
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  background: url("../images/background_v2.JPG") center/cover no-repeat fixed;
  height: 100vh;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* WebP background for browsers that support it */
.webp .hero {
  background-image: url("../images/background_v2.webp");
}

/* Dark overlay */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

/* Disable parallax on mobile for performance */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
  }
}

.hero h1,
.hero p {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.5rem;
  font-weight: 400;
}

/* Typewriter effect */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--color-primary);
  white-space: nowrap;
  animation: blink-caret 0.75s step-end infinite;
  display: inline-block;
}

.typewriter.done {
  border-right-color: transparent;
  animation: none;
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--color-primary); }
}

/* Hero content needs higher z-index than overlays */
.hero .container {
  position: relative;
  z-index: 2;
}

/* Hero CTA Button */
.hero .btn-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text);
  background-color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: 50px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 3;
}

.hero .btn-cta:hover {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
  transform: translateY(-2px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  animation: bounce 2s infinite;
}

.scroll-indicator a {
  color: var(--color-text);
  font-size: 2rem;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.scroll-indicator a:hover {
  opacity: 1;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */

section {
  padding: 80px 0;
}

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

/* ==========================================================================
   Services / Leistungen
   ========================================================================== */

.leistung-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 15px;
  color: var(--color-primary);
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Service Cards */
.service-card {
  padding: 2rem 1.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: transparent;
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-5px);
}

.service-card:hover .leistung-icon {
  transform: scale(1.1);
  color: var(--color-primary-light);
}

.service-card h5 {
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ==========================================================================
   About / Ueber
   ========================================================================== */

.ueber-img {
  object-fit: cover;
  object-position: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: var(--color-background-alt);
  color: var(--color-text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-main {
  padding: 3rem 0;
}

.footer-logo img {
  height: 50px;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 250px;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--color-primary-light);
}

.footer-contact p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer-contact a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: var(--color-primary-light);
}

.footer-contact i {
  color: var(--color-primary);
  margin-right: 0.5rem;
  width: 1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.85rem;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--color-primary);
  color: var(--color-text);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--color-primary-light);
  transform: translateY(-3px);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-backdrop.show {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 1.5rem 2rem;
  border-bottom: none;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.modal-body {
  padding: 2rem;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-body h5 {
  color: var(--color-primary-light);
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.modal-body h5:first-child {
  margin-top: 0;
}

.modal-body p {
  color: var(--color-text-muted);
  line-height: 1.7;
}

.modal-body ul {
  color: var(--color-text-muted);
  padding-left: 1.25rem;
}

.modal-body li {
  margin-bottom: 0.25rem;
}

.modal-body a {
  color: var(--color-primary-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.modal-body a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

/* Modal animation */
.modal.fade .modal-dialog {
  transform: scale(0.9) translateY(-20px);
  transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

/* ==========================================================================
   Language Switcher
   ========================================================================== */

.language-switcher {
  display: flex;
  align-items: center;
  gap: 0;
}

.language-switcher .lang-btn {
  position: relative;
  opacity: 0.4;
  font-size: 1.5rem;
  transition: opacity 0.3s;
  background: none;
  border: none;
  cursor: pointer;
}

.lang-btn-left {
  padding: 0 1rem 0 0;
}

.lang-btn-right {
  padding: 0 0 0 1rem;
}

.language-switcher .divider {
  width: 1px;
  height: 1.5em;
  background-color: var(--color-icon-muted);
}

.language-switcher .lang-btn.active {
  opacity: 1;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.inline-logo {
  height: 1.2em;
  vertical-align: middle;
}

.header-logo {
  height: 1.5em;
}

.icon-muted {
  color: var(--color-icon-muted);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: var(--color-text);
  padding: 8px 16px;
  z-index: 9999;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1.2rem;
  }
  .hero .btn-cta {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays for children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   3D Tilt Gallery Effect
   ========================================================================== */

.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.tilt-card img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
}

.tilt-card:hover img {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.tilt-card .tilt-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0) 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tilt-card:hover .tilt-shine {
  opacity: 1;
}
