/* ========================================
   Spenglerinfo - Modern CSS
   Responsiv, Clean, Professional
   ======================================== */

/* CSS Variables */
:root {
    /* Warme, metallische Farbgebung für Spengler-Handwerk */
    --primary: #4a5568;        /* Stahl-Grau */
    --primary-light: #718096;  /* Helles Stahl-Grau */
    --primary-dark: #2d3748;   /* Dunkles Anthrazit */
    --accent: #c05621;         /* Warmes Kupfer/Orange */
    --accent-hover: #9c4221;   /* Dunkleres Kupfer */
    --success: #38a169;
    --warning: #dd6b20;
    --danger: #c53030;
    
    /* Farb-Akzente für Normen - angepasst */
    --norm-safety: #c53030;
    --norm-tech: #4a5568;
    --norm-material: #38a169;
    --norm-calc: #dd6b20;
    
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --bg-alt: #edf2f7;
    
    --text-dark: #1a202c;
    --text-medium: #4a5568;
    --text-light: #718096;
    --text-muted: #a0aec0;
    
    --border: #e2e8f0;
    --border-light: #edf2f7;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --transition: all 0.25s ease;
    
    --max-width: 1200px;
    --header-height: 70px;
    
    /* Verbesserte Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

/* Verbesserte Code/Formel-Darstellung */
code, .formula code, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
}

code {
    padding: 2px 6px;
    color: var(--accent);
}

.formula code {
    display: block;
    padding: 16px 24px;
    font-size: 1.1em;
    color: white;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

/* Norm-Tag Farben */
.norm-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.norm-badge.sicherheit { background: rgba(230, 57, 70, 0.1); color: var(--norm-safety); }
.norm-badge.tech { background: rgba(45, 90, 138, 0.1); color: var(--norm-tech); }
.norm-badge.material { background: rgba(42, 157, 143, 0.1); color: var(--norm-material); }
.norm-badge.berechnung { background: rgba(244, 162, 97, 0.1); color: var(--norm-calc); }

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

ul, ol {
    padding-left: 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
    display: none; /* Hidden on mobile, shown via media query below */
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Main Navigation */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    color: var(--text-medium);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--bg-alt);
}

.nav-link:last-child {
    padding: 10px 14px;
    font-size: 1.2rem;
}

/* ========================================
   Main Content
   ======================================== */

.main-content {
    padding-top: calc(var(--header-height) + 40px);
    padding-left: 320px;
    padding-right: 40px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    .main-content {
        padding-left: 20px;
    }
}

.content-section {
    padding: 80px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.content-section.alt-bg {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    padding: 100px 20px 80px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 24px;
    font-weight: 500;
}

.hero-desc {
    color: rgba(255,255,255,0.75);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

.quick-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    color: white;
    font-weight: 500;
    transition: var(--transition);
}

.quick-link:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    color: white;
}

.ql-icon {
    font-size: 1.3rem;
}

/* ========================================
   Cards Grid
   ======================================== */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.card-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}

.card-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-alt);
    color: var(--text-medium);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
    margin-bottom: 14px;
}

.card p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

/* ========================================
   Material Cards
   ======================================== */

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

.material-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.material-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.material-header h3 {
    color: white;
    margin-bottom: 4px;
}

.material-grade {
    font-size: 0.85rem;
    opacity: 0.85;
}

