/*
 Theme Name: Sascha Herold Theme
 Theme URI: https://ninaherold.com
 Author: Sascha Herold
 Author URI: https://herr-herold.ch
 Description: Minimalistisches Portfolio-Theme mit 3-Spalten-Grid, Lightbox und reduziertem Menü.
 Version: 1.0
 Text Domain: sascha-herold-theme
*/

/* -------------------------
   Basis
   ------------------------- */
/* ----------------------------------------
   Comfortaa – self hosted (WOFF2)
   Ordnerstruktur:
   /wp-content/themes/sascha-herold-theme/fonts/
   ---------------------------------------- */

@font-face {
  font-family: "Comfortaa";
  src: url("fonts/Comfortaa-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comfortaa";
  src: url("fonts/Comfortaa-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comfortaa";
  src: url("fonts/Comfortaa-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Comfortaa";
  src: url("fonts/Comfortaa-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html,
body {
  margin: 0;
  padding: 0;
}

/****************************************************
 * BODY – globale Schrift Comfortaa
 ****************************************************/
body {
  font-family: "Comfortaa", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-body-text, #111111);
  background: #ffffff;
  margin: 0;
  padding: 0;
}

/* Links */

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

a:hover {
  text-decoration: underline;
}

/* -------------------------
   Layout-Container
   ------------------------- */

.sh-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 80px;
}

/* etwas enger z.B. Laptop 1280 */

@media (max-width: 1360px) {
  .sh-container {
    padding: 0 64px;
  }
}

@media (max-width: 1024px) {
  .sh-container {
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  .sh-container {
    padding: 0 24px;
  }
}

/* -------------------------
   Header / Navigation
   ------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
}

.site-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 80px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Laptops etwas enger */

@media (max-width: 1360px) {
  .site-header-inner {
    padding: 32px 64px 40px;
  }
}

/* Tablet & kleiner */

@media (max-width: 1024px) {
  .site-header-inner {
    padding: 24px 40px 32px;
  }
}

@media (max-width: 768px) {
  .site-header-inner {
    padding: 24px 24px 28px;
  }
}

/* Logo (Text) */

.site-branding a {
  display: inline-block;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
}

/* Desktop-Menü */

.primary-nav {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Aktiver Menüpunkt */

.primary-nav li.current-menu-item > a,
.primary-nav li.current_page_item > a {
  text-decoration: underline;
}

/* Hamburger-Schalter */

.menu-toggle {
  display: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
}

/* Drei Linien */

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 30px;
  height: 2px;
  background: #111;
  position: relative;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before {
  top: -8px;
}

.menu-toggle span::after {
  top: 8px;
}

/* Wenn offen -> feines X */

.menu-toggle.is-open span {
  background: transparent;
}

.menu-toggle.is-open span::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-toggle.is-open span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Breakpoint: Desktop -> Mobile-Menü */

@media (max-width: 900px) {
  .primary-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}

/* -------------------------
   Mobile-Fullscreen-Menü
   ------------------------- */

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.mobile-nav-overlay.is-open {
  display: flex;
}

.mobile-nav-overlay ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: center;
}

.mobile-nav-overlay a {
  font-size: 28px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 300;
}

/* Close-X oben rechts (optional, zusätzlich zum Hamburger) */

.mobile-nav-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* Body fixieren, wenn Menü offen */

body.sh-mobile-menu-open {
  overflow: hidden;
}

/* -------------------------
   Startseite – Grid mit Werken
   ------------------------- */

.sh-front-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 80px 120px;
}

@media (max-width: 1360px) {
  .sh-front-main {
    padding: 40px 64px 100px;
  }
}

@media (max-width: 1024px) {
  .sh-front-main {
    padding: 32px 40px 80px;
  }
}

@media (max-width: 768px) {
  .sh-front-main {
    padding: 24px 24px 72px;
  }
}

/* Grid: 3 Spalten Desktop */

.sh-works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
}

/* Tablet quer: 3 Spalten bleiben, aber Raster enger */

@media (max-width: 1024px) {
  .sh-works-grid {
    gap: 32px;
  }
}

/* Tablet hoch: 2 Spalten */

@media (max-width: 900px) {
  .sh-works-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
}

/* Kleine Phones: 1 Spalte */

@media (max-width: 480px) {
  .sh-works-grid {
    grid-template-columns: 1fr;
  }
}

/* Einzelnes Werk im Grid */

.sh-work-item {
  display: block;
  cursor: zoom-in;
}

.sh-work-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

/* Bildtitel + Beschreibung unter dem Bild */

.sh-work-meta {
  margin-top: 20px;
}

.sh-work-title {
  font-size: 18px;
  margin-bottom: 6px;
}

.sh-work-caption {
  font-size: 14px;
}

/* -------------------------
   Standard-Seiten / Unterseiten
   ------------------------- */

.sh-page-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px 80px 120px;
}

@media (max-width: 1360px) {
  .sh-page-main {
    padding: 40px 64px 100px;
  }
}

@media (max-width: 1024px) {
  .sh-page-main {
    padding: 32px 40px 80px;
  }
}

@media (max-width: 768px) {
  .sh-page-main {
    padding: 24px 24px 72px;
  }
}

/* Hero-Bild oben auf Unterseiten:
   Einfach einem Bild den Wrapper .sh-hero geben */

.sh-hero {
  margin-bottom: 48px;
}

.sh-hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* Inhalt enger, zweispaltig für Textseite "Ausstellungen" etc.
   Du kannst der Inhaltsspalte einfach die Klasse .sh-page-content geben */

.sh-page-content {
  max-width: 1024px;
}

/* Zweispaltiger Text (z.B. Ausstellungen) */
.sh-two-column-text {
  column-count: 2;
  column-gap: 40px;
}

@media (max-width: 900px) {
  .sh-two-column-text {
    column-count: 1;
  }
}

/* -------------------------
   Lightbox – Overlay, Bild & Text
   ------------------------- */

.sh-lightbox-overlay {
  position: fixed;
  inset: 0;
  padding: 20px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9000;
}

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

.sh-lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Bild: bewusst kleiner halten, damit immer Platz für Text bleibt */
.sh-lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 60vh;      /* vorher calc(100vh - 200px) */
  height: auto;
  width: auto;
  object-fit: contain;
  margin: 0 auto;
}


/* Caption unter dem Bild – schwarz, gut lesbar */
.sh-lightbox-caption {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.4;
  padding: 0 10px;
  color: #000 !important;
  text-shadow: none !important;
  text-align: center;
}

/* Buttons */
.sh-lightbox-close {
  position: absolute;
  top: -32px;
  right: 0;
  font-size: 26px;
  cursor: pointer;
  background: none;
  border: none;
  color: #000;
}

.sh-lightbox-prev,
.sh-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  color: rgba(0, 0, 0, 0.7);
  background: none;
  border: none;
  cursor: pointer;
}

.sh-lightbox-prev {
  left: -32px;
}

.sh-lightbox-next {
  right: -32px;
}

/* Mobile-Optimierung für die Lightbox */
@media (max-width: 768px) {
  .sh-lightbox-inner {
    max-width: 100vw;
    max-height: 100vh;
    padding: 10px;
  }

  .sh-lightbox-inner img {
    max-height: 55vh;    /* noch etwas kleiner auf kleinen Geräten */
  }


  .sh-lightbox-prev {
    left: 4px;
  }

  .sh-lightbox-next {
    right: 4px;
  }

  /* Sicherheit: ALLE Texte in der Lightbox schwarz */
  .sh-lightbox-overlay,
  .sh-lightbox-overlay *,
  .sh-lightbox-inner,
  .sh-lightbox-inner * {
    color: #000 !important;
    text-shadow: none !important;
  }
}
