/* ============================================
   MARIA BUCHHAUS — GALERIE
   Minimal Vienna gallery aesthetic
   ============================================ */

:root {
  --white:      #ffffff;
  --off-white:  #f8f7f4;
  --paper:      #f2f0eb;
  --black:      #1a1a1a;
  --ink:        #2c2c2c;
  --grey-mid:   #888880;
  --grey-light: #d4d2cc;
  --accent:     #8b7355;
  --accent-lt:  #c4a882;

  /* Retro XP accent system — used for header, sidebar, buttons */
  --xp-ink:          #14181c;
  --xp-orange-top:   #ffa352;
  --xp-orange-mid:   #ff7a1a;
  --xp-orange-bottom:#e85d04;
  --xp-green-top:    #00d45f;
  --xp-green-mid:    #00b84f;
  --xp-green-bottom: #00873a;
  --xp-face:         #ece6d8;
  --xp-face-light:   #ffffff;
  --xp-face-dark:    #aca899;

  --font-display: 'Tangerine', 'Brush Script MT', cursive;
  --font-body:    Tahoma, Verdana, 'Segoe UI', sans-serif;

  --header-h: 108px; /* 8px top strip + 100px title bar */
  --sidebar-w: 240px;
  --gap: 32px;
  --card-radius: 0px;

  --transition: 0.2s ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--xp-ink);
}

.header-topstrip {
  height: 8px;
  background: var(--xp-ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gap);
  height: calc(var(--header-h) - 8px);
  background: linear-gradient(180deg, var(--xp-orange-top) 0%, var(--xp-orange-mid) 55%, var(--xp-orange-bottom) 100%);
  border-bottom: 2px solid var(--xp-orange-bottom);
  box-shadow: 0 3px 8px rgba(0,0,0,0.28);
  gap: 18px;
}

.header-avatar-link {
  display: block;
  line-height: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.header-avatar {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 3px;
  border-top: 2px solid var(--xp-face-light);
  border-left: 2px solid var(--xp-face-light);
  border-bottom: 2px solid var(--xp-face-dark);
  border-right: 2px solid var(--xp-face-dark);
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.header-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  margin-right: auto;
}

.name-first {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.9);
  display: block;
  letter-spacing: 0.02em;
  text-transform: none;
  line-height: 1;
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
}

.name-last {
  font-size: 3rem;
  color: var(--white);
  display: block;
  letter-spacing: 0.02em;
  margin-top: -6px;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.header-nav {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 100%;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--xp-ink);
  text-decoration: none;
  background: var(--xp-face);
  padding: 8px 18px 7px;
  margin-bottom: 12px;
  border-radius: 4px 4px 0 0;
  border-top: 1px solid var(--xp-face-light);
  border-left: 1px solid var(--xp-face-light);
  border-right: 1px solid var(--xp-face-dark);
  box-shadow: inset 0 0 0 rgba(0,0,0,0);
  transition: background var(--transition), transform 0.1s ease;
}

.nav-link:hover {
  background: var(--white);
}

.nav-link.active {
  background: var(--white);
  border-top: 1px solid var(--xp-face-dark);
  border-left: 1px solid var(--xp-face-dark);
  border-right: 1px solid var(--xp-face-dark);
  box-shadow: inset 1px 2px 4px rgba(0,0,0,0.18);
  color: var(--xp-orange-bottom);
  font-weight: 600;
}

.header-rule {
  display: none;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */

.main-layout {
  display: flex;
  flex: 1;
  align-items: flex-start;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: linear-gradient(180deg, var(--xp-green-top) 0%, var(--xp-green-mid) 35%, var(--xp-green-bottom) 100%);
  border-right: 3px solid var(--xp-green-bottom);
  box-shadow: inset -6px 0 10px -8px rgba(0,0,0,0.4);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.5) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.5);
}

.sidebar-inner {
  padding: 28px 20px 40px;
}

/* Search */
.search-group {
  margin-bottom: 0;
}

.search-input {
  width: 100%;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--ink);
  padding: 8px 10px;
  outline: none;
  letter-spacing: 0.04em;
  border-radius: 2px;
  border-top: 2px solid var(--xp-face-dark);
  border-left: 2px solid var(--xp-face-dark);
  border-bottom: 2px solid var(--xp-face-light);
  border-right: 2px solid var(--xp-face-light);
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.2);
  transition: box-shadow var(--transition);
}

