/* ================================================================
   HANDWERKSMUSEUM OVELGÖNNE — Global Stylesheet
   Basiert auf dem Design der index.html (Master-Referenz)
   ================================================================ */

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
    --ci-teal:        #699a97;
    --ci-teal-dark:   #4d7572;
    --ci-teal-light:  #f0f5f4;
    --ci-yellow:      #edc50f;
    --bg-color:       #ffffff;
    --bg-secondary:   #f9fafa;
    --text-main:      #1a1a1a;
    --text-light:     #555555;
    --text-muted:     #888888;
    --line-color:     #e5e5e5;
    --font-body:      'Inter', sans-serif;
    --font-display:   'Playfair Display', serif;
    --page-padding:   6vw;
    --section-spacing: 120px;
    --radius:         8px;
    --radius-sm:      4px;
    --radius-md:      12px;
    --radius-btn:     50px;
    --radius-card:    12px;
}

/* ================================================================
   BASE & TYPOGRAPHY
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }

h1, h2, h3, h4, h5 { font-family: var(--font-display); line-height: 1.1; margin-top: 0; }
h1 { font-size: clamp(3.5rem, 8vw, 6.5rem); font-weight: 700; margin-bottom: 20px; letter-spacing: -1px; }
h2 { font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 400; margin-bottom: 30px; color: var(--text-main); }
h3 { font-family: var(--font-body); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--ci-teal); margin-bottom: 15px; display: block; }
p { margin-bottom: 25px; color: var(--text-light); font-weight: 300; font-size: 1.15rem; line-height: 1.7; max-width: 800px; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); }

/* ================================================================
   GLOBAL UTILITIES
   ================================================================ */
#scroll-progress {
    position: fixed; top: 0; left: 0; width: 0%; height: 4px;
    background: linear-gradient(90deg, var(--ci-teal), var(--ci-yellow));
    z-index: 10000; transition: width 0.1s ease-out; border-radius: 0 2px 2px 0;
}

#preloader {
    position: fixed; inset: 0; background: var(--bg-color); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s;
}
.spinner {
    width: 50px; height: 50px; border: 3px solid var(--line-color);
    border-top-color: var(--ci-teal-dark); border-right-color: var(--ci-teal);
    border-radius: 50%; animation: spin 1s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

#back-to-top {
    position: fixed; bottom: 32px; right: 32px;
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--ci-teal-dark); color: white; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(16px);
    transition: opacity .3s, transform .3s, background .2s;
    z-index: 500; box-shadow: 0 6px 24px rgba(0,0,0,.22);
}
#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { background: var(--ci-teal); }

