/*
Theme Name: FlexiTheme
Theme URI: https://example.com/flexitheme
Author: FlexiTheme
Author URI: https://example.com
Description: Ein schlankes, Elementor-kompatibles WordPress-Theme mit frei konfigurierbarem Header (Logo + Menü), sauberem Elementor-Contentbereich ohne Seitentitel und einem Footer mit Textzeile, Untermenü und wählbarer Ausrichtung. Alle Farben, Schriften und die Header-Trennlinie sind bequem im Customizer einstellbar.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flexitheme
Tags: custom-logo, custom-menu, custom-colors, elementor, full-width-template
*/

/* ============================================================
   RESET & BASE
   Schriften werden via PHP direkt als CSS-Regeln ausgegeben,
   nicht per CSS Custom Property – so funktionieren sie zuverlässig.
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  /* font-family und font-size werden per PHP (functions.php) inline gesetzt */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   SITE LAYOUT
   ============================================================ */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1 0 auto;
}

/* ============================================================
   HEADER
   Hintergrundfarbe + Trennlinie werden per PHP inline gesetzt.
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Logo ---- */
.site-branding {
  flex-shrink: 0;
}

.site-branding a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* Logogrößen werden per PHP inline gesetzt (.custom-logo { height: Xpx; width: ... }) */
.custom-logo {
  display: block;
  max-width: 100%;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
}

.main-navigation ul li {
  position: relative;
}

.main-navigation ul li a {
  display: block;
  padding: 0.5rem 1rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

/* Dropdown */
.main-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  z-index: 1000;
  flex-direction: column;
  background-color: inherit;
}

.main-navigation ul li:hover > ul,
.main-navigation ul li:focus-within > ul {
  display: flex;
}

.main-navigation ul ul li a {
  padding: 0.6rem 1.2rem;
  font-size: 0.9em;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.main-navigation ul ul li:last-child a {
  border-bottom: none;
}

/* Mobile toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   CONTENT AREA – STANDARD & ELEMENTOR
   ============================================================ */

/* Seitentitel nie anzeigen */
.entry-header,
.entry-title,
.page-title {
  display: none !important;
}

/* ================================================================
   ELEMENTOR-SEITEN  (.ft-elementor-wrap)
   Keine Wrapper, kein overflow:hidden – Elementor steuert alles.
   "Sektion strecken" im Elementor-Editor → volle Browserbreite.
   ================================================================ */
.ft-elementor-wrap {
  width: 100%;
  padding: 0;
  margin: 0;
  overflow: visible;
}

/* Elementor-Sections direkt ab Oberkante */
.ft-elementor-wrap > .elementor > .elementor-inner > .elementor-section:first-child,
.ft-elementor-wrap > .elementor .e-con:first-child,
.ft-elementor-wrap .elementor-section:first-child {
  margin-top: 0 !important;
}

/* Sicherstellen dass gestreckte Sections den vollen Viewport nutzen */
.ft-elementor-wrap .elementor-section.elementor-section-stretched {
  max-width: none !important;
}

/* ================================================================
   STANDARD-SEITEN  (.ft-standard-wrap)
   Zentrierter Container mit konfigurierbarer Maximalbreite.
   ================================================================ */
.ft-standard-wrap {
  width: 100%;
}

.ft-content-container {
  max-width: var(--ft-container-width, 1280px);
  margin-left: auto;
  margin-right: auto;
  padding: 2.5rem 1.5rem;
}

/* Typografie Standard-Content */
.ft-content-container h1,
.ft-content-container h2,
.ft-content-container h3,
.ft-content-container h4,
.ft-content-container h5,
.ft-content-container h6 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.ft-content-container p     { margin-bottom: 1rem; }
.ft-content-container ul,
.ft-content-container ol    { margin: 0 0 1rem 1.5rem; }
.ft-content-container img   { border-radius: 4px; margin: 1rem 0; }

/* ============================================================
   FOOTER
   Hintergrundfarbe, Textfarbe und Ausrichtung werden per PHP gesetzt.
   ============================================================ */
.site-footer {
  padding: 1.2rem 1.5rem;
  flex-shrink: 0;
}

.footer-inner {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-text {
  font-size: 0.875rem;
  line-height: 1.5;
}

.footer-text a {
  text-decoration: underline;
}

/* Footer-Untermenü */
.footer-navigation ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.footer-navigation ul li {
  display: flex;
  align-items: center;
}

.footer-navigation ul li::after {
  content: '|';
  padding: 0 0.5rem;
  opacity: 0.35;
}

.footer-navigation ul li:last-child::after {
  display: none;
}

.footer-navigation ul li a {
  font-size: 0.8rem;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-navigation ul li a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    min-height: auto !important;
  }

  .menu-toggle {
    display: flex;
  }

  .main-navigation {
    display: none;
    width: 100%;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding: 0.5rem 0 0.75rem;
  }

  .main-navigation.nav-open {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-navigation ul li a {
    padding: 0.6rem 0.5rem;
    width: 100%;
  }

  .main-navigation ul ul {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 1rem;
    border-radius: 0;
  }

  .main-navigation ul li:hover > ul {
    display: none;
  }

  .main-navigation ul li.submenu-open > ul {
    display: flex;
  }

  .footer-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem;
    text-align: left !important;
  }

  .footer-navigation ul {
    flex-wrap: wrap;
  }
}
