:root {
    --hak-red: #dd0835;
    --hak-grey: #b3b2b2;
    --hak-white: #ffffff;

    --green-up: #008800;
    --red-down: #cc0000;
    --bg-dark: #222222;

    --ticker-duration: 30s;
}

/* ===== Grundlayout ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: var(--hak-grey);
    color: #111;
    padding-bottom: 60px; /* Platz für Ticker */
}

/* ===== Header ===== */

.top-bar {
    background: var(--hak-red);
    color: var(--hak-white);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.header-center {
    text-align: center;
    font-size: 0.95rem;
}

.header-right {
    display: flex;
    gap: 10px;
}

.logo-small {
    height: 40px;
    background: white;
    border-radius: 4px;
}

/* ===== News-Bar ===== */

#top-info {
    padding: 10px 20px 20px;
}

.news-bar {
    background: var(--bg-dark);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.news-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-icon {
    font-size: 2.4rem;
}

.news-label {
    background: var(--hak-red);
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.news-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.news-line1 {
    font-size: 1.15rem;
    font-weight: bold;
}

.news-line2 {
    font-size: 0.95rem;
    opacity: 0.9;
}

.news-fade {
    animation: news-fade 0.5s ease;
}

@keyframes news-fade {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ===== Info-Gitter ===== */

.info-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 10px;
}

.info-box {
    background: var(--hak-white);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.info-box h2 {
    font-size: 0.9rem;
    color: var(--hak-red);
    margin-bottom: 6px;
}

/* Slogan */

.slogan-box p {
    font-weight: bold;
}

/* Wetter-Box */

.weather-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f0f0;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.weather-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.weather-icon {
    font-size: 2.4rem;
}

.weather-title {
    font-weight: bold;
}

.weather-text {
    text-align: right;
    font-size: 0.85rem;
}

/* Tagesindikatoren */

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.indicator-card {
    background: #f7f7f7;
    border-radius: 6px;
    padding: 6px;
}

.indicator-title {
    font-size: 0.8rem;
    color: #555;
}

.indicator-value {
    font-size: 1rem;
    font-weight: bold;
}

.indicator-note {
    font-size: 0.7rem;
    color: #777;
}

.indicator-placeholder {
    font-size: 0.8rem;
    color: #777;
}

/* ===== Termine-Tabelle ===== */

.events-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
    background: #f2f4f6;
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.88rem;
}

.events-table th {
    background: var(--hak-grey);
    color: white;
    padding: 6px;
    font-weight: bold;
    text-align: left;
}

.events-table td {
    padding: 6px 8px;
}

.events-table tbody tr:nth-child(odd) {
    background: #f2f4f6;
}

.events-table tbody tr:nth-child(even) {
    background: #e5eaef;
}

.events-table th:first-child,
.events-table td:first-child {
    width: 120px;
}

/* ===== Markt-Tabellen (n-tv Stil) ===== */

.market-section {
    margin: 6px 20px 54px;
    display: block;          /* statt nebeneinander */
}

.market-table-wrapper {
    margin-bottom: 12px;     /* etwas Abstand zwischen den 2 Tabellen */
}


.market-table-header {
    background: var(--hak-grey);
    color: white;
    padding: 4px 8px;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
    font-size: 0.85rem;
}

.market-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.98rem;
    background: #f2f4f6;
}

.market-table th,
.market-table td {
    padding: 3px 6px;
}

.market-table th {
    font-weight: normal;
    text-align: left;
}

.market-table td {
    text-align: right;
}

.market-table tbody tr:nth-child(odd) {
    background: #f2f4f6;
}

.market-table tbody tr:nth-child(even) {
    background: #e5eaef;
}

/* Kurszellen */

.value-cell {
    font-weight: bold;
    background: white;
    border-radius: 3px;
}

.value-cell.up {
    background: #e3f3c4;
    color: #006400;
}

.value-cell.down {
    background: #f6d0d0;
    color: #a00000;
}

.arrow-cell.up { color: #006400; }
.arrow-cell.down { color: #a00000; }

.change-cell.up {
    color: #006400;
    font-weight: bold;
}

.change-cell.down {
    color: #a00000;
    font-weight: bold;
}

.time-cell {
    color: #666;
    font-size: 0.75rem;
}

/* ===== Börsenticker unten ===== */

#stock-ticker {
    background: var(--bg-dark);
    color: white;
    border-top: 3px solid var(--hak-red);
    position: fixed;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    height: 48px;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    white-space: nowrap;
    width: max-content;
    animation: ticker-scroll var(--ticker-duration) linear infinite;
}

.ticker-item {
    padding: 0 25px;
    border-right: 1px solid #444;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.no-animation {
    animation: none !important;
}

/* Symbole im Ticker */

.ticker-symbol {
    font-weight: bold;
    margin-right: 4px;
}

.ticker-name {
    margin-right: 8px;
    opacity: 0.85;
    font-size: 0.85rem;
}

.ticker-price {
    margin-right: 4px;
    font-variant-numeric: tabular-nums;
}

.ticker-change {
    margin-left: 4px;
}

/* ===== Responsive ===== */

@media (max-width: 900px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .market-section {
        flex-direction: column;
    }
}
