/* ============================================
   BASE.CSS - Gemeinsame Styles für alle Seiten
   ============================================ */

/* CSS-Variablen importieren */
@import url('variables.css');

/* ============================================
   BODY & GRUNDLEGENDE STYLES
   ============================================ */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    padding-top: var(--nav-padding-top);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
/* Screen Reader Only Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   SOCIAL MEDIA ICONS
   ============================================ */
.instagram-icon {
    width: 30px;
    height: 30px;
    vertical-align: middle;
}

/* ============================================
   NAVIGATION - Desktop (Variante B)
   ============================================ */
/* Skip-to-Content Link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: var(--text-white);
    padding: var(--spacing-sm) var(--spacing-md);
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 5px 0;
}

.skip-to-content:focus {
    top: 0;
}

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: linear-gradient(135deg, var(--bg-nav-gradient-start) 0%, var(--bg-nav-gradient-end) 100%);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid rgba(183, 77, 77, 0.2);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.main-nav li {
    display: inline-block;
    position: relative;
}

.main-nav a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 12px 18px;
    display: block;
    border-radius: 8px;
    transition: all var(--transition-normal);
    position: relative;
    letter-spacing: 0.3px;
    outline: none;
}

/* Focus-State für Barrierefreiheit */
.main-nav a:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Hover-Effekt mit Hintergrund und Unterstreichung */
.main-nav a::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-normal);
}

.main-nav a:hover {
    color: var(--bg-primary);
    background-color: rgba(183, 77, 77, 0.15);
}

/* Bild-Loading Animation */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity var(--transition-normal);
}

img[loading="lazy"].loaded {
    opacity: 1;
}

.main-nav a:hover::before {
    transform: scaleX(1);
}

/* Aktive Seite hervorheben */
.main-nav a.active {
    color: var(--bg-primary);
    background-color: rgba(183, 77, 77, 0.25);
}

.main-nav a.active::before {
    transform: scaleX(1);
}

/* Hamburger-Button (auf Desktop ausgeblendet) */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 200;
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--color-primary);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 12px 16px;
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.menu-toggle:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

.menu-toggle:active {
    transform: scale(0.95);
}

/* ============================================
   BUTTON STYLES
   ============================================ */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 10px;
    text-decoration: none;
}

a.btn {
    text-decoration: none;
}

a.btn:hover {
    opacity: 0.9;
}

/* Button-Varianten */
.red-btn {
    background-color: var(--color-primary);
    color: var(--text-white);
}

