/*
Theme Name: Rusterholz AG
Theme URI: https://rusterholz-ag.ch
Author: Rusterholz AG
Description: Modernes Theme für rusterholz-ag.ch, basierend auf dem 2026er Redesign-Prototyp. Ersetzt SoSimple.
Version: 1.6 (Kachel-Overlay-Menü statt Dropdown-Navigation; WPGlobus-Sprachumschalter integriert; hartcodierte Theme-Texte mehrsprachig; "Auf einen Blick"-Übersicht dynamisch aus dem Hauptmenü, inkl. Rusterholz AG/Umgebung/Konto; Konto aus dem Hauptmenü ausgeblendet; Teaser ohne Bildunterschriften/Shortcode-Reste)
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: rusterholz
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:  #3a5a3e;
  --green-mid:   #5a7d5e;
  --green-light: #c8dbc9;
  --cream:       #f7f5f0;
  --sand:        #ede9e0;
  --text:        #1e1e1e;
  --muted:       #5a5a5a;
  --white:       #ffffff;
  --nav-h:       64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ─── NAV ─── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  min-height: var(--nav-h);
  background: rgba(58, 90, 62, 0.97);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 2.5rem;
  box-shadow: 0 2px 20px rgba(0,0,0,.25);
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}
.site-branding a {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--white);
  letter-spacing: .06em;
  text-decoration: none;
}
.site-branding img { max-height: 40px; }

.menu-toggle {
  background: none; border: none; color: white;
  font-size: 1.7rem; line-height: 1; cursor: pointer;
  padding: .3rem .4rem;
}

/* ─── MENÜ-OVERLAY (Kacheln statt Dropdown) ───
   Ersetzt die frühere horizontale/mehrstufige Navigation. Von jeder Seite
   aus über den Menü-Button oben rechts erreichbar (siehe header.php). */
.site-menu-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: var(--green-dark);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-16px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  overflow-y: auto;
}
.site-menu-overlay.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
body.menu-is-open { overflow: hidden; }

.site-menu-overlay-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem;
  position: relative;
}
.menu-overlay-close {
  position: absolute;
  top: 1.1rem; right: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4);
  background: transparent;
  color: var(--white);
  font-size: 1.6rem; line-height: 1;
  cursor: pointer;
}
.menu-overlay-close:hover { background: rgba(255,255,255,.12); }

.kachel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
}
.kachel-item {
  display: block;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  padding: 1.8rem 1.6rem;
  text-decoration: none;
  transition: transform .25s, background .25s, box-shadow .25s;
}
.kachel-item:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,.12);
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
}
.kachel-title {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: .4rem;
}
.kachel-desc { display: block; font-size: .88rem; color: var(--green-light); }

/* Sprachumschalter-Kachel (WPGlobus) – kein Link, darum kein Hover-Lift */
.kachel-item--lang { cursor: default; }
.kachel-item--lang:hover { transform: none; box-shadow: none; }
.kachel-lang-links { display: flex; align-items: center; gap: 1rem; margin-top: .5rem; flex-wrap: wrap; }
.kachel-lang-current { opacity: .5; }
.kachel-lang-link { color: var(--white); text-decoration: none; font-weight: 600; }
.kachel-lang-link:hover { color: var(--green-light); }

