/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

@import url('https://fonts.googleapis.com/css2?family=Quattrocento:wght@400;700&family=Geologica:wght@100;200;300;400;500;600;700;800;900&display=swap');

/** ========================================
 * Sillgraben Premium Custom Styles
 * Version: 2.1 - 1200px Standard with Fluid Scaling
 * ======================================== **/

/* ========================================
 * GLOBALE EINSTELLUNGEN
 * ======================================== */

/* Globales box-sizing für konsistentes Box-Model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ========================================
 * ROOT VARIABLEN - Zentrale Design-Token
 * ======================================== */
:root {
  /* === FARBEN === */
  --sillgraben-primary-dark: #304843;    /* Hauptfarbe Dunkel */
  --sillgraben-primary-light: #DFDFD0;   /* Hauptfarbe Hell */
  --sillgraben-accent-green: #5A7A6F;    /* Akzentfarbe Grün */
  --sillgraben-accent-gold: #D4AF37;     /* Akzentfarbe Gold */
  
  /* === CONTAINER BREITEN - UPDATED TO 1200px === */
  --container-max-width: 1200px;         /* Industry standard width */
  --container-width: min(94%, var(--container-max-width)); /* Fluid with max limit */
  
  /* === HORIZONTALE ABSTÄNDE === */
  --side-padding-mobile: 16px;           /* Slightly reduced for mobile */
  --side-padding-tablet: 32px;           /* Balanced tablet padding */
  --side-padding-desktop: 48px;          /* Comfortable desktop padding */
  
  /* Fluid responsive padding */
  --container-padding-x: clamp(var(--side-padding-mobile), 4vw, var(--side-padding-desktop));
  
  /* === VERTIKALE ABSTÄNDE === */
  --spacing-xs: 16px;     /* Extra Klein */
  --spacing-sm: 32px;     /* Klein */
  --spacing-md: 48px;     /* Mittel */
  --spacing-lg: 64px;     /* Groß */
  --spacing-xl: 96px;     /* Extra Groß */
  --spacing-xxl: 128px;   /* Extra Extra Groß */
  
  /* Fluid vertical section padding */
  --section-padding-y: clamp(var(--spacing-md), 8vw, var(--spacing-xl));  
}

/* ========================================
 * GLOBALE HTML EINSTELLUNGEN
 * ======================================== */
html {
  scroll-behavior: smooth; /* Sanftes Scrollen bei Anker-Links */
}

/* ========================================
 * CONTAINER STYLES - FLUID & RESPONSIVE
 * ======================================== */

/* Basis-Container mit fluid width */
.container {
  width: var(--container-width);
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding-x);
  padding-right: var(--container-padding-x);
  box-sizing: border-box;
}

/* Premium Container - same fluid behavior */
.container-premium {
  width: var(--container-width);
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding-left: var(--container-padding-x);
  padding-right: var(--container-padding-x);
  box-sizing: border-box;
}


/* Header Container Padding - matches main container */
.brxe-header,
.brxe-header-row,
#brx-header .brxe-container {
  padding-left: clamp(16px, 4vw, 48px) !important;
  padding-right: clamp(16px, 4vw, 48px) !important;
}

/* Header Container Padding - matches main container */
.brxe-header,
.brxe-header-row,
#brx-header .brxe-container {
  padding-left: clamp(16px, 4vw, 48px) !important;
  padding-right: clamp(16px, 4vw, 48px) !important;
}

/* If your header has a nested container, ensure it doesn't double the padding */
#brx-header .brxe-container .brxe-container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* If your header has a nested container, ensure it doesn't double the padding */
#brx-header .brxe-container .brxe-container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}


/* ========================================
 * BRICKS BUILDER SPEZIFISCHE FIXES
 * Updated for 1200px width
 * ======================================== */

/* Bricks Container Override - Now 1200px */
.brxe-container {
  width: min(94%, 1200px) !important;  /* Fluid until 1200px */
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: clamp(16px, 4vw, 48px) !important;
  padding-right: clamp(16px, 4vw, 48px) !important;
  box-sizing: border-box !important;
}

