/* --- Topic Hero Header (single-topic.php) --- */
.topic-hero-section {
    position: relative;
    width: 100%;
    height: 40vh; /* Shorter than main page hero */
    overflow: hidden;
    margin-bottom: 30px;
}

.topic-hero-section .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(40%); /* Slightly darker for better title contrast */
    z-index: 1;
}

.topic-hero-section .hero-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    padding: 0 1rem;
    color: #fff;
}

.topic-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
}

/* --- Articles Grid Section --- */
.topic-articles-section {
    padding: 20px 0;
}

.articles-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 25px;
}

.articles-grid-cards {
    display: grid;
    max-width: 85vw;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* --- Individual Article Cards (Reusing structure from front page) --- */
.article-card {
    border: 1px solid #ddd;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    background: white;
    display: flex;
    flex-direction: column;
}

.article-card a {
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Ensure text color is inherited */
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.article-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-content {
    padding: 15px;
    flex-grow: 1; /* Allows content area to expand equally */
    display: flex;
    align-items: center; /* Center title vertically if card heights differ */
    justify-content: center;
}

.article-card-title {
    margin: 0;
    font-size: 1.25rem;
}

/* Centrování bloku s textem "žádné články" */
.no-articles-wrapper {
    display: flex;
    justify-content: center; 
    align-items: center; 
    padding: 20px;
    margin-top: 20px;
}

.no-articles-wrapper .no-articles {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    color: #555;
    margin: 0;
}

/* --- Filter Buttons Styling --- */
.article-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: #555;
}

.filter-btn:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}

/* Active State (Selected) */
.filter-btn.active {
    background-color: #E65014; /* Using your branding orange color */
    color: #fff;
    border-color: #E65014;
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
    .topic-hero-section {
        height: 30vh;
    }
    .topic-hero-title {
        font-size: 2rem;
    }
	.articles-grid-cards {
		max-width: 80vw;
	}
}