.skip-link {
    position: absolute; top: -100px; left: 20px;
    background: var(--ci-yellow); color: var(--text-main);
    padding: 10px 20px; border-radius: 0 0 8px 8px;
    font-weight: 700; font-size: .9rem; z-index: 9999;
    transition: top .2s; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes fadeUp  { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn  { to { opacity: 1; } }
@keyframes pulseGreen {
    0%   { box-shadow: 0 0 0 0   rgba(16,185,129,.4); }
    70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0   rgba(16,185,129,0); }
}

.animate-up { opacity: 0; transform: translateY(30px); animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

.reveal { opacity: 0; transform: translateY(40px); transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal-scale { opacity: 0; transform: scale(0.95); transition: all 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-scale.active { opacity: 1; transform: scale(1); }

/* ================================================================
   HEADER
   ================================================================ */
header {
    padding: 28px var(--page-padding);
    display: flex; justify-content: space-between; align-items: center;
    position: fixed; top: 0; width: 100%; z-index: 2000;
    background: transparent;
    transition: all .4s cubic-bezier(.16,1,.3,1);
}
header.scrolled {
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    padding: 14px var(--page-padding);
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
    border-bottom: 1px solid var(--line-color);
}

/* Logo */
.logo {
    font-family: var(--font-display); font-weight: 700;
    font-size: 1.1rem; color: white; z-index: 2001;
    position: relative; letter-spacing: .5px; transition: color .4s;
    flex-shrink: 0;
}
header.scrolled .logo { color: var(--text-main); }
.theme-dark-nav .logo { color: var(--text-main); }

/* Rechter Wrapper */
.header-right { display: flex; align-items: center; gap: 0; }

/* Desktop Nav */
.nav-desktop { display: flex; gap: 28px; align-items: center; margin-right: 24px; }
.nav-desktop a {
    font-size: .78rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px; color: white; position: relative; transition: color .4s;
}
header.scrolled .nav-desktop a,
.theme-dark-nav .nav-desktop a { color: var(--text-main); }
.nav-desktop a::after {
    content: ''; position: absolute; bottom: -5px; left: 0;
    width: 0%; height: 2px; background: var(--ci-yellow); transition: width .3s;
}
.nav-desktop a:hover::after,
.nav-desktop a.active::after { width: 100%; }

/* Header Aktionen */
.header-actions { display: flex; align-items: center; gap: 6px; }

.header-icon-btn {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; transition: background .2s, color .2s;
    position: relative; text-decoration: none;
}
.header-icon-btn svg { width: 17px; height: 17px; }
.header-icon-btn:hover { background: rgba(255,255,255,.15); }
header.scrolled .header-icon-btn { color: var(--text-main); }
header.scrolled .header-icon-btn:hover { background: var(--bg-secondary); }
.theme-dark-nav .header-icon-btn { color: var(--text-main); }

/* Grüner Pip wenn geöffnet */
.header-icon-btn.is-open::after {
    content: ''; position: absolute; top: 6px; right: 6px;
    width: 7px; height: 7px; border-radius: 50%; background: #10b981;
    border: 1.5px solid white;
}
header.scrolled .header-icon-btn.is-open::after { border-color: white; }

.header-sep {
    width: 1px; height: 16px; background: rgba(255,255,255,.25);
    margin: 0 8px;
}
header.scrolled .header-sep { background: var(--line-color); }

/* Sprach-Switch */
.lang-switch {
    font-family: var(--font-body) !important;
    font-size: .72rem !important; font-weight: 800 !important;
    letter-spacing: 1px; color: white;
    border: 1.5px solid rgba(255,255,255,.5) !important;
    border-radius: 4px; padding: 3px 8px;
    transition: background .2s, color .2s, border-color .2s;
}
.lang-switch::after { display: none !important; }
.lang-switch:hover {
    background: var(--ci-yellow) !important;
    color: var(--text-main) !important;
    border-color: var(--ci-yellow) !important;
}
header.scrolled .lang-switch,
.theme-dark-nav .lang-switch {
    color: var(--text-main) !important;
    border-color: var(--line-color) !important;
}

/* Burger */
.menu-trigger {
    display: none; cursor: pointer; z-index: 2001;
    width: 28px; height: 18px; position: relative;
    background: none; border: none; padding: 0; margin-left: 14px;
    flex-shrink: 0;
}
.menu-trigger span {
    display: block; width: 100%; height: 2px; background: white;
    position: absolute; left: 0;
    transition: all .32s cubic-bezier(.16,1,.3,1);
}
header.scrolled .menu-trigger span,
.theme-dark-nav .menu-trigger span { background: var(--text-main); }
.menu-trigger span:nth-child(1) { top: 0; }
.menu-trigger span:nth-child(2) { top: 8px; }
.menu-trigger span:nth-child(3) { top: 16px; }
.menu-trigger.open span { background: var(--text-main) !important; }
.menu-trigger.open span:nth-child(1) { top: 8px; transform: rotate(45deg); }
.menu-trigger.open span:nth-child(2) { opacity: 0; transform: translateX(-16px); }
.menu-trigger.open span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* ================================================================
   MOBILE NAVIGATION OVERLAY
   ================================================================ */
.mobile-nav-overlay {
    position: fixed; inset: 0; background: white; z-index: 2002;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    opacity: 0; pointer-events: none;
    transition: opacity .38s ease;
}
.mobile-nav-overlay.open { opacity: 1; pointer-events: all; }

/* X-Schließen-Button */
.mobile-nav-close {
    position: absolute; top: 24px; right: var(--page-padding);
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--bg-secondary); border: 1px solid var(--line-color);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-main);
    transition: background .2s, color .2s;
}
.mobile-nav-close:hover { background: var(--ci-teal-dark); color: white; border-color: var(--ci-teal-dark); }
.mobile-nav-close svg { width: 22px; height: 22px; }

/* Nav-Links */
.mobile-nav-overlay a.mob-link {
    font-family: var(--font-display); font-size: clamp(2rem, 6vw, 3rem);
    margin: 10px 0; color: var(--text-main);
    transform: translateY(20px); opacity: 0;
    transition: color .3s, transform .5s, opacity .5s;
    text-decoration: none; position: relative;
}
.mobile-nav-overlay a.mob-link::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--ci-yellow);
    transition: width .3s;
}
.mobile-nav-overlay a.mob-link:hover { color: var(--ci-teal-dark); }
.mobile-nav-overlay a.mob-link:hover::after { width: 100%; }
.mobile-nav-overlay.open a.mob-link { transform: translateY(0); opacity: 1; }

