/* ========================================
   RESPONSIVE BASE CSS - Karolin Wunderlich
   Allgemeine Mobile-Optimierungen für alle Seiten
   ======================================== */

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* FIX: Navigation immer über Content */
.fixed-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Alle Container maximal Bildschirmbreite */
.container,
.background-container,
.ueberschrift-background-container,
.three-col-row,
.image-row,
main,
section {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Bilder nie breiter als Container */
img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   MOBILE-ONLY / DESKTOP-ONLY
   ======================================== */

/* Standardmäßig: Mobile verstecken, Desktop zeigen */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* ========================================
   HAMBURGER-MENÜ
   ======================================== */

/* Hamburger Button (standardmäßig versteckt) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: #621A74;
    border: none;
    cursor: pointer;
    z-index: 1001;
    position: fixed;
    top: 1rem;
    right: 20px;
    border-radius: 8px;
    padding: 10px;
    width: 50px;
    height: 50px;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: #FF914D;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hamburger Animation (X-Form) */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   MOBILE (bis 768px)
   ======================================== */

@media screen and (max-width: 768px) {
    
    /* MOBILE-ONLY / DESKTOP-ONLY */
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    /* Body & Container */
    body {
        font-size: 16px;
        line-height: 1.6;
        overflow-x: hidden;
        padding-top: 0rem;
    }
    
    /* Bilder responsive */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Links & Buttons - Touch-optimiert */
    a, button {
        min-height: 44px;
        padding: 10px;
    }
    
    /* ========================================
       NAVIGATION MIT HAMBURGER-MENÜ
       ======================================== */
    
    .hamburger {
        display: flex;
        justify-content: center;
        align-items: center;
        top: 1rem;
    }
    
    .fixed-nav ul {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 200px;
        height: 44vh;
        background-color: #f7f7fb;
        box-shadow: -2px 0 15px rgba(0, 0, 0, 0.2);
        flex-direction: column;
        padding-top: 100px;
        padding-bottom: 2rem;
        overflow-y: auto;
        transition: transform 0.3s ease;
        z-index: 1000;
    }
    
    .fixed-nav ul.active {
        display: flex;
        transform: translateX(0);
    }
    
    .fixed-nav li {
        width: 100%;
        text-align: left;
        margin: 0;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .fixed-nav a {
        display: block;
        padding: 1.2rem 1.5rem;
        color: #621A74;
        font-weight: 600;
        font-size: 1.1rem;
        transition: all 0.2s ease;
    }
    
    .fixed-nav a:hover {
        background-color: #FF914D;
        color: white;
        padding-left: 2rem;
    }
    
    .fixed-nav a[style*="color: #FF914D"] {
        background-color: #621A74;
        color: #FF914D;
    }
    
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        display: block;
    }
    
    .fixed-nav hr {
        display: none;
    }
    
    /* ========================================
       ÜBERSCHRIFTEN
       ======================================== */
    
    h1 {
        font-size: 2rem !important;
        padding-right: 80px;
        text-align: left;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    h2 {
        font-size: 1.5rem !important;
        padding-right: 80px;
        text-align: left;
    }
    
    h3 {
        font-size: 1.2rem !important;
        text-align: left;
    }

    h4 {
        font-size: 1rem !important;
        text-align: left;
    }
    
    /* ========================================
       HINTERGRUND-CONTAINER
       ======================================== */
    
    .background-container,
    .ueberschrift-background-container {
        height: 40vh !important;
        width: 100% !important;
        margin-left: 0 !important;
        padding: 15px !important;
        background-position: center 30%;
    }
    
    .ueberschrift {
        font-size: 2rem !important;
        padding: 15px 20px !important;
        margin-bottom: 10px !important;
    }
    
    /* ========================================
       HORIZONTALE LINIEN
       ======================================== */
    
    hr {
        margin: 0.5rem 0.5rem;
    }
    
    hr.lila {
        margin: 0.5rem 0.5rem;
    }
    
    /* ========================================
       FOOTER
       ======================================== */
     
    .footer-content {
        flex-direction: column;
        gap: 0.1rem;
        text-align: center;
    }
    
    .footer-column {
        width: 100%;
    }
    
    .footer-copy {
        font-size: 0.9rem;
    }
}

/* ========================================
   KLEINE SMARTPHONES (bis 480px)
   ======================================== */

@media screen and (max-width: 480px) {
    
    .hamburger {
        top: 1rem;
        right: 15px;
    }
    
    h1 {
        font-size: 1.5rem !important;
        padding-right: 65px;        
    }
    
    .ueberschrift {
        font-size: 1.5rem !important;
        padding: 10px 15px !important;
    }
    
    .background-container,
    .ueberschrift-background-container {
        height: 35vh !important;
        padding: 10px !important;
    }
    
    .fixed-nav a {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* ========================================
   MEDIUM SMARTPHONES (481px - 768px)
   ======================================== */

@media screen and (min-width: 481px) and (max-width: 768px) {
    
    .hamburger {
        top: 1rem;
        right: 18px;
    }
    
    h1 {
        font-size: 1.75rem !important;
        padding-right: 80px;
    }
    
    .ueberschrift {
        font-size: 1.75rem !important;
        padding: 12px 17px !important;
    }
    
    .background-container,
    .ueberschrift-background-container {
        height: 37vh !important;
        padding: 12px !important;
    }
    
    .fixed-nav a {
        padding: 1.1rem 1.5rem;
        font-size: 1.05rem;
    }
}

/* ========================================
   DESKTOP (ab 769px)
   ======================================== */

@media screen and (min-width: 769px) {
    
    body {
        padding-top: 5rem;
    }
    
    .hamburger {
        display: none !important;
    }
    
    .fixed-nav ul {
        display: flex !important;
        flex-direction: row;
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
    
    .nav-overlay {
        display: none !important;
    }
}

/* ========================================
   TABLET (769px - 1024px)
   ======================================== */

@media screen and (min-width: 769px) and (max-width: 1024px) {
    
    .fixed-nav ul {
        flex-wrap: wrap;
        justify-content: center;     
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .background-container,
    .ueberschrift-background-container {
        height: 60vh;
        width: 96%;
    }
    
    .ueberschrift {
        font-size: 3rem;
    }
}

/* ========================================
   TABLET LANDSCAPE (1025px - 1366px)
   ======================================== */

@media screen and (min-width: 1025px) and (max-width: 1366px) {
    
    h1 {
        font-size: 3rem;
    }
    
    .ueberschrift {
        font-size: 3.5rem;
    }
    
    .background-container,
    .ueberschrift-background-container {
        height: 70vh;
    }
}

/* ========================================
   SMARTPHONE LANDSCAPE (Querformat)
   ======================================== */

@media screen and (max-height: 500px) and (orientation: landscape) {
    
    .background-container,
    .ueberschrift-background-container {
        height: 80vh !important;
    }
    
    .fixed-nav ul.active {
        width: 220px;
        padding-top: 60px;
    }
    
    .fixed-nav a {
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .ueberschrift {
        font-size: 2rem !important;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    
    .fixed-nav,
    .footer,
    .circle-button,
    .hamburger,
    .nav-overlay {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}