/* ============================================
   macropics.de – Modern Redesign
   Elegant dark photography portfolio
   ============================================ */

:root {
  --bg: #121212;
  --bg-elevated: #1a1a1a;
  --bg-card: #222;
  --text: #f0f0f0;
  --text-muted: #a0a0a0;
  --accent: #c45c26;          /* warm orange-brown, nature feel */
  --accent-hover: #e07a3d;
  --border: #333;
  --radius: 8px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --header-h: 70px;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul { list-style: none; }

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}
.container.narrow { width: min(720px, 92%); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 18, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo {
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}
.logo span { color: var(--accent); font-weight: 400; }

.main-nav ul {
  display: flex;
  gap: 0.15rem;
  align-items: center;
}
.main-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-radius: 4px;
}
.main-nav a:hover,
.main-nav a.active { color: var(--text); }
.main-nav a.active { color: var(--accent); }

.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all var(--transition);
  z-index: 50;
}
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  padding: 0.45rem 1rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: min(78vh, 720px);
  overflow: hidden;
}
.hero-slider { height: 100%; position: relative; }
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.slide.active { opacity: 1; z-index: 1; }
.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.4) 100%);
}
.slide-content {
  position: absolute;
  bottom: 18%;
  left: 8%;
  z-index: 2;
  max-width: 560px;
}
.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.slide-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.slide-content p { color: #ccc; font-size: 1.05rem; }

.hero-controls {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-controls button {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background var(--transition);
}
.hero-controls button:hover { background: rgba(255,255,255,0.25); }
.dots { display: flex; gap: 8px; }
.dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 0;
}
.dots button.active { background: var(--accent); width: 22px; border-radius: 4px; }

/* ---------- Sections ---------- */
.section { padding: 4.5rem 0; }
.section.dark { background: var(--bg-elevated); }
.section-header {
  text-align: center;
  margin-bottom: 2.75rem;
}
.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.section-header p { color: var(--text-muted); }
.section-header.light h2,
.section-header.light p { color: var(--text); }
.section-header.light p { opacity: 0.7; }

/* ---------- Category Grid ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.category-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.card-img {
  aspect-ratio: 4/3;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #111;
  flex-shrink: 0;
}
.card-body {
  padding: 1rem 1.1rem 1.2rem;
}
.card-body h3 {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}
.card-body span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Photo Grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.photo-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: #111;
  aspect-ratio: 1;
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}
.photo-item:hover img { transform: scale(1.05); }
.photo-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1rem 0.75rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.photo-item:hover figcaption { opacity: 1; }

/* ---------- About teaser ---------- */
.about-teaser {
  text-align: center;
}
.about-teaser h2 {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  margin-bottom: 1rem;
}
.about-teaser p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: background var(--transition);
}
.btn:hover { background: var(--accent-hover); }