.search-input::placeholder {
  color: var(--grey-mid);
  font-style: italic;
}

.search-input:focus {
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.25), 0 0 0 2px var(--xp-orange-mid);
}

/* Divider */
.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.3);
  margin: 20px 0;
}

/* Filter groups */
.filter-group {
  margin-bottom: 0;
}

.filter-group-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 10px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
  transition: color var(--transition);
}

.filter-group-header:hover {
  color: var(--xp-ink);
}

.filter-chevron {
  font-size: 1rem;
  transition: transform var(--transition);
  line-height: 1;
}

.filter-group-header[aria-expanded="false"] .filter-chevron {
  transform: rotate(-90deg);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 600px;
  opacity: 1;
}

.filter-pills.collapsed {
  max-height: 0;
  opacity: 0;
}

.pill {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--xp-ink);
  background: var(--xp-face);
  border-radius: 3px;
  border-top: 1px solid var(--xp-face-light);
  border-left: 1px solid var(--xp-face-light);
  border-bottom: 1px solid var(--xp-face-dark);
  border-right: 1px solid var(--xp-face-dark);
  padding: 3px 10px;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  white-space: nowrap;
}

.pill:hover {
  background: var(--white);
}

.pill:active {
  border-top: 1px solid var(--xp-face-dark);
  border-left: 1px solid var(--xp-face-dark);
  border-bottom: 1px solid var(--xp-face-light);
  border-right: 1px solid var(--xp-face-light);
}

.pill.active {
  background: var(--xp-orange-mid);
  border-top: 1px solid var(--xp-orange-bottom);
  border-left: 1px solid var(--xp-orange-bottom);
  border-bottom: 1px solid var(--xp-orange-top);
  border-right: 1px solid var(--xp-orange-top);
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.25);
  color: var(--white);
}

/* Reset */
.reset-btn {
  margin-top: 4px;
  background: var(--xp-face);
  border-radius: 3px;
  border-top: 1px solid var(--xp-face-light);
  border-left: 1px solid var(--xp-face-light);
  border-bottom: 1px solid var(--xp-face-dark);
  border-right: 1px solid var(--xp-face-dark);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--xp-ink);
  cursor: pointer;
  padding: 7px 14px;
  transition: background var(--transition);
  text-decoration: none;
}

.reset-btn:hover {
  background: var(--white);
}

.reset-btn:active {
  border-top: 1px solid var(--xp-face-dark);
  border-left: 1px solid var(--xp-face-dark);
  border-bottom: 1px solid var(--xp-face-light);
  border-right: 1px solid var(--xp-face-light);
}

/* ============================================
   GALLERY
   ============================================ */

.gallery-section {
  flex: 1;
  padding: 28px var(--gap) 60px;
  min-width: 0;
}

.gallery-meta {
  margin-bottom: 20px;
  min-height: 1.2rem;
}

.gallery-intro {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 28px;
}

.gallery-intro .intro-link {
  color: var(--xp-orange-bottom);
  font-style: normal;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.gallery-intro .intro-link:hover {
  color: var(--xp-green-bottom);
}

.result-count {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-mid);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 40px 28px;
}

/* ============================================
   CARD
   ============================================ */

.card {
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  animation: cardIn 0.4s ease forwards;
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  aspect-ratio: 4/3;
  padding: 6px;
  border: 1px solid var(--grey-light);
  outline: 1px dashed transparent;
  outline-offset: 3px;
  transition: outline-color var(--transition);
}

.card:hover .card-image-wrap {
  outline-color: var(--xp-orange-mid);
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.card:hover .card-img {
  transform: scale(1.03);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,26,26,0);
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card:hover .card-overlay {
  background: rgba(26,26,26,0.15);
}

.card-zoom-icon {
  opacity: 0;
  transition: opacity 0.3s ease;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.card:hover .card-zoom-icon {
  opacity: 1;
}

.card-body {
  padding: 14px 0 0;
  border-top: 1px solid var(--grey-light);
  margin-top: 0;
}

.card-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--black);
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-desc {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--grey-mid);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* No results */
.no-results {
  text-align: center;
  padding: 80px 0;
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--grey-mid);
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.92);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-inner {
  display: flex;
  gap: 40px;
  align-items: center;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  padding: 0 60px;
}