/* Entfernt unerwünschte Margins von inneren Elementen */
.brxe-section .brxe-container > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Section Width Fix */
.brxe-section {
  width: 100% !important;
}

/* Inner Container für Bricks - Updated */
.brxe-section-content {
  width: min(94%, 1200px) !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
}

/* ========================================
 * SPACING UTILITY KLASSEN
 * ======================================== */

/* === Vertikale Padding Utilities === */
.py-sm { 
  padding-top: var(--spacing-sm); 
  padding-bottom: var(--spacing-sm); 
}
.py-md { 
  padding-top: var(--spacing-md); 
  padding-bottom: var(--spacing-md); 
}
.py-lg { 
  padding-top: var(--spacing-lg); 
  padding-bottom: var(--spacing-lg); 
}
.py-xl { 
  padding-top: var(--spacing-xl); 
  padding-bottom: var(--spacing-xl); 
}

/* === Padding Top Utilities === */
.pt-sm { padding-top: var(--spacing-sm); }
.pt-md { padding-top: var(--spacing-md); }
.pt-lg { padding-top: var(--spacing-lg); }
.pt-xl { padding-top: var(--spacing-xl); }

/* === Padding Bottom Utilities === */
.pb-sm { padding-bottom: var(--spacing-sm); }
.pb-md { padding-bottom: var(--spacing-md); }
.pb-lg { padding-bottom: var(--spacing-lg); }
.pb-xl { padding-bottom: var(--spacing-xl); }

/* === Margin Top Utilities === */
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

/* === Margin Bottom Utilities === */
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

/* ========================================
 * SPEZIELLE EFFEKTE
 * ======================================== */

/* Glass Morphism Karten-Effekt */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: var(--spacing-md);
}

/* Hero Section Overlay */
.hero-overlay {
  position: relative;
}

.hero-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, 
    rgba(48,72,67,0.85) 0%, 
    rgba(48,72,67,0.3) 50%, 
    rgba(48,72,67,0.7) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ========================================
 * SECTION SPACING
 * ======================================== */

/* Standard Section Padding */
section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
}

/* ========================================
 * ANIMATIONEN
 * ======================================== */

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* ========================================
 * LAYOUT PATTERNS
 * ======================================== */

/* Golden Ratio Layout Grid */
.golden-ratio-container {
  display: grid;
  grid-template-columns: 1fr 1.618fr;
  gap: var(--spacing-md);
}

/* ========================================
 * RESPONSIVE BREAKPOINTS - FLUID SCALING
 * ======================================== */

/* Extra Large Screens */
@media (max-width: 1400px) {
  :root {
    --container-max-width: 1140px;
  }
}

/* Large Screens */
@media (max-width: 1200px) {
  :root {
    --container-max-width: 960px;
  }
}

/* Medium Screens */
@media (max-width: 992px) {
  :root {
    --container-max-width: 720px;
    --side-padding-tablet: 24px;
  }
}

/* Tablets */
@media (max-width: 768px) {
  :root {
    --container-max-width: 540px;
    --section-padding-y: var(--spacing-md);
  }
  
  .golden-ratio-container {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 576px) {
  :root {
    --container-max-width: 100%;
    --container-width: 100%;
    --section-padding-y: var(--spacing-sm);
    --side-padding-mobile: 12px;
  }
}

/* ========================================
 * CONTENT WIDTH CONSTRAINTS
 * For optimal reading experience
 * ======================================== */

/* Article/Blog content width */
.content-article,
.entry-content {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Wide content (for galleries, etc) */
.content-wide {
  max-width: 100%;
}

/* Narrow content (for forms, etc) */
.content-narrow {
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}



/* ========================================
 * Sticky Footer
 * ======================================== */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#brx-content {
  flex: 1;
}

#brx-footer {
  margin-top: auto;
}

/* ========================================
 * DEBUG STYLES (REMOVE IN PRODUCTION!)
 * ======================================== */

/* Debug - Remove these lines when everything works */

