/* Modern Aktuelles Cards Styles */
/* Using the website's cream (#d1c1ad) and white color scheme */

/* Override default blog post styles with modern cards */
body:not(.cms-liveeditor-is-opened) .blog-posts .shuffle-item {
    position: relative;
    z-index: 1;
    padding: 0;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

/* Remove the old gray background */
body:not(.cms-liveeditor-is-opened) .blog-posts .shuffle-item:before {
    display: none;
}

/* Modern card container */
body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(209, 193, 173, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    height: 100%;
    position: relative;
    border: 1px solid rgba(209, 193, 173, 0.1);
}

/* Card hover effects */
body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(209, 193, 173, 0.25);
    border-color: rgba(209, 193, 173, 0.3);
}

/* Image container with cream accent */
body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: all 0.3s ease;
    border-bottom: 3px solid #d1c1ad;
    flex-shrink: 0;
}

body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview:hover img {
    transform: scale(1.05);
}

/* Modern title styling */
body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-title {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
    color: #2c2c2c;
    margin: 1.5rem 1.5rem 1rem 1.5rem;
    line-height: 1.3;
    transition: color 0.3s ease;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview:hover .blog-post-title {
    color: #d1c1ad;
}

/* Category tags styling */
body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 1.5rem 1.5rem 1.5rem;
    padding: 0;
    list-style: none;
    margin-top: auto;
}

body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-categories li {
    background: linear-gradient(135deg, #d1c1ad, #c8b5a1);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(209, 193, 173, 0.3);
}

body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-categories li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(209, 193, 173, 0.4);
}

/* Add a subtle cream accent to the card */
body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #d1c1ad, #c8b5a1, #d1c1ad);
    border-radius: 16px 16px 0 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body:not(.cms-liveeditor-is-opened) .blog-posts .shuffle-item {
        margin-bottom: 1.5rem;
    }
    
    body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview img {
        height: 180px;
    }
    
    body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-title {
        margin: 1.2rem 1.2rem 0.8rem 1.2rem;
        font-size: 1.1rem;
    }
    
    body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-categories {
        margin: 0.8rem 1.2rem 1.2rem 1.2rem;
    }
    
    body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-categories li {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Grid improvements for better layout */
body:not(.cms-liveeditor-is-opened) .blog-posts.shuffle {
    gap: 1.5rem;
}

/* Ensure all cards have the same height */
body:not(.cms-liveeditor-is-opened) .blog-posts .shuffle-item {
    display: flex;
    flex-direction: column;
}

/* Loading state animation */
@keyframes cardShimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview.loading {
    background: linear-gradient(90deg, #f5f5f5 0px, #e8e8e8 40px, #f5f5f5 80px);
    background-size: 200px 100%;
    animation: cardShimmer 1.5s infinite;
}

/* Enhanced focus states for accessibility */
body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview:focus {
    outline: 3px solid #d1c1ad;
    outline-offset: 2px;
}

/* Category filter buttons styling */
[data-blog-filter-form] .btn {
    background: transparent;
    border: 2px solid #e0e0e0;
    color: #666;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0.25rem;
}

[data-blog-filter-form] .btn:hover {
    border-color: #d1c1ad;
    color: #d1c1ad;
    transform: translateY(-2px);
}

[data-blog-filter-form] .btn.active {
    background: #d1c1ad;
    border-color: #d1c1ad;
    color: #fff;
    box-shadow: 0 4px 12px rgba(209, 193, 173, 0.3);
}

/* Page header styling */
.Aktuelles h1 {
    color: #d1c1ad;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 300;
    position: relative;
}

.Aktuelles h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #d1c1ad, #c8b5a1);
    border-radius: 2px;
}

/* Additional improvements for better card appearance */
body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview {
    min-height: 400px;
}

/* Ensure proper spacing in the grid */
@media (min-width: 640px) {
    body:not(.cms-liveeditor-is-opened) .blog-posts .shuffle-item {
        margin-bottom: 2rem;
    }
}

@media (min-width: 992px) {
    body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview img {
        height: 200px;
    }
    
    body:not(.cms-liveeditor-is-opened) .blog-posts .blog-post-overview {
        min-height: 380px;
    }
}

/* Smooth transitions for a polished feel */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Filter section styling */
[data-blog-filter-form] {
    margin-bottom: 3rem;
    text-align: center;
}

[data-blog-filter-form] label {
    color: #d1c1ad;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

/* Improve overall page appearance */
body.Aktuelles main {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    min-height: 100vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
} 

/* Layout fix – ensure the column wrapper used by the CMS does not restrict
   the width of our cards when they are placed inside the CSS grid. */
body:not(.cms-liveeditor-is-opened) .blog-posts .col {
    /* Remove legacy float-based grid behaviour */
    float: none !important;
    /* Reset padding that could create unexpected gaps */
    padding: 0 !important;
    /* Allow the CSS-grid on the parent to control the width */
    width: 100% !important;
    max-width: 100% !important;
}

/* Make sure the grid fills the row nicely on large screens */
body:not(.cms-liveeditor-is-opened) .blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
} 

/* --- Visibility & UX Tweaks (2025-07-25) ------------------------------ */

/* Give the fixed navbar an opaque glass background on the Aktuelles page
   so links remain readable on any scroll position */
body.Aktuelles .top-nav {
    background: rgba(255, 255, 255, 0.90) !important; /* almost white glass */
    backdrop-filter: blur(25px) saturate(160%) !important; /* keep glass effect */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Darken default link color inside the bright navbar */
body.Aktuelles .top-nav .nav-menu li a {
    color: #2c3e50 !important;
}

body.Aktuelles .top-nav .nav-menu li a.active {
    color: #d1c1ad !important;
    font-weight: 600;
}

/* Ensure ALL blog-post cards are rendered – remove accidental clipping */
body:not(.cms-liveeditor-is-opened) .blog-posts {
    overflow: visible !important;
}

/* Fallback flex layout for browsers where CSS grid might be overridden
   by third-party scripts (e.g., Shuffle.js) */
@supports not (grid-template-columns: repeat(auto-fill, minmax(280px, 1fr))) {
    body:not(.cms-liveeditor-is-opened) .blog-posts {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
    }
    body:not(.cms-liveeditor-is-opened) .blog-posts .col {
        flex: 1 1 280px;
    }
} 

/* --- Navbar action buttons visibility fix ----------------------------- */
body.Aktuelles .top-nav .nav-actions .nav-btn {
    background: #d1c1ad !important;   /* brand cream tone */
    color: #fff !important;
    border: none !important;
}
body.Aktuelles .top-nav .nav-actions .nav-btn:hover {
    background: #c8b89e !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

body.Aktuelles .top-nav .language-switcher {
    background: rgba(209,193,173,0.15) !important;
    border: 1px solid #d1c1ad !important;
}
body.Aktuelles .top-nav .language-switcher a {
    color: #2c3e50 !important;
}
body.Aktuelles .top-nav .language-switcher a.active,
body.Aktuelles .top-nav .language-switcher a:hover {
    background: #d1c1ad !important;
    color: #fff !important;
} 