/*
  Mastergarden theme support CSS.
  Three jobs only:
    1. Self-hosted font @font-face declarations.
    2. Helper classes the customer can apply via Elementor's "CSS Classes" field.
    3. Tiny chrome bits that the theme parts (header/footer) need.
  Everything else lives in Elementor (Kit + per-widget settings).
*/

/* ─── Fonts (self-hosted per-weight, DSGVO) ─────────────────────────── */
@font-face { font-family:'Manrope'; font-style:normal; font-weight:300; font-display:swap; src:url('../fonts/Manrope-Light.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/Manrope-Regular.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/Manrope-Medium.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/Manrope-SemiBold.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/Manrope-Bold.woff2') format('woff2'); }
@font-face { font-family:'DM Serif Display'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/DMSerifDisplay-Regular.woff2') format('woff2'); }
@font-face { font-family:'DM Serif Display'; font-style:italic; font-weight:400; font-display:swap; src:url('../fonts/DMSerifDisplay-Italic.woff2') format('woff2'); }

/* ─── Theme parts chrome ──────────────────────────────────────────────── */
.mg-site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #1F3018;
  border-bottom: 1px solid rgba(195, 162, 75, 0.45);
  padding: 18px 0;
}
.mg-site-header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.mg-site-header__brand {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 26px;
  color: #fff;
  text-decoration: none;
  line-height: 1.05;
}
.mg-site-header__brand small {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #C3A24B;
  margin-top: 4px;
  font-weight: 400;
}
.mg-site-header__nav {
  display: flex;
  gap: 32px;
}
.mg-site-header__nav a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
}
.mg-site-header__nav a::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 100%;
  height: 1px; background: #C3A24B;
  transition: right .25s;
}
.mg-site-header__nav a:hover { color: #C3A24B; }
.mg-site-header__nav a:hover::after { right: 0; }

.mg-site-footer {
  background: #1B1C1A;
  color: #F7F5EC;
  padding: 80px 0 28px;
}
.mg-site-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
}
.mg-site-footer h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #C3A24B;
  margin: 0 0 16px;
}
.mg-site-footer p,
.mg-site-footer a { color: #F7F5EC; font-size: 15px; line-height: 1.55; }
.mg-site-footer a { display: block; padding: 3px 0; text-decoration: none; }
.mg-site-footer a:hover { color: #C3A24B; }
.mg-site-footer__legal {
  max-width: 1280px; margin: 56px auto 0;
  padding: 24px 32px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 12px; opacity: .82;
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.mg-site-footer__legal a {
  display: inline;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
}
@media (max-width: 820px) {
  .mg-site-footer__inner { grid-template-columns: 1fr; gap: 30px; }
  .mg-site-header__nav { display: none; }
}

/* ─── Helper classes the customer applies via Elementor → CSS Classes ─── */

/* Apply to any Section: thin brass hairline at the section's TOP edge.
   Matches the variant-b separator pattern (header underline + section dividers). */
.mg-divider {
  border-top: 1px solid rgba(195, 162, 75, 0.4);
}

/* Apply to a column inside an Elementor section to make it sticky on scroll.
   Elementor's default .elementor-column has position:relative — we need to
   override that. Higher-specificity selector beats Elementor's defaults
   without resorting to !important. Sticky offset clears the 100px sticky
   header band plus a 24px breathing gap. */
@media (min-width: 1024px) {
  .elementor-column.mg-sticky-label,
  .e-con.mg-sticky-label,
  .mg-sticky-label {
    position: sticky;
    top: 124px;
    align-self: flex-start;
    /* Self-bound height so sticky has a defined containment box */
    height: fit-content;
  }
}
/* Mobile: revert to normal flow so label sits above body content */
@media (max-width: 1023px) {
  .mg-sticky-label { position: relative; top: 0; }
}

/* Decorative short brass rule above a section heading. Apply to a Heading
   widget or to a Divider widget; the customer can change colour via Kit. */
.mg-rule-short {
  display: inline-block;
  width: 64px;
  height: 2px;
  background: #5C5318;
  margin: 18px 0;
}

/* Eyebrow text — small uppercase tracked. Apply to a Heading widget set to "div". */
.mg-eyebrow {
  font-family: 'Manrope', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.28em !important;
  text-transform: uppercase !important;
}

/* Forest-on-dark eyebrow variant — use inside forest sections. */
.mg-eyebrow--dark { color: #C3A24B !important; }

/* Pullquote-ish block — wrap a Text Editor widget with this class. */
.mg-pullquote {
  border-left: 3px solid #C3A24B;
  padding: 12px 0 12px 24px;
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  font-size: 22px;
  color: #1F3018;
}

/* Numbered display digit for process steps — Heading widget with this class. */
.mg-bignum {
  font-family: 'DM Serif Display', serif !important;
  font-size: 120px !important;
  line-height: 0.9 !important;
  color: #5C4F18 !important;
}
.mg-bignum--brass { color: #C3A24B !important; }

/* Service tile grid — 2-column on desktop, 1-column on mobile.
   Tiles are <a> elements so the whole card area is the click target —
   not just the headline. Spacing between tiles, no collapsed borders. */
.mg-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 767px) {
  .mg-services-grid { grid-template-columns: 1fr; }
}
.mg-tile {
  display: flex;
  flex-direction: column;
  background: #FBFAF4;
  border: 1px solid #D7D8CB;
  padding: 36px 28px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  min-height: 260px;
  transition: background .2s, transform .25s ease, box-shadow .25s ease;
}
.mg-tile:hover {
  background: #F7F5EC;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(31,48,24,.08);
}
.mg-tile:focus-visible {
  outline: 2px solid #C3A24B;
  outline-offset: 3px;
}
.mg-tile h3,
.mg-tile p { color: inherit; }
.mg-tile-num {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: #5C5318;
  margin-bottom: 14px;
  display: block;
}
.mg-tile p { flex: 1; margin-bottom: 16px; }
.mg-tile-more {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5C5318;
  transition: gap .2s ease;
}
.mg-tile:hover .mg-tile-more { letter-spacing: 0.22em; }

/* Image with brass tag for portrait nameplate */
.mg-portrait-meta {
  border-top: 1px solid #D7D8CB;
  padding-top: 16px;
  margin-top: 12px;
}

/* Photo gallery — 3-col grid of square crops, 2-col tablet, 1-col mobile */
.mg-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .mg-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .mg-gallery { grid-template-columns: 1fr; } }
.mg-gallery .mg-gallery-item {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center center;
  position: relative;
  overflow: hidden;
  transition: transform .35s ease;
}
.mg-gallery .mg-gallery-item:hover { transform: scale(1.02); }

/* Service overview tile (used on /leistungen and footer hubs) — image-led */
.mg-service-card {
  display: block;
  background: #FBFAF4;
  border: 1px solid #D7D8CB;
  text-decoration: none;
  color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
}
.mg-service-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(31,48,24,.08); }
.mg-service-card-img { aspect-ratio: 4/3; background-size: cover; background-position: center; }
.mg-service-card-body { padding: 24px 22px 26px; }
.mg-service-card-body h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: #1F3018;
  margin: 0 0 8px;
}
.mg-service-card-body p { margin: 0; font-size: 15px; color: #2C2A1F; line-height: 1.55; }
.mg-service-card-more {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5C5318;
}

/* Reused 4-up team portrait grid (Team page version of homepage grid) */
.mg-team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .mg-team-grid { grid-template-columns: repeat(2, 1fr); } }
.mg-team-grid .portrait .pic {
  aspect-ratio: 3/4;
  background-size: cover;
  background-position: center;
  background-color: #1F3018;
}
