/**
 * responsive.css - Responsive Styles für das FinanceFlow Theme
 *
 * Umfasst die Medienabfragen für verschiedene Gerätebreiten, um sicherzustellen,
 * dass das FinanceFlow Theme auf allen Geräten optimal dargestellt wird.
 */

/* Gemeinsame Stile für alle Viewports */
:root {
    --container-padding: 20px;
}

.container {
    padding: 0 var(--container-padding);
}

/* Große Desktops (1440px und höher) */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
    
    .featured-article {
        height: 500px;
    }
    
    .featured-overlay h2 {
        font-size: 2.2rem;
    }
}

/* Desktop und große Tablets (1024px bis 1439px) */
@media (max-width: 1439px) {
    .container {
        max-width: 1140px;
    }
    
    /* Layouts mit Seitenleiste */
    .news-grid,
    .company-overview {
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets und kleine Desktops (768px bis 1023px) */
@media (max-width: 1023px) {
    .container {
        max-width: 900px;
    }
    
    /* Header */
    .site-header .container {
        padding: 0.8rem var(--container-padding);
    }
    
    .main-navigation li {
        margin: 0 0.8rem;
    }
    
    .search-form input {
        width: 160px;
    }
    
    /* Gemeinsame Grid-Layouts */
    .news-grid,
    .companies-grid,
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .news-sidebar,
    .overview-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-overlay h2 {
        font-size: 1.6rem;
    }
    
    /* Tabellen und Dashboards */
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th, 
    .data-table td {
        padding: 0.8rem;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer */
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets und große Mobilgeräte (576px bis 767px) */
@media (max-width: 767px) {
    :root {
        --container-padding: 15px;
    }
    
    /* Typografie für kleinere Geräte */
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Header und Navigation */
    .search-form {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        height: 0;
        overflow: hidden;
        transition: height 0.3s ease;
        z-index: 100;
    }
    
    .main-navigation.active {
        height: auto;
        padding-bottom: 1rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        padding: 1rem 0;
    }
    
    .main-navigation li {
        margin: 0.5rem 1.5rem;
    }
    
    /* Featured Article */
    .featured-article {
        height: 300px;
    }
    
    .featured-overlay {
        padding: 1.5rem;
    }
    
    .featured-overlay h2 {
        font-size: 1.4rem;
    }
    
    /* Content Grids */
    .posts-grid,
    .news-sidebar,
    .overview-sidebar {
        grid-template-columns: 1fr;
    }
    
    /* Tab- und Filteransichten */
    .view-tabs,
    .tab-navigation {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }
    
    .filter-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-options > * {
        margin-bottom: 0.5rem;
    }
    
    /* Tabellenansicht */
    .data-table {
        overflow-x: auto;
        display: block;
        width: 100%;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    /* Unternehmensseite */
    .company-header {
        flex-direction: column;
    }
    
    .company-info {
        margin-bottom: 1rem;
    }
    
    .company-price {
        align-self: flex-start;
    }
    
    .tab-item {
        padding: 0.8rem 1.2rem;
    }
    
    /* Footer */
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
    }
}

/* Kleine Mobilgeräte (bis 575px) */
@media (max-width: 575px) {
    /* Header */
    .site-header .container {
        padding: 0.6rem var(--container-padding);
    }
    
    .site-title {
        font-size: 1.2rem;
    }
    
    /* Featured Content */
    .featured-article {
        height: 250px;
    }
    
    .featured-overlay {
        padding: 1rem;
    }
    
    .featured-overlay h2 {
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }
    
    .featured-meta > * {
        margin-right: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Filter und Kategorien */
    .news-categories,
    .time-range {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }
    
    .cat-filter,
    .time-range-item {
        padding: 0.4rem 0.8rem;
        margin-right: 0.3rem;
    }
    
    /* Unternehmensseite */
    .company-details h2 {
        font-size: 1.4rem;
    }
    
    .company-meta {
        font-size: 0.8rem;
    }
    
    .company-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    /* Tabellen */
    .data-table th, 
    .data-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .score-pill {
        padding: 0.2rem 0.5rem;
        min-width: 40px;
        font-size: 0.8rem;
    }
    
    /* Formulare */
    input, 
    select, 
    button {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .button {
        padding: 0.5rem 1rem;
    }
    
    /* Suchseite */
    .search-result-item {
        grid-template-columns: 1fr;
    }
    
    .search-result-image {
        display: none;
    }
    
    /* Kommentare */
    .comment-form input,
    .comment-form textarea {
        font-size: 0.9rem;
    }
}

/* Dark Mode Styles - kombiniert für alle Viewports */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .site-header,
body.dark-mode .main-navigation,
body.dark-mode .site-footer {
    background-color: #1a1a1a;
}

body.dark-mode .card,
body.dark-mode .chart-container,
body.dark-mode .metrics-box,
body.dark-mode .company-header,
body.dark-mode .company-card,
body.dark-mode .analysis-card {
    background-color: #1e1e1e;
    border-color: #333;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
    color: #ffffff;
}

body.dark-mode a {
    color: #6baefb;
}

body.dark-mode a:hover {
    color: #ff8c42;
}

body.dark-mode .button {
    background-color: #1f4a72;
}

body.dark-mode .button:hover {
    background-color: #2a6599;
}

body.dark-mode .button-secondary {
    background-color: #00875A;
}

body.dark-mode .button-outline {
    border-color: #6baefb;
    color: #6baefb;
}

body.dark-mode .button-outline:hover {
    background-color: #6baefb;
    color: #121212;
}

body.dark-mode .data-table th {
    background-color: #2a2a2a;
}

body.dark-mode .data-table tr:nth-child(even) {
    background-color: #1a1a1a;
}

body.dark-mode .data-table tr:hover {
    background-color: #252525;
}

body.dark-mode .tab-item {
    color: #ccc;
}

body.dark-mode .tab-item.active {
    border-color: #6baefb;
    color: #ffffff;
}