/*Theme Name: 1150 Jahre Brütten Theme
Theme URI: http://bruetten1150.ch
Description: Theme für das Jubiläum der Gemeinde Brütten
Version: 1.0
Author: Daniel Spiess
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html*/

/* WordPress Required Styles */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
}

.alignright {
    float: right;
}

.wp-caption {
    border: 1px solid #ddd;
    text-align: center;
    background-color: #f3f3f3;
    padding-top: 4px;
    margin: 10px;
    -moz-border-radius: 3px;
    -khtml-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
}

.wp-caption img {
    margin: 0;
    padding: 0;
    border: 0 none;
}

.wp-caption-dd {
    font-size: 11px;
    line-height: 17px;
    padding: 0 4px 5px;
    margin: 0;
}

.sticky {
    background: #f7f7f7;
    padding: 0 10px 10px;
}
    
.sticky h2 {
    padding-top: 10px;
}

/*------------------*/
/* Allgemeine Stile */
/*------------------*/
body {
    font-family: "Oswald", sans-serif;
    color: #333;
    background: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family:'Playfair Display', serif;
    color: #015aaa;
}

.center {
    text-align: center;
}
/*------------------*/
/*      Menu        */
/*------------------*/
.menu-toggle {
    background: none;
    border: none;
    font-size: 34pt;
    color: #015aaa;
    cursor: pointer;
    padding: 20px 20px;
    display: flex;
    align-items: center;
}
.hamburger-icon {
    display: block;
}

.sidenav {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    color: #fff;
    transition: left 0.3s ease-out;
    z-index: 2000;
    overflow-y: auto;
    padding-top: 3rem;
}
.sidenav.active {
    left: 0;
}
.sidenav-close {
    position: absolute;
    top: 2rem;
    right: 1rem;
    background: none;
    border: none;
    color: #015aaa;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}
.sidenav-menu {
    list-style: none;
    margin: 20px 0 0 0;
    padding: 0;
}
.sidenav-menu li {
    position: relative;
}
.sidenav-menu a {
    display: block;
    color: #015aaa;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
}
.sidenav-menu a:hover,
.sidenav-menu .current-menu-item > a {
    color: #015aaa;
}

.sidenav-menu .sub-menu {
    max-height: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.sidenav-menu .sub-menu.active {
    max-height: 500px;
}
.sidenav-menu .sub-menu a {
    padding-left: 3rem;
    font-size: 1rem;
}
.sidenav-menu .menu-item-has-children > a::after {
    content: '▾';
    float: right;
    margin-right: 1rem;
    transition: transform 0.2s ease;
}
.sidenav-menu .menu-item-has-children.active > a::after {
    transform: rotate(180deg);
}

/*------------------*/
/*      Header      */
/*------------------*/
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #fff;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.header-logo {
    background: url(https://bruetten1150.ch/wp-content/themes/bruetten1150_theme/img/logo.png) no-repeat;
    background-size: contain;
    position: absolute;
    width: 500px;
    height: 350px;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.4s ease-in-out 0s;
}

.tiny {
    width: 100px !important;
    height: 100px !important;
    top: 25px !important;
}

.logo-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: cover;
    transition: width 0.3s ease-out;
}

.site-header.is-scrolled .header-logo {
    position: static;
    transform: none;
    margin-left: auto;
}
.site-header.is-scrolled .logo-image {
    width: 100px;
    max-width: none;
}

/*-----------------*/
/*       Main      */
/*-----------------*/
.site-main {
    margin-top:5px;
}

.header-placeholder {
    height: 520px;
    transition: height 0.3s ease-out;
}
.site-header.is-scrolled ~ .header-placeholder {
    height: 0;
}

.content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.content-left {
    width: 95%;
    max-width: 600px;
    margin: 0 0 0 auto;
}

.content-right {
    width: 95%;
    max-width: 600px;
    margin: 0 auto 0 0;
}

.blue-left {
    background-color: #015aaa;
    width: 50%;
    float: left;
}

.white-right {
    background-color: #fff;
    width: 50%;
    float: right;
}

/*-----------------*/
/*  Front Page     */
/*-----------------*/
/* Container für den promoteten Artikel */
.featured-post-content {
    display: flex;
    flex-wrap: wrap; /* Ermöglicht Umbruch bei kleineren Bildschirmen */
    gap: 20px; /* Abstand zwischen Thumbnail und Inhalt */
    max-width: 1200px; /* Maximale Breite des Containers */
    margin: 0 auto 10px; /* Zentriert den Container */
    padding: 20px; /* Innenabstand */
}

/* Thumbnail-Styling */
.featured-post-thumbnail {
    flex: 0 0 40%; /* Thumbnail nimmt 40% der Breite ein */
    max-width: 400px; /* Maximale Breite des Thumbnails */
}

/* Styling für das Bild im Thumbnail */
.featured-post-thumbnail img {
    width: 100%; /* Bild füllt den Container */
    height: auto; /* Behält das Seitenverhältnis */
    object-fit: cover; /* Skaliert das Bild, ohne es zu verzerren */
    border-radius: 8px; /* Optional: abgerundete Ecken */
}

/* Container für Titel, Metadaten und Inhalt */
.featured-post-meta,
.featured-post-body,
.featured-post-content h1 {
    flex: 1; /* Nimmt den restlichen Platz ein */
    min-width: 300px; /* Mindestbreite für den Inhalt */
}

/* Styling für den Titel */
.featured-post-content h1 {
    margin: 0 0 10px; /* Abstand unter dem Titel */
    font-size: 2rem; /* Anpassbare Schriftgröße */
}

/* Metadaten-Styling */
.featured-post-meta {
    margin-bottom: 15px; /* Abstand unter den Metadaten */
    font-size: 0.9rem; /* Kleinere Schriftgröße */
    color: #666; /* Farbe für Metadaten */
}

/* Kategorien und Datum */
.featured-post-meta .post-date,
.featured-post-meta .post-categories {
    margin-right: 10px; /* Abstand zwischen Datum und Kategorien */
}

/* Inhaltsbereich */
.featured-post-body {
    line-height: 1.6; /* Zeilenabstand für bessere Lesbarkeit */
}

/* Styling für den Weiterlesen-Button */
.read-more-button {
    display: inline-block;
    padding: 10px 20px;
    margin-top: 15px;
    background-color: #015aaa; /* Primärfarbe, anpassbar */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.read-more-button:hover {
    background-color: #0056b3; /* Dunklere Farbe beim Hover */
}


#counter {
    background: #fec210;
    color: #015aaa;
    font-size: 24px;
    text-align: center;
    margin: 0 0 20px 0;
    padding: 50px;
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}
.news-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}
.news-section h2 {
    color: #015aaa;
    font-family: 'Playfair Display', serif;
}
.news-list li {
    margin-bottom: 0.5rem;
}
.news-list a {
    color: #015aaa;
    text-decoration: none;
}
.news-list a:hover {
    color: #fec210;
}

