/*
Theme Name: Zeichenblog
Theme URI: https://grafik.wilsdorff.biz
Author: Ingo Wilsdorff
Version: 1.7.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: zeichenblog
*/

/* Montserrat wird lokal gehostet – siehe assets/fonts/montserrat-local.css */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
    background: #c8bfb0;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.6;
}

a { color: #222; text-decoration: none; }
a:hover { color: #000; text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ============================================================
   ZENTRALER WRAPPER – einmal definiert, überall verwendet
   Alle Hauptbereiche (Header, Content, Footer) nutzen .wrap
   ============================================================ */
.wrap {
    max-width: 1360px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 30px;
    padding-right: 30px;
    box-sizing: border-box;
}

/* Header-Wrap: padding-right = 30px (sidebar 185px) + 30px gap + 30px = 245px
   damit das Menü rechtsbündig mit dem Grid endet */
.header-nav-bar .wrap {
    padding-right: 245px;
}

#page { margin: 0; padding: 0; }

/* WordPress setzt manchmal body margin – explizit auf 0 */
body { margin: 0 !important; padding: 0 !important; }
.admin-bar .header-nav-bar { margin-top: 32px; }

/* ============================================================
   HEADER
   ============================================================ */
.header-nav-bar {
    background: #fff;
    width: 100%;
}

.header-nav-bar .wrap {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Seitenname – Montserrat Thin */
.header-site-title {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-site-title a { text-decoration: none; }
.header-site-title a:hover { text-decoration: none; }

.header-site-title .site-name {
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 100;
    font-size: 42px;
    color: #111;
    line-height: 1;
    letter-spacing: 0.01em;
    display: block;
}

.site-branding { display: none; }

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

#primary-menu,
.main-navigation ul {
    display: flex !important;
    flex-direction: row !important;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

#primary-menu > li > a,
.main-navigation ul > li > a {
    display: block;
    padding: 0 0 0 24px;
    font-size: 13px;
    color: #333;
    line-height: 64px;
    white-space: nowrap;
    text-decoration: none;
    font-weight: 400;
    transition: font-weight 0.1s;
}

#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a {
    font-weight: 700;
    color: #000;
    text-decoration: none;
}

#primary-menu li ul,
.main-navigation ul li ul { display: none !important; }

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #ddd;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
}

/* ============================================================
   CONTENT AREA – .wrap kümmert sich um Alignment
   ============================================================ */
#content .wrap {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding-top: 30px;
    padding-bottom: 0;
}

#primary { flex: 1; min-width: 0; }

/* ============================================================
   GRID
   ============================================================ */
#posts-container.grid-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

#posts-container.grid-view article {
    position: relative;
    overflow: hidden;
}

#posts-container.grid-view .post-thumbnail {
    position: relative;
    display: block;
    overflow: hidden;
}

#posts-container.grid-view .post-thumbnail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

#posts-container.grid-view article:hover .post-thumbnail::after {
    opacity: 1;
}

#posts-container.grid-view .post-thumbnail img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* Motivname beim Hover – weiße Schrift ohne Box */
#posts-container.grid-view .hover-title {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 2;
    padding: 16px;
}

#posts-container.grid-view article:hover .hover-title {
    opacity: 1;
}

#posts-container.grid-view .hover-title span {
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
    max-width: 90%;
}

#posts-container.grid-view .entry-header { display: none; }

/* ============================================================
   PAGINATION
   ============================================================ */
.posts-navigation {
    margin-top: 30px;
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
}


.posts-navigation a {
    font-size: 13px;
    color: #444;
    text-decoration: none;
    transition: color 0.15s, font-weight 0.1s;
}

.posts-navigation a:hover {
    color: #000;
    font-weight: bold;
    text-decoration: none;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single #primary { max-width: 100%; }

.single .entry-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 4px;
    line-height: 1.3;
    color: #111;
}

.single .entry-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 14px;
}

.single-image-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
    line-height: 0;
}

.single-image-wrap img { display: block; max-width: 100%; height: auto; }

.img-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #222;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.img-arrow:hover {
    background: #fff;
    color: #000;
    text-decoration: none;
    transform: translateY(-50%) scale(1.08);
}

.img-arrow.arrow-prev { left: 14px; }
.img-arrow.arrow-next { right: 14px; }
.img-arrow.disabled { opacity: 0.18; pointer-events: none; box-shadow: none; }

