/* ========================================
   MAIN.CSS - Layout, Typografie, Grundstruktur
   ======================================== */

/* ----- Reset & Basis ----- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* ----- Typografie ----- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Times New Roman', Times, serif;
    font-weight: normal;
    letter-spacing: 0.05em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid currentColor;
    padding-bottom: 0.3em;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1em;
    text-align: justify;
    hyphens: auto;
}

/* ----- Layout-Struktur ----- */
.scroll-content {
    max-width: 560px;
    margin: 0 auto;
    margin-top: 4rem;
    margin-bottom: 4rem;
    padding: 0 1rem;
    flex: 0 1 auto;
}

.scroll-body {
    padding: 1.25rem 1.75rem;
}

.content-section {
    display: flex;
    align-items: stretch;
}

.section-inner {
    flex: 1;
    padding: 0.75rem 1rem;
}

.section-banner {
    width: 20px;
    flex-shrink: 0;
}

/* ----- Heraldische Trennlinie ----- */
.section-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
    overflow: hidden;
}

.section-divider svg {
    width: 100%;
    max-width: 360px;
    height: 36px;
}

/* ----- Header Layout ----- */
.helm-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    min-height: 100px;
}

.header-content {
    flex: 1;
    max-width: 600px;
    text-align: center;
    padding: 0 1rem;
    position: relative;
}

.header-title {
    margin: 0.25rem 0;
    font-size: 1.4rem;
}

.header-nav {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem 0.5rem;
}

.nav-link {
    color: var(--accent);
    text-decoration: none;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--accent);
    color: var(--primary);
}

.nav-separator {
    color: var(--accent);
    opacity: 0.5;
    font-size: 0.6rem;
}

.header-symbol {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.header-symbol svg {
    width: 100%;
    height: 100%;
}

.helm-decoration {
    margin-bottom: 0.25rem;
}

.helm-ornament {
    width: 280px;
    height: 30px;
}

/* ----- Farbumschalter ----- */
.color-toggle {
    margin-top: 1.5rem;
}

.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.8rem;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    width: 50px;
    height: 26px;
    background: var(--primary);
    border: 2px solid var(--accent);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
    margin: 0 8px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--accent);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-label {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: bold;
}

.toggle-label-bw {
    opacity: 1;
}

.toggle-label-color {
    opacity: 0.5;
}

.toggle-switch input:checked ~ .toggle-label-bw {
    opacity: 0.5;
}

.toggle-switch input:checked ~ .toggle-label-color {
    opacity: 1;
}

/* ----- Seitenleisten Layout ----- */
.side-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
}

.side-rail-left {
    left: 0;
}

.side-rail-right {
    right: 0;
}

.rail-ornament {
    width: 60px;
    height: 30px;
    flex-shrink: 0;
}

.rail-weapon {
    flex: 1;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.rail-weapon svg {
    width: 100%;
    height: 100%;
    max-height: 400px;
}

.rail-symbol {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    padding: 5px;
}

.rail-symbol svg {
    width: 100%;
    height: 100%;
}

/* ----- Footer Layout ----- */
.seal-footer {
    padding: 2rem 1rem;
    margin-top: auto;
    position: relative;
    z-index: 20;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.seal {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
}

.seal svg {
    width: 100%;
    height: 100%;
}

.motto {
    font-size: 1.2rem;
    font-style: italic;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.footer-info {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ----- Responsive Anpassungen ----- */
@media (max-width: 1100px) {
    .side-rail {
        width: 60px;
    }
    
    .rail-weapon {
        width: 45px;
    }
    
    .rail-symbol {
        width: 50px;
        height: 50px;
    }
    
    .scroll-content {
        margin-left: 60px;
        margin-right: 60px;
        max-width: calc(100% - 120px);
    }
}

@media (max-width: 768px) {
    .side-rail {
        display: none;
    }
    
    .scroll-content {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        padding: 0 0.5rem;
        margin-top: 2.5rem;
        margin-bottom: 2.5rem;
    }
    
    .scroll-body {
        padding: 1rem;
    }
    
    .section-banner {
        display: none;
    }
    
    .header-symbol {
        width: 60px;
        height: 60px;
    }
    
    .header-title {
        font-size: 1.1rem;
    }
    
    .helm-ornament {
        width: 200px;
    }
    
    .header-nav {
        font-size: 0.75rem;
    }
    
    .section-divider svg {
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .nav-separator {
        display: none;
    }
    
    .header-nav {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.2rem 0.5rem;
        border: 1px solid var(--accent);
        border-radius: 3px;
    }
}
/* ----- Service Kacheln ----- */
.service-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--accent);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}

.service-tile:hover {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.service-tile:active {
    transform: translateY(0);
}

.service-tile-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.service-tile-icon svg {
    width: 100%;
    height: 100%;
}

.service-tile-content {
    flex: 1;
}

.service-tile-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--accent);
    border: none;
    padding: 0;
}

.service-tile-description {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.8;
    text-align: left;
}

.service-tile-arrow {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.service-tile:hover .service-tile-arrow {
    opacity: 1;
    transform: translateX(4px);
}

.service-tile-arrow svg {
    width: 100%;
    height: 100%;
}

/* Responsive */
@media (max-width: 480px) {
    .service-tile {
        padding: 0.875rem 1rem;
    }
    
    .service-tile-icon {
        width: 50px;
        height: 50px;
    }
    
    .service-tile-title {
        font-size: 1rem;
    }
    
    .service-tile-description {
        font-size: 0.8rem;
    }
}