.news-preview {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 10px;
    margin-bottom: 10px;
}
.news-preview-content {
    color: #015aaa;
    padding: 20px 0;
}
.news-preview-content a {
    text-decoration: none;
}
.preview-date {
    width: 100%;
    margin-bottom: 5px;
    text-decoration: none !important;
    font-size: 14px;
}
.preview-title {
    width: 100%;
    font-size: 20px;
}
.news-preview-thumbnail img {
    max-width: 110px;
    height: auto;
    border-radius: 20px;
}
.events-section .secondary-button {
    margin: 20px 0 0;
}

.instagram-section {
    background: #f8f8f8;
    text-align: center;
    float: left;
    width: 100%;
    margin: 20px 0;
}
.instagram-section h2 {
    color: #015aaa;
    font-family: 'Playfair Display', serif;
}
.instagram-feed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.instagram-item img {
    width: 100%;
    height: auto;
    border: 2px solid #015aaa;
}
.instagram-hashtag {
    display: block;
    color: #015aaa;
    margin-top: 0.5rem;
}
.instagram-note a {
    color: #fec210;
    text-decoration: none;
}

.history-section {
    background: #015aaa;
    padding-bottom: 20px;
    color: #fff;
    float: left;
    width: 100%;
}
.history-section h2 {
    font-family: 'Playfair Display', serif;
    color: #fec210;
    text-align: center;
}
.history-content {
    width: 100%;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
}
.history-content h3 a {
    color: #fec210;
    text-decoration: none;
}
.history-content p {
    color: #fff;
}
.history-buttons {
    margin-top: 1rem;
}
.history-item {
    display: flex;
    gap: 2rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.history-front-content {
    width: 100%;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
}
.history-front-item {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Erste Spalte schmaler (Bild), zweite breiter (Titel) */
    grid-template-rows: auto auto; /* Zwei Zeilen */
    gap: 10px; /* Abstand zwischen Elementen */
    align-items: center; /* Vertikale Zentrierung */
    max-width: 1200px; /* Maximale Breite */
    margin: 0 auto; /* Zentriert horizontal */
}

.history-front-item .history-preview:nth-child(3) {
    grid-column: 1 / -1; /* Zweites .history-preview (drittes Kind) über beide Spalten */
}
.history-preview h3 a {
    color: #fec210;
    text-decoration: none;
}
.history-preview p {
    color: #fff;
}
.history-image img {
    max-width: 200px;
    height: auto;
    border: 3px solid #fec210;
    border-radius: 20px;
}

.primary-button, .secondary-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
}
.primary-button {
    background: #fec210;
    color: #015aaa;
}
.secondary-button {
    background: #fff;
    color: #015aaa;
    margin-left: 1rem;
}
.history-section .secondary-button {
    width: 40%;
    margin: 30px 30% 10px;
    text-align: center;
}
.primary-button:hover, .secondary-button:hover {
    opacity: 0.9;
}

/*-------------------*/
/*     Category      */
/*-------------------*/

