/*
 * theme-layout.css
 * Phase 1: ausgelagert aus functions.php (fleet_data_unified_dark_theme, ehem. wp_head Prio 999).
 * Wird zuletzt in der Abhaengigkeitskette geladen -> deterministische Kaskade, kein wp_head-Inline mehr.
 * Backup: _backup-phase1-20260518-184159/
 */

/* UNIFIED DARK THEME FOR ALL PAGES */
body,
html {
    background: #2C3E50 !important;
    color: #ffffff !important;
    min-height: 100vh;
}

.page-main,
.page-content,
.single-post,
.search-section,
.entry-content,
main {
    background: #2C3E50 !important;
    color: #ffffff !important;
}

.page-hero,
.single-hero {
    background: #178687;
    padding: 80px 0 60px;
    margin-bottom: 0;
}

.page-title,
.single-title,
.page-hero h1 {
    color: white !important;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.page-content-section,
.page-main section,
.single-content-wrapper {
    background: #2C3E50 !important;
    padding: 60px 0;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4 {
    color: #ffffff !important;
    margin-bottom: 1.5rem;
}

.page-content p,
.entry-content p,
.single-content p,
.page-main p {
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.page-content ul,
.page-content ol,
.entry-content ul,
.entry-content ol {
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.8;
    padding-left: 2rem;
    margin-bottom: 1.25rem;
}

.page-content li,
.entry-content li {
    color: rgba(255, 255, 255, 0.95) !important;
    margin-bottom: 0.5rem;
}

.page-content a:not(.btn):not(.button),
.entry-content a:not(.btn):not(.button),
.single-content a:not(.btn):not(.button) {
    color: #178687 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-content a:not(.btn):not(.button):hover,
.entry-content a:not(.btn):not(.button):hover {
    color: #147273 !important;
}

.content-box,
.info-box,
.argument-block,
.trust-card,
.path-card {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.blog-sidebar,
.search-sidebar {
    background: transparent !important;
}

.sidebar-widget {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.sidebar-widget-title {
    color: white !important;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.single-content-wrapper {
    background: #2C3E50 !important;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.blog-main {
    background: transparent !important;
}

.single-meta,
.single-meta-top {
    color: rgba(255, 255, 255, 0.8) !important;
}

.single-featured-image img {
    border-radius: 12px;
    margin-bottom: 30px;
}

.single-tag,
.blog-card-cat {
    background: #2C3E50 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.single-tag:hover,
.blog-card-cat:hover {
    background: #1A252F !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.single-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.single-nav-link {
    flex: 1;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.single-nav-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: #178687 !important;
    transform: translateY(-2px);
}

.single-nav-label {
    color: #178687 !important;
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.single-nav-title {
    color: white !important;
    font-weight: 600;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: #178687 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(23, 134, 135, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95) !important;
}

th {
    font-weight: 600;
    color: white !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

/* ------------------------------------------------------------
 * Tabellen ohne Rahmen — Opt-out fuer einzelne Bloecke.
 * Klasse "fn-no-border" am Tabellen-Block setzen (z. B. Seite
 * "light-vormerken"). Hebt die globalen th/td-Trennlinien auf;
 * deckt Klasse am <figure>-Wrapper UND direkt an <table> ab.
 * ---------------------------------------------------------- */
.fn-no-border,
.fn-no-border table,
.fn-no-border th,
.fn-no-border td {
    border: 0 !important;
}

blockquote {
    border-left: 4px solid #178687;
    padding-left: 24px;
    margin: 30px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9) !important;
}

code {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #178687 !important;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

pre {
    background: rgba(255, 255, 255, 0.08) !important;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

pre code {
    background: transparent !important;
    padding: 0;
}

@media (max-width: 968px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    .page-title,
    .single-title {
        font-size: 2.2rem;
    }
    .page-hero,
    .single-hero {
        padding: 60px 0 40px;
    }
    .single-nav {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .page-title,
    .single-title {
        font-size: 1.8rem;
    }
    .page-content-section,
    .single-content-wrapper {
        padding: 40px 0;
    }
}

.wp-block-group,
.wp-block-cover,
.wp-block-columns {
    background: transparent !important;
}

.wp-block-group h1,
.wp-block-group h2,
.wp-block-group h3,
.wp-block-group h4,
.wp-block-group h5,
.wp-block-group h6,
.wp-block-group p {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* ============================================================
 * Phase 3: Header — EINZIGE Quelle der Wahrheit
 * Sichtbarkeit (Desktop-Nav <-> Burger), Grundlayout und Customizer-
 * Positionen. Mobile-first, OHNE !important: style.css, responsive.css
 * und modern-header-styles.css steuern den Header nicht mehr (der
 * fruehere !important-Krieg ueber 4 Dateien ist damit aufgeloest).
 * Werte aus dem Customizer via :root-Variablen (fleet_data_dynamic_css_vars).
 * theme-layout.css laedt zuletzt -> diese Regeln gewinnen ohne !important.
 * ============================================================ */

/* --- Container & unveraenderliches Grundlayout --- */
.header .container,
.header > .container {
    max-width: var(--fleet-header-container-max, 100%);
    width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
    margin: var(--fleet-header-container-margin, 0);
}
.header .header-content {
    display: grid;
    align-items: center;
    gap: 1rem;
    width: 100%;
}
.header .nav-menu {
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.header .nav-link,
.header .nav-item {
    white-space: nowrap;
}

/* --- Basis = Mobil: Burger sichtbar, Desktop-Nav versteckt --- */
.header .header-content {
    grid-template-columns: auto 1fr auto;
}
.header .logo {
    grid-column: 1;
    justify-self: start;
}
.header .desktop-nav {
    display: none;
}
.header .header-actions {
    display: flex;
    grid-column: 3;
    justify-self: end;
}

/* --- Desktop ab 1024px: Desktop-Nav sichtbar, Burger weg --- */
@media (min-width: 1024px) {
    .header .header-content {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .header .logo {
        grid-column: var(--fleet-logo-col, 1);
        justify-self: var(--fleet-logo-justify, start);
    }
    .header .desktop-nav {
        display: flex;
        grid-column: var(--fleet-menu-col, 3);
        justify-self: var(--fleet-menu-justify, end);
    }
    .header .header-actions {
        display: none;
    }
}

/* Inhaltsbreite (Customizer: content_width_px) */
.container,
.nav-container,
.hero-content,
.content-wrapper {
    max-width: var(--fleet-content-width, 1200px);
}

/* style.css setzt fuer Unterseiten und Rechtstexte ein festes
 * max-width:1000px auf ".page-content .container" bzw.
 * ".legal-section .container" (Spezifitaet 0,2,0) und ueberstimmt
 * damit die Variablen-Regel oben. Hier mit gleicher Spezifitaet
 * gegenhalten — theme-layout.css laedt zuletzt und gewinnt, der
 * Customizer-Slider greift dadurch auf ALLEN Unterseiten. */
.page-content .container,
.legal-section .container {
    max-width: var(--fleet-content-width, 1200px);
}

/* ============================================================
 * Logo-Groesse — EINE zentrale Regel.
 * Die Logo-Bilder sind freigestellt (kein weisser Rand mehr),
 * daher: CSS-Hoehe = tatsaechlich sichtbare Logo-Hoehe.
 * theme-layout.css laedt zuletzt -> diese Regel gewinnt und
 * ersetzt die ~15 verstreuten .logo-img-Regeln in
 * modern-header-styles.css.
 * ============================================================ */
.logo-img,
.logo-svg {
    height: 68px !important;          /* Handy  (Header ~80px) */
    width: auto !important;
    max-width: 92vw !important;       /* laeuft nie aus dem Screen */
}
@media (min-width: 768px) {
    .logo-img, .logo-svg { height: 88px !important; }    /* Tablet (Header ~100px) */
}
@media (min-width: 1024px) {
    .logo-img, .logo-svg { height: 130px !important; }   /* Desktop (Header ~175px) */
}
.header.is-sticky .logo-img,
.header.is-sticky .logo-svg {
    height: 56px !important;          /* gescrollt: Handy/Tablet */
}
@media (min-width: 1024px) {
    .header.is-sticky .logo-img,
    .header.is-sticky .logo-svg { height: 90px !important; }   /* gescrollt: Desktop */
}

/* ============================================================
 * Mobile-Suche: Overlay oben am Bildschirm fixieren.
 * Vorher war es position:absolute und scrollte mit -> beim
 * Hochfahren der Tastatur verschwand das Eingabefeld.
 * Jetzt fixiert direkt unter dem Header -> immer sichtbar.
 * ============================================================ */
@media (max-width: 767px) {
    .search-overlay.active {
        position: fixed !important;
        top: 84px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
}

/* ============================================================
 * Editionen-Kacheln (Seite "Editionen im Vergleich").
 * Ersetzt die fruehere grosse Vergleichstabelle. Scoping ueber
 * die Klasse ".editionen-tiles" -> ueberlebt den Seitentausch
 * (Post 714 -> Post 276), unabhaengig von der Seiten-ID.
 * !important nur dort, wo der globale ".wp-block-group"-Block
 * (background:transparent / color) sonst durchschlaegt.
 * ============================================================ */
.editionen-tiles {
    gap: 1.75rem !important;
    margin: 2.5rem 0 !important;
    align-items: stretch;
}
.editionen-tiles .wp-block-column {
    display: flex;
}
.editionen-tiles .edition-tile {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: rgba(52, 73, 94, 0.45) !important;
    border: 2px solid rgba(23, 134, 135, 0.45);
    border-radius: 18px;
    padding: 2rem 1.75rem !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.editionen-tiles .edition-tile:hover {
    transform: translateY(-6px);
    border-color: #1fb6b8;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38),
                0 0 26px rgba(31, 182, 184, 0.65),
                inset 0 0 12px rgba(31, 182, 184, 0.28);
}
.editionen-tiles .edition-name {
    margin: 0 0 0.2rem !important;
    font-size: 1.55rem !important;
    text-align: center;
    color: #ffffff !important;
}
/* ============================================================
 * "Termin machen"-Button — ersetzt das fruehere Chatbot-Widget.
 * Gleiche fixe Position unten rechts wie der Chatbot, scrollt
 * mit dem Viewport mit (bleibt immer auf Hoehe des Nutzers).
 * ============================================================ */
.termin-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1.4rem;
    background: linear-gradient(135deg, #178687 0%, #0f6566 100%);
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none !important;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35),
                0 0 0 3px rgba(23, 134, 135, 0.25);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.termin-fab:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #1ba0a1 0%, #178687 100%);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45),
                0 0 22px rgba(31, 182, 184, 0.6);
    color: #ffffff !important;
}
.termin-fab-icon {
    font-size: 1.25rem;
    line-height: 1;
}
@media (max-width: 480px) {
    .termin-fab {
        bottom: 14px;
        right: 14px;
        padding: 0.8rem 1.1rem;
        font-size: 0.92rem;
    }
}

/* Expert-Edition hervorheben: goldener, leuchtender Stern */
.editionen-tiles .is-featured .edition-name::after {
    content: " \2605";
    color: #F5B301;
    text-shadow: 0 0 8px rgba(245, 179, 1, 0.9),
                 0 0 18px rgba(245, 179, 1, 0.55);
}
.editionen-tiles .edition-sub {
    margin: 0 0 1rem !important;
    text-align: center;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6) !important;
}
.editionen-tiles .edition-price {
    margin: 0 !important;
    text-align: center;
    font-size: 2.4rem !important;
    font-weight: 800;
    letter-spacing: -1px;
    color: #ffffff !important;
}
.editionen-tiles .edition-price-note {
    margin: 0.2rem 0 1.25rem !important;
    text-align: center;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.65) !important;
}
.editionen-tiles .rag-box {
    background: rgba(23, 134, 135, 0.12) !important;
    border: 1px solid rgba(23, 134, 135, 0.4);
    border-radius: 12px;
    padding: 0.9rem 1.05rem !important;
    margin-bottom: 1.25rem;
}
.editionen-tiles .rag-title {
    margin: 0 0 0.5rem !important;
    font-size: 0.74rem !important;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #1fb6b8 !important;
}
.editionen-tiles .rag-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.editionen-tiles .rag-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.26rem 0;
    font-size: 0.92rem;
    border: 0 !important;
    color: rgba(255, 255, 255, 0.82) !important;
}
.editionen-tiles .rag-list li strong {
    color: #ffffff !important;
    font-weight: 700;
}
.editionen-tiles .feature-list {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.editionen-tiles .feature-list li {
    padding: 0.46rem 0;
    font-size: 0.93rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}
.editionen-tiles .feature-list li:last-child {
    border-bottom: 0 !important;
}
.editionen-tiles .feature-list li::first-letter {
    font-size: 1.1em;
    font-weight: 700;
}
@media (max-width: 781px) {
    .editionen-tiles {
        flex-wrap: wrap;
    }
    .editionen-tiles .wp-block-column {
        flex-basis: 100% !important;
    }
}
