/* ============================================
   Design 1: "Elegant Flow"
   Kinder- und Jugendhilfe Sehmsdorf
   ============================================ */

/* Custom Properties */
:root {
    --primary: #0C4A6E;
    --primary-light: #0E7490;
    --primary-dark: #082f49;
    --accent: #14B8A6;
    --accent-light: #5EEAD4;
    --bg-light: #F0FDFA;
    --bg-white: #ffffff;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.25);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ---- NAVIGATION ---- */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-link {
    color: #0C4A6E !important;
}

.nav-scrolled .nav-logo-text {
    color: #0C4A6E !important;
}

/* Hamburger */
.hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background: currentColor;
    transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* ---- HERO ---- */
.hero-gradient {
    background: linear-gradient(135deg, #0C4A6E 0%, #0E7490 40%, #14B8A6 100%);
}

.hero-text-reveal {
    animation: textReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(40px);
}

.hero-text-reveal:nth-child(2) { animation-delay: 0.2s; }
.hero-text-reveal:nth-child(3) { animation-delay: 0.4s; }
.hero-text-reveal:nth-child(4) { animation-delay: 0.6s; }

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating shapes */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: floatShape 8s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
    width: 300px;
    height: 300px;
    top: 10%;
    right: -5%;
    background: #5EEAD4;
    animation-duration: 7s;
}

.floating-shape:nth-child(2) {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: -3%;
    background: #fff;
    animation-duration: 9s;
    animation-delay: 2s;
}

.floating-shape:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 20%;
    background: #5EEAD4;
    animation-duration: 11s;
    animation-delay: 1s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -30px) rotate(5deg); }
    50% { transform: translate(-10px, 20px) rotate(-5deg); }
    75% { transform: translate(15px, 10px) rotate(3deg); }
}

/* ---- SCROLL ANIMATIONS ---- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-slide-left.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-slide-right.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-scale.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.animate-in > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(3) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(4) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(5) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(6) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(7) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(8) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(9) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(10) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(11) { transition-delay: 0.55s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(12) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(13) { transition-delay: 0.65s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(14) { transition-delay: 0.7s; opacity: 1; transform: translateY(0); }
.stagger-children.animate-in > *:nth-child(n+15) { transition-delay: 0.75s; opacity: 1; transform: translateY(0); }

/* ---- GLASS CARDS ---- */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(12, 74, 110, 0.15);
}

/* ---- INFO CARDS ---- */
.info-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #0E7490, #14B8A6);
    transition: height 0.4s ease;
}

.info-card:hover::before {
    height: 100%;
}

.info-card:hover {
    transform: translateX(8px);
    box-shadow: 0 10px 40px rgba(12, 74, 110, 0.1);
}

/* ---- TEAM CARDS ---- */
.team-card {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-card:hover {
    transform: translateY(-12px) scale(1.02);
}

.team-card .team-img-wrapper {
    overflow: hidden;
    transition: all 0.5s ease;
}

.team-card:hover .team-img-wrapper img {
    transform: scale(1.1);
}

.team-card .team-img-wrapper img {
    transition: transform 0.5s ease;
}

.team-card .team-overlay {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.team-card:hover .team-overlay {
    opacity: 1;
}

/* ---- BUTTONS ---- */
.btn-primary {
    background: linear-gradient(135deg, #0C4A6E, #0E7490);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(12, 74, 110, 0.3);
}

.btn-outline {
    border: 2px solid #0C4A6E;
    color: #0C4A6E;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #0C4A6E;
    color: white;
    transform: translateY(-2px);
}

/* ---- COOKIE BANNER ---- */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    z-index: 9999;
    transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(12, 74, 110, 0.1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
}

.cookie-banner.show {
    bottom: 0;
}

/* ---- ACCESSIBILITY WIDGET ---- */
.a11y-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0C4A6E, #0E7490);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(12, 74, 110, 0.3);
    transition: all 0.3s ease;
    border: none;
}

.a11y-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(12, 74, 110, 0.4);
}

.a11y-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 9997;
    width: 320px;
    max-height: 80vh;
    overflow-y: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 24px;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
}

.a11y-panel.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.a11y-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #334155;
}

.a11y-btn:hover {
    border-color: #0E7490;
    background: #F0FDFA;
}

.a11y-btn.active {
    border-color: #0E7490;
    background: #0E7490;
    color: white;
}

/* ---- ACCESSIBILITY MODES ---- */
body.high-contrast {
    filter: contrast(1.5);
}

body.grayscale {
    filter: grayscale(1);
}

body.large-font {
    font-size: 120% !important;
}

body.extra-large-font {
    font-size: 140% !important;
}

body.highlight-links a {
    outline: 3px solid #F59E0B !important;
    outline-offset: 2px;
}

body.readable-font * {
    font-family: 'Arial', sans-serif !important;
    letter-spacing: 0.05em;
    word-spacing: 0.1em;
}

/* ---- COUNTER ANIMATION ---- */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ---- WAVE DIVIDER ---- */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* ---- GRADIENT TEXT ---- */
.gradient-text {
    background: linear-gradient(135deg, #0C4A6E, #14B8A6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- SECTION DIVIDERS ---- */
.section-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #0C4A6E, #14B8A6);
    border-radius: 2px;
}

/* ---- PARALLAX ---- */
.parallax-slow {
    will-change: transform;
}

/* ---- PAGE LOADER ---- */
.page-loader {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.page-loader.hide {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #0E7490;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- FOOTER ---- */
.footer-gradient {
    background: linear-gradient(135deg, #082f49 0%, #0C4A6E 100%);
}

/* ---- PRINT ---- */
@media print {
    .cookie-banner, .a11y-toggle, .a11y-panel, nav {
        display: none !important;
    }
}
