/*
Theme Name: 1914-18 Dark Modern Theme
Author: Historisches Projekt
Version: 4.7
*/

:root {
    /* Dunkles Farbschema basierend auf der Vorlage */
    --bg-base: #11141d;
    --sidebar-bg: #0b0d13;
    --drawer-bg: #171a24;
    --card-bg: #202432;
    --card-border: rgba(255, 255, 255, 0.08);
    
    --text-main: #f1f5f9;
    --text-muted: #8b95a5;
    --accent-blue: #435453;
    
    /* Jahresfarben (1914 wieder im ursprünglichen Ton) */
    --color-1914: #597063; 
    --color-1915: #5E6F7D; 
    --color-1916: #8C5855; 
    --color-1917: #9E7352; 
    --color-1918: #383838; 
    
    --current-year-color: var(--color-1914);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    font-weight: 400;
}

/* Hauptlayout Container */
.w18-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-base);
}

/* --- LINKE SEITENLEISTE --- */
.w18-sidebar {
    width: 90px;
    height: 100%;
    background-color: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    z-index: 1002;
    position: relative;
    flex-shrink: 0;
}

.w18-logo {
    width: 100%;
    margin-top: 10px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.w18-logo img {
    display: block;
    width: 48px;
    height: auto;
    object-fit: contain;
}

/* Jahres-Buttons */
.w18-years-nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin: auto 0;
    align-items: center;
}

.w18-year-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 8px 4px;
    border-radius: 6px;
}

.w18-year-btn:hover, .w18-year-btn.active {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Unterer Bereich der Sidebar */
.w18-sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 0 16px;
    margin-bottom: 10px;
}

.w18-menu-btn, .w18-calendar-top-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 0px solid var(--card-border);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.w18-menu-btn svg, .w18-calendar-top-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--text-main);
    fill: var(--text-main);
    transition: all 0.3s ease;
}

.w18-menu-btn:hover, .w18-calendar-top-btn:hover {
    background-color: var(--current-year-color) !important;
    border-color: var(--current-year-color);
}

.w18-menu-btn:hover svg, .w18-calendar-top-btn:hover svg {
    stroke: #ffffff;
    fill: #ffffff;
    transform: scale(1.05);
}

/* --- AUSFAHRBARER CONTENT-DRAWER (Inter Font & Scrollbar) --- */
.w18-content-drawer {
    position: absolute;
    top: 0;
    left: 90px; 
    width: 30vw;
    min-width: 320px;
    max-width: 500px;
    height: 100%;
    background: #171a24 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-right: 0px solid var(--card-border);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
    z-index: 1001;
    transform: translateX(-100%); 
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    scrollbar-width: thin;
    scrollbar-color: #171a24 rgba(0, 0, 0, 0.2);
}

.w18-content-drawer::-webkit-scrollbar {
    width: 6px;
}

.w18-content-drawer::-webkit-scrollbar-track {
    background: transparent;
}

.w18-content-drawer::-webkit-scrollbar-thumb {
    background: #171a24 !important;
    border-radius: 4px;
}

.w18-content-drawer::-webkit-scrollbar-thumb:hover {
    background: #202432 !important;
}

.w18-content-drawer.open {
    transform: translateX(0);
}

/* TOGGLE-CONTAINER & BUTTON */
.w18-drawer-toggle-container {
    position: absolute;
    top: 50%;
    left: 90px;
    transform: translateY(-50%);
    z-index: 2000;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.w18-wrapper.drawer-open .w18-drawer-toggle-container {
    transform: translateY(-50%) translateX(30vw);
}

@media (min-width: 1666px) {
    .w18-wrapper.drawer-open .w18-drawer-toggle-container {
        transform: translateY(-50%) translateX(500px);
    }
}

.w18-drawer-btn {
    background: #171a24;
    color: var(--text-main);
    border: 1px solid var(--card-border);
    border-left: none;
    border-radius: 0 12px 12px 0;
    padding: 20px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 6px 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    text-decoration: none;
    pointer-events: auto;
}

.w18-drawer-btn:hover {
    background: var(--card-bg);
    color: #ffffff;
}

.w18-drawer-btn span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.w18-drawer-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s;
}

.w18-wrapper.drawer-open .w18-drawer-btn svg {
    transform: scaleX(-1);
}

