/*
Theme Name:   Divi Child Theme
Theme URI:    https://operator4you.de
Description:  Leistungsoptimiertes Divi Child Theme mit Sticky Footer-System (Operator4You Stable Build).
Author:       Jens Buchwald
Author URI:   https://operator4you.de
Template:     Divi
Version:      1.3.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  divi-child-theme
Tags:         divi, child, performance, sticky-footer, operator4you
*/

/* =========================================================
   💠 OPERATOR4YOU – FLEXIBLE STICKY FOOTER SYSTEM
   =========================================================
   Build:      Stable Integration (v1.3.4)
   Pair:       Divi Child Base v1.3.3 + functions.php v1.2.4
   Author:     Jens Buchwald
   Created:    2025-10-25
   ---------------------------------------------------------
   Zweck:
   Diese Regel fixiert die Footer-Sektion (#sticky-footer)
   am unteren Seitenrand, wenn der Inhalt kürzer als
   der Viewport ist. Bei längeren Seiten wandert sie
   dynamisch mit nach unten.
   Kein position: fixed → volle Kompatibilität mit Divi.
   ========================================================= */

/* Grundstruktur (Flexbox-Basis für Sticky-Footer-System) */
html,
body {
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

#page-container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

#et-main-area {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

#main-content {
  flex: 1 0 auto;
}

/* =========================================================
   🔹 Footer-Sektion (ID: #sticky-footer)
   ---------------------------------------------------------
   - bleibt unten bei wenig Inhalt
   - verschiebt sich bei langem Inhalt automatisch
   - kein Überlappen mit Texten oder Builder-Elementen
   ========================================================= */
#sticky-footer {
  flex-shrink: 0;
  margin-top: auto !important;
  position: relative; /* verhindert Builder-Konflikte */
  z-index: 10;
}

/* =========================================================
   🔹 Builder-Kompatibilitätsfix
   ---------------------------------------------------------
   verhindert im Frontend-Builder (Visual Mode), dass der
   Footer fälschlich oben angezeigt oder überlappt wird.
   ========================================================= */
.et-fb #sticky-footer {
  position: relative !important;
  margin-top: 0 !important;
}