.red-btn:hover,
.red-btn:focus {
    background-color: var(--color-primary-dark);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.green-btn {
    background-color: var(--color-secondary-dark);
    color: var(--text-white);
}

.green-btn:hover,
.green-btn:focus {
    background-color: var(--color-secondary);
    outline: 2px solid var(--color-secondary-dark);
    outline-offset: 2px;
}

.white-btn {
    background-color: #e0d7d7;
    color: var(--text-primary);
}

.white-btn:hover,
.white-btn:focus {
    background-color: #d4c9c9;
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

.download-btn {
    background-color: var(--color-primary-dark);
    font-size: 16px;
    color: var(--text-white);
}

.download-btn:hover,
.download-btn:focus {
    background-color: var(--color-primary);
    outline: 2px solid var(--color-primary-dark);
    outline-offset: 2px;
}

/* ============================================
   MOBILE OPTIMIERUNG
   ============================================ */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        padding: 10px;
        padding-top: 0;
    }

    /* Hamburger-Icon anzeigen */
    .menu-toggle {
        display: flex;
        color: var(--text-primary);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .menu-toggle:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 1);
    }

    /* Navigation als seitliches Panel */
    .main-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        background: linear-gradient(135deg, var(--bg-nav-gradient-start) 0%, var(--bg-nav-gradient-end) 100%);
        backdrop-filter: blur(10px);
        display: block;
        padding-top: 70px;
        transition: left var(--transition-normal);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        z-index: 150;
    }

    .main-nav ul {
        display: block;
        padding: 0;
        gap: 0;
    }

    .main-nav li {
        margin: 20px 0;
        text-align: left;
    }

    .main-nav a {
        display: flex;
        align-items: center;
        padding: 16px 24px;
        min-height: 48px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-nav a:active {
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Menü einblenden */
    .main-nav.show-menu {
        left: 0;
    }

    /* Allgemeine Mobile-Styles */
    img {
        max-width: 100%;
        height: auto;
    }

    h1, h2, h3 {
        font-size: 1.5em;
    }

    .btn {
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
}

/* ============================================
   NACH OBEN BUTTON
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background-color: var(--color-primary);
    color: var(--text-white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    touch-action: manipulation;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.scroll-to-top:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: linear-gradient(135deg, var(--bg-nav-gradient-start) 0%, var(--bg-nav-gradient-end) 100%);
    color: var(--text-white);
    padding: 40px 20px 20px;
    margin-top: auto;
    border-top: 1px solid rgba(183, 77, 77, 0.2);
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-white);
    font-family: 'Georgia', serif;
}

.footer-section p {
    margin: 8px 0;
    line-height: 1.6;
    font-size: 14px;
}

.footer-section a {
    color: var(--text-white);
    text-decoration: none;
    transition: color var(--transition-normal);
}

.footer-section a:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-section {
        text-align: center;
    }
}

/* ============================================
   RESPONSIVE EDGE CASES
   ============================================ */

/* Sehr kleine Bildschirme (< 320px) */
@media (max-width: 320px) {
    .main-nav ul {
        font-size: 12px;
        gap: 4px;
        padding: 5px;
    }
    
    .main-nav a {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .cookie-banner-content {
        padding: 10px;
    }
    
    .cookie-banner-text {
        font-size: 12px;
        min-width: 100%;
    }
    
    .cookie-banner-btn {
        font-size: 12px;
        padding: 8px 12px;
        min-width: 100px;
    }
    
    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .menu-toggle {
        font-size: 24px;
        padding: 10px 12px;
        min-width: 44px;
        min-height: 44px;
        top: 10px;
        left: 10px;
    }
    
    .scroll-to-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }
    
    h1, h2, h3 {
        font-size: 1.2em;
    }
}

/* Sehr große Bildschirme (> 1920px) */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
    
    .footer-content {
        max-width: 1400px;
    }
    
    .main-nav {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* ============================================
   COOKIE-BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--bg-nav-gradient-start) 0%, var(--bg-nav-gradient-end) 100%);
    color: var(--text-white);
    padding: 20px;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-banner.show {
    display: block;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-banner-text {
    flex: 1;
    min-width: 250px;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-banner-text a {
    color: var(--text-white);
    text-decoration: underline;
}

.cookie-banner-text a:hover {
    text-decoration: none;
}

.cookie-banner-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cookie-banner-btn {
    padding: 10px 20px;
    border: 2px solid var(--text-white);
    border-radius: 5px;
    background: transparent;
    color: var(--text-white);
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all var(--transition-normal);
    text-decoration: none;
    display: inline-block;
}

.cookie-banner-btn:hover {
    background: var(--text-white);
    color: var(--color-primary);
}

.cookie-banner-btn.accept {
    background: var(--text-white);
    color: var(--color-primary);
}

.cookie-banner-btn.accept:hover {
    background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 16px;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        text-align: center;
    }
    
    .cookie-banner-text {
        font-size: 14px;
        min-width: 100%;
        text-align: center;
    }
    
    .cookie-banner-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .cookie-banner-btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
        touch-action: manipulation;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    /* Navigation und interaktive Elemente ausblenden */
    .main-nav,
    .menu-toggle,
    .cookie-banner,
    .site-footer,
    .scroll-to-top,
    .skip-to-content {
        display: none !important;
    }
    
    /* Body-Anpassungen */
    body {
        background: white !important;
        color: black !important;
        padding-top: 0 !important;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    /* Links */
    a {
        color: black !important;
        text-decoration: underline;
    }
    
    /* Externe Links mit URL anzeigen */
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
    
    /* E-Mail-Links */
    a[href^="mailto:"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
    
    /* Bilder */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
    
    /* Seitenumbrüche vermeiden */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    p, li {
        page-break-inside: avoid;
    }
    
    /* Container */
    .container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Farben für Druck anpassen */
    .circle-text,
    .green-circle,
    .red-circle,
    .therapy-item,
    .testimonial-box {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }
    
    /* Google Maps ausblenden */
    iframe {
        display: none !important;
    }
    
    /* Footer-Informationen (falls gewünscht) */
    .print-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 10pt;
        border-top: 1px solid #ccc;
        padding: 10px;
    }
}