/*
.brxe-container,
.brxe-section,
.brxe-div {
  position: relative;
  border: 2px solid red !important;
}


.brxe-container::before {
  content: "W: " attr(style);
  position: absolute;
  top: 0;
  left: 0;
  background: yellow;
  color: black;
  padding: 2px 5px;
  font-size: 11px;
  z-index: 999999;
}
*/

/* ============================================
   GUTENBERG BLOCKS STYLING FOR BRICKS BUILDER
   Ensures Gutenberg block content displays 
   correctly within Bricks Builder theme
   ============================================ */

/* Base container for all post content */
.brxe-post-content {
  margin: 0 auto;
}

/* Headings - standardized styling for all heading levels */
.wp-block-heading,
.brxe-post-content h1,
.brxe-post-content h2,
.brxe-post-content h3 {
  margin-top: 60px;
  margin-bottom: 30px;
  color: #304843;
}

/* Heading hierarchy - size and line-height scaling */
.brxe-post-content h1 { font-size: 48px; line-height: 1.2; }
.brxe-post-content h2 { font-size: 36px; line-height: 1.3; }
.brxe-post-content h3 { font-size: 28px; line-height: 1.4; }

/* Paragraph text - body copy styling */
.brxe-post-content p {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
}

/* Cover block - full-width hero sections with background images */
.wp-block-cover {
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 0;
  margin-bottom: 60px;
}

/* Cover block inner content - ensures proper layering above background */
.wp-block-cover__inner-container {
  padding: 40px 20px;
  z-index: 2;
}

/* Column layout - flexible grid system for multi-column content */
.wp-block-columns {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin: 30px 0;
}

/* Individual column - responsive width with minimum breakpoint */
.wp-block-column {
  flex: 1;
  min-width: 280px;
}

/* Button wrapper - spacing around button elements */
.wp-block-button {
  margin: 10px 5px;
}

/* Button link styling - consistent CTA appearance */
.wp-block-button__link {
  display: inline-block;
  padding: 18px 48px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Outline button style - transparent background with border */
.is-style-outline .wp-block-button__link {
  background: transparent !important;
  border: 2px solid #304843;
  color: #304843 !important;
}

/* Outline button hover state - inverted colors on interaction */
.is-style-outline .wp-block-button__link:hover {
  background: #304843 !important;
  color: white !important;
}

/* Details/Accordion element - expandable content sections */
.wp-block-details {
  border-radius: 12px;
  padding: 20px 30px;
  margin-bottom: 20px;
}

/* Accordion summary/trigger - clickable header */
.wp-block-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 18px;
  color: #304843;
  padding: 10px 0;
}

/* Open accordion state - adds spacing when expanded */
.wp-block-details[open] summary {
  margin-bottom: 15px;
}

/* Horizontal separator - visual section divider */
.wp-block-separator {
  border: none;
  border-top: 1px solid #ddd;
  margin: 60px 0;
}

/* Spacer block - vertical spacing element */
.wp-block-spacer {
  display: block;
}

/* Image block - container for images */
.wp-block-image {
  margin: 30px 0;
}

/* Center-aligned images */
.wp-block-image.aligncenter {
  text-align: center;
}

/* Image element - responsive sizing and styling */
.wp-block-image img {
  height: auto;
  border-radius: 8px;
}

/* List elements - unordered and ordered lists */
.brxe-post-content ul,
.brxe-post-content ol {
  margin: 20px 0;
  padding-left: 30px;
}

/* List items - individual bullet/number points */
.brxe-post-content li {
  margin-bottom: 10px;
  line-height: 1.6;
}

/* Blockquote - styled quote boxes */
.wp-block-quote {
  border-left: 4px solid #304843;
  padding: 20px 30px;
  margin: 30px 0;
  font-style: italic;
}

/* Quote attribution - author/source citation */
.wp-block-quote cite {
  display: block;
  margin-top: 15px;
  font-style: normal;
  font-weight: 600;
}

/* Background color utility - adds padding to colored sections */
.has-background {
  padding: 30px;
  border-radius: 12px;
}