.category-blog, .single-post {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.category-list {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
}

.category-item {
    padding: 20px;
    border-radius: 5px;
}
.category-item.color-blue {
    box-shadow: 3px 1px 20px 5px #e8f0f7;
    color: #333;
    border-left: 4px solid #015aaa;
}
.category-item.color-yellow {
    box-shadow: 3px 1px 20px 5px #fff9e6;
    color: #333;
    border-left: 4px solid #fec210;
}
.category-thumbnail img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 5px;
}
.category-content {
    flex: 1;
}
.category-title a {
    color: inherit;
    text-decoration: none;
    font-size: 1.5em;
}
.category-title a:hover {
    text-decoration: underline;
}
.category-meta {
    font-size: 0.9em;
    margin: 10px 0;
}
.category-excerpt {
    font-size: 1em;
    line-height: 1.5;
}
.category-link {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}
.category-link:hover {
    background-color: #555;
}
.tag-filter {
    margin-bottom: 20px;
}
.tag-filter select {
    padding: 5px;
    font-size: 1em;
}
.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: space-around; /* Links gleichmäßig über die volle Breite verteilt */
    flex-wrap: wrap; /* Umbruch bei vielen Links */
    gap: 10px; /* Abstand zwischen Links */
    width: 100%; /* Stelle sicher, dass die Pagination die volle Breite nutzt */
}
.pagination a, .pagination span {
    padding: 8px 15px;
    text-decoration: none;
    border: 1px solid #333;
    border-radius: 3px;
    background-color: #fff;
    color: #333;
    text-align: center;
    flex: 0 1 auto; /* Links passen sich an, ohne zu wachsen */
}
.pagination a:hover {
    background-color: #f0f0f0;
}
.pagination .current {
    background-color: #007bff; /* Blau wie Veranstaltungen */
    color: #fff;
    border-color: #007bff;
}

.single-post .post-content {
    margin-bottom: 40px;
}
.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
}
.single-post .post-meta {
    font-size: 0.9em;
    margin-bottom: 20px;
}
.single-post .post-body {
    line-height: 1.6;
}
.related-posts {
    margin-top: 40px;
}
.related-list {
    display: grid;
    gap: 20px;
}
.related-item {
    padding: 15px;
    border-radius: 5px;
    display: grid;
    grid-template-columns: repeat(1, 1fr 5fr);
    place-items: center;
}
.related-item.color-blue {
    box-shadow: 3px 1px 20px 5px #e8f0f7;
    color: #333;
    border-left: 4px solid #015aaa;
}
.related-item.color-yellow {
    box-shadow: 3px 1px 20px 5px #fff9e6;
    color: #333;
    border-left: 4px solid #fec210;
}

.related-thumbnail img {
    width: 125px;
    height: auto;
    border-radius: 5px;
}
.related-title a {
    color: inherit;
    text-decoration: none;
    font-size: 1.2em;
}
.related-title a:hover {
    text-decoration: underline;
}
.related-exerpt {
    font-size: 1em;
    line-height: 1.5;
}
.related-meta {
    font-size: 0.8em;
    margin-top: 5px;
}

/*-------------------*/
/*     Footer        */
/*-------------------*/
footer {
    text-align: center;
    margin-top: 50px;
    float: left;
    width: 100%;
}

/*-------------------*/
/* Responsive Design */
/*-------------------*/
@media (max-width: 990px) {
    .menu-toggle {
        padding: 0 20px;
    }
    .header-logo {
        width: 400px;
        height: 300px;
        top: 80px;
    }
    .tiny {
        top: 25px !important;
    }
}

@media (max-width: 768px) {
    .header-logo {
        width: 300px;
        height: 200px;
        top: 60px;
    }
    .sidenav {
        width: 250px;
        left: -250px;
    }
    .sidenav.active {
        left: 0;
    }
    .header-placeholder {
        height: 260px;
    }
    .blue-left {
        width: 100%;
    }
    .white-right {
        width: 100%;
        float: left;
    }
    .content-left {
        max-width: 1200px;
    }
    .content-right {
        max-width: 1200px;
        margin: 0 0 0 auto;
    }
    .featured-post-content {
        flex-direction: column; /* Stapelt die Elemente untereinander */
    }

    .featured-post-thumbnail {
        flex: 0 0 100%; /* Thumbnail nimmt volle Breite ein */
        max-width: 100%; /* Volle Breite auf kleinen Bildschirmen */
    }
    .history-front-content {
        grid-template-columns: repeat(1, 1fr);
    }
    
    /* Category */
    .related-list {
        grid-template-columns: repeat(1, 1fr);
    }
    .category-list {
        grid-template-columns: repeat(1, 1fr);
    }
    .pagination {
        justify-content: center; /* Zentriert auf Mobilgeräten */
        gap: 5px;
    }
    .related-thumbnail img {
        width: 80px;
        height: auto;
        border-radius: 5px;
    }
}

@media (max-width: 480px) {
    .header-logo {
        width: 175px;
        height: 115px;
        top: 45px;
    }
    .tiny {
        width: 70px !important;
        height: 70px !important;
        top: 10px !important;
    }
    .header-placeholder {
        height: 160px;
    }
    
    .history-image img {
        max-width: 140px;
    }
    
    /* Category Blog */
    .category-thumbnail img {
        width: 30%;
    }
    .category-title a {
        font-size: 1em;
    }
}