/* ============================================
   LEGAL PAGES (Impressum & Datenschutz)
   höchstmass staff GmbH - Website 2026
   ============================================
   
   Styling für rechtliche Seiten
   - Sachlich, seriös, professionell
   - Fokus auf Lesbarkeit
   - Neutrale Farbwelt mit dezentem Akzent
   
   ============================================ */

/* ============================================
   PAGE HEADER (Legal Pages)
============================================ */
.page-header {
    background: var(--primary);
    padding: 140px 0 60px;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
}

.page-header h1 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.025em;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.breadcrumb a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb span {
    color: var(--accent-light);
}

.breadcrumb svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255,255,255,0.5);
}

/* ============================================
   LEGAL CONTENT
============================================ */
.legal-content {
    padding: var(--section-padding);
    background: var(--white);
}

.legal-content .container {
    max-width: 800px;
}

/* ============================================
   TABLE OF CONTENTS
============================================ */
.toc {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    padding: 32px 0;
    position: sticky;
    top: 74px;
    z-index: 100;
}

.toc .container {
    max-width: 800px;
}

.toc h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

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

.toc-list a {
    font-size: 14px;
    color: var(--gray-600);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.toc-list .toc-number {
    font-weight: 600;
    color: var(--accent);
}

/* ============================================
   LEGAL CHAPTERS
============================================ */
.legal-chapter {
    margin-bottom: 80px;
    scroll-margin-top: 180px;
}

.legal-chapter:last-child {
    margin-bottom: 0;
}

.chapter-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--white);
    font-weight: 700;
    font-size: 18px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.legal-chapter h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-200);
}

.legal-chapter h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 48px;
    margin-bottom: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-100);
}

.legal-chapter h3:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.legal-chapter h4 {
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-chapter p {
    margin-bottom: 16px;
    color: var(--gray-700);
    line-height: 1.8;
}

.legal-chapter a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.legal-chapter a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.legal-chapter ul {
    margin: 16px 0 24px 0;
    padding-left: 0;
    list-style: none;
}

.legal-chapter ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    line-height: 1.7;
}

.legal-chapter ul li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--accent);
    font-weight: bold;
}

/* ============================================
   LEGAL HIGHLIGHT BOX
============================================ */
.legal-highlight {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 24px 0;
}

.legal-highlight p {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0;
}

.legal-highlight p + p {
    margin-top: 16px;
}

/* ============================================
   BACK TO TOP BUTTON
============================================ */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 500;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-4px);
}

.back-to-top svg {
    stroke: var(--white);
    width: 24px;
    height: 24px;
}

.legal-section {
    margin-bottom: 60px;
}

.legal-section:last-child {
    margin-bottom: 0;
}

.legal-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-200);
}

.legal-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 40px;
    margin-bottom: 16px;
}

.legal-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-section p {
    margin-bottom: 16px;
    color: var(--gray-700);
    line-height: 1.8;
}

.legal-section a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.legal-section a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.legal-section ul,
.legal-section ol {
    margin-bottom: 16px;
    padding-left: 24px;
    color: var(--gray-700);
    line-height: 1.8;
}

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

/* ============================================
   ADDRESS BLOCK
============================================ */
.legal-address {
    background: var(--gray-50);
    border-left: 4px solid var(--accent);
    padding: 24px 28px;
    margin: 24px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.legal-address p {
    margin-bottom: 8px;
    font-size: 16px;
}

.legal-address p:last-child {
    margin-bottom: 0;
}

.legal-address .company-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 18px;
}

/* ============================================
   NOTES & HIGHLIGHTS
============================================ */
.legal-note {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 24px 0;
    font-size: 14px;
    color: var(--gray-600);
}

.legal-note strong {
    color: var(--gray-800);
}

.legal-note a {
    color: var(--accent);
    text-decoration: none;
}

.legal-note a:hover {
    text-decoration: underline;
}

/* ============================================
   META INFORMATION
============================================ */
.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.legal-meta-item {
    font-size: 15px;
    color: var(--gray-600);
}

.legal-meta-item strong {
    color: var(--gray-800);
}

/* ============================================
   DIVIDERS & CREDITS
============================================ */
.divider {
    height: 1px;
    background: var(--gray-200);
    margin: 48px 0;
}

.chapter-divider {
    height: 2px;
    background: linear-gradient(to right, var(--accent), var(--gray-200));
    margin: 60px 0;
}

.design-credit {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-top: 32px;
}

.design-credit h4 {
    margin-top: 0;
    margin-bottom: 12px;
}

.design-credit p {
    margin-bottom: 0;
    font-size: 15px;
    color: var(--gray-600);
}

.design-credit a {
    color: var(--accent);
    text-decoration: none;
}

.design-credit a:hover {
    text-decoration: underline;
}

.copyright-notice {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--gray-200);
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 1024px) {
    .toc {
        position: static;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 120px 0 48px;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .toc-list {
        flex-direction: column;
        gap: 8px;
    }
    
    .legal-content {
        padding: var(--section-padding-sm);
    }
    
    .legal-section h2,
    .legal-chapter h2 {
        font-size: 24px;
    }
    
    .legal-chapter {
        margin-bottom: 60px;
    }
    
    .legal-chapter h3 {
        font-size: 18px;
    }
    
    .legal-address {
        padding: 20px;
    }
    
    .legal-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .breadcrumb {
        flex-wrap: wrap;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .legal-address {
        padding: 16px;
    }
    
    .legal-note {
        padding: 16px;
    }
    
    .design-credit {
        padding: 16px 20px;
    }
    
    .legal-highlight {
        padding: 16px;
    }
}
