/* ==========================================================================
   Reset / base
   ========================================================================== */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Sofia Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Arial, sans-serif;
  color: #1a1a1a;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Layout: sidebar + content
   ========================================================================== */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  flex: 0 0 220px;
  width: 220px;
  padding: 48px 32px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.logo {
  font-size: 19px;
  letter-spacing: 0.03em;
  margin-bottom: 40px;
}

.logo a {
  display: block;
}

.logo-first,
.logo-last {
  display: block;
  line-height: 1;
}

.logo-first {
  font-weight: 400;
}

.logo-last {
  margin-top: 3px;
  font-weight: 800;
}

.logo-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a3a3a3;
  margin-top: 6px;
}

.nav-group {
  margin-bottom: 24px;
}

.nav-group--contact {
  margin-top: 12px;
}

.nav-group ul li {
  margin-bottom: 10px;
}

.nav-group ul li a {
  font-size: 15px;
  text-transform: uppercase;
  color: #6b6b6b;
  transition: color 0.15s ease;
}

.nav-group ul li a:hover,
.nav-group ul li a.active {
  color: #1a1a1a;
}

.content {
  flex: 1;
  min-width: 0;
  margin-left: 220px;
}

/* ==========================================================================
   Homepage — category sections
   ========================================================================== */
.home-sections {
  display: flex;
  flex-direction: column;
}

.category-section {
  padding: 10px 48px;
}

.rotator-row {
  display: block;
}

.rotator-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 2.1 / 1;
  overflow: hidden;
  background: #f4f4f4;
}

.rotator-slot a {
  display: block;
  width: 100%;
  height: 100%;
}

.rotator-slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms ease;
  z-index: 1;
}

.rotator-slot img.is-active {
  opacity: 1;
}

.rotator-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.22) 22%,
    rgba(0, 0, 0, 0) 45%
  );
}

.rotator-caption {
  position: absolute;
  left: 28px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rotator-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.rotator-title {
  color: #ffffff;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Category page — gallery
   ========================================================================== */
.gallery-header {
  padding: 48px 48px 24px;
}

.gallery-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a3a3a3;
  margin-bottom: 4px;
}

.gallery-title {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #1a1a1a;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 0 48px 48px;
}

.gallery-item {
  cursor: zoom-in;
  background: #f4f4f4;
  overflow: hidden;
  /* aspect-ratio is derived automatically from the width/height HTML
     attributes on the <img> when height:auto is set (modern browsers).
     overflow:hidden keeps the placeholder background visible while
     the image loads, preventing any layout shift. */
}

.gallery-item img {
  width: 100%;
  height: auto;
  /* width+height HTML attrs + height:auto = browser reserves exact space */
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: #121212;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
  touch-action: none;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 0.04em;
  font-family: inherit;
}

.lightbox-close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  top: 28px;
  right: 40px;
  z-index: 10;
}

.lightbox-prev,
.lightbox-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev svg,
.lightbox-next svg {
  width: 28px;
  height: 28px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #a3a3a3;
}