/* ---------- Footer ---------- */
.site-footer {
  background: #0c0c0c;
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-grid .logo { display: block; margin-bottom: 0.6rem; }
.footer-grid p { color: var(--text-muted); max-width: 280px; }
.footer-grid h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}
.footer-grid ul li { margin-bottom: 0.35rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------- Lightbox (Slideshow + Thumbnails) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox[hidden] { display: none; }

.lightbox-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  z-index: 10;
  background: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent);
}
.lightbox-counter {
  font-size: 0.85rem;
  color: #bbb;
  letter-spacing: 0.04em;
  min-width: 4.5rem;
}
.lightbox-zoom-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  padding: 0.2rem 0.35rem;
}
.lightbox-zoom-controls button {
  background: transparent;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.lightbox-zoom-controls button:hover { background: rgba(255,255,255,0.15); }
.lightbox-zoom-level {
  font-size: 0.75rem;
  color: #ccc;
  min-width: 2.8rem;
  text-align: center;
  user-select: none;
}
.lightbox-close {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

.lightbox-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  min-height: 0;
  padding: 3.5rem 4rem 0.5rem;
}
.lightbox-stage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.lightbox-viewport {
  max-height: calc(100vh - 180px);
  max-width: min(92vw, 1100px);
  overflow: hidden;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  touch-action: none;
}
.lightbox-viewport.is-zoomed { cursor: grab; }
.lightbox-viewport.is-zoomed.is-panning { cursor: grabbing; }
.lightbox-viewport img {
  max-height: calc(100vh - 180px);
  max-width: min(92vw, 1100px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  transform-origin: center center;
  transition: opacity 0.2s ease;
  will-change: transform;
}
.lightbox-viewport.is-zoomed img {
  transition: none;
}
.lightbox-stage img.is-loading,
.lightbox-viewport img.is-loading { opacity: 0.4; }
.lightbox-caption {
  margin-top: 0.6rem;
  color: #ccc;
  font-size: 0.9rem;
  text-align: center;
  max-width: 90vw;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  z-index: 5;
  user-select: none;
}
.lightbox-nav:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-50%) scale(1.05);
}
.lightbox-nav.prev { left: 1rem; }
.lightbox-nav.next { right: 1rem; }
.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* Thumbnail strip */
.lightbox-thumbs {
  flex-shrink: 0;
  width: 100%;
  padding: 0.75rem 1rem 1rem;
  background: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.lightbox-thumbs-track {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 0.25rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.25) transparent;
  justify-content: safe center;
}
.lightbox-thumbs-track::-webkit-scrollbar { height: 4px; }
.lightbox-thumbs-track::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
}
.lightbox-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 54px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s, transform 0.15s;
  background: #222;
  padding: 0;
}
.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.lightbox-thumb:hover {
  opacity: 0.9;
  transform: scale(1.04);
}
.lightbox-thumb.active {
  opacity: 1;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

@media (max-width: 700px) {
  .lightbox-main { padding: 3.2rem 0.5rem 0.25rem; }
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
  .lightbox-nav.prev { left: 0.35rem; }
  .lightbox-nav.next { right: 0.35rem; }
  .lightbox-viewport,
  .lightbox-viewport img { max-height: calc(100vh - 160px); }
  .lightbox-thumb { width: 56px; height: 42px; }
  .lightbox-zoom-level { display: none; }
}

/* ---------- Gallery page ---------- */
.page-hero {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 500;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.breadcrumb a:hover { color: var(--accent); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
}
.filter-btn {
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Contact ---------- */
.contact-form {
  max-width: 520px;
  margin: 2rem auto 0;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ---------- Disclaimer / legal ---------- */
.legal-content {
  max-width: 720px;
  margin: 2rem auto;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.legal-content h2 {
  color: var(--text);
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  font-weight: 500;
}
.legal-content h3 {
  color: var(--text);
  font-size: 1.05rem;
  margin: 1.4rem 0 0.5rem;
}
.legal-content p { margin-bottom: 0.9rem; }
.legal-content ul { margin: 0.5rem 0 1rem 1.25rem; list-style: disc; }
.legal-content a { color: var(--accent); }

/* ---------- Responsive ---------- */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
img, video, svg {
  max-width: 100%;
  height: auto;
}
.photo-item img,
.card-img,
.lightbox-viewport img {
  max-width: 100%;
  height: auto;
}
.photo-item {
  max-width: 100%;
}

@media (max-width: 1280px) {
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    background: #121212;
    border-bottom: none;
    padding: 0.5rem 1rem 2rem;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .main-nav.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .main-nav > ul > li > a {
    padding: 0.9rem 0.5rem;
    font-size: 1.05rem;
    border-bottom: 1px solid #333;
    color: #f0f0f0;
  }
  .has-dropdown .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    background: transparent;
    padding: 0 0 0.25rem 1.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .has-dropdown.open .dropdown {
    max-height: 600px;
  }
  .dropdown a {
    padding: 0.7rem 0.5rem;
    font-size: 0.95rem;
    color: #ccc;
  }
  .menu-toggle {
    display: flex;
    z-index: 201;
    position: relative;
  }
  .menu-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .slide-content { left: 5%; right: 5%; bottom: 8%; }
  .hero {
    height: auto;
    aspect-ratio: 16/10;
    min-height: 220px;
    max-height: 70vh;
  }
  .slide {
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #0a0a0a;
  }
  .section { padding: 2.5rem 0; }
  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .card-img {
    aspect-ratio: 4/3;
    background-size: contain;
    background-repeat: no-repeat;
    background-color: #111;
  }
  .photo-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .photo-item {
    aspect-ratio: 4/3;
    max-width: 100%;
  }
  .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #111;
  }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 480px) {
  .photo-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .category-grid { grid-template-columns: 1fr; }
  .hero {
    aspect-ratio: 4/3;
    max-height: none;
    min-height: 260px;
  }
  .slide-content h1 { font-size: 1.4rem; }
  .header-inner { padding: 0 0.5rem; }
  .logo { font-size: 0.95rem; }
}

/* ---------- Cookie Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: rgba(22, 22, 22, 0.97);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  padding: 1.15rem 1.25rem;
  transform: translateY(110%);
  transition: transform 0.35s ease;
}
.cookie-banner.is-visible {
  transform: translateY(0);
}
.cookie-banner-inner {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}
.cookie-banner-text {
  flex: 1 1 280px;
  font-size: 0.9rem;
  color: #ccc;
  line-height: 1.5;
}
.cookie-banner-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-text a:hover {
  color: var(--accent-hover);
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}
.cookie-btn {
  padding: 0.55rem 1.15rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
}
.cookie-btn-accept {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.cookie-btn-accept:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.cookie-btn-essential {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.cookie-btn-essential:hover {
  border-color: #666;
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 600px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner-actions {
    width: 100%;
  }
  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}
