/* Pantaris Artikel Display Styles */

.pantaris-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.pantaris-header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 40px;
}

.pantaris-header h1 {
    font-size: 1.67em; /* 2/3 of 2.5em */
    margin: 0 0 10px 0;
    color: #333;
}

.pantaris-stats {
    font-size: 0.73em; /* 2/3 of 1.1em */
    color: #666;
}

/* 3-Column Layout */
.pantaris-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    min-height: 600px;
}

@media (max-width: 1200px) {
    .pantaris-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .pantaris-column.pantaris-description {
        overflow-x: scroll;
    }

    /* Make topics list collapsible on mobile */
    .pantaris-topics-list {
        position: relative;
        top: auto;
        max-height: none;
        order: -1;
    }

    /* Add toggle button for topics on mobile */
    .pantaris-topics-list::before {
        content: "📋 Themen anzeigen/verstecken";
        display: block;
        background: #00cc00;
        color: white;
        padding: 10px;
        margin: -20px -20px 15px -20px;
        border-radius: 8px 8px 0 0;
        cursor: pointer;
        text-align: center;
        font-weight: bold;
        user-select: none;
    }

    .pantaris-topics-list.collapsed .topics-menu {
        display: none;
    }

    .pantaris-topics-list.collapsed h2 {
        display: none;
    }

    /* Mobile-specific adjustments */
    .topics-menu a {
        padding: 6px 8px; /* Smaller padding on mobile */
    }
}

/* Column 1: Topics List */
.pantaris-topics-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.pantaris-topics-list h2 {
    margin-top: 0;
    font-size: 0.87em; /* 2/3 of 1.3em */
    color: #333;
    border-bottom: 2px solid #00cc00;
    padding-bottom: 10px;
}

.topics-menu {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.topics-menu li {
    margin-bottom: 5px;
}

.topics-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.63em; /* 2/3 of 0.95em */
    hyphens: auto;
    word-wrap: break-word;
}

.topics-menu a:hover {
    background: #00cc00;
    color: white;
}

.topics-menu a.active {
    background: #00cc00;
    color: white;
    font-weight: bold;
}

.topics-menu .count {
    font-size: 0.57em; /* 2/3 of 0.85em */
    opacity: 0.7;
    flex-shrink: 0;
    margin-left: 8px;
}

/* Column 2: Topic Description */
.pantaris-description {
    padding: 0 20px;
}

.pantaris-description h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.2em; /* 2/3 of 1.8em */
    border-bottom: 2px solid #00cc00;
    padding-bottom: 10px;
}

.topic-description {
    line-height: 1.6;
    color: #444;
    font-size: 0.87em; /* Slightly smaller body text */
}

/* Preserve HTML table styling from topics */
.topic-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.topic-description td {
    padding: 8px;
    vertical-align: top;
}

.topic-description h1,
.topic-description h2,
.topic-description h3 {
    color: #333;
    margin: 20px 0 10px 0;
}

.welcome-message {
    line-height: 1.6;
    color: #444;
    font-size: 0.87em; /* Slightly smaller body text */
}

.recent-articles {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.recent-articles li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.recent-articles li:last-child {
    border-bottom: none;
}

/* Column 3: Articles List */
.pantaris-articles {
    padding: 0 20px;
}

.pantaris-articles h2 {
    margin-top: 0;
    color: #333;
    font-size: 1.2em; /* 2/3 of 1.8em */
    border-bottom: 2px solid #00cc00;
    padding-bottom: 10px;
}

.select-topic {
    color: #666;
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

.articles-list {
    margin-top: 20px;
}

.pantaris-article-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}

.pantaris-article-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pantaris-article-item header {
    margin-bottom: 15px;
}

.pantaris-article-item h3 {
    margin: 0 0 8px 0;
    font-size: 0.8em; /* 2/3 of 1.2em */
    color: #333;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.6em; /* 2/3 of 0.9em */
    color: #666;
}

.article-meta .publication {
    font-weight: bold;
    color: #00cc00;
}

.article-content {
    line-height: 1.6;
    color: #444;
    margin: 15px 0;
    font-size: 0.87em; /* Slightly smaller body text */
}

.article-full-content {
    line-height: 1.6;
    color: #444;
    margin: 15px 0;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.87em; /* Slightly smaller body text */
}

.read-more {
    display: inline-block;
    color: #00cc00;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.63em; /* 2/3 of 0.95em */
    transition: color 0.2s;
}

.read-more:hover {
    color: #009900;
    text-decoration: underline;
}

/* Scrollbar styling */
.pantaris-topics-list::-webkit-scrollbar,
.articles-list::-webkit-scrollbar {
    width: 8px;
}

.pantaris-topics-list::-webkit-scrollbar-track,
.articles-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.pantaris-topics-list::-webkit-scrollbar-thumb,
.articles-list::-webkit-scrollbar-thumb {
    background: #00cc00;
    border-radius: 4px;
}

.pantaris-topics-list::-webkit-scrollbar-thumb:hover,
.articles-list::-webkit-scrollbar-thumb:hover {
    background: #009900;
}

/* Search functionality */
.search-container {
    margin-top: 20px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.8em;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #00cc00;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: bold;
    color: #333;
    font-size: 0.75em;
    margin-bottom: 4px;
}

.search-result-meta {
    font-size: 0.65em;
    color: #666;
    margin-bottom: 4px;
}

.search-result-excerpt {
    font-size: 0.7em;
    color: #444;
    line-height: 1.4;
}

.search-highlight {
    background-color: #ffff00;
    font-weight: bold;
}

/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Print styles */
@media print {
    .pantaris-topics-list {
        display: none;
    }
    
    .pantaris-container {
        grid-template-columns: 1fr;
    }
    
    .read-more {
        display: none;
    }
}