.single .entry-content {
    font-size: 13px;
    line-height: 1.7;
    color: #333;
    margin-top: 12px;
    max-width: 660px;
}

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

.entry-footer {
    margin-top: 12px;
    padding-top: 10px;
    border-top: none;
    font-size: 12px;
    color: #999;
    max-width: 660px;
}

.entry-footer a { color: #777; }
.entry-footer a:hover { color: #333; }

/* ============================================================
   STATIC PAGES
   ============================================================ */
.page .entry-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: none;
    color: #111;
}

.page .entry-content {
    font-size: 13px;
    line-height: 1.75;
    color: #333;
    max-width: 660px;
}

.page .entry-content p { margin-bottom: 12px; }
.page .entry-content img { margin-top: 16px; max-width: 380px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
#secondary {
    width: 185px;
    flex-shrink: 0;
    font-size: 12px;
}

.widget { margin-bottom: 20px; }

.widget-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #555;
    border-bottom: none;
    padding-bottom: 4px;
    margin-bottom: 7px;
    font-weight: bold;
}

.widget ul li {
    margin-bottom: 3px;
    padding-bottom: 3px;
    border-bottom: none;
    font-size: 12px;
}

.widget ul li a { color: #555; }
.widget ul li a:hover { color: #000; text-decoration: none; }

.tagcloud { line-height: 2.1; }
.tagcloud a { color: #666; margin-right: 2px; font-size: 12px !important; }
.tagcloud a:hover { color: #000; }

/* ============================================================
   FOOTER – 3 Spalten, schwarzer Hintergrund, weiße Schrift
   ============================================================ */
.footer-nav-bar {
    background: #000;
    width: 100%;
    margin-top: 40px;
}

.footer-nav-bar .wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-top: 30px;
    padding-bottom: 30px;
}

.footer-col-title {
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    border-bottom: none;
    padding-bottom: 6px;
    margin-bottom: 12px;
    text-transform: none;
    letter-spacing: 0;
}

.footer-col ul { list-style: none; }

.footer-col ul li {
    font-size: 12px;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: none;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
}

.footer-col ul li a:hover { color: #fff; text-decoration: none; }

/* Kontakt */
.footer-col-contact p {
    font-size: 12px;
    color: #ccc;
    line-height: 1.9;
}

.footer-col-contact a { color: #ccc; text-decoration: none; }
.footer-col-contact a:hover { color: #fff; text-decoration: underline; }

/* Socials */
.footer-col-socials ul li { border-bottom: none; }
.footer-col-socials ul li a { color: #ccc; }
.footer-col-socials ul li a:hover { color: #fff; }

/* Meta */
.footer-col-meta ul li { border-bottom: none; }
.footer-col-meta ul li a { color: #ccc; }
.footer-col-meta ul li a:hover { color: #fff; }

.footer-meta-search {
    margin-top: 10px;
}

.footer-meta-search input[type="search"] {
    background: #111;
    border: none;
    color: #ccc;
    padding: 5px 8px;
    font-size: 12px;
    width: 100%;
    outline: none;
}

.footer-meta-search input[type="search"]::placeholder { color: #666; }
.footer-meta-search input[type="search"]:focus { border-color: #888; }

.footer-meta-search input[type="submit"] {
    display: none;
}

/* Footer-Bottom: Copyright */
.footer-bottom {
    background: #000;
    border-top: none;
}

.footer-bottom .wrap {
    padding-top: 10px;
    padding-bottom: 10px;
}

.site-info {
    font-size: 12px;
    color: #666;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    #posts-container.grid-view { gap: 20px; }
    .footer-nav-bar .wrap { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 900px) {
    #posts-container.grid-view { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    #content .wrap { flex-direction: column; padding-top: 15px; }
    #secondary { width: 100%; border-top: none; padding-top: 16px; }
    .wrap { padding-left: 15px; padding-right: 15px; }
    .menu-toggle { display: block; }
    #primary-menu,
    .main-navigation ul { display: none !important; }
    #primary-menu.toggled { display: flex !important; flex-direction: column !important; }
    #posts-container.grid-view { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .footer-nav-bar .wrap { grid-template-columns: 1fr; gap: 24px; }
    .header-site-title .site-name { font-size: 28px; }
}
