/* Reset and Base Styles */
body {
    overflow-x: hidden;
    background-color: #121212;
    color: #e0e0e0;
}

/* CRITICAL: Force filter section backgrounds with multiple fallbacks */
.blog-filter-section,
.blog-tags-section,
.blog-controls-section {
    /* Multiple fallback methods */
    background-color: #1d1d1b !important;
    background: #1d1d1b !important;
    background-image: linear-gradient(135deg, #1d1d1b 0%, #2a2a2a 100%) !important;
    background-image: linear-gradient(135deg, rgba(29, 29, 27, 0.97) 0%, rgba(42, 42, 42, 0.95) 100%) !important;
    
    /* Force other properties */
    color: white !important;
    padding: 2rem !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(75, 75, 75, 0.2) !important;
    height: 100% !important;
    
    /* Additional browser-specific fallbacks */
    -webkit-background: #1d1d1b !important;
    -moz-background: #1d1d1b !important;
    -o-background: #1d1d1b !important;
    -ms-background: #1d1d1b !important;
}

/* Force visibility of filter sections */
.blog-filter-layout .col-lg-8 > div,
.blog-filter-layout .col-md-7 > div,
.blog-filter-layout .col-lg-4 > div,
.blog-filter-layout .col-md-5 > div {
    background: #1d1d1b !important;
    background-color: #1d1d1b !important;
    min-height: 150px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Blog Hero Section - Dark Theme */
.blog-hero {
    background: linear-gradient(135deg, rgba(29, 29, 27, 0.97) 0%, rgba(42, 42, 42, 0.95) 100%);
    color: white;
    padding: 3.5rem 0 2.5rem;
    margin-bottom: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.blog-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(111, 111, 111, 0.5);
}

.animated-bar {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #1d1d1b, #a020f0);
    margin: 0 auto 1.5rem;
    position: relative;
    overflow: hidden;
}

.animated-bar::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

.center-bar {
    margin: 0 auto 2rem;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Search container styling */
.search-container {
    margin-bottom: 1rem;
}

.input-group .input-group-text {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
    color: #616061;
}

.input-group .form-control {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
    color: #ffffff;
}

.input-group .form-control:focus {
    background-color: #1d1d1b;
    border-color: #4f4d4e;
    box-shadow: 0 0 0 0.25rem rgba(79, 77, 78, 0.35);
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}

.input-group .form-control::placeholder {
    color: #aaaaaa;
}

/* Smaller search button */
.input-group .btn-tt-default {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Smaller "Beitrag erstellen" button */
.mobile-center .btn-tt-default {
    padding: 0.4rem 1rem;
    height: auto;
    font-size: 1rem;
    line-height: 1.5;
}

/* New Two-Section Blog Filter Layout */
.blog-filter-layout {
    margin-bottom: 2.5rem;
}

/* Base styling for both filter sections */
.blog-filter-section {
    background: #1d1b1b; /* Fallback solid color */
    background: linear-gradient(135deg, rgba(29, 29, 27, 0.97) 0%, rgba(42, 42, 42, 0.95) 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(75, 75, 75, 0.2);
    height: 100%;
}

/* Specific styling for tags section */
.blog-tags-section {
    background: #1d1b1b !important; /* Force fallback */
    background: linear-gradient(135deg, rgba(29, 29, 27, 0.97) 0%, rgba(42, 42, 42, 0.95) 100%) !important;
}

/* Specific styling for controls section */
.blog-controls-section {
    background: #1d1b1b !important; /* Force fallback */
    background: linear-gradient(135deg, rgba(29, 29, 27, 0.97) 0%, rgba(42, 42, 42, 0.95) 100%) !important;
}

.section-title {
    color: #ffffff;
    font-size: 1.1rem !important;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(79, 77, 78, 0.3);
    padding-bottom: 0.5rem;
}

.blog-controls-section .section-title {
    border-bottom: 2px solid rgba(79, 77, 78, 0.3);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}

.controls-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.control-item {
    width: 100%;
}

/* Enhanced tag pills for new layout */
.blog-tags-section .tag-pill {
    background: rgba(45, 45, 45, 0.6);
    color: #e0e0e0;
    border-radius: 50px;
    padding: 0.4rem 1rem;
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 77, 78, 0.3);
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.blog-tags-section .tag-pill:hover {
    background: rgba(79, 77, 78, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.blog-tags-section .tag-pill i {
    margin-right: 0.5rem;
    color: #4f4d4e;
    transition: color 0.3s ease;
}

.blog-tags-section .tag-pill:hover i {
    color: #ffffff;
}

.blog-tags-section .tag-pill.active {
    border: 1px solid #4f4d4e;
    background: rgba(79, 77, 78, 0.4);
    font-weight: 500;
    box-shadow: 0 0 10px rgba(79, 77, 78, 0.4);
}

/* Enhanced controls section styling */
.blog-controls-section .sort-dropdown {
    background-color: #1d1d1b;
    color: #e0e0e0;
    border-color: #4f4d4e;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
}

.blog-controls-section .sort-dropdown:hover {
    background-color: #4f4d4e;
    border-color: #6f6f6f;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.blog-controls-section .btn-tt-default {
    padding: 0.6rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.blog-controls-section .btn-tt-default:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Filter bar styling - LEGACY SUPPORT */
.filter-bar {
    background: linear-gradient(135deg, rgba(29, 29, 27, 0.97) 0%, rgba(42, 42, 42, 0.95) 100%) !important;
    /* Remove problematic rgba backgrounds */
    /* background-color: #2d2d2d !important; */
    /* background-color: rgba(45, 45, 45, 0.7) !important; */
    /* background: #2d2d2d !important; */
    /* background: rgba(45, 45, 45, 0.7) !important; */
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(75, 75, 75, 0.2);
    position: relative !important;
    z-index: 30 !important;
}

/* Sort dropdown container */
.filter-bar .dropdown {
    position: relative !important;
}

.sort-dropdown {
    min-width: 180px;
    background-color: #1d1d1b;
    color: #e0e0e0;
    border-color: #4f4d4e;
    position: relative;
    z-index: 1500;
    transition: all 0.3s ease;
}

.sort-dropdown:hover {
    background-color: #4f4d4e;
    border-color: #6f6f6f;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Sort dropdown menu */
.sort-dropdown-menu {
    background-color: #1d1d1b !important;
    border: 1px solid #4f4d4e !important;
    border-radius: 0.5rem !important;
    margin-top: 5px !important;
    position: absolute !important;
    z-index: 1030 !important; /* Muss unter modal-backdrop (1040) liegen */
    left: 0 !important; /* Reset position to left */
    right: auto !important;
    top: 100% !important; /* Position below the button */
    min-width: 180px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2) !important;
}

.sort-dropdown-menu .dropdown-item {
    color: #6f6f6f !important;
    padding: 0.6rem 1rem !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    z-index: 1500 !important;
}

.sort-dropdown-menu .dropdown-item:hover {
    background-color: #4f4d4e !important;
    color: #ffffff !important;
}

.sort-dropdown-menu .dropdown-item.active,
.sort-dropdown-menu .dropdown-item.active:hover {
    background-color: #4f4d4e !important;
    color: #ffffff !important;
}

/* Filterbar Dropdowns (auch für .show) */
.filter-bar .dropdown-menu,
.filter-bar .dropdown-menu.show,
.blog-filter .dropdown-menu,
.blog-filter .dropdown-menu.show,
.sort-dropdown-menu,
.sort-dropdown-menu.show {
    z-index: 1030 !important; /* Muss unter modal-backdrop (1040) liegen */
}

/* Tag pill styling */
.tag-pill {
    background: rgba(45, 45, 45, 0.6);
    color: #e0e0e0;
    border-radius: 50px;
    padding: 0.35rem 1rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 77, 78, 0.3);
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tag-pill:hover {
    background: rgba(79, 77, 78, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.tag-pill i {
    margin-right: 0.5rem;
    color: #4f4d4e;
    transition: color 0.3s ease;
}

/* Make the icon white on hover for better contrast */
.tag-pill:hover i {
    color: #ffffff;
}

.tag-pill.active {
    border: 1px solid #4f4d4e;
    background: rgba(79, 77, 78, 0.4);
    font-weight: 500;
    box-shadow: 0 0 10px rgba(79, 77, 78, 0.4);
}

/* Make active tag icons more visible too */
.tag-pill.active i {
    color: #6f6f6f;
}

/* Blog tag badge styling */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0.75rem;
}

.blog-tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.75rem;
    background-color: #1d1d1b;
    color: #e0e0e0;
    border-radius: 100px;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.blog-tag-badge:hover {
    background-color: #4f4d4e;
    transform: translateY(-2px);
}

.blog-tag-badge i {
    margin-right: 4px;
    color: #6f6f6f;
    font-size: 0.7rem;
    transition: color 0.2s ease; /* Add transition for smooth color change */
}

/* Add new rule to make icon white on hover */
.blog-tag-badge:hover i {
    color: #ffffff;
}

/* Blog post item */
.blog-post-item {
    position: relative !important;
    z-index: 1 !important;
}

/* Blog card styling */
.blog-card {
    background-color: #222222;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    border: none;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.blog-image-container {
    position: relative;
    height: 275px; /* Set a fixed height */
    overflow: hidden;
    background-color: #1a1a1a; /* Optional: Background for loading/gaps */
}

.blog-card .card-img-top {
    height: 100%;
    width: 100%;
    object-fit: cover; /* Ensure image covers the container */
    transition: transform 0.5s;
}

.blog-card:hover .card-img-top {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(34, 34, 34, 0.9), transparent);
}

.blog-card .card-body {
    padding: 1.5rem;
    background-color: #222222;
    color: #e0e0e0;
}

.blog-card .card-title {
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    color: #ffffff;
}

.blog-card .card-text {
    color: #bbbbbb;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Blog meta information */
.blog-meta {
    font-size: 0.85rem;
    color: #999999;
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.blog-meta i {
    margin-right: 0.5rem;
    color: #4f4d4e;
}

.blog-meta span {
    margin-right: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Author link styling */
.author-link {
    color: #999999;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    font-weight: 500;
}

.author-link:hover {
    color: #e0e0e0;
    transform: translateY(-2px);
    text-decoration: underline;
}

/* Read more link */
.read-more {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: #6f6f6f;
    text-decoration: none;
    transition: transform 0.3s;
}

.read-more i {
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.read-more:hover {
    color: #4f4d4e;
    transform: translateX(5px);
}

.read-more:hover i {
    transform: translateX(3px);
}

/* Featured badge */
.featured-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #4f4d4e, #1d1d1b);
    color: white;
    padding: 0.5rem 1rem;
    border-bottom-right-radius: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

/* Blog action buttons - updated position */
.blog-actions {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    display: flex;
    gap: 5px;
}

/* New positioning class for top-right location */
.blog-actions.top-right {
    top: 10px;
    right: 10px;
    z-index: 20;
}

.blog-card:hover .blog-actions {
    opacity: 1;
    transform: translateY(0);
}

.blog-actions .btn-outline-primary {
    color: #047857;
    border-color: #047857;
    background-color: rgba(34, 34, 34, 0.7);
}

.blog-actions .btn-outline-primary:hover {
    background-color: #047857;
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.blog-actions .btn-outline-danger {
    color: #dc3545;
    background-color: rgba(34, 34, 34, 0.7);
}

.blog-actions .btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

/* Blog interaction counts - ensure proper spacing */
.blog-interaction-counts {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 5px; /* Add some margin to avoid edge collision */
}

/* Blog interaction counts */
.blog-interaction-counts {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-count-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: #999999;
    transition: all 0.2s ease;
    position: relative;
    padding: 2px 6px;
    border-radius: 4px;
}

.blog-count-item:hover {
    background-color: rgba(79, 77, 78, 0.1);
    color: #e0e0e0;
}

.blog-count-item i {
    margin-right: 4px;
}

.blog-count-item.like-count i {
    color: #dc3545;
}

.blog-count-item.comment-count i {
    color: #4f4d4e;
}

.blog-count-item:hover:after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -5px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    background-color: #222222;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin: 2rem 0;
    border: 1px solid rgba(75, 75, 75, 0.2);
}

.empty-state i {
    font-size: 3.5rem;
    color: #444444;
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: #ffffff;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #bbbbbb;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Dark mode modals */
.dark-modal {
    background-color: #222222;
    color: #e0e0e0;
}

.dark-modal .modal-header {
    border-bottom-color: #3d3d3d;
}

.dark-modal .modal-footer {
    border-top-color: #3d3d3d;
}

/* Button glow effect */
.btn-glow {
    position: relative;
    overflow: hidden;
    background-color: #1d1d1b;
    border-color: #1d1d1b;
    transition: all 0.3s ease;
    min-width: 200px; /* Erhöhte Mindestbreite für mehr Text */
    padding: 8px 20px; /* Mehr horizontaler Padding */
}

.btn-glow:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(160, 32, 240, 0.4);
    background-color: #a020f0;
    border-color: #a020f0;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(30deg);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-glow:hover::after {
    opacity: 1;
    animation: glow-sweep 1.5s infinite;
}

@keyframes glow-sweep {
    0% {
        transform: rotate(30deg) translateX(-100%);
    }
    100% {
        transform: rotate(30deg) translateX(100%);
    }
}

/* Pagination styling */
.pagination {
    margin-top: 2rem;
}

.pagination .page-item.disabled span.page-link,
.pagination .page-item.disabled a.page-link {
    background-color: #222222;
    border-color: #3d3d3d;
    color: #666666;
}

.pagination .page-link {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background-color: #2d2d2d;
    border: 1px solid #3d3d3d;
    color: #e0e0e0;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-family: 'Leander', sans-serif;
}

.pagination .page-link:hover {
    background-color: #3d3d3d;
    border-color: #4d4d4d;
    color: #ffffff;
    transform: translateY(-2px);
}

.pagination .page-link.active {
    background-color: #4f4d4e;
    border-color: #4f4d4e;
    color: #ffffff;
    font-weight: bold;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(79, 77, 78, 0.5);
}

.pagination .page-link.active:hover {
    background-color: #3d3d3d;
    border-color: #3d3d3d;
    color: #ffffff;
    cursor: default;
}

/* Hide pagination if not needed */
.pagination:empty {
    display: none;
}

/* Selection color */
::selection {
    background-color: rgba(160, 32, 240, 0.7);
    color: white;
}

.no-select {
    user-select: none;
}

/* Primary button styling */
.btn-primary {
    background-color: #1d1d1b;
    border-color: #1d1d1b;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #4f4d4e;
    border-color: #4f4d4e;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(79, 77, 78, 0.3);
}

.btn-outline-primary {
    color: #e0e0e0;
    border-color: #3d3d3d;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    color: white;
    background-color: #4f4d4e;
    border-color: #4f4d4e;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(79, 77, 78, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .tag-pill {
        white-space: nowrap;
        margin-bottom: 0.5rem;
        font-size: 0.8rem; /* Kleinere Schrift auf Mobile */
        padding: 0.3rem 0.8rem; /* Kompaktere Polsterung */
    }
    
    .d-flex.align-items-center {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem; /* Kleinere Abstände auf Mobile */
    }
    
    .col-md-6.mb-3.mb-md-0 {
        display: flex;
        justify-content: center;
    }
    
    .search-container {
        padding: 0 25px;
    }
    
    .mobile-center {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .blog-hero {
        margin-bottom: 2.5rem;
        padding: 2.5rem 1rem;
    }
    
    .filter-bar {
        padding: 1.5rem 1.25rem;
    }
    
    .blog-post-item {
        margin-bottom: 2rem !important;
    }
    
    .blog-actions {
        opacity: 1;
        transform: none;
    }

    .blog-card .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .blog-interaction-counts {
        align-self: flex-end;
    }
}

/* Mobile responsiveness for new layout */
@media (max-width: 991px) {
    .blog-filter-layout {
        margin-bottom: 2rem;
    }
    
    .blog-filter-layout .col-lg-8,
    .blog-filter-layout .col-md-7 {
        margin-bottom: 2rem !important;
    }
    
    .blog-tags-section,
    .blog-controls-section {
        margin-bottom: 0 !important;
        padding: 1.5rem;
    }
    
    .tags-container {
        justify-content: center;
    }
    
    .controls-container {
        gap: 0.75rem;
    }
}

@media (max-width: 767px) {
    .blog-filter-layout .col-lg-8,
    .blog-filter-layout .col-md-7,
    .blog-filter-layout .col-lg-4,
    .blog-filter-layout .col-md-5 {
        margin-bottom: 2rem !important;
    }
    
    .blog-filter-layout .col-lg-4:last-child,
    .blog-filter-layout .col-md-5:last-child {
        margin-bottom: 0 !important;
    }
    
    .blog-tags-section,
    .blog-controls-section {
        padding: 1.25rem;
        margin-bottom: 0 !important;
    }
    
    .section-title {
        font-size: 1rem;
        text-align: center;
    }
    
    .tags-container {
        justify-content: center;
        gap: 0.4rem;
    }
    
    .blog-tags-section .tag-pill {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
    
    .control-item {
        text-align: center;
    }
}

/* Fix for the blog page sort/filter z-index issue */
.blog-filters-container,
.blog-sorting-container {
    z-index: 50 !important; /* Lower than modal */
}

/* Ensure mobile menu has higher z-index */
.mobile-menu-toggle,
.mobile-nav-button {
    z-index: 9000 !important; /* Force higher z-index */
}

/* Fix any potential positioning issues */
@media (max-width: 767px) {
    .blog-filters-container,
    .blog-sorting-container {
        position: relative;
        z-index: 50;
    }
    
    /* Make sure menu buttons are properly visible */
    .mobile-menu-toggle,
    .mobile-nav-button {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 768px) {
    .mobile-center {
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 10px;
        display: inline-flex;
        align-items: center;
    }
    
    .dropdown.me-2 {
        margin-right: 10px !important;
    }
    
    .sort-dropdown {
        min-width: 180px;
        height: 100%;
        display: flex;
        align-items: center;
    }
}

/* Touch feedback */
@media (max-width: 991px) {
    .btn.touch-active {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(160, 32, 240, 0.3);
    }
}

/* Add this at the end of the file to ensure it has priority */

/* Fix for header logo and text alignment on blog page */
.navbar-brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
}

.navbar-brand img.trichtertrupp-logo {
    display: inline-block !important;
    margin-right: 0.5rem !important;
    vertical-align: middle !important;
}

.navbar-brand span {
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Ensure proper spacing on mobile */
@media (max-width: 767px) {
    .navbar-brand {
        width: auto !important;
        flex-wrap: nowrap !important;
    }
    
    .navbar-brand img.trichtertrupp-logo {
        width: 60px !important; /* Slightly smaller on blog page for better fit */
    }
    
    /* Ensure header height is consistent with other pages */
    .navbar {
        padding-top: 25px !important;
        padding-bottom: 25px !important;
        min-height: 85px !important;
    }
}

/* Enhanced dropdown styling - MODIFIED TO SCOPE TO BLOG-SPECIFIC DROPDOWNS ONLY */
.filter-bar .dropdown-menu.show,
.blog-filter .dropdown-menu.show,
.sort-dropdown-menu.show {
    display: block !important;
    position: absolute !important;
    z-index: 100000 !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important;
    background-color: #2d2d2d !important;
    border: 1px solid #3d3d3d !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 0 !important;
    margin-top: 0.25rem !important;
    min-width: 180px !important;
    transform: none !important;
}

.filter-bar .dropdown-menu.show .dropdown-item,
.blog-filter .dropdown-menu.show .dropdown-item,
.sort-dropdown-menu.show .dropdown-item {
    position: relative;
    z-index: 100001 !important;
    color: #e0e0e0 !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.filter-bar .dropdown-menu.show .dropdown-item:hover,
.blog-filter .dropdown-menu.show .dropdown-item:hover,
.sort-dropdown-menu.show .dropdown-item:hover {
    background-color: rgba(79, 77, 78, 0.15) !important;
    color: #ffffff !important;
}

.filter-bar .dropdown-menu.show .dropdown-item:active,
.blog-filter .dropdown-menu.show .dropdown-item:active,
.sort-dropdown-menu.show .dropdown-item:active {
    background-color: rgba(79, 77, 78, 0.3) !important;
}

/* Match font with button - scoped to blog dropdowns */
.filter-bar .dropdown-menu.show .dropdown-item,
.blog-filter .dropdown-menu.show .dropdown-item,
.sort-dropdown-menu.show .dropdown-item {
    font-family: inherit;
}

/* AOS Fallback Styling - ensure content is visible even if AOS fails */
[data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: all 0.3s ease;
}

/* Specific fallback for elements that might be hidden */
.aos-fallback-visible {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Ensure blog hero is always visible */
.blog-hero {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Ensure filter layout is always visible */
.blog-filter-layout {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* Ensure blog posts are always visible */
.blog-post-item {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}