/* ============================================
   Franka Fotografin — Custom Styles
   ============================================ */

:root {
  /* Farbpalette */
  --color-dark: #1A1A1A;
  --color-dark-secondary: #2D2D2D;
  --color-cream: #FAF5F0;
  --color-cream-dark: #F0E8DF;
  --color-cream-light: #FFFDF9;
  --color-text-dark: #1A1A1A;
  --color-text-light: #FAF5F0;
  --color-text-muted: #5A534F;
  --color-accent: #C8A882;

  /* Typografie */
  --font-heading: 'Cormorant', serif;
  --font-body: 'Montserrat', sans-serif;
}

/* Skip Navigation Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-dark);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 100;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-dark);
  outline-offset: 2px;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Global Focus States */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Form Focus States */
input:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 1px var(--color-accent);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: 4px;
}

/* Navigation Scroll-Effekt */
.nav-scrolled {
  background-color: rgba(26, 26, 26, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu Open State */
.mobile-menu-open #mobile-menu {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 60 !important;
}

/* Hamburger → X Animation */
.mobile-menu-open #menu-toggle .menu-line:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}

.mobile-menu-open #menu-toggle .menu-line:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}

.mobile-menu-open #menu-toggle .menu-line:nth-child(3) {
  transform: translateY(-4.5px) rotate(-45deg);
}

/* Mobile Nav Link Stagger Animation */
.mobile-menu-open .mobile-nav-link {
  animation: fadeSlideIn 0.4s ease forwards;
  opacity: 0;
}

.mobile-menu-open li:nth-child(1) .mobile-nav-link { animation-delay: 0.1s; }
.mobile-menu-open li:nth-child(2) .mobile-nav-link { animation-delay: 0.15s; }
.mobile-menu-open li:nth-child(3) .mobile-nav-link { animation-delay: 0.2s; }
.mobile-menu-open li:nth-child(4) .mobile-nav-link { animation-delay: 0.25s; }
.mobile-menu-open li:nth-child(5) .mobile-nav-link { animation-delay: 0.3s; }

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slogan Line-Height */
.slogan-leading {
  line-height: 0.85 !important;
}

/* Collage Grid */
.collage-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto;
  gap: 6px;
}
.collage-1  { grid-column: 1 / 4;   grid-row: 1; }
.collage-2  { grid-column: 4 / 8;   grid-row: 1; }
.collage-3  { grid-column: 8 / 11;  grid-row: 1; }
.collage-4  { grid-column: 11 / 13; grid-row: 1 / 3; }
.collage-5  { grid-column: 1 / 3;   grid-row: 2 / 4; }
.collage-6  { grid-column: 3 / 6;   grid-row: 2; }
.collage-7  { grid-column: 6 / 9;   grid-row: 2; }
.collage-8  { grid-column: 9 / 11;  grid-row: 2; }
.collage-9  { grid-column: 3 / 7;   grid-row: 3; }
.collage-10 { grid-column: 7 / 13;  grid-row: 3; }

.collage-grid .gallery-item img {
  height: 180px;
}
.collage-4 img,
.collage-5 img {
  height: 366px !important;
}

@media (max-width: 640px) {
  .collage-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .collage-1  { grid-column: 1 / 3; grid-row: auto; }
  .collage-2  { grid-column: 3 / 5; grid-row: auto; }
  .collage-3  { grid-column: 1 / 3; grid-row: auto; }
  .collage-4  { grid-column: 3 / 5; grid-row: auto; }
  .collage-5  { grid-column: 1 / 3; grid-row: auto; }
  .collage-6  { grid-column: 3 / 5; grid-row: auto; }
  .collage-7  { grid-column: 1 / 3; grid-row: auto; }
  .collage-8  { grid-column: 3 / 5; grid-row: auto; }
  .collage-9  { grid-column: 1 / 3; grid-row: auto; }
  .collage-10 { grid-column: 3 / 5; grid-row: auto; }
  .collage-grid .gallery-item img {
    height: 120px;
  }
  .collage-4 img,
  .collage-5 img {
    height: 120px !important;
  }
}

/* Flip Card */
.flip-card {
  perspective: 1000px;
}
.flip-card-inner {
  position: relative;
  transition: transform 0.7s ease;
  transform-style: preserve-3d;
}
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  overflow: hidden;
}
.flip-card-front {
  z-index: 2;
}
.flip-card-back {
  transform: rotateY(180deg);
  border: 1px solid rgba(200, 168, 130, 0.2);
}

/* Hero Overlay */
.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 26, 0.4) 0%,
    rgba(26, 26, 26, 0.2) 50%,
    rgba(26, 26, 26, 0.6) 100%
  );
}

/* Scroll-Indikator Animation */
@keyframes bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.scroll-indicator {
  animation: bounce-slow 2s ease-in-out infinite;
}

/* Fade-In Animation für Sektionen */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* Lightbox */
.lightbox {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

/* FAQ Akkordeon */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-answer.open {
  max-height: 500px;
}

/* FAQ Icon rotation when open */
.faq-toggle[aria-expanded="true"] .faq-icon span:last-child {
  transform: translate(-50%, -50%) rotate(0deg) !important;
}

.faq-toggle[aria-expanded="false"] .faq-icon span:last-child {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* Testimonial Mehr lesen */
.testimonial-text {
  max-height: 205px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
}

.testimonial-text.overflows::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, #FAF5F0);
  transition: opacity 0.3s ease;
}

.testimonial-text.expanded {
  max-height: 1000px;
}

.testimonial-text.overflows.expanded::after {
  opacity: 0;
}

/* Hover-Effekte für Galerie */
.gallery-item img {
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}


/* reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-indicator {
    animation: none;
  }

  .gallery-item img,
  .category-card img {
    transition: none;
  }

  .lightbox {
    transition: none;
  }

  .faq-answer {
    transition: none;
  }
}

/* Parallax mobile fallback */
@media (max-width: 768px) {
  .bg-fixed {
    background-attachment: scroll;
  }
}

@supports (-webkit-touch-callout: none) {
  .bg-fixed {
    background-attachment: scroll;
  }
}
