/*
 Theme Name:   TwentyTwentyFive Child
 Description:  Layout für elementarwesen-arts.de
 Author:       Daniel Dörpinghaus
 Author URI:   https://elementarwesen-arts.de/
 Template:     twentytwentyfive
 Version:      1.0
 Text Domain:  tt5-child
*/

/* ================================================================================ Voreinstellungen */
:root {
	--ew_shadow: 		4px 4px 4px rgba(0,0,0,0.25);
	
	--ew_radius_small: 	5px;
	--ew_radius_medium: none; /* 10px */
	--ew_radius_large: 	15px;
}


/* ================================================================================ Voreinstellungen */
/* Container für die Begegnungen */
.linkliste {
  max-width: 1100px;
  margin: 4rem auto;
  padding: 0 1rem;
}

/* Einzelne Begegnung: Abstand nach unten */
.linkliste p {
  margin: 0;
}

/* Abstand zwischen den Begegnungs-Blöcken */
.linkliste p + p {
  margin-top: 0.75rem;
}

.linkliste p:has(a) {
  margin-top: 3rem;
}

/* Titel / Name der Begegnung */
.linkliste a {
  /*font-size: 1.15rem;*/
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

/* Dezente Hover-Wirkung */
.linkliste a:hover {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* Beschreibungstext */
.linkliste p:not(:has(a)) {
  /*font-size: 1rem;*/
  line-height: 1.6;
  opacity: 0.85;
}

@media (max-width: 768px) {
	.linkliste * {
		text-align: center;
	}
}


/* ================================================================================ Desktop-Basis Bild-Container */
.ew_pageheader {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  box-shadow: var(--ew_shadow);
}

.ew_pageheader img {
  position: absolute;      
  inset: 0;                
  width: 100%;
  height: 100%;
  object-fit: cover;       
  object-position: center; 
  display: block;
  z-index: 0;              
}

@media (max-width: 768px) {
  .ew_pageheader {
    /*aspect-ratio: 5 / 7;*/
    margin-bottom: 2rem;
  }
}

/* ================================================================================ Inhalts-Container [2-spaltig] */
.ew_grid_2 {
  width: 100%;
  display: flex;
  align-items: center;            /* vertikal zentriert */
  gap: clamp(2rem, 5vw, 4rem);    /* Abstand zwischen Spalten */
  padding-left: clamp(2rem, 5vw, 4rem);
  padding-right: clamp(2rem, 5vw, 4rem);
  box-sizing: border-box;
}

/* Textspalte */
.ew_grid_2_text {
  text-align: left; /* Desktop linksbündig */
  flex: 1 1 60%;
}

/* Bildcontainer */
.ew_grid_2_img {
  flex: 1 1 40%;
  display: block;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  box-shadow: var(--ew_shadow);
  overflow: hidden;
}

.ew_grid_2_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ===== Mobile: unter 768px ===== */
@media (max-width: 768px) {
  .ew_grid_2 {
    grid-template-columns: 1fr; /* 1 Spalte */
    gap: clamp(2rem, 5vw, 3rem);
  }

  .ew_grid_2_img {
    order: 1; /* Bild zuerst */
    margin-bottom: clamp(2rem, 6vw, 4rem);
  }

  .ew_grid_2_text {
    order: 2; /* Text darunter */
  }
  .ew_grid_2_text * {
    text-align: center;
  }
}

/* ================================================================================ Inhalt- Container [3-spaltig] */
.ew_grid_3_container {
  margin: 6rem auto;
  padding: 0 clamp(2rem, 5vw, 4rem);
  box-sizing: border-box;
}

.ew_grid_3 {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 3rem;                          /* Abstand zwischen Spalten */
  align-items: center;                  /* Inhalte oben ausrichten */
}

/* Jede Spalte als eigene Gruppe */
.ew_grid_3 .ew_grid_3_spalte {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* Abstand zwischen Absätzen innerhalb der Spalte */
  position: relative;
  text-align: center;
}

/* Mobile: 1 Spalte */
@media (max-width: 900px) {
  .ew_grid_3 {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ================================================================================ Rezensions-Container [3 spaltig] */
.ew_rezensionen {
  margin: 6rem auto;
  padding: 0 2rem;
  text-align: center;
}

.ew_rezensionen_grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: center;
  gap: 3rem;
}

/* äußere, kürzere Stimmen */
.ew_rezensionen_spalte:nth-child(1),
.ew_rezensionen_spalte:nth-child(3) {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

/* zentrale, längere Stimme */
.ew_rezensionen_spalte:nth-child(2) {
  font-size: 1.125rem;
}

/* Quellenangabe */
.ew_rezensionen_grid .cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Mobile */
@media (max-width: 900px) {
  .ew_rezensionen_grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ================================================================================ Textgruppe [1-spaltig] */
.ew_textgruppe {
  max-width: 1340px;
  margin-left: auto;
  margin-right: auto;

  padding-left: clamp(3rem, 8vw, 8rem);
  padding-right: clamp(3rem, 8vw, 8rem);

  box-sizing: border-box;
}

@media (max-width: 768px) {
	.ew_textgruppe * {
	  text-align: center;
	}
}

/* ================================================================================ Newsletter-Formular */
@media (max-width: 768px) {
    .mobilausblenden {
        display: none !important;
    }
	
	.wp-block-cover.newslettermobil {
    /* Seitenverhältnis 3:2 */
    aspect-ratio: 1 / 1 !important;
	}
	
	.wp-block-cover.newslettermobil img {
    /* Seitenverhältnis 3:2 */
    aspect-ratio: 1 / 1 !important;
	object-fit: cover;
	object-position: 15% 50%;
	}
}

/* ================================================================================ MailerLite Formular anpassen */

#mailerlite-form_1 .mailerlite-form-inputs {
  display: block;
}

#mailerlite-form_1 .mailerlite-form-field,
#mailerlite-form_1 .mailerlite-subscribe-button-container {
  width: 100%;
  margin-bottom: 1rem;
}

#mailerlite-form_1 label {
  display: block;
  font-family: 'Quicksand', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #3F372F;
  margin-bottom: 6px;
}

#mailerlite-form_1 input[type="email"],
#mailerlite-form_1 input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: 'Quicksand', sans-serif;
  background-color: #FAFAF8;
  border: 1px solid #3F372F;
  border-radius: 25px;
  box-sizing: border-box;
}

#mailerlite-form_1 .mailerlite-subscribe-submit {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-family: 'Quicksand', sans-serif;
  font-weight: bold;
  background-color: #3F372F;
  color: #FAFAF8;
  border: 1px solid transparent;
  border-radius: 25px;
  box-sizing: border-box;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#mailerlite-form_1 .mailerlite-subscribe-submit:hover {
  background-color: #55654B;
  color: #FAFAF8;
}