/* Tabs Header */
.w18-tabs-header {
    display: flex;
    border-bottom: 1px solid var(--card-border);
    background: #12151c !important;
    padding: 8px 12px 0 12px;
    gap: 6px;
    overflow-x: auto;
}

.w18-tab-link {
    padding: 12px 16px;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.w18-tab-link.active {
    color: #ffffff;
    border-bottom-color: var(--current-year-color);
    background: #171a24 !important;
}

/* Tabs Content & Articles */
.w18-tabs-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
    background: #171a24;
}

.w18-tab-pane {
    display: none;
}

.w18-tab-pane.active {
    display: block;
}

.w18-tab-pane h2 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
}

.w18-tab-pane article {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 20px 0 !important;
    margin-bottom: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.w18-tab-pane article:last-child {
    border-bottom: none !important;
}

.w18-tab-pane article h3 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.w18-tab-pane article div,
.w18-tab-pane article div p,
.w18-content-drawer p,
.w18-content-drawer div {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 400 !important;
}

.w18-tab-pane article div p {
    margin-bottom: 16px;
}

.w18-tab-pane article div p:last-child {
    margin-bottom: 0;
}

/* --- LEERER ZUSTAND --- */
.w18-empty-state {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 20px 0 !important;
    margin-top: 0 !important;
    text-align: left !important;
    color: var(--text-muted) !important;
    font-weight: 400 !important;
}

/* --- KARTE & HISTORISCHER SATELLITEN-LOOK --- */
#w18-map {
    flex-grow: 1;
    height: 105%;
    z-index: 1;
    background-color: var(--bg-base);
}

#w18-map img {
    filter: brightness(0.55) contrast(1.25) saturate(0.35) hue-rotate(150deg);
}

/* --- PERFEKTE AUSRICHTUNG & JAHRES-FARBE FÜR DEN PIN --- */
.w18-teardrop-pin {
    position: relative;
    width: 32px;
    height: 42px;
}

.w18-teardrop-pin svg path {
    fill: var(--current-year-color) !important;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.4));
}

.w18-pin-content {
    position: absolute;
    top: 2px;
    left: 0;
    width: 32px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.w18-pin-content img {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* --- DATUMS-KASTEN UNTEN RECHTS --- */
.w18-date-widget {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

.w18-date-display {
    background: rgba(23, 26, 36, 0.9) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 2px solid var(--current-year-color);
    padding: 12px 22px;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 14px;
}

.w18-nav-arrow {
    background: rgba(23, 26, 36, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    text-decoration: none;
}

.w18-nav-arrow svg {
    width: 18px;
    height: 18px;
    stroke: #ffffff;
}

.w18-nav-arrow:hover {
    background-color: var(--current-year-color) !important;
    border-color: var(--current-year-color) !important;
    box-shadow: 0 0 16px var(--current-year-color);
    transform: translateY(-2px);
}

.w18-day-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
}

.w18-day-number {
    font-size: 34px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.w18-separator {
    width: 1px;
    height: 32px;
    background: var(--card-border);
    margin: 0 4px;
}

.w18-month-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
}

.w18-year-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--current-year-color);
}

/* Kalender Modal / Popout */
.w18-calendar-modal {
    position: absolute;
    bottom: 20px;
    left: 95px;
    background: rgba(18, 21, 28, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    width: 330px;
    padding: 24px;
    z-index: 2005;
    display: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f1f5f9;
}

.w18-calendar-modal.open {
    display: block;
    opacity: 1;
}

.w18-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 10px;
}

.w18-cal-header select {
    background: #202534;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    width: 100%;
}

.w18-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}

.w18-cal-weekdays {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    padding-bottom: 10px;
    text-transform: uppercase;
}

.w18-cal-day {
    padding: 9px 0;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.w18-cal-day:hover, .w18-cal-day.active {
    background: var(--current-year-color);
    color: #fff;
}

/* Alten Umschalter sicher ausblenden */
.w18-switch-container {
    display: none !important;
}
/* --- PIN IN JAHRESFARBE & ICON WEISS --- */
.w18-teardrop-pin {
    position: relative;
    width: 32px;
    height: 42px;
}

.w18-teardrop-pin svg path {
    fill: var(--current-year-color) !important;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.4));
}

.w18-pin-content {
    position: absolute;
    top: 2px;
    left: 0;
    width: 32px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.w18-pin-content img {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain;
    filter: brightness(0) invert(1) !important; /* Erzwingt ein rein weißes Icon */
}