/*
Theme Name: Kirchgemeine Nidau - Pro Child
Template: bam-pro
Version: 1.0
*/

/* =========================================
   LOGO
   ========================================= */
.site-logo-image img {
    width: 100%;
    height: auto;
    opacity: 0.9;
    background-color: white;
    padding: clamp(4px, 2vw, 20px);
}

/* Logo-Container auf maximal 35% der Headerbreite begrenzen */
#site-header-inner > div:first-child {
    flex-shrink: 0 !important;
    width: clamp(100px, 25vw, 320px) !important; /* Container begrenzen, nicht das Bild */
    display: flex !important;
    align-items: center !important;
}

.site-header.default-style #site-header-inner .site-branding {
    float: none !important;
    height: auto !important;
    width: 100% !important;
    flex-shrink: 1;
}

.site-header.default-style #site-header-inner .site-branding-inner {
    height: auto !important;
    width: 100% !important;
}

.site-logo-image {
    width: 100% !important;
}

/* =========================================
   HEADER LAYOUT
   ========================================= */
#site-header-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

#site-header-inner > div:last-child {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    max-height: clamp(80px, 20vw, 250px) !important; /* Höhe begrenzen */
}

/* =========================================
   HEADER BILD
   ========================================= */
#site-header-inner .header_image.wphi_dom_element {
    width: 100%;
    height: 100% !important;
    overflow: hidden !important;
    line-height: 0;
}

#site-header-inner .header_image img {
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: top !important;
    display: block !important;
    max-width: none !important;
}

/* =========================================
   POST TILES
   ========================================= */
.post-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.post-tiles article {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-tiles article a img {
    width: 100%;
    height: clamp(200px, 40vw, 512px);
    object-fit: cover;
    display: block;
}

.post-tiles .tile-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.post-tiles .tile-body .title {
    font-weight: 600;
    color: #b52555;
    text-decoration: none;
    line-height: 1.3;
}

.post-tiles .tile-body .date {
    font-size: 0.78rem;
    color: #666;
}

@media (max-width: 900px) {
    .post-tiles {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 600px) {
    .post-tiles {
        grid-template-columns: 1fr;
    }

    .post-tiles article a img {
        height: clamp(180px, 60vw, 350px);
    }
}

/* =========================================
   POST TILES PAGINATION
   ========================================= */
.post-tiles-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding: 0.5rem 0;
}

.post-tiles-pagination a {
    background-color: #b52555;
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
}

.post-tiles-pagination a:hover {
    background-color: #8a1a3d !important;
    color: white !important;
}

.post-tiles-pagination .tiles-page-info {
    font-size: 0.9rem;
    color: #666;
}
