/*
CHANGES (2025-03-15):
1) Für die mobile Ansicht (max-width: 480px) haben wir Heading + Formular vergrößert
   und so gestaltet, dass sie den gesamten bzw. fast gesamten Bildschirm füllen.
2) '.subscribe-page' bekommt 'min-height: 100vh' und zentriert Heading/Formular vertikal.
3) In der Media Query werden Schriftgrößen, Abstände und Containerbreiten erhöht.
*/

html {
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
}

/* CSS-Variable */
:root {
  --max-content-width: 1200px;
}

/* Grundlegende Reset-Regeln */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Grundlegendes Styling */
body {
  font-family: "Open Sans", sans-serif; /* Standard Fließtextschrift */
  color: rgba(0, 0, 0, 0.8); /* 80% Schwarz */
}

/* Hintergrundbild */
.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

/* Grid */
.grid {
  background: transparent;
  max-width: var(--max-content-width);
  margin: 0 auto;
  margin-top: 80px; /* Platz unter dem Menü */
}

.grid:after {
  content: '';
  display: block;
  clear: both;
}

.grid-sizer,
.grid-item {
  width: 25%;
}

.grid-item {
  float: left;
}

.grid-item img {
  display: block;
  padding: 4px;
  width: 100%;
  height: auto;
}

/* Media Queries */
@media (max-width: 768px) {
  .grid-item {
    width: 100%;
    margin: 0 0 10px;
  }

  .grid-item img {
    padding: 5px;
  }

  .menu .menu-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  /* Name in der Auswahl anzeigen */
  .menu-content .logo {
    position: absolute;
    top: 15px;
    left: 20px;
    font-family: "EB Garamond", serif;
    font-size: 20px;
    font-weight: 700;
    color: rgb(83, 83, 83);
    z-index: 1002; /* Über allen anderen Elementen */
  }

  .menu .menu-items {
    gap: 10px;
    flex-direction: column;
  }

  .menu .menu-items li a {
    font-size: 16px;
  }

  .grid {
    margin-top: 100px;
  }
}

/* Chevron-Button */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none; /* Standardmäßig ausgeblendet */
  z-index: 1000;
  cursor: pointer;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.scroll-to-top.visible {
  display: flex; /* Chevron sichtbar machen */
  justify-content: center;
  align-items: center;
  opacity: 1;
  transform: scale(1);
}

.scroll-to-top:hover {
  transform: scale(1.2); /* Vergrößert den Chevron bei Hover */
}

.chevron {
  width: 36px; /* Größe des Chevron */
  height: 36px;
  stroke: black; /* Schwarze Farbe für den Pfeil */
}

/* Thumbnail-Container */
.thumbnail-overlay {
  position: relative;
  overflow: hidden;
}

.thumbnail-overlay img {
  display: block;
  width: 100%; /* Passt das Bild an die Größe des Containers an */
  height: auto;
  transition: transform 0.3s ease, filter 0.3s ease; /* Weiche Bewegung und Filter */
}

/* Hover-Effekt für das Bild */
.thumbnail-overlay:hover img {
  filter: brightness(50%);
  transform: scale(1.05);
}

/* Caption-Styling */
.caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
}

.thumbnail-overlay:hover .caption {
  opacity: 1;
}

/* Projekt-Titel */
.project-title {
  font-family: "EB Garamond", serif;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

/* Projekt-Unterzeile */
.project-subtitle {
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  margin: 10px 0 0;
}

/* Globale Reset-Regeln (bleiben unverändert) */
.caption {
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Captions in Portfolio bleiben bei Hover */
.thumbnail-overlay:hover .caption {
  opacity: 1;
}

/* Thumbnail-Container */
body.shop-thumbnails .grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.shop-thumbnails .thumbnail-overlay {
  display: block;
  width: 100%;
  height: auto;
}

body.shop-thumbnails .caption {
  opacity: 1;
  margin-top: 100px;
  width: 100%;
  text-align: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.8);
  color: black;
  font-family: "Open Sans", sans-serif;
  box-sizing: border-box;
}

/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* NUR Double-Opt-In: .subscribe-page + .subscribe-form                   */
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */

.subscribe-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* Füllt die gesamte Bildschirmhöhe aus */
  min-height: 100vh;
}

.subscribe-page .subscribe-heading {
  text-align: center;
  margin-bottom: 20px;
  font-family: "EB Garamond", serif;
  font-size: 24px;
}

.subscribe-page .subscribe-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  margin: 40px auto;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.subscribe-page .subscribe-form label {
  margin-bottom: 5px;
  font-weight: bold;
}

.subscribe-page .subscribe-form input[type="text"],
.subscribe-page .subscribe-form input[type="email"] {
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 15px;
  width: 100%;
}

.subscribe-page .subscribe-form input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.2);
}

.subscribe-page .subscribe-form button {
  padding: 12px;
  font-size: 16px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.subscribe-page .subscribe-form button:hover {
  background-color: #555;
}

/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* >>>> Responsive: mobile Ansicht soll alles deutlich größer wirken <<<< */
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
@media (max-width: 480px) {
  .subscribe-page .subscribe-heading {
    font-size: 2rem;            /* Größere Überschrift */
    margin-bottom: 2rem;
  }

  .subscribe-page .subscribe-form {
    max-width: 95%;             /* Breiter, um fast den ganzen Screen zu nutzen */
    margin: 0 auto;             /* Kein zusätzlicher Außenabstand */
    flex-grow: 1;               /* Füllt vertikal den verbleibenden Platz */
    display: flex;
    flex-direction: column;
    justify-content: center;    /* Zentrierte Ausrichtung im verfügbaren Raum */
    padding: 2rem;             /* Größeres Padding für mehr 'Fläche' */
  }

  .subscribe-page .subscribe-form label {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .subscribe-page .subscribe-form input[type="text"],
  .subscribe-page .subscribe-form input[type="email"] {
    font-size: 1.2rem;
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .subscribe-page .subscribe-form button {
    font-size: 1.2rem;
    padding: 1rem;
  }
}