/* Staggered delays */
.mobile-nav-overlay a.mob-link:nth-child(2)  { transition-delay: .04s; }
.mobile-nav-overlay a.mob-link:nth-child(3)  { transition-delay: .08s; }
.mobile-nav-overlay a.mob-link:nth-child(4)  { transition-delay: .12s; }
.mobile-nav-overlay a.mob-link:nth-child(5)  { transition-delay: .16s; }
.mobile-nav-overlay a.mob-link:nth-child(6)  { transition-delay: .20s; }
.mobile-nav-overlay a.mob-link:nth-child(7)  { transition-delay: .24s; }
.mobile-nav-overlay a.mob-link:nth-child(8)  { transition-delay: .28s; }

/* Untere Info-Leiste im Mobile-Menü */
.mobile-nav-footer {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 24px var(--page-padding);
    border-top: 1px solid var(--line-color);
    display: flex; justify-content: space-between; align-items: center;
    opacity: 0; transition: opacity .4s .3s;
}
.mobile-nav-overlay.open .mobile-nav-footer { opacity: 1; }
.mob-footer-info { font-size: .8rem; color: var(--text-light); line-height: 1.7; }
.mob-footer-info strong { color: var(--text-main); display: block; font-size: .85rem; }
.mob-footer-lang a {
    font-weight: 800; font-size: .8rem; letter-spacing: 1px;
    color: var(--text-main); border: 1.5px solid var(--line-color);
    padding: 6px 14px; border-radius: 4px; display: block;
}
.mob-footer-lang a:hover { background: var(--ci-yellow); border-color: var(--ci-yellow); }

/* ================================================================
   FOOTER
   ================================================================ */
#page-footer { background: #111; border-top: 4px solid var(--ci-yellow); }