/* Mobile responsive adjustments - tablet and phone screens */
@media (max-width: 768px) {
  /* Stack columns vertically on small screens */
  .wp-block-columns {
    flex-direction: column;
  }
  
  /* Reduce heading sizes for mobile readability */
  .brxe-post-content h1 { font-size: 36px; }
  .brxe-post-content h2 { font-size: 28px; }
  .brxe-post-content h3 { font-size: 24px; }
  
  /* Reduce hero height on mobile devices */
  .wp-block-cover {
    min-height: 400px;
  }
}


/* ========================================
 * ENDE DER CUSTOM STYLES
 * ======================================== */


/* =====================================================================
   P2/P3 Mobile-Headlines — Hyphenation/Word-Break Fix
   Branch: fix/sillgraben-mobile-headlines
   Ticket: ClickUp 86c9n58nf + 86c9n590n / Paperclip STA-198
   Datum: 2026-05-07 / erweitert 2026-05-11 / Tablet-Range 2026-05-14
   Hintergrund: Deutsche Compound-Wörter (Gemeinschaft, Hauswirtschaftsteam)
   sprengen Container auf Mobile/Tablet, Browser hyphenisiert ohne explizites
   CSS nicht. Fix: hyphens:auto + word-break + overflow-wrap.
   2026-05-11 Erweiterung: Selector greift jetzt auf alle Heading-Tags
   (H1-H6) plus Bricks-Heading-Klassen-Varianten plus .title-Klasse.
   2026-05-14 Tablet-Range: Hyphenation gilt bis 1024px (iPad inklusive),
   Page-Header in 3 Stufen (52/64/80) — Harald-Feedback iPad-Headlines
   nicht hyphenisiert.
   !important nötig gegen Bricks-Inline-Styles.
   ===================================================================== */
@media (max-width: 1024px) {
  h1, h2, h3, h4, h5, h6,
  .brxe-heading,
  [class*="brxe-heading"],
  .title {
    hyphens: auto !important;
    -webkit-hyphens: auto !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
  }
}

/* Page-Header #brxe-zfiuph (großer grüner Titel auf allen Subseiten,
   Bricks-Template-Component): 3-Stufen-Skalierung gegen Truncate. */
@media (max-width: 767px) {
  /* Mobile (Handy): 52px */
  #brxe-zfiuph {
    font-size: 52px !important;
    line-height: 1.1 !important;
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
  /* Tablet (iPad Portrait inkl. iPad Pro): 64px */
  #brxe-zfiuph {
    font-size: 64px !important;
    line-height: 1.15 !important;
  }
}

@media (max-width: 767px) {

  /* =====================================================================
     P5 — Weißer Bereich nach Footer auf Mobile
     Ticket: ClickUp 86c9n59h1 / Harald Punkt 5
     Body/Content darf keinen padding-bottom haben; letzte Section vor
     Footer ebenfalls flach abschließen. */
  body.brx-body,
  #brx-content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  #brx-content > section:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
  #brx-footer {
    margin-bottom: 0 !important;
  }

  /* =====================================================================
     P4 — Back-to-Top-Button auf Mobile
     Ticket: ClickUp 86c9n5981 / Harald Punkt 4
     Erscheint nach 500 px Scroll, kleiner Pfeil unten rechts. */
  #sg-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #2d4a3e; /* Sillgraben-Grün */
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    padding: 0;
  }
  #sg-back-to-top.is-visible {
    opacity: 0.92;
    visibility: visible;
    transform: translateY(0);
  }
  #sg-back-to-top:hover,
  #sg-back-to-top:focus {
    opacity: 1;
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
  }
  #sg-back-to-top svg {
    width: 20px;
    height: 20px;
    display: block;
  }

  /* Solange Cookie-Banner sichtbar ist, Button höher schieben statt verstecken.
     Banner ist cmplz-bottom-right, würde sonst Klicks intercepten. */
  body:has(.cmplz-cookiebanner.cmplz-show) #sg-back-to-top {
    bottom: clamp(180px, 28vh, 240px);
  }
}

/* Desktop: Back-to-Top ausblenden (Mobile-only Feature) */
@media (min-width: 768px) {
  #sg-back-to-top { display: none !important; }
}