#mailerlite-form_1 .mailerlite-form-response h4 {
  font-family: 'Quicksand', sans-serif;
  font-size: 16px;
  color: #2f443b;
  margin-top: 1.5rem;
  text-align: center;
}

#mailerlite-form_1 .mailerlite-form-loader {
  display: none;
}

/* ================================================================================ */
/* Veranstaltungen */
/* ================================================================================ */

/* Äußerer Container: volle Seitenbreite, vertikale Liste */
.events-template {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: clamp(3rem, 6vw, 6rem);
  max-width: 1340px;
  margin-top: var(--ew-space-lg);
  margin-bottom: var(--ew-space-sm);
}

/* Einzelner Termin: zweispaltig */
.event-item {
  display: grid;
  grid-template-columns: 35% 65%;
  column-gap: clamp(1.5rem, 4vw, 3rem);
  background: transparent;
  align-items: start;
}

/* Flyer-Container – ruhig, objektartig */
.event-flyer {
  background: #D7C8B3;
  padding: 0.7rem;
}

.event-flyer img {
  width: 100%;
  height: auto;
  display: block;
}

/* Infobox */
.event-infobox {
  width: 100%;
  height: 100%;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(0,0,0,0.08);
  font-weight: 300;
}

/* Typografische Stabilität */
.event-infobox p {
  margin: 0 0 0.5rem;
  hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

/* Kleine Zusatznote */
.event-note {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: #8a8178;
}

/* Responsive */
@media (max-width: 768px) {
  .events-template {
	text-align: center;
  }
	
  .event-item {
    grid-template-columns: 1fr;
  }
  
  .event-item * {
    text-align: center;
  }

  .event-infobox {
    margin-top: 1.25rem;
    padding-left: 0;
    border-left: none;
  }
}




/* ================================================================================ WooCommerce Anpassungen */
/* ===============================
   WooCommerce Produktgrid
   =============================== */
.wc-block-product-template {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(3rem, 6vw, 6rem) clamp(1rem, 4vw, 1.5rem);
  max-width: 1280px;
  margin-inline: auto;
}

.wc-block-product {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.wc-block-product .wp-block-group.is-layout-grid {
  grid-template-columns: 1fr;
}

.wc-block-components-product-image {
  background: #D7C8B3;
  padding: 0.7rem;
}

.wc-block-components-product-image img {
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: center;
  display: block;
  width: 100%;
  transition: transform 1.2s ease;
}

.wc-block-product:hover img {
  transform: scale(1.015);
}

.wc-block-product .infobox {
  margin-top: 1.25rem;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(0,0,0,0.08);
  font-weight: 300;
}

.wc-block-product h2, .wc-block-product h3 {
  font-family: 'Quicksand', sans-serif;
  margin: 0 0 0.35rem;
  text-align: left;
}

.wc-block-product h2 a, .wc-block-product h3 a {
  display: block;
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 400;
  color: #3F372F;
  text-decoration: none;
}

.wc-block-components-product-price {
  font-size: 0.85rem;
  color: #8a8178;
  text-align: left;
}

.wc-block-components-product-sale-badge {
  display: none;
}

.wc-block-product:nth-child(3n+2) {
  margin-top: 2.5rem;
}

/* Responsive */
@media (max-width: 900px) {
  .wc-block-product-template {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .wc-block-product-template {
    grid-template-columns: 1fr;
  }
}

/* ==== Mini-Cart */

.minicart, .kassenseite {
 font-family: 'Quicksand', sans-serif;
}

.minicart_h, .kassenseite label {
 font-family: 'Quicksand', sans-serif;
}

.single-product .single_add_to_cart_button,
.single-product .wc-block-components-product-button__button {
  background: transparent;
  color: #3e3a32;
  border: 0;
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.5s ease;
}

.single-product .single_add_to_cart_button:hover,
.single-product .wc-block-components-product-button__button:hover {
  background: rgba(62,58,50,0.05);
  border-color: rgba(62,58,50,0.7);
  transition: all 0.5s ease;
}

.single-product .single_add_to_cart_button:focus,
.single-product .single_add_to_cart_button:focus-visible,
.single-product .wc-block-components-product-button__button:focus,
.single-product .wc-block-components-product-button__button:focus-visible {
  outline: none;
  box-shadow: none;
}
	
@media (max-width: 768px) {
	.produktvorschau h3 a {
	  display: -webkit-box;        /* Für das Zeilen-Clamping */
	  -webkit-box-orient: vertical; 
	  -webkit-line-clamp: 3;       /* Anzahl der Zeilen */
	  overflow: hidden;            /* Textüberlauf verstecken */
	  text-overflow: ellipsis;     /* "..." am Ende */
	  word-break: break-word;      /* Optional: lange Wörter umbrechen */
	  text-align: left;
	  font-size: 1rem;
	  line-height: 1.5;
	  font-weight: 400;
	  margin: 0.25rem 0 0;
	}
	
	.wc-block-product-template {
		column-gap: 5rem;
  		row-gap: 5rem;
	}
	
	.wc-block-components-product-price {
	  font-size: 1rem;
	}
}

/* ================================================================================ WooCommerce: KASSENSEITE */
/* Überschriften auf der Kassenseite in Quicksand */
#kassenseite h1,
#kassenseite h2,
#kassenseite h3,
#kassenseite h4,
#kassenseite h5,
#kassenseite h6 {
    font-family: 'Quicksand', sans-serif;
    font-weight: 500; /* optional: mittleres Gewicht, kann angepasst werden */
}

/* ================================================================================ Buttons Image-Gallery BETA */
.wc-block-next-previous-buttons__button {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0.5rem;
  border-radius: 0;
}

.wc-block-next-previous-buttons__button:focus,
.wc-block-next-previous-buttons__button:focus-visible,
.wc-block-next-previous-buttons__button:active {
  outline: none !important;
  box-shadow: none !important;
}

.wc-block-next-previous-buttons__icon {
  color: rgba(240, 236, 228, 0.85);
  transform: scale(1.5);
}

.wc-block-next-previous-buttons__button:hover
.wc-block-next-previous-buttons__icon {
  color: rgba(255, 255, 255, 1);
}
	
/* ================================================================================ WooCommerce Anpassungen mobil ===== */




/* Shop-Menu Einträge */
/* Grundstil für den Link oder Text */
/* Grundstil für den Link oder Text */
.shopmenu {
  position: relative; /* Wichtig für die Positionierung des Pseudo-Elements */
  text-decoration: none; /* Standard-Unterstrich entfernen */
  color: #3F372F;
  transition: color 0.3s ease; /* Optional: Farbe weich wechseln */
}

/* Das Pseudo-Element für den Unterstrich erstellen */
.shopmenu a,
.shopmenu a:hover,
.shopmenu a:focus {
  text-decoration: none !important;
}

.shopmenu {
  position: relative;
  text-decoration: none;
}

.shopmenu::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 100%;
  height: 2px;
  background-color: #3F372F;
  
  /* Start: Linie ist von der Mitte aus unsichtbar */
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;

  transition: transform 0.3s ease-out;
}

.shopmenu:hover {
  text-decoration: none;
}

.shopmenu:hover::after {
  /* Ende: Linie wird sichtbar und wächst nach außen */
  transform: translateX(-50%) scaleX(1);
}


/* ==========================================================================
   SPACING-GLÄTTUNG – NICHT INVASIVER ANHANG
   Ziel: gleichmäßige Abstände Desktop & Mobile
   Kann gefahrlos wieder entfernt werden
   ========================================================================== */

/* 1) ZENTRALES SPACING-SYSTEM (nur Variablen, keine Zerstörung) */
:root {
  --ew-space-xs: 0.5rem;
  --ew-space-sm: 1rem;
  --ew-space-md: 1.75rem;
  --ew-space-lg: 3rem;
  --ew-space-xl: 5rem;

  --ew-pad-desktop: clamp(2rem, 5vw, 4rem);
  --ew-pad-mobile: clamp(1rem, 4vw, 1.25rem);

  --ew-gap: clamp(1.25rem, 3vw, 2.5rem);
}

/* 2) SEKTIONS-ABSTÄNDE VEREINHEITLICHEN (nur wenn vorhanden) */
section,
.ew_section,
.wp-block-group,
.wp-block-cover,
.events-template {
  margin-block: var(--ew-space-xl);
}

/* engere Varianten bleiben möglich */
.section-tight {
  margin-block: var(--ew-space-lg);
}

/* 3) SEITENABSTÄNDE RUHIG & KONSISTENT */
.ew_grid_2,
.ew_grid_3_container,
.ew_rezensionen,
.ew_textgruppe,
.linkliste,
.wc-block-product-template,
.events-template {
  padding-left: var(--ew-pad-desktop);
  padding-right: var(--ew-pad-desktop);
}

/* 4) VERTIKALE TEXTABSTÄNDE GLÄTTEN */
p + p,
p + ul,
p + ol {
  margin-top: var(--ew-space-md);
}

h2, h3, h4 {
  margin-top: var(--ew-space-lg);
  margin-bottom: var(--ew-space-sm);
}

h2:first-child,
h3:first-child,
h4:first-child {
  margin-top: 0;
}

/* 5) GRID & FLEX GAPS ANGLEICHEN */
.ew_grid_2,
.ew_grid_3,
.ew_rezensionen_grid {
  gap: var(--ew-gap);
}

/* 6) MOBILE: ALLES ETWAS NÄHER, ABER NICHT GEQUETSCHT */
@media (max-width: 768px) {

  section,
  .ew_section,
  .wp-block-group,
  .wp-block-cover {
    margin-block: var(--ew-space-lg);
  }

  .ew_grid_2,
  .ew_grid_3_container,
  .ew_rezensionen,
  .ew_textgruppe,
  .linkliste,
  .wc-block-product-template,
  .events-template {
    padding-left: var(--ew-pad-mobile);
    padding-right: var(--ew-pad-mobile);
  }

  p + p {
    margin-top: var(--ew-space-sm);
  }

  h2, h3, h4 {
    margin-top: var(--ew-space-md);
  }
}

/* ==========================================================================
   MOBILE HEADLINE-GLÄTTUNG
   Ziel: weniger Zeilenumbrüche, ruhigere Typo
   ========================================================================== */

/* Desktop bleibt unangetastet */

/* Mobile Typo-Scaling */
@media (max-width: 768px) {

  h1 {
    font-size: clamp(2.2rem, 5.5vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 0.6em;
  }

  h2 {
    font-size: clamp(1.8rem, 4.8vw, 2rem);
    line-height: 1.25;
    margin-bottom: 0.5em;
  }

  h3 {
    font-size: clamp(1.35rem, 4.2vw, 1.75rem);
    line-height: 1.3;
  }
}