/*
Theme Name: simple_x1
Theme URI: https://htmo.de
Author: Magnus020
Author URI: https://htmo.de
Description: Ein einfaches, minimalistisches WordPress-Template.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: simple_x1
*/

/* CSS-Variablen definieren */
:root {
    /* Basisfarben */
    --color-beige: #FFF3E0;
    --color-orange: #D35400;
    --color-orange-dark: #BF360C;
    --color-orange-light: #E67E22;

    /* Seitenmenü */
    --color-sidebar-bg: #FFE0B2;
    --color-sidebar-border: #FFB74D;
    --color-sidebar-title: #BF360C;
    --color-sidebar-title-border: #FFB74D;
    --color-sidebar-link: #BF360C;
    --color-sidebar-link-hover: #D35400;
    --color-sidebar-link-bg-hover: #FFCC80;

    /* Footer */
    --color-footer-text: #000;

    /* Content und Footer Widgets */
    --color-content-text: #333333;
    --color-content-bg: #ffffff;
    --color-footer-widget-text: #333333;

    /* Footer Menü */
    --color-footer-menu-text: #333333;
    --color-footer-menu-hover-bg: #BF360C;
    --color-footer-menu-hover-text: #ffffff;
}

/* ---------------------- */
/* Grundlegendes Reset    */
/* ---------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---------------------- */
/* Body & Container       */
/* ---------------------- */
body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background-color: var(--color-content-bg);
    color: var(--color-content-text);
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px;
}

/* ---------------------- */
/* Header & Footer        */
/* ---------------------- */
.header,
.footer {
    width: 100%;
    background-color: var(--color-beige);
}

