/* ========================================
   Spenglerinfo - NEU - Design
   Style: Scientific Journal meets Vintage Atlas
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Sans:wght@400;500;600&family=Source+Serif+Pro:wght@400;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Primärfarben - Paper/Editorial Style */
    --cream: #F5F0E6;
    --charcoal: #2C2C2C;
    --terracotta: #C45D3E;
    --forest-green: #1D4A3C;
    --burnt-sienna: #A0522D;
    
    /* Sekundärfarben */
    --ochre: #D4A853;
    --warm-gray: #8B8680;
    --paper-white: #FFFEF9;
    --ink-black: #1A1A1A;
    
    /* Klimadaten-Farbskala (falls benötigt) */
    --temp-cold: #2C4A7C;
    --temp-cool: #6B8CBF;
    --temp-neutral: #E8E4DC;
    --temp-warm: #F5E6C8;
    --temp-hot: #E8A94D;
    --temp-very-hot: #D4652F;
    --temp-extreme: #B82E2E;
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Serif 4', 'Times New Roman', serif;
    --font-ui: 'DM Sans', 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, monospace;
    
    /* Animation */
    --ease-out-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--charcoal);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Paper texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

/* ========================================
   Navigation
   ======================================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(180deg, var(--cream) 0%, rgba(245,240,230,0.95) 100%);
    border-bottom: 1px solid rgba(44,44,44,0.1);
}

.nav-container {
    max-width: 1200px;
    justify-content: center;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--charcoal);
    text-decoration: none;
}

.nav-logo:hover {
    color: var(--terracotta);
}

.nav-logo-icon {
    color: var(--terracotta);
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-link {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--charcoal);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: rgba(44,44,44,0.05);
    color: var(--terracotta);
}

/* Remove active highlighting - all links look the same */

/* Hide old navigation elements from content */
.main-menu,
.main-nav-2,
.site-header,
.header-top,
.header-actions,
.header-search-line {
    display: none !important;
}

/* Active link highlighting */
.nav-link.active {
    background: var(--terracotta);
    color: white;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: 8rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(196,163,90,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--charcoal);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--warm-gray);
    margin-bottom: 2rem;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    max-width: 1200px;
    justify-content: center;
    margin: 0 auto;
    padding: 5rem 2rem 2rem;
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--charcoal);
}

.page-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.page-description {
    font-size: 1.1rem;
    color: var(--warm-gray);
}

/* ========================================
   Cards
   ======================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: var(--paper-white);
    border: 1px solid rgba(44,44,44,0.1);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--terracotta);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--terracotta);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--charcoal);
}

.card-text {
    color: var(--warm-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--terracotta);
    text-decoration: none;
    font-weight: 500;
}

.card-link:hover {
    text-decoration: underline;
}

/* ========================================
   Content Sections
   ======================================== */
.content-section {
    margin: 3rem 0;
    padding: 5rem 2rem 2rem;
    background: var(--paper-white);
    border-radius: 8px;
    border: 1px solid rgba(44,44,44,0.1);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--charcoal);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(44,44,44,0.1);
}

/* ========================================
   Lists
   ======================================== */
.content-list {
    list-style: none;
}

.content-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(44,44,44,0.05);
}

.content-list li:last-child {
    border-bottom: none;
}

.content-list a {
    color: var(--charcoal);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.content-list a:hover {
    color: var(--terracotta);
}

.content-list a::before {
    content: '→';
    color: var(--terracotta);
    opacity: 0;
    transition: opacity 0.2s;
}

.content-list a:hover::before {
    opacity: 1;
}

/* ========================================
   Tables
   ======================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(44,44,44,0.1);
}

.data-table th {
    font-family: var(--font-ui);
    font-weight: 600;
    background: rgba(44,44,44,0.03);
    color: var(--charcoal);
}

.data-table tr:hover {
    background: rgba(44,44,44,0.02);
}

/* ========================================
   Search
   ======================================== */
.search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-family: var(--font-ui);
    border: 2px solid rgba(44,44,44,0.1);
    border-radius: 8px;
    background: var(--paper-white);
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--terracotta);
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background: var(--charcoal);
    color: var(--cream);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    justify-content: center;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--ochre);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--cream);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    max-width: 1200px;
    justify-content: center;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
    padding: 1rem 2rem;
    background: rgba(44,44,44,0.03);
    font-size: 0.9rem;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    max-width: 1200px;
    justify-content: center;
    margin: 0 auto;
}

.breadcrumb-list li::after {
    content: '→';
    margin-left: 0.5rem;
    color: var(--warm-gray);
}

.breadcrumb-list li:last-child::after {
    display: none;
}

.breadcrumb-list a {
    color: var(--terracotta);
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

.breadcrumb-list li:last-child {
    color: var(--warm-gray);
}

/* ========================================
   Glossary Styles (Enhanced)
   ======================================== */

/* Main Glossary Page - A-Z Navigation */
.glossary-section {
    padding: 1rem 0;
}

.glossary-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(44,44,44,0.1);
}

.glossary-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.glossary-header h1::before {
    content: '📖';
    font-size: 1.75rem;
}

.glossary-header p {
    font-size: 1.1rem;
    color: var(--warm-gray);
    font-style: italic;
}

/* Alphabet Grid - Clean A-Z Navigation */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.alpha-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--paper-white);
    border: 1px solid rgba(44,44,44,0.1);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.alpha-box:hover {
    border-color: var(--terracotta);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.alpha-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--charcoal);
    color: var(--cream);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 6px;
    flex-shrink: 0;
}

