/*
Theme Name: Responsive Header Theme
Theme URI: https://example.com/responsive-header-theme
Author: Dein Name
Author URI: https://example.com
Description: Ein schlankes, responsives WordPress-Theme mit Header-Foto und darüber liegendem SVG-Logo, horizontaler Beitragsnavigation, Haupt-Beitragsbereich und editierbarem Footer. Alle Bereiche sind über den Customizer bzw. das Menü-System editierbar.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: responsive-header-theme
*/

/* -------------------------------------------------
   RESET / BASICS
------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #222;
    background: #fff;
    line-height: 1.6;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* -------------------------------------------------
   HEADER BLOCK (Foto + Logo überlagert)
------------------------------------------------- */
.site-header {
    position: relative;
    width: 100%;
    background-color: #1a1a1a;
    overflow: hidden;
}

.site-header.no-photo {
    min-height: 320px;
}

.site-header-photo-img {
    display: block;
    width: 100%;
    margin: 0;
    max-width: 1200px;
}

.site-header .container {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 1200px;
    z-index: 2;
}

.site-header .site-logo {
    position: relative;
    z-index: 2;
    max-width: 260px;
    width: 60%;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.site-header .site-logo img,
.site-header .site-logo svg {
    width: 100%;
    height: auto;
}

.site-header .site-title-fallback {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
}

/* Logo-Einfärbung: Inline-SVG, Füllfarbe wird per ID-Selektor
   in inc/customizer.php erzwungen (siehe rht_dynamic_css()). */
#site-logo-svg-wrap {
    display: block;
    width: 100%;
}

#site-logo-svg-wrap svg {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    .site-header.no-photo {
        min-height: 220px;
    }
    .site-header .site-logo {
        max-width: 160px;
    }
}

/* -------------------------------------------------
   NAVIGATION BLOCK (horizontal)
------------------------------------------------- */
.site-navigation {
    background: #ffffff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-navigation .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.primary-menu li a {
    display: block;
    padding: 16px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    color: #222;
    transition: color 0.2s ease, background 0.2s ease;
    border-radius: 4px;
}

.primary-menu li a:hover,
.primary-menu li.current-menu-item a {
    color: #fff;
    background: #1a1a1a;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 12px 16px;
    cursor: pointer;
}

@media (max-width: 700px) {
    .menu-toggle {
        display: block;
    }
    .primary-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    .primary-menu.is-open {
        display: flex;
    }
    .site-navigation .container {
        flex-direction: column;
        align-items: stretch;
    }
}

/* -------------------------------------------------
   MAIN BLOCK (Beiträge)
------------------------------------------------- */
.site-main {
    padding: 48px 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

.post-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.post-card .post-thumbnail img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.post-card .post-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .post-title {
    font-size: 1.25rem;
    margin: 0 0 8px;
}

.post-card .post-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 12px;
}

.post-card .post-excerpt {
    color: #444;
    font-size: 0.95rem;
    flex: 1;
}

.post-card .read-more {
    margin-top: 16px;
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 2px solid #1a1a1a;
    align-self: flex-start;
}

.pagination-nav {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination-nav a,
.pagination-nav span {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.no-posts {
    text-align: center;
    padding: 60px 0;
    color: #888;
}

/* -------------------------------------------------
   FOOTER BLOCK
------------------------------------------------- */
.site-footer {
    position: relative;
    background: #1a1a1a;
    color: #ccc;
    text-align: center;
    font-size: 0.9rem;
    overflow: hidden;
}

.site-footer a {
    color: #fff;
    text-decoration: underline;
}

.site-footer .footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-bottom: 24px;
    text-align: left;
}

.site-footer .footer-widgets .widget-area {
    min-width: 200px;
}
