/* home.css – Überarbeitete Version mit Schatten & Akzenten */

/* Allgemeine Verbesserungen */
.financial-card {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease;
}

.financial-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Kompakter Highlight-Bereich */
.blog-highlight-content {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 10px;
    background: var(--item-bg) !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05),
                0 1px 2px rgba(0, 0, 0, 0.05) inset;
    transition: transform 0.2s ease;
    align-items: flex-start;
}

.blog-highlight-img {
    flex: 1 1 40%;
    min-width: 250px;
    max-width: 400px;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.blog-highlight-text {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1 1 60%;
    padding: 0.5rem 0;
}

.blog-highlight-text h4 {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    color: var(--heading-color);
    position: relative;
    padding-right: 2rem;
}

.blog-highlight-text h4::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
                rgba(59, 130, 246, 0.4) 0%, 
                rgba(99, 102, 241, 0.2) 100%);
    opacity: 1;
}

.blog-highlight-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted-color);
    border-bottom: 1px solid rgba(var(--border-color-rgb), 0.3);
}

.blog-highlight-text .text-muted {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
}

.blog-highlight-text p {
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    -webkit-line-clamp: 4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-highlight-text .btn-primary {
    align-self: flex-end;
    margin-top: auto;
    width: fit-content;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 6px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.15),
                0 1px 2px rgba(255, 255, 255, 0.1) inset;
}

.blog-highlight-text .btn-primary:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

/* Responsive Anpassungen */
@media (max-width: 1200px) {
    .blog-highlight-img {
        height: 200px;
        min-width: 200px;
    }
}

@media (max-width: 992px) {
    .blog-highlight-content {
        align-items: stretch;
    }
    
    .blog-highlight-text {
        height: auto;
    }
    
    .blog-highlight-text .btn-primary {
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .blog-highlight-text h4 {
        font-size: 1.2rem;
    }
    
    .blog-highlight-text p {
        font-size: 0.95rem;
        -webkit-line-clamp: 3;
    }
    
    .blog-highlight-img {
        height: 160px;
    }
}

/* Dark Mode Anpassungen */
[data-bs-theme="dark"] .blog-highlight-content {
    border-color: #2d3748;
}

[data-bs-theme="dark"] {
    --text-color: #e5e7eb;
    --border-color-rgb: 55, 65, 81;
    --shadow-color: rgba(0, 0, 0, 0.25);
}

[data-bs-theme="light"] {
    --text-color: #374151;
    --border-color-rgb: 229, 231, 235;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Kompakte Listen */
.blog-compact-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-radius: 0.5rem;
}

.blog-item-compact {
    display: flex;
    align-items: center;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    background: var(--item-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.blog-item-compact:hover,
.news-item-compact:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.blog-item-compact .compact-image {
    width: 60px !important;
    height: 40px !important;
    margin-right: 0.5rem;
    object-fit: cover;
    border-radius: 3px;
}

/* Tabellenverbesserungen */
.table-compact {
    width: 100%;
    font-size: 0.875rem;
    border-collapse: separate;
    border-spacing: 0;
}

.table-compact th {
    background: var(--table-header-bg);
    color: var(--table-header-color);
    padding: 0.5rem 0.75rem;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.05);
}

.table-compact td {
    padding: 0.5rem 0.75rem;
    background: var(--table-cell-bg);
}

.table-compact tr:not(:last-child) td {
    box-shadow: 0 1px 0 rgba(var(--border-color-rgb), 0.1);
}

.table-compact th:nth-child(1) { width: 60%; }
.table-compact th:nth-child(2),
.table-compact th:nth-child(3) { text-align: center; }

.table-compact td:nth-child(2),
.table-compact td:nth-child(3) {
    text-align: center;
    vertical-align: middle;
}

/* Update History */
.update-history-container {
    max-height: 600px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.update-history-container li {
    position: relative;
    padding-left: 1rem;
}

.update-history-container li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4em;
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(59, 130, 246, 0.3);
}

/* News-Feed */
.news-grid-compact {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.news-item-compact {
    padding: 0.75rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    background: var(--item-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.news-item-compact .compact-image {
    width: 60px !important;
    height: 40px !important;
    margin-right: 0.5rem;
    object-position: center;
}

.compact-content {
    padding: 0.1rem;
}

.compact-title {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    margin-bottom: 0.1rem;
}

.compact-meta {
    font-size: 0.75rem;
}

/* Scrollbar-Anpassungen */
.news-grid-compact::-webkit-scrollbar,
.update-history-container::-webkit-scrollbar {
    width: 6px;
}

.news-grid-compact::-webkit-scrollbar-track,
.update-history-container::-webkit-scrollbar-track {
    background: var(--card-bg);
}

.news-grid-compact::-webkit-scrollbar-thumb,
.update-history-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.news-grid-compact::-webkit-scrollbar-thumb:hover,
.update-history-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .financial-card {
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    }
    
    .blog-item-compact,
    .news-item-compact {
        flex-wrap: wrap;
    }
    
    .compact-image {
        margin-bottom: 0.5rem;
    }
    
    .update-history-container {
        max-height: 500px;
    }
    
    .news-item-compact .compact-image {
        width: 50px !important;
        height: 35px !important;
    }
}

/* Dark Mode Variablen */
[data-bs-theme="dark"] {
    --card-bg: #1f2937;
    --border-color: #374151;
    --heading-color: #e5e7eb;
    --item-bg: #172032;
    --table-header-bg: #1e3a8a;
    --table-header-color: #f3f4f6;
    --table-cell-bg: #1a2435;
}

/* Light Mode Variablen */
[data-bs-theme="light"] {
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --heading-color: #1f2937;
    --item-bg: #f9fafb;
    --table-header-bg: #3b82f6;
    --table-header-color: #ffffff;
    --table-cell-bg: #ffffff;
}