/*
Theme Name: GeneratePress Child
Template: generatepress
*/

/* === RESET === */
* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f2f3f5;
    color: #222;
    margin: 0;
}

/* === GP KOMPLETT AUSBLENDEN === */
.site-header,
#right-sidebar,
.sidebar,
.inside-article > .entry-meta:last-child,
.entry-summary,
.comments-link,
.site-content > .ast-container,
.page-header {
    display: none !important;
}

/* === GP CONTAINER RESET === */
.site-content,
.site-content .content-area,
.separate-containers .content-area,
.one-container .content-area,
body.right-sidebar .site-content .content-area,
body.right-sidebar .content-area,
.grid-container,
.site-body-container-padding {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.separate-containers .inside-article,
.separate-containers .site-main > article,
.separate-containers .paging-navigation {
    margin-bottom: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.site {
    margin: 0 !important;
    padding: 0 !important;
}

.inside-site-info,
.footer-widgets-container {
    display: none !important;
}

/* ============================================
   HEADER
   ============================================ */
.ff-header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: relative;
    z-index: 100;
}

.ff-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 40px;
}

.ff-logo img {
    max-height: 44px;
    width: auto;
}

.ff-header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ff-search {
    position: relative;
    display: flex;
    align-items: center;
}

.ff-search input[type="search"] {
    border: 1px solid #e0e0e0;
    border-radius: 22px;
    padding: 8px 38px 8px 16px;
    font-size: 13px;
    width: 190px;
    outline: none;
    background: #f5f5f5;
    transition: border-color 0.2s, width 0.2s, background 0.2s;
}

.ff-search input[type="search"]:focus {
    border-color: #c62828;
    width: 250px;
    background: #fff;
}

.ff-search button {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
}

.ff-search button svg {
    width: 16px;
    height: 16px;
    stroke: #aaa;
}

.ff-meta-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ff-meta-nav a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.ff-meta-nav a:hover { color: #c62828; }

.ff-plus-btn {
    background: #c62828 !important;
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 22px;
    font-weight: 700 !important;
    font-size: 11px !important;
    letter-spacing: 0.3px;
}

.ff-plus-btn:hover { background: #a01010 !important; }

/* ============================================
   NAVIGATION
   ============================================ */
.ff-main-nav {
    background: #fff;
    border-top: 1px solid #eee;
    border-bottom: 2px solid #c62828;
}

ul.ff-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 1400px;
}

ul.ff-menu > li { position: relative; }

ul.ff-menu > li > a {
    display: block;
    color: #333;
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 13px 18px;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}

ul.ff-menu > li > a:hover { color: #c62828; }

/* Vertikale Trennlinie zwischen Menüpunkten */
ul.ff-menu > li + li {
    border-left: 1px solid #e0e0e0;
}

.ff-menu-item-home a {
    display: flex;
    align-items: center;
    justify-content: center;
}
.ff-nav-icon-home {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.ff-menu-item-home a:hover .ff-nav-icon-home { stroke: #c62828; }

/* Dropdown */
ul.ff-menu ul.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-top: 2px solid #c62828;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    max-height: 380px;
    overflow-y: auto;
    width: 240px;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    z-index: 9999;
}

ul.ff-menu > li:hover > ul.sub-menu { display: block; }

ul.ff-menu ul.sub-menu li a {
    display: block;
    padding: 8px 18px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

ul.ff-menu ul.sub-menu li a:hover {
    background: #fdf0f0;
    color: #c62828;
}

ul.ff-menu ul.sub-menu::-webkit-scrollbar { width: 5px; }
ul.ff-menu ul.sub-menu::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* ============================================
   KACHEL-GRID (STARTSEITE / ARCHIV)
   ============================================ */
#main.site-main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 40px;
}

/* === KACHEL === */
#main.site-main > article {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
}

/* Bild OBEN (order) */
#main.site-main > article .post-image {
    order: 1;
    overflow: hidden;
}

#main.site-main > article .post-image a {
    display: block;
    line-height: 0;
}

#main.site-main > article .post-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

/* Header (Titel + Meta) UNTER dem Bild */
#main.site-main > article .entry-header {
    order: 2;
    padding: 18px 20px 16px;
}

/* Meta (Datum + Autor) */
#main.site-main > article .entry-header .entry-meta {
    display: block !important;
    margin-bottom: 6px;
}

#main.site-main > article .entry-header .entry-meta .posted-on {
    font-size: 12px;
    color: #999;
}

#main.site-main > article .entry-header .entry-meta .byline {
    font-size: 12px;
    color: #bbb;
}

#main.site-main > article .entry-header .entry-meta .byline a {
    color: #bbb;
    text-decoration: none;
}

/* Titel */
#main.site-main > article .entry-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

#main.site-main > article .entry-title a {
    color: #1a1a1a;
    text-decoration: none;
}

#main.site-main > article .entry-title a:hover {
    color: #c62828;
}