.footer-top {
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 56px; padding: 88px var(--page-padding) 68px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.fc h5 {
    font-family: var(--font-body); text-transform: uppercase;
    letter-spacing: 2px; color: rgba(255,255,255,.35);
    margin-bottom: 22px; font-weight: 700; font-size: .7rem;
}
.fc h5.brand { color: white; letter-spacing: .5px; font-size: .85rem; }
.fc a {
    display: block; color: rgba(255,255,255,.55); margin-bottom: 11px;
    font-size: .9rem; transition: color .2s, padding-left .2s;
    max-width: none;
}
.fc a:hover { color: var(--ci-yellow); padding-left: 6px; }
.footer-addr { color: rgba(255,255,255,.45); font-size: .88rem; line-height: 1.9; margin-bottom: 18px; }
.footer-hours-tag {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-btn);
    padding: 8px 16px; font-size: .8rem; color: rgba(255,255,255,.55);
}
.footer-hours-tag svg { width: 14px; height: 14px; color: var(--ci-yellow); }
.footer-social { display: flex; gap: 10px; margin-top: 26px; }
.footer-social a {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.55); margin: 0; padding: 0;
    transition: background .2s, border-color .2s, color .2s;
    max-width: none;
}
.footer-social a:hover {
    background: var(--ci-yellow); border-color: var(--ci-yellow);
    color: var(--text-main); padding-left: 0;
}
.footer-social a svg { width: 16px; height: 16px; }
.footer-bottom {
    padding: 22px var(--page-padding);
    display: flex; justify-content: space-between; align-items: center;
    gap: 16px; flex-wrap: wrap;
}
.footer-copy { font-size: .78rem; color: rgba(255,255,255,.25); }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a {
    font-size: .78rem; color: rgba(255,255,255,.32);
    transition: color .2s; max-width: none; margin-bottom: 0;
}
.footer-legal a:hover { color: rgba(255,255,255,.65); padding-left: 0; }

/* ================================================================
   COOKIE BANNER
   ================================================================ */
#cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 8000;
    background: #111; padding: 20px var(--page-padding);
    display: flex; align-items: center; justify-content: space-between;
    gap: 28px; flex-wrap: wrap; border-top: 3px solid var(--ci-yellow);
    transform: translateY(100%); transition: transform .4s cubic-bezier(.16,1,.3,1);
}
#cookie-banner.show { transform: translateY(0); }
.cookie-text p { margin: 0; font-size: .88rem; color: rgba(255,255,255,.75); max-width: 780px; }
.cookie-btns { display: flex; gap: 10px; flex-shrink: 0; }
.btn-ck {
    padding: 9px 22px; font-size: .8rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    border-radius: var(--radius-btn); cursor: pointer; border: 1.5px solid;
    transition: all .2s;
}
.btn-ck-no  { background: transparent; color: rgba(255,255,255,.6); border-color: rgba(255,255,255,.25); }
.btn-ck-no:hover  { color: white; border-color: white; }
.btn-ck-yes { background: var(--ci-yellow); color: var(--text-main); border-color: var(--ci-yellow); }
.btn-ck-yes:hover { background: #d4ad0b; }

/* ================================================================
   BUTTONS (global)
   ================================================================ */
.btn-solid {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--ci-yellow); color: var(--text-main);
    padding: 14px 28px; font-weight: 700; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 1.5px;
    border: 2px solid var(--ci-yellow);
    border-radius: var(--radius-btn);
    transition: background .25s, color .25s, transform .2s;
    white-space: nowrap; cursor: pointer; text-decoration: none;
}
.btn-solid:hover { background: transparent; color: var(--ci-yellow); transform: translateY(-2px); }

.btn-outline {
    display: inline-flex; align-items: center; gap: 10px;
    background: transparent; color: var(--text-main);
    padding: 14px 28px; font-weight: 700; font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 1.5px;
    border: 2px solid currentColor;
    border-radius: var(--radius-btn);
    transition: background .25s, color .25s, transform .2s;
    white-space: nowrap; cursor: pointer; text-decoration: none;
}
.btn-outline:hover { background: var(--text-main); color: white; transform: translateY(-2px); }

.btn-white-outline {
    color: white !important; border-color: rgba(255,255,255,.45) !important;
}
.btn-white-outline:hover {
    background: white !important; color: var(--ci-teal-dark) !important;
    border-color: white !important;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1300px) {
    header .nav-desktop { gap: 18px; }
}

@media (max-width: 1024px) {
    :root { --page-padding: 5vw; --section-spacing: 80px; }
    .nav-desktop { display: none; }
    .menu-trigger { display: block; }
    h1 { font-size: 3.5rem; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; padding: 56px var(--page-padding) 48px; }
}

@media (max-width: 600px) {
    :root { --page-padding: 5vw; }
    .footer-top { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 480px) {
    header .logo { font-size: .88rem; letter-spacing: 0; }
}
