/**
 * Frontend Styles - IfaS Themendatenbank
 *
 * @package IfaS_Themendatenbank
 */

/* ==========================================================================
   Fokusthemen Grid
   ========================================================================== */

.fokusthemen-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.fokusthemen-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.fokusthemen-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.fokusthemen-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .fokusthemen-grid.cols-3,
    .fokusthemen-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .fokusthemen-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Thema Card
   ========================================================================== */

.thema-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.thema-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.thema-card-image {
    background: #f8f9fa;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.thema-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.thema-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.thema-card:hover .thema-card-image img {
    transform: scale(1.05);
}

.thema-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.thema-card-title {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.thema-card-title a {
    color: #333;
    text-decoration: none;
}

.thema-card-title a:hover {
    color: #0073aa;
}

.thema-card-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.thema-card-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    text-align: center;
    align-self: flex-start;
}

.thema-card-link:hover {
    background: #005177;
    color: #fff;
}

/* ==========================================================================
   No Results
   ========================================================================== */

.fokusthemen-grid + p {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
    font-size: 1.1rem;
}

/* ==========================================================================
   Thema Single Page
   ========================================================================== */

.thema-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.thema-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #eee;
}

.thema-fokus-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    background-color: #d4edda;
    color: #155724;
    margin-bottom: 1rem;
}

.thema-title {
    font-size: 2.5rem;
    margin: 0.5rem 0;
    line-height: 1.2;
}

.thema-excerpt {
    margin-top: 1rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

/* Content Layout */
.thema-content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .thema-content-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Sidebar */
.thema-sidebar {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    height: fit-content;
}

.thema-image {
    margin-bottom: 1.5rem;
    text-align: center;
}

.thema-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.thema-sidebar-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.thema-sidebar-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.thema-sidebar-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #333;
}

/* Ansprechpersonen Cards */
.thema-ansprechpersonen-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.thema-ansprechperson-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: box-shadow 0.2s ease;
}

.thema-ansprechperson-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.thema-ansprechperson-photo {
    flex-shrink: 0;
}

.thema-ansprechperson-photo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.thema-ansprechperson-info {
    flex: 1;
    min-width: 0;
}

.thema-ansprechperson-name {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.thema-ansprechperson-name a {
    color: #333;
    text-decoration: none;
}

.thema-ansprechperson-name a:hover {
    color: #0073aa;
}

.thema-ansprechperson-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.thema-ansprechperson-contact .contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.thema-ansprechperson-contact .dashicons {
    color: #666;
    font-size: 18px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.thema-ansprechperson-contact .contact-link {
    color: #0073aa;
    text-decoration: none;
    word-break: break-word;
}

.thema-ansprechperson-contact .contact-link:hover {
    text-decoration: underline;
}

/* Projects List */
.thema-projekte-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.thema-projekt-item {
    padding: 0.5rem 0;
}

.thema-projekt-item a {
    color: #0073aa;
    text-decoration: none;
}

.thema-projekt-item a:hover {
    text-decoration: underline;
}

/* Main Content */
.thema-main-content {
    min-width: 0;
}

.thema-beschreibung {
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
    .thema-ansprechperson-card {
        flex-direction: column;
        text-align: center;
    }

    .thema-ansprechperson-photo {
        margin: 0 auto;
    }

    .thema-ansprechperson-contact {
        justify-content: center;
    }
}