.alpha-box:hover .alpha-letter {
    background: var(--terracotta);
}

.alpha-desc {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--warm-gray);
    line-height: 1.3;
}

/* Back button on letter pages */
.abc-back {
    margin-bottom: 1.5rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--terracotta);
    text-decoration: none;
    border: 1px solid var(--terracotta);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--terracotta);
    color: white;
}

.back-btn::before {
    content: '←';
}

/* Glossary List Container */
.glossar-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Term Cards - Professional Dictionary Style */
.term-card {
    background: var(--paper-white);
    border: 1px solid rgba(44,44,44,0.08);
    border-left: 4px solid var(--terracotta);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    transition: all 0.25s ease;
}

.term-card:hover {
    border-left-color: var(--forest-green);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateX(4px);
}

.term-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.term-card p {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--warm-gray);
    line-height: 1.65;
}

/* Individual Letter Page Header */
.term-card + .term-card {
    margin-top: 0.75rem;
}

/* Page subtitle on letter pages */
.subtitle {
    font-size: 1.1rem;
    color: var(--warm-gray);
    margin-bottom: 1.5rem;
    font-style: italic;
}

/* Container override for glossary pages */
.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Legacy Glossary Styles (kept for compatibility) */
.glossary-letter {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--terracotta);
    padding: 1rem 0;
    border-bottom: 2px solid var(--terracotta);
    margin: 2rem 0 1rem;
}

.glossary-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(44,44,44,0.05);
}

.glossary-term {
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

.glossary-def {
    color: var(--warm-gray);
    font-size: 0.95rem;
}

/* ========================================
   Formula/Technical Styles
   ======================================== */
.formula-block {
    background: var(--paper-white);
    border: 1px solid rgba(44,44,44,0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    text-align: center;
    overflow-x: auto;
}

.formula-name {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--warm-gray);
    margin-bottom: 0.5rem;
    text-align: center;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 6rem 1rem 3rem;
    }
    
    .main-content {
        padding: 4rem 1rem 1rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    /* Glossary responsive */
    .alphabet-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .alpha-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }
    
    .alpha-letter {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .alpha-desc {
        font-size: 0.75rem;
    }
    
    .term-card {
        padding: 1rem;
    }
    
    .term-card h3 {
        font-size: 1.1rem;
    }
    
    .term-card p {
        font-size: 0.9rem;
    }
    
    .glossary-header h1 {
        font-size: 1.75rem;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   Glossary Styles
   ======================================== */

/* Main Glossary Page - Alphabet Grid */
.alphabet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.alpha-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: var(--paper-white);
    border: 1px solid rgba(44,44,44,0.1);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.alpha-box:hover {
    border-color: var(--terracotta);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(196,93,62,0.15);
    background: var(--cream);
}

.alpha-letter {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--terracotta);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.alpha-desc {
    font-size: 0.75rem;
    color: var(--warm-gray);
    text-align: center;
    line-height: 1.4;
}

/* Individual Letter Pages */
.letter-header {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--terracotta);
    padding: 2rem 0 1rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--terracotta);
    text-align: center;
}

.term-list {
    list-style: none;
    margin: 2rem 0;
}

.term-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--paper-white);
    border: 1px solid rgba(44,44,44,0.08);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.term-item:hover {
    border-color: var(--terracotta);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.term-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.term-def {
    color: var(--warm-gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Two column layout for terms */
.term-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.term-card {
    padding: 1.5rem;
    background: var(--paper-white);
    border: 1px solid rgba(44,44,44,0.08);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.term-card:hover {
    border-color: var(--terracotta);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.term-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(44,44,44,0.1);
}

.term-card-def {
    color: var(--warm-gray);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Letter navigation at bottom */
.letter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(44,44,44,0.1);
}

.letter-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--paper-white);
    border: 1px solid rgba(44,44,44,0.1);
    border-radius: 4px;
    color: var(--charcoal);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.letter-nav a:hover {
    background: var(--terracotta);
    color: white;
    border-color: var(--terracotta);
}

.letter-nav a.current {
    background: var(--terracotta);
    color: white;
    border-color: var(--terracotta);
}

/* Responsive */
@media (max-width: 768px) {
    .alphabet-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .term-grid {
        grid-template-columns: 1fr;
    }
    
    .letter-header {
        font-size: 2rem;
    }
}

/* ========================================
   TOC Styles for Fachregel
   ======================================== */
.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.toc-item {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--paper-white);
    border: 1px solid rgba(44,44,44,0.08);
    border-radius: 6px;
    color: var(--charcoal);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.toc-item:hover {
    border-color: var(--terracotta);
    background: rgba(196,93,62,0.05);
    color: var(--terracotta);
}

/* Page description */
.page-description {
    font-size: 1.1rem;
    color: var(--warm-gray);
    margin-top: 0.5rem;
}

/* Formula block adjustments */
.formula-block p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.formula-block p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Fachregel Content Styles
   ======================================== */
.fachregel-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--charcoal);
}

.fachregel-content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.fachregel-content ul,
.fachregel-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.fachregel-content li {
    margin-bottom: 0.5rem;
}

.fachregel-content strong {
    color: var(--terracotta);
    font-weight: 600;
}

.fachregel-content h3,
.fachregel-content h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem;
    color: var(--charcoal);
}