.lightbox-counter {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #a3a3a3;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Kontakt
   ========================================================================== */
.contact-page {
  display: flex;
  align-items: flex-start;
  gap: 64px;
  padding: 48px;
}

.contact-photo {
  flex: 0 0 320px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f4f4f4;
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-text {
  flex: 1;
  max-width: 560px;
  padding-top: 8px;
}

.contact-title {
  margin: 0 0 24px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #1a1a1a;
}

.contact-text p {
  margin: 0 0 20px;
  color: #6b6b6b;
  font-size: 16px;
  line-height: 1.6;
}

.contact-link {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.contact-link:hover {
  color: #6b6b6b;
}

.contact-email {
  display: inline-block;
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-email:hover {
  color: #6b6b6b;
  border-color: #6b6b6b;
}

/* ==========================================================================
   Cookie banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 900;
  width: calc(100% - 48px);
  max-width: 340px;
  background: #ffffff;
  border: 1px solid #efefef;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 20px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-banner.is-hiding {
  opacity: 0;
  transform: translateY(16px);
}

.cookie-banner-text {
  font-size: 13px;
  color: #6b6b6b;
  line-height: 1.6;
  margin: 0 0 16px;
}

.cookie-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cookie-btn {
  display: block;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 16px;
  border-radius: 2px;
  transition: opacity 0.15s ease;
}

.cookie-btn:hover {
  opacity: 0.75;
}

.cookie-btn--accept {
  background: #1a1a1a;
  color: #ffffff;
  border: 1px solid #1a1a1a;
}

.cookie-btn--decline {
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid #d9d9d9;
}

/* ==========================================================================
   Mobile nav toggle
   ========================================================================== */
/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  text-align: center;
  font-size: 12px;
  color: #a3a3a3;
  letter-spacing: 0.04em;
  padding: 20px 24px;
}

.mobile-topbar {
  display: none;
}

/* ==========================================================================
   Microanimations
   ========================================================================== */

/* Nav underline: base state (always rendered, motion guard on transition) */
.nav-group ul li a {
  position: relative;
}

.nav-group ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
}

/* Active page always shows the underline, regardless of motion preference */
.nav-group ul li a.active::after {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: no-preference) {
  /* Nav underline slide-in on hover */
  .nav-group ul li a::after {
    transition: transform 0.2s ease;
  }

  .nav-group ul li a:hover::after {
    transform: scaleX(1);
  }

  /* Gallery thumbnail hover lift */
  .gallery-item img {
    transition: transform 0.3s ease;
  }

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

  /* Scroll-reveal: JS adds .reveal; IntersectionObserver adds .is-visible */
  .gallery-item.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s ease, transform 0.45s ease;
  }

  .gallery-item.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Rotator section hover zoom — overrides the opacity-only transition */
  .rotator-slot img {
    transition: opacity 900ms ease, transform 400ms ease;
  }

  .rotator-slot:hover img.is-active {
    transform: scale(1.04);
  }

  /* Lightbox fade-in */
  @keyframes lightboxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }

  .lightbox.is-open {
    animation: lightboxFadeIn 200ms ease;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: static;
    height: auto;
    width: 100%;
    flex: none;
    padding: 24px 24px 0;
    display: none;
  }

  .content {
    margin-left: 0;
  }

  .sidebar.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 800;
    overflow-y: auto;
    background: #ffffff;
    flex-direction: column;
    justify-content: center;
    padding: 48px 24px;
  }

  .sidebar.is-open .nav-group ul li a {
    font-size: 20px;
  }

  .sidebar.is-open .nav-group ul li {
    margin-bottom: 24px;
  }

  .sidebar.is-open .nav-group ul li:last-child {
    margin-bottom: 0;
  }

  .sidebar .logo {
    display: none;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 900;
    background: #ffffff;
  }

  .mobile-topbar .logo {
    margin: 0;
    font-size: 17px;
    display: flex;
    flex-direction: column;
  }

  .mobile-topbar .logo-tag {
    margin-top: 2px;
  }

  .mobile-menu-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
  }

  .mobile-menu-btn .icon-close {
    display: none;
  }

  .mobile-menu-btn.is-open .icon-hamburger {
    display: none;
  }

  .mobile-menu-btn.is-open .icon-close {
    display: block;
  }

  .category-section {
    padding: 8px 24px;
  }

  .rotator-slot {
    aspect-ratio: 4 / 4.3;
  }

  .rotator-caption {
    left: 18px;
    bottom: 16px;
  }

  .rotator-title {
    font-size: 22px;
  }

  .gallery-header {
    padding: 28px 24px 16px;
  }

  .gallery-title {
    font-size: 22px;
  }

  .gallery {
    padding: 0 24px 32px;
    gap: 16px;
  }

  .lightbox {
    padding: 0;
  }

  .lightbox-close {
    width: 48px;
    height: 48px;
    top: 8px;
    right: 8px;
    justify-content: center;
    font-size: 20px;
  }

  .cookie-banner {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
    max-width: none;
  }

  .lightbox-close-text {
    display: none;
  }

  .lightbox-bottom-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
  }

  .lightbox-prev,
  .lightbox-next {
    position: static;
    transform: none;
    width: 48px;
    height: 48px;
  }

  .lightbox-prev svg,
  .lightbox-next svg {
    width: 24px;
    height: 24px;
  }

  .lightbox-counter {
    position: static;
    transform: none;
  }

  .contact-page {
    flex-direction: column;
    padding: 28px 24px;
    gap: 28px;
  }

  .contact-photo {
    flex: none;
    width: 100%;
  }

  .contact-title {
    font-size: 22px;
  }
}