/* ─── HERO ─── */
.hero {
  height: 100vh; min-height: 600px;
  position: relative;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-top: calc(-1 * var(--nav-h));
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.5);
  transform: scale(1.04);
  transition: transform 8s ease;
}
.hero:hover .hero-bg { transform: scale(1.12); }
.hero-content { position: relative; z-index: 1; color: #fff; padding: 6rem 1.5rem 0; }
.hero-eyebrow {
  font-size: .8rem; letter-spacing: .3em; text-transform: uppercase;
  opacity: .7; margin-bottom: 1rem; font-weight: 300;
}
.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700; line-height: 1.08;
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
  margin-bottom: .5rem;
}
.hero-content h2 {
  font-size: clamp(.95rem, 2.5vw, 1.3rem);
  font-weight: 300; letter-spacing: .2em; text-transform: uppercase;
  opacity: .88; margin-bottom: 2.5rem;
}
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  padding: .75rem 2rem; border-radius: 3px;
  font-size: .9rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: all .2s; border: 2px solid transparent;
}
.btn-outline { border-color: rgba(255,255,255,.8); color: #fff; background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; }
.btn-filled { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-filled:hover { background: var(--green-mid); border-color: var(--green-mid); }

/* ─── SECTION BASE ─── */
.page-section, section { padding: 6rem 1.5rem; }
.section-label {
  font-size: .75rem; font-weight: 700; letter-spacing: .25em;
  text-transform: uppercase; color: var(--green-dark); margin-bottom: 1rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2; color: var(--text); margin-bottom: 1.5rem;
}
.section-lead { font-size: 1.05rem; line-height: 1.8; color: var(--muted); max-width: 640px; }
.container { max-width: 1100px; margin: 0 auto; }
.entry-content { font-size: 1.02rem; line-height: 1.85; color: var(--muted); }
.entry-content h2, .entry-content h3 { font-family: 'Playfair Display', serif; color: var(--text); margin: 1.6em 0 .6em; }
.entry-content img { border-radius: 8px; margin: 1.2em 0; }
.entry-content a { color: var(--green-dark); }

/* ─── PAGE HEADER (default page.php) ─── */
.page-hero {
  background: var(--green-dark); color: white;
  padding: 6.3rem 1.5rem 2.4rem; text-align: center;
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

/* ─── WOHNUNGEN / BUILDINGS ─── */
.wohnungen-section { background: var(--sand); }
.buildings-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; margin-top: 3rem;
}
.building-card {
  background: var(--white); border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .25s, box-shadow .25s;
  text-decoration: none; color: inherit; display: block;
}
.building-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(0,0,0,.13); }
.building-img { width: 100%; height: 190px; object-fit: cover; }
.building-img-placeholder {
  width: 100%; height: 190px;
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  display: flex; align-items: center; justify-content: center; color: white; font-size: 2rem;
}
.building-body { padding: 1.4rem; }
.building-address {
  font-size: .75rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase; color: var(--green-dark); margin-bottom: .4rem;
}
.building-name { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--text); margin-bottom: .7rem; }
.building-desc { font-size: .88rem; line-height: 1.6; color: var(--muted); margin-bottom: 1rem; }
.building-status {
  display: inline-block; font-size: .78rem; font-weight: 700;
  padding: .3rem .9rem; border-radius: 20px; letter-spacing: .05em;
}
.badge-free { background: #d4edda; color: #1a6b3a; }
.badge-full { background: #f0ebe3; color: #7a6a5a; }

/* ─── PHILOSOPHIE / KARTEN-GRID ─── */
.phil-section { background: var(--white); }
.phil-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2rem; margin-top: 3rem; }
.phil-card { border-top: 3px solid var(--green-dark); padding: 1.8rem 0 0; }
.phil-icon { font-size: 2rem; margin-bottom: 1rem; }
.phil-card h4 { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: .7rem; }
.phil-card p { font-size: .9rem; line-height: 1.7; color: var(--muted); }

/* ─── KONTAKT ─── */
.kontakt-section { background: var(--green-dark); color: var(--white); }
.kontakt-section .section-label { color: var(--green-light); }
.kontakt-section .section-title { color: var(--white); }
.kontakt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-top: 3rem; }
.kontakt-info p { font-size: 1rem; line-height: 1.9; color: rgba(255,255,255,.8); }
.kontakt-info strong { color: var(--white); }
.kontakt-info a { color: var(--green-light); text-decoration: none; }
.kontakt-info a:hover { text-decoration: underline; }
.kontakt-form .wpcf7-form input,
.kontakt-form .wpcf7-form textarea {
  width: 100%; padding: .85rem 1rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 4px; color: white; font-size: .95rem;
  font-family: 'Source Sans 3', sans-serif; margin-bottom: 1rem;
}
.kontakt-form .wpcf7-form input::placeholder,
.kontakt-form .wpcf7-form textarea::placeholder { color: rgba(255,255,255,.4); }
.kontakt-form .wpcf7-form textarea { height: 130px; resize: vertical; }
.kontakt-form .wpcf7-form input[type=submit] {
  background: var(--green-light); color: var(--green-dark);
  border: none; padding: .85rem 2.5rem; border-radius: 3px;
  font-weight: 700; font-size: .9rem; letter-spacing: .06em;
  text-transform: uppercase; cursor: pointer; width: auto;
}

/* ─── FOOTER ─── */
.site-footer {
  background: #1a2e1c; color: rgba(255,255,255,.5);
  text-align: center; padding: 1.5rem; font-size: .8rem; letter-spacing: .05em;
}
.site-footer a { color: var(--green-light); text-decoration: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .buildings-grid, .phil-grid, .kontakt-grid { grid-template-columns: 1fr; }
  .site-menu-overlay-inner { padding-top: calc(var(--nav-h) + 1.5rem); }
}