/* inside-article als transparent */
#main.site-main > article .inside-article {
    display: contents;
}

/* Excerpt + Footer Meta weg */
.blog #main.site-main > article .entry-summary,
.archive #main.site-main > article .entry-summary,
.home #main.site-main > article .entry-summary,
.blog #main.site-main > article .entry-content,
.archive #main.site-main > article .entry-content,
.home #main.site-main > article .entry-content {
    display: none;
}

/* ============================================
   PAGINATION
   ============================================ */
.paging-navigation,
.posts-navigation {
    grid-column: 1 / -1;
    width: 100%;
}

.separate-containers .paging-navigation {
    background: none !important;
}

.paging-navigation .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 35px 0 10px;
}

.paging-navigation .nav-links a,
.paging-navigation .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 0 10px;
}

.paging-navigation .nav-links a {
    background: #fff;
    color: #444;
    border: 1px solid #ddd;
}

.paging-navigation .nav-links a:hover {
    background: #c62828;
    color: #fff;
    border-color: #c62828;
}

.paging-navigation .nav-links span.current {
    background: #c62828;
    color: #fff;
}

/* ============================================
   EINZELBEITRAG
   ============================================ */
.single #main.site-main {
    display: block;
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 40px;
}

.single #main.site-main > article {
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    background: #fff;
    overflow: hidden;
}

.single #main.site-main > article .post-image img {
    height: 400px;
    width: 100%;
    object-fit: cover;
}

.single #main.site-main > article .entry-header {
    padding: 28px 36px 0;
}

.single #main.site-main > article .entry-title {
    font-size: 26px;
    line-height: 1.3;
}

.single #main.site-main > article .entry-header .entry-meta {
    margin-top: 10px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
}

.single .entry-content {
    display: block !important;
    padding: 24px 36px 40px;
    font-size: 16px;
    line-height: 1.85;
    color: #333;
}

.single .entry-content p {
    margin-bottom: 20px;
}

.single .entry-content img {
    max-width: 100%;
    height: auto !important;
    border-radius: 8px;
    margin: 16px 0;
}

.single .entry-content a {
    color: #c62828;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Post Navigation */
.post-navigation {
    max-width: 860px;
    margin: 24px auto;
    padding: 0 40px;
}

.post-navigation .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.post-navigation .nav-links a {
    display: block;
    background: #fff;
    padding: 16px 20px;
    border-radius: 10px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.post-navigation .nav-links a:hover { color: #c62828; }

/* ============================================
   FOOTER – ausgelagert in ff-footer.css (Logo mittig, Links, Social, Scroll-Pfeil)
   ============================================ */

/* ============================================
   CUSTOM PAGE TEMPLATES – ALLGEMEIN
   ============================================ */
.ff-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 40px;
}

.ff-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    padding: 36px 40px 48px;
}

.ff-page-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.ff-page-hero-image {
    margin: 0 -40px 24px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.ff-page-hero-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.ff-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 28px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #c62828;
}

.ff-section-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: #444;
    margin: 20px 0 12px;
}

.ff-page-intro {
    font-size: 14px;
    color: #777;
    margin: 0 0 20px;
}

.ff-back-link {
    margin: 0 0 20px;
}

.ff-back-link a {
    color: #c62828;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.ff-back-link a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    #main.site-main {
        grid-template-columns: 1fr;
        padding: 20px 16px;
    }

    #main.site-main > article .post-image img {
        height: 200px;
    }

    .ff-header-top {
        flex-direction: column;
        gap: 10px;
        padding: 10px 16px;
    }

    .ff-header-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    ul.ff-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    ul.ff-menu > li > a {
        padding: 10px 10px;
        font-size: 11px;
    }

    .single #main.site-main {
        padding: 20px 16px;
    }

    .single .entry-content {
        padding: 20px 18px 30px;
    }

    .single #main.site-main > article .entry-header {
        padding: 20px 18px 0;
    }

    .single #main.site-main > article .entry-title {
        font-size: 20px;
    }

    /* Custom Templates responsive */
    .ff-main {
        padding: 20px 16px;
    }

    .ff-container {
        padding: 24px 18px 32px;
    }

    .ff-page-hero-image {
        margin: 0 -18px 20px;
    }

    .ff-page-hero-image img {
        height: 200px;
    }

    .ff-page-title {
        font-size: 22px;
    }

    .ff-section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    /* Footer-Layout in ff-footer.css */
}

/* ============================================
   STICKY FOOTER – Global für alle Seiten
   Body wird zum Grid: Header | Content | Footer
   ============================================ */
html, body { min-height: 100%; }
body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}
body > *:nth-child(2) { min-height: 0; }
/* Fallback: wenn Theme nur ein Wrapper-Kind hat (z.B. #page) */
body > *:only-child {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100%;
}
body > *:only-child > *:nth-child(2) { min-height: 0; }