.material-props {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.prop {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prop-label {
    color: var(--text-medium);
}

.prop-value {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.material-notes {
    padding: 20px 24px;
}

.material-notes ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.material-notes li {
    padding: 4px 0;
    color: var(--text-medium);
}

.material-notes li::before {
    content: '•';
    color: var(--accent);
    margin-right: 8px;
}

.note {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-medium);
}

/* ========================================
   Tables
   ======================================== */

.material-table-section {
    margin-top: 40px;
}

.material-table-section h3 {
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th,
.data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg-alt);
}

/* ========================================
   Tech Cards
   ======================================== */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tech-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.tech-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.formula {
    background: var(--primary-dark);
    color: white;
    padding: 16px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 16px;
}

.formula code {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.calc-table {
    width: 100%;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.calc-table td {
    padding: 6px 0;
}

.calc-table td:first-child {
    font-weight: 600;
    color: var(--primary);
    width: 50px;
}

.important-box {
    background: #fff3cd;
    border-left: 4px solid var(--warning);
    padding: 14px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.9rem;
}

.important-box ul {
    margin-top: 8px;
    padding-left: 1.2rem;
}

.important-box li {
    margin: 4px 0;
}

.zone-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.zone {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.zone.green {
    background: #d4edda;
    color: #155724;
}

.zone.yellow {
    background: #fff3cd;
    color: #856404;
}

.zone.red {
    background: #f8d7da;
    color: #721c24;
}

/* ========================================
   Planung Section
   ======================================== */

.planung-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.system-card,
.checklist-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.system-card h3,
.checklist-card h3 {
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.system-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.system-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.system-item h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

.system-item p {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin: 4px 0;
}

.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.checklist label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: var(--text-medium);
}

.checklist input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ========================================
   TOC Section
   ======================================== */

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.toc-column h3 {
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
}

.toc-list li {
    margin: 8px 0;
}

.toc-list a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-medium);
    transition: var(--transition);
}

.toc-list a:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

/* Chapter Details */
.chapter-details {
    margin-top: 40px;
}

.chapter {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.chapter h3 {
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.chapter h4 {
    margin: 20px 0 12px;
    color: var(--primary-light);
}

.chapter ul {
    margin: 12px 0;
}

.chapter li {
    margin: 8px 0;
    color: var(--text-medium);
}

.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.term {
    background: var(--bg-alt);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.term strong {
    color: var(--primary);
    display: block;
    margin-bottom: 6px;
}

.term p {
    font-size: 0.9rem;
    color: var(--text-medium);
}

/* ========================================
   Search Section
   ======================================== */

.search-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    text-align: center;
}

.search-section .section-header h2,
.search-section .section-header p {
    color: white;
}

.search-section .section-header h2::after {
    background: white;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 12px;
}

.search-box input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    box-shadow: var(--shadow-md);
}

.search-box input:focus {
    outline: none;
    box-shadow: var(--shadow-lg);
}

.search-box button {
    padding: 16px 32px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.search-results {
    max-width: 800px;
    margin: 30px auto 0;
    text-align: left;
}

.search-result-item {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    transition: var(--transition);
}

.search-result-item:hover {
    transform: translateX(4px);
}

.search-result-item h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

.search-result-item p {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 40px 20px;
    text-align: center;
}

.footer-content p {
    margin: 8px 0;
}

.footer-note {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ========================================
   Mobile Responsive
   ======================================== */

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
    h3 { font-size: 1.3rem; }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        font-size: 1.5rem;
        padding: 20px;
        width: 100%;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-desc {
        font-size: 1rem;
    }

    .quick-links {
        flex-direction: column;
        align-items: center;
    }

    .quick-link {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .content-section {
        padding: 50px 16px;
    }

    .cards-grid,
    .material-grid,
    .tech-grid,
    .planung-grid {
        grid-template-columns: 1fr;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box button {
        width: 100%;
    }

    .toc-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .card,
    .tech-card,
    .system-card,
    .checklist-card {
        padding: 20px;
    }
}

/* ========================================
   Animations
   ======================================== */

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

.card,
.material-card,
.tech-card,
.system-card,
.checklist-card,
.chapter {
    animation: fadeInUp 0.5s ease forwards;
}

.cards-grid .card:nth-child(1) { animation-delay: 0.05s; }
.cards-grid .card:nth-child(2) { animation-delay: 0.1s; }
.cards-grid .card:nth-child(3) { animation-delay: 0.15s; }
.cards-grid .card:nth-child(4) { animation-delay: 0.2s; }
.cards-grid .card:nth-child(5) { animation-delay: 0.25s; }
.cards-grid .card:nth-child(6) { animation-delay: 0.3s; }
.cards-grid .card:nth-child(7) { animation-delay: 0.35s; }
.cards-grid .card:nth-child(8) { animation-delay: 0.4s; }

/* ========================================
   HORIZONTAL LINKTREE HEADER
   ======================================== */

.site-header {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.header-top .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-top .logo-icon {
    font-size: 1.8rem;
}

.header-top .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
}

.header-search {
    color: #fff;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.header-search:hover {
    background: rgba(255,255,255,0.1);
}

/* Header Search Box */
.header-search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 25px;
    padding: 5px;
    gap: 5px;
}

.header-search-input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 12px;
    font-size: 0.9rem;
    width: 150px;
    transition: width 0.3s ease;
}

.header-search-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.header-search-input:focus {
    outline: none;
    width: 200px;
}

.header-search-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.header-search-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Horizontal Linktree */
.linktree-nav {
    background: var(--primary-dark);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.linktree-nav::-webkit-scrollbar {
    height: 6px;
}

.linktree-nav::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.linktree-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.linktree-nav .linktree {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: max-content;
}
    padding: 0;
    max-width: var(--max-width);
    margin: 0 auto;
}

.linktree-nav .linktree-item {
    border-bottom: none;
    position: relative;
}

.linktree-nav .linktree-link {
    display: block;
    padding: 10px 12px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 500;
}

.linktree-nav .linktree-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.linktree-nav .linktree-link.active {
    color: #fff;
    background: transparent;
    border-bottom-color: var(--accent);
}

/* Farbcodierte Navigation */
.linktree-link.normen { border-bottom-color: #3498db; }
.linktree-link.materialien { border-bottom-color: #27ae60; }
.linktree-link.technik { border-bottom-color: #e67e22; }
.linktree-link.planung { border-bottom-color: #9b59b6; }
.linktree-link.fachregel { border-bottom-color: #1abc9c; }

/* Submenu - Dropdown */
.linktree-nav .linktree-item.has-submenu {
    position: relative;
}

.linktree-nav .linktree-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-dark);
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-lg);
}

.linktree-nav .has-submenu:hover > .linktree-submenu,
.linktree-nav .has-submenu:focus-within > .linktree-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.linktree-nav .linktree-submenu li a {
    display: block;
    padding: 10px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    white-space: nowrap;
    background: rgba(45, 55, 72, 0.95);
}

.linktree-nav .linktree-submenu li a:hover {
    color: #fff;
    background: rgba(192, 86, 33, 0.8);
    padding-left: 25px;
}

/* Main Content */
.main-content {
    padding: 40px 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ========================================
   KONTAKT SECTION
   ======================================== */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.contact-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 25px;
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.contact-card p {
    color: var(--text-medium);
    margin: 0;
}

.contact-card a {
    color: var(--text-medium);
    text-decoration: none;
}

.contact-card a:hover {
    color: var(--primary);
}

.contact-form-wrapper {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
    max-width: 600px;
}

.contact-form-wrapper h3 {
    margin-bottom: 20px;
    color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-light);
}

/* ========================================
   Mobile/Tablet Optimierung
   ======================================== */

/* Touch-freundliche Elemente (min. 44px) */
@media (max-width: 1024px) {
    /* Buttons größer für Touch */
    .btn-primary,
    .btn-secondary,
    button {
        min-height: 48px;
        padding: 14px 24px;
    }
    
    /* Header-Suchfeld touch-freundlich */
    .header-search-input {
        height: 44px;
        padding: 10px 16px;
        font-size: 16px; /* Verhindert iOS Zoom */
    }
    
    .header-search-btn {
        width: 48px;
        height: 48px;
    }
    
    /* Cards: Bessere Klickflächen */
    .card {
        padding: 20px;
    }
    
    /* Linktree Touch-optimiert */
    .linktree-link {
        padding: 12px 16px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Formulare: Touch-freundliche Inputs */
    .rechner-input input,
    .rechner-input select {
        height: 48px;
        padding: 12px 16px;
        font-size: 16px; /* Verhindert iOS Zoom bei input focus */
    }
    
    .rechner-btn {
        height: 48px;
        padding: 12px 24px;
    }
}

/* Tablet-Optimierung (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .content-section {
        padding: 60px 30px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
}

/* Mobile-Optimierung (< 768px) */
@media (max-width: 767px) {
    :root {
        --header-height: 60px;
    }
    
    body {
        font-size: 15px;
        line-height: 1.5;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1.1rem; }
    
    /* Kompaktere Sections */
    .content-section {
        padding: 50px 16px;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .section-header h2::after {
        width: 40px;
        height: 3px;
    }
    
    /* Cards: 1 Spalte */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card {
        padding: 16px;
    }
    
    .card h3 {
        font-size: 1.15rem;
    }
    
    .card p {
        font-size: 0.9rem;
    }
    
    /* Tables scrollbar machen */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    /* Formeln: Scrollbar bei langen Formeln */
    .formula-box {
        overflow-x: auto;
        padding: 12px;
    }
    
    /* Footer: Kompakter */
    .footer-content {
        padding: 20px 16px;
        text-align: center;
    }
    
    .footer p {
        font-size: 0.85rem;
    }
    
    /* Header-Navigation horizontal scrollbar */
    .linktree-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE */
    }
    
    .linktree-nav::-webkit-scrollbar {
        display: none;
    }
    
    .linktree {
        padding: 0 12px;
    }
}

/* Sehr kleine Screens (< 400px) */
@media (max-width: 400px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .card-tag {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

@media (max-width: 768px) {
    .header-top {
        padding: 12px 15px;
    }
    
    .header-top .logo-text {
        font-size: 1.2rem;
    }
    
    .linktree-nav .linktree-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 25px 15px;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .menu-toggle,
    .quick-links,
    .search-box,
    .checklist {
        display: none;
    }

    .content-section {
        padding: 20px;
    }

    .card,
    .tech-card,
    .chapter {
        break-inside: avoid;
    }
}

/* ========================================
   NORM DETAIL PAGES
   ======================================== */

.norm-detail {
    max-width: 900px;
    margin: 0 auto;
}

.norm-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 40px;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    text-align: center;
}

.norm-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.norm-header h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.norm-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.norm-status {
    font-size: 0.9rem;
    opacity: 0.7;
}

.norm-section {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 25px;
}

.norm-section h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.norm-section h3 {
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.norm-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.norm-section li {
    margin-bottom: 8px;
}

.norm-section p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.norm-section .note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.back-link {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.back-link:hover {
    background: rgba(255,255,255,0.2);
}

.norm-section .data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.norm-section .data-table th,
.norm-section .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.norm-section .data-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--primary);
}

.norm-section .data-table tr:hover {
    background: var(--bg-alt);
}

/* Linked Cards */
.cards-grid .card a {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cards-grid .card a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   SUCHERGEBNISSE SEITE
   ======================================== */

.search-results-page {
    max-width: 900px;
    margin: 0 auto;
}

.search-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 40px;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    text-align: center;
}

.search-header h1 {
    color: #fff;
    margin-bottom: 10px;
}

.search-query {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.search-query strong {
    color: #fff;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 4px;
}

.search-count {
    font-size: 0.9rem;
    opacity: 0.8;
}

.search-results-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-card {
    background: var(--bg-white) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-md);
    padding: 25px;
    position: relative !important;
    z-index: 999 !important;
    display: block !important;
    text-decoration: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

.result-card:hover {
    border-color: var(--primary) !important;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.result-card h3 {
    color: var(--primary);
}

.result-category {
    display: inline-block;
    background: var(--primary-light);
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.result-card h3 {
    margin-bottom: 10px;
}

.result-card h3 a {
    color: var(--primary);
    text-decoration: none;
}

.result-card h3 a:hover {
    text-decoration: underline;
}

.result-card p {
    color: var(--text-medium);
    margin: 0;
    line-height: 1.6;
}

.search-suggestions {
    text-align: center;
    padding: 40px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.search-suggestions h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.suggestion-tag {
    background: var(--bg-alt);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.suggestion-tag:hover {
    background: var(--primary);
    color: #fff;
}

/* ========================================
   FORMELN SEITE
   ======================================== */

.formula-page {
    max-width: 900px;
    margin: 0 auto;
}

.formula-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 50px 40px;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    text-align: center;
}

.formula-header h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.formula-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

.formula-section {
    margin-bottom: 40px;
}

.formula-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

/* Mobile Fix für formula-card */
@media (max-width: 600px) {
    .formula-card {
        padding: 20px;
        border-radius: var(--radius-md);
    }
    
    .formula-title {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .formula-icon {
        font-size: 2rem;
    }
    
    .formula-title h2 {
        font-size: 1.4rem;
    }
    
    .formula-box {
        padding: 20px;
        overflow-x: auto;
    }
    
    .formula-box code {
        font-size: 1rem;
    }
}

.formula-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-light);
}

.formula-icon {
    font-size: 2.5rem;
}

.formula-title h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin: 0;
}

.formula-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 25px;
    text-align: center;
}

.formula-main {
    font-size: 1.8rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 10px;
}

.formula-main code {
    background: none;
    font-size: inherit;
    color: #fff;
}

.formula-description {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin: 0;
}

.formula-explanation {
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 25px;
}

.formula-explanation h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.explanation-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.explanation-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    line-height: 1.6;
}

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

.explanation-list strong {
    color: var(--primary);
    font-weight: 600;
}

.formula-example {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 25px;
    margin-bottom: 25px;
}

.formula-example h3 {
    color: #2e7d32;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.calc-box {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 15px 20px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    margin: 15px 0;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.calc-box code {
    background: none;
    color: var(--text-dark);
}

.material-table {
    margin-bottom: 25px;
}

.material-table h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.formula-tip {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 20px;
}

.formula-tip h3 {
    color: #e65100;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.formula-tip p {
    margin: 0;
    line-height: 1.6;
}

.quick-ref {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.quick-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.quick-item h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 10px;
}

.quick-item code {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .formula-header {
        padding: 30px 20px;
    }
    
    .formula-header h1 {
        font-size: 1.8rem;
    }
    
    .formula-card {
        padding: 25px 20px;
    }
    
    .formula-main {
        font-size: 1.3rem;
    }
    
    .formula-title {
        flex-direction: column;
        text-align: center;
    }
    
    .quick-grid {
        grid-template-columns: 1fr;
    }
}

/* Official Sources */
.official-sources {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.source-card {
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    padding: 25px;
    border-left: 4px solid var(--primary);
}

.source-card h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.source-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.source-card li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    line-height: 1.5;
}

.source-card li:last-child {
    border-bottom: none;
}

.source-card strong {
    color: var(--text-dark);
}

.source-link {
    color: var(--primary);
    font-family: monospace;
    font-size: 0.85rem;
    background: rgba(30,58,95,0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ========================================
   LANDESBAUORDNUNGEN
   ======================================== */

.intro-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-medium);
    text-align: center;
    padding: 20px;
}

.land-card {
    border-left: 5px solid var(--primary);
}

.land-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-light);
    flex-wrap: wrap;
}

.land-icon {
    font-size: 2rem;
}

.land-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 0;
}

.land-name {
    background: var(--primary);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-left: auto;
}

.land-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.land-info h3, .land-links h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.land-info ul, .land-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.land-info li, .land-links li {
    padding: 8px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-medium);
}

.land-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.land-links a:hover {
    text-decoration: underline;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-medium);
}

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

.info-list li:first-child {
    padding-top: 0;
}

@media (max-width: 768px) {
    .land-header {
        flex-direction: column;
        text-align: center;
    }
    
    .land-name {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .land-content {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Rechenbeispiele & Praxis
   ======================================== */

.example-box {
    background: var(--bg-alt);
    border-left: 4px solid var(--primary);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.example-box h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.example-box .formula {
    background: var(--bg-white);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 12px 0;
    font-family: 'Consolas', 'Monaco', monospace;
}

.example-box .formula code {
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.diagram-container {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.falz-diagramm {
    max-width: 100%;
    height: auto;
}

.diagram-caption {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 12px;
}

.checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.checklist-item:hover {
    background: var(--border-light);
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checklist-item span {
    flex: 1;
    font-size: 0.95rem;
}

.norm-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    list-style: none;
    padding: 0;
}

.norm-links li {
    background: var(--bg-alt);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.norm-links li:hover {
    background: var(--primary);
    color: var(--bg-white);
}

.norm-links li:hover a {
    color: var(--bg-white);
}

.norm-links a {
    color: var(--text-dark);
    font-weight: 500;
}

/* ========================================
   Rechner (Schneelast & Windlast)
   ======================================== */

.rechner-container {
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

/* Mobile Fix für Rechner */
@media (max-width: 600px) {
    .rechner-container {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 12px;
    }
    
    .rechner-input {
        width: 100%;
    }
    
    .rechner-btn {
        width: 100%;
        margin-top: 8px;
    }
    
    .rechner-ergebnis {
        grid-column: 1;
    }
}

.rechner-input {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rechner-input label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-medium);
}

.rechner-input select,
.rechner-input input {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--bg-white);
    transition: var(--transition);
}

.rechner-input select:focus,
.rechner-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.rechner-btn {
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.rechner-btn:hover {
    background: var(--primary-light);
}

/* Praxis-Beispiele */
.beispiel-box {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f7fa 100%);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-top: 20px;
}

.beispiel-box h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.beispiel-box p {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 6px;
    line-height: 1.5;
}

.beispiel-box strong {
    color: var(--text-dark);
}

.rechner-ergebnis {
    grid-column: 1 / -1;
    background: var(--bg-white);
    padding: 16px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--success);
    margin-top: 8px;
}

/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}
