/*
Theme Name: FinanceFlow
Theme URI: https://www.dividenden-kalender.de
Author: Alexander Müller
Author URI: https://www.dividenden-kalender.de
Description: Ein modernes WordPress-Template für Finanzseiten mit Fokus auf Aktien und Dividenden
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: financeflow
Tags: finance, stocks, dividends, responsive, modern
*/

/* Allgemeine Reset-Styles und Grundlayout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Farbpalette */
    --primary-color: #142B42;
    --secondary-color: #00875A;
    --accent-color: #FF8C42;
    --light-bg: #F7F9FC;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --error-color: #D64242;

    /* Typografie */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
    --mono-font: 'Roboto Mono', monospace;
}

body {
    font-family: var(--body-font);
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header-Styles */
.site-header {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
    margin: 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0 1rem;
}

.main-navigation a {
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.current-menu-item a::after {
    width: 100%;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-form input {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--white);
    font-size: 0.9rem;
    width: 200px;
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.mobile-menu-toggle {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Footer-Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 0.5rem;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Buttons */
.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: var(--body-font);
}

.button:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

.button-secondary {
    background-color: var(--secondary-color);
}

.button-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.button-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.card-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.card-meta > * {
    margin-right: 1rem;
}

.card-excerpt {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-family: var(--mono-font);
}

.data-table th {
    background-color: #F0F0F0;
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    position: sticky;
    top: 60px; /* Höhe des Headers */
    cursor: pointer;
}

.data-table th:hover {
    background-color: #E0E0E0;
}

.data-table th::after {
    content: '▼';
    margin-left: 0.5rem;
    opacity: 0.5;
    font-size: 0.8rem;
}

.data-table th.sorted-asc::after {
    content: '▲';
    opacity: 1;
}

.data-table th.sorted-desc::after {
    content: '▼';
    opacity: 1;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:nth-child(even) {
    background-color: var(--light-bg);
}

.data-table tr:hover {
    background-color: rgba(0, 135, 90, 0.05);
}

.positive {
    color: var(--secondary-color);
}

.negative {
    color: var(--error-color);
}

.score-pill {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    min-width: 60px;
}

.score-pill.medium {
    background-color: var(--accent-color);
}

.score-pill.low {
    background-color: var(--error-color);
}

/* Tabs */
.tab-navigation {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    transition: border-color 0.3s ease;
}

.tab-item.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Charts */
.chart-container {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    margin-bottom: 0;
}

.time-range {
    display: flex;
    background-color: #F0F0F0;
    border-radius: 20px;
    overflow: hidden;
}

.time-range-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.time-range-item.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Company Header */
.company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.company-info {
    display: flex;
    align-items: center;
}

.company-logo {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    font-weight: bold;
    margin-right: 1.5rem;
}

.company-details h2 {
    margin-bottom: 0.5rem;
}

.company-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

.company-price {
    text-align: right;
}

.company-price .current-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.price-change {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    color: var(--white);
    font-weight: 600;
}

.price-change.positive {
    background-color: var(--secondary-color);
}

.price-change.negative {
    background-color: var(--error-color);
}

/* Key Metrics Box */
.metrics-box {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.metrics-box h3 {
    margin-bottom: 1.5rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.metric-item:last-child {
    border-bottom: none;
}

.metric-label {
    color: var(--text-light);
}

.metric-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* Featured Article */
.featured-article {
    position: relative;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.featured-article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
}

.featured-overlay h2 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.featured-meta {
    display: flex;
    font-size: 0.9rem;
    opacity: 0.8;
}

.featured-meta > * {
    margin-right: 1rem;
}

/* Media Queries für Responsivität */
@media (max-width: 1024px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .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;
    }

    .main-navigation.active {
        height: auto;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .main-navigation ul {
        flex-direction: column;
    }

    .main-navigation li {
        margin: 0.5rem 1rem;
    }

    .search-form {
        margin-left: auto;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .company-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .company-price {
        text-align: left;
        margin-top: 1rem;
    }

    .featured-overlay h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .search-form input {
        width: 150px;
    }

    .company-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .company-logo {
        margin-bottom: 1rem;
    }
}