/* ---------------------- */
/* Navigation             */
/* ---------------------- */
.nav-primary {
    background-color: var(--color-orange);
    border-bottom: 3px solid var(--color-orange-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.nav-primary ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}
.nav-primary li {
    position: relative;
}
.nav-primary a {
    color: #fff;
    padding: 5px 10px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.nav-primary a:hover,
.nav-primary a:focus {
    background-color: var(--color-orange-dark);
}

/* Dropdown-Menüs in der Navigation */
.nav-primary li ul {
    display: none;
    position: absolute;
    background-color: var(--color-orange-light);
    top: 100%;
    left: 0;
    min-width: 180px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
.nav-primary li:hover > ul,
.nav-primary li:focus-within > ul {
    display: block;
}
.nav-primary li ul li a {
    padding: 10px 15px;
    white-space: nowrap;
}

/* ---------------------- */
/* Content & Layout       */
/* ---------------------- */
.site-content {
    flex: 1;
}
.content {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
}
.sidebar {
    width: 300px;
    padding: 20px;
}
.main-content {
    flex: 1;
    padding: 20px;
}

/* ---------------------- */
/* Post Cards             */
/* ---------------------- */
.post-card {
    background: #fff;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}
@media (min-width: 768px) {
    .post-card {
        flex-direction: row;
    }
}

/* Beitragsbild */
.post-thumbnail {
    width: 100%;
}
@media (min-width: 768px) {
    .post-thumbnail {
        flex: 0 0 40%;
    }
}
.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Details */
.post-details {
    padding: 20px;
    flex: 1;
}
.entry-header .entry-title a {
    color: var(--color-content-text);
    text-decoration: none;
    transition: color 0.3s ease;
}
.entry-header .entry-title a:hover {
    color: var(--color-orange-dark);
}
.entry-summary {
    margin: 15px 0;
    line-height: 1.6;
}
.read-more {
    display: inline-block;
    background-color: var(--color-orange);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.read-more:hover {
    background-color: var(--color-orange-dark);
}

/* Meta-Leiste für Beiträge */
.entry-meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
.entry-meta span {
    margin-right: 10px;
}

.entry-content p {
    margin-bottom: 0.5em; /* Verringere den Abstand zwischen Absätzen */
    line-height: 1.4;     /* Passe die Zeilenhöhe an, falls nötig */
}

/* Inline-Beitragsbild – Bild links einbetten */
.post-thumbnail-inline {
    float: left;
    margin: 0 20px 20px 0;
    max-width: 40%; /* Beschränkt die Breite, sodass das Bild nicht zu groß wird */
}
.post-thumbnail-inline img {
    width: 100%;
    height: auto;
    display: block;
}

/* Clearfix für den Fall, dass das Floaten Auswirkungen auf nachfolgenden Content hat */
.single-post::after {
    content: "";
    display: table;
    clear: both;
}


/* ---------------------- */
/* Seitenmenü (Custom)    */
/* ---------------------- */
.custom-menu-sidebar {
    background-color: var(--color-sidebar-bg);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--color-sidebar-border);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.custom-menu-sidebar h2 {
    color: var(--color-sidebar-title);
    margin-bottom: 10px;
    font-size: 1.3em;
    border-bottom: 2px solid var(--color-sidebar-title-border);
    padding-bottom: 5px;
}
.custom-menu-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.custom-menu-sidebar li {
    margin-bottom: 10px;
}
.custom-menu-sidebar a {
    text-decoration: none;
    color: var(--color-sidebar-link);
    padding: 8px 12px;
    display: block;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.custom-menu-sidebar a:hover,
.custom-menu-sidebar a:focus {
    background-color: var(--color-sidebar-link-bg-hover);
    color: var(--color-sidebar-link-hover);
}

/* ---------------------- */
/* Footer Widgets & Menüs */
/* ---------------------- */
.footer-widgets {
    display: flex;
    flex-wrap: wrap;
}
.footer-widgets .widget-area {
    flex: 1;
    min-width: 200px;
    padding: 20px;
}
.footer-widgets .widget-area,
.footer-widgets .widget-area * {
    color: var(--color-footer-widget-text) !important;
}

/* Footer Menü (via Widget) Container */
.footer-widgets .widget_nav_menu {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.footer-widgets .widget_nav_menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
}
.footer-widgets .widget_nav_menu li {
    margin-bottom: 10px;
}
.footer-widgets .widget_nav_menu a {
    display: block;
    text-decoration: none;
    color: var(--color-footer-menu-text) !important;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.footer-widgets .widget_nav_menu a:hover,
.footer-widgets .widget_nav_menu a:focus {
    background-color: var(--color-footer-menu-hover-bg) !important;
    color: var(--color-footer-menu-hover-text) !important;
}

/* Footer Copyright */
.footer-copyright {
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    color: var(--color-footer-text);
}

/* ---------------------- */
/* Kalender-Block         */
/* ---------------------- */
.wp-block-calendar {
    margin: 20px 0;
    border-collapse: collapse;
}
.wp-block-calendar table {
    width: 100%;
    border-collapse: collapse;
}
.wp-block-calendar caption {
    padding: 8px;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--color-content-text);
}
.wp-block-calendar th,
.wp-block-calendar td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}
.wp-block-calendar th {
    background-color: var(--color-orange-dark);
    color: #fff;
    font-weight: bold;
}
.wp-block-calendar th:hover {
    background-color: var(--color-orange);
}
.wp-block-calendar td {
    background-color: var(--color-content-bg);
    color: var(--color-content-text);
}

/* Archiv-Menü Container */
.custom-archive-menu {
    background-color: var(--color-sidebar-bg);
    border: 1px solid var(--color-sidebar-border);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.custom-archive-menu h2 {
    color: var(--color-sidebar-title);
    margin-bottom: 10px;
    font-size: 1.3em;
    border-bottom: 2px solid var(--color-sidebar-title-border);
    padding-bottom: 5px;
}

/* Listen für Jahr, Monat und Tag */
.custom-archive-menu ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
}
.archive-year > li,
.archive-month > li,
.archive-day > li {
    margin-bottom: 5px;
}

/* Standard-Link-Styling */
.custom-archive-menu a {
    display: block;
    text-decoration: none;
    color: var(--color-sidebar-link);
    padding: 5px;
    transition: color 0.3s ease;
}
.custom-archive-menu a:hover {
    color: var(--color-sidebar-link-hover);
}

/* Verstecke zunächst die untergeordneten Listen */
.archive-month,
.archive-day {
    display: none;
}

/* Pfeil-Indikatoren */
.year-item > a:after,
.month-item > a:after {
    content: "\25BC"; /* Unicode für Down-Arrow */
    float: right;
    transition: transform 0.3s ease;
}
.year-item.open > a:after,
.month-item.open > a:after {
    transform: rotate(180deg);
}

.page-header {
    flex-basis: 100%;
    width: 100%;
    clear: both;
}