.lightbox-image-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-info {
  flex: 0 0 260px;
  color: var(--off-white);
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 36px;
}

.lightbox-id {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.lightbox-size {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-top: -10px;
  margin-bottom: 20px;
}

.lightbox-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}

.lightbox-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lightbox-tag {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 2px 8px;
}

.lightbox-share {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.lightbox-share-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}

.lightbox-share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.65);
  background: transparent;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 6px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.95);
}

.share-btn:active {
  background: rgba(255,255,255,0.1);
}

.share-btn.copied {
  border-color: var(--accent-lt);
  color: var(--accent-lt);
}

.share-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Lightbox controls */
.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
  z-index: 202;
  font-weight: 300;
}

.lightbox-close:hover {
  color: var(--white);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 202;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: rgba(255,255,255,0.5);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--xp-ink);
  border-top: none;
  padding: 20px var(--gap);
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.65);
}

.footer-sep {
  color: rgba(255,255,255,0.3);
}

.footer-link {
  color: var(--xp-orange-top);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--xp-green-top);
}

/* ============================================
   PLACEHOLDER PAGE (Über mich / Kontakt)
   ============================================ */

.page-content {
  max-width: 680px;
  margin: 80px auto;
  padding: 0 var(--gap);
}

.page-title {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--black);
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--xp-orange-mid);
  position: relative;
}

.page-title::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--xp-green-mid);
  margin-right: 12px;
  vertical-align: middle;
  border-radius: 2px;
}

.page-body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--ink);
}

.page-body p + p {
  margin-top: 1.5em;
}

/* ============================================
   CONTACT FORM
   ============================================ */

.contact-intro {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--grey-mid);
  margin-bottom: 48px;
  line-height: 1.7;
}

.contact-form {
  margin-top: 0;
}

.form-field {
  margin-bottom: 36px;
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-mid);
  margin-bottom: 10px;
}

.form-input {
  width: 100%;
  background: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  transition: box-shadow var(--transition);
  border-radius: 2px;
  border-top: 2px solid var(--xp-face-dark);
  border-left: 2px solid var(--xp-face-dark);
  border-bottom: 2px solid var(--xp-face-light);
  border-right: 2px solid var(--xp-face-light);
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.15);
  -webkit-appearance: none;
}

.form-input:focus {
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.2), 0 0 0 2px var(--xp-orange-mid);
}

.form-textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.7;
}

.form-footer {
  margin-top: 44px;
}

.form-submit {
  background: linear-gradient(180deg, var(--xp-orange-top), var(--xp-orange-mid));
  color: var(--white);
  border-radius: 3px;
  border-top: 1px solid var(--xp-orange-top);
  border-left: 1px solid var(--xp-orange-top);
  border-bottom: 1px solid var(--xp-orange-bottom);
  border-right: 1px solid var(--xp-orange-bottom);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 40px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
  transition: filter var(--transition);
}

.form-submit:hover {
  filter: brightness(1.06);
}

.form-submit:active {
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.3);
  border-top: 1px solid var(--xp-orange-bottom);
  border-left: 1px solid var(--xp-orange-bottom);
  border-bottom: 1px solid var(--xp-orange-top);
  border-right: 1px solid var(--xp-orange-top);
}

.form-success,
.form-error {
  display: none;
  margin-top: 28px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.6;
}

.form-success {
  color: var(--accent);
}

.form-error {
  color: #a04040;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  :root {
    --sidebar-w: 200px;
  }
  .lightbox-inner {
    flex-direction: column;
    padding: 60px 20px 20px;
  }
  .lightbox-info {
    flex: none;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-left: 0;
    padding-top: 20px;
  }
}

@media (max-width: 680px) {
  .main-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--grey-light);
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px 16px;
  }
  .header-inner {
    padding: 0 16px;
  }
  .header-avatar {
    width: 52px;
    height: 52px;
  }
  .name-last {
    font-size: 1.4rem;
  }
  .header-nav {
    gap: 3px;
  }
  .nav-link {
    padding: 6px 10px 6px;
    font-size: 0.7rem;
  }
}
