/* ========================================
   KinderUni Website Specific Styles
   ======================================== */

/* CSS Variables */
:root {
    --color-blue: #023047;
    --color-yellow: #FFB703;
    --color-orange: #FB8500;

    /* Dynamic Sky Default (Day) */
    --color-sky-bottom: #c0dbe8;
    --color-sky-top: #ffffff;
    --sky-star-opacity: 0;
    --sky-moon-progress: 0;
    --sky-moon-opacity: 0;

    --color-white: #ffffff;
    --color-text: #252525;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --font-main: 'Inika', sans-serif;
}

/* Night Mode Overrides */
body.night-mode {
    --color-text: #e0e0e0;
    --color-white: #f5f5f5;
    --glass-bg: rgba(40, 40, 60, 0.25);
    --color-sky-top: #0a0f1c;
    --color-sky-bottom: #1a253c;
    background: var(--color-sky-top);
}

body.night-mode .hero-title,
body.night-mode .hero-subtitle {
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

body.night-mode .hero-overlay {
    background: rgba(0, 0, 0, 0.4);
}

body.night-mode .event-card {
    background: rgba(30, 30, 45, 0.85);
}

body.night-mode .event-title,
body.night-mode .event-description,
body.night-mode .detail-item {
    color: #e0e0e0;
}

body.night-mode .imprint-content,
body.night-mode .privacy-content,
body.night-mode .contact-card {
    background: rgba(30, 30, 45, 0.85);
    color: #e0e0e0;
}

body.night-mode .contact-title {
    color: #60a5fa;
}

/* Overlay Night Mode Overrides */
body.night-mode .overlay-panel {
    background: #0d0f14;
    color: #e2e8f0;
}

body.night-mode .auth-tabs,
body.night-mode .admin-tabs {
    background: #161923;
}

body.night-mode .auth-tab,
body.night-mode .admin-tab {
    color: #94a3b8;
}

body.night-mode .auth-tab.active,
body.night-mode .admin-tab.active {
    background: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
}

body.night-mode .child-row,
body.night-mode .reg-row,
body.night-mode .admin-user-card,
body.night-mode .admin-event-card,
body.night-mode .admin-registration,
body.night-mode .emu-btn {
    background: #1a1e29;
    border-color: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

body.night-mode .emu-btn.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

body.night-mode .input-group {
    background: #0d1117;
    border-color: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}


body.night-mode .add-child-form,
body.night-mode .event-form-card {
    background: #12141c;
}

body.night-mode .profile-card {
    background: linear-gradient(135deg, #161923, #12141c);
}

body.night-mode .input-group input,
body.night-mode .event-form-card select,
body.night-mode select {
    color: #ffffff;
    background-color: transparent;
    color-scheme: dark;
}

body.night-mode select option {
    background-color: #0d1117;
    color: #ffffff;
}

body.night-mode input[type="checkbox"] {
    color-scheme: dark;
}

body.night-mode .input-group:focus-within {
    background: #1f2430;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

body.night-mode .auth-header,
body.night-mode .parent-header,
body.night-mode .admin-toolbar {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.night-mode .auth-header h2,
body.night-mode .parent-header h2,
body.night-mode .admin-toolbar h2,
body.night-mode .section-title,
body.night-mode .admin-section-title {
    color: #60a5fa;
    border-bottom-color: #3b82f6;
}

body.night-mode .auth-submit-btn {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    color: #ffffff;
}

body.night-mode .auth-submit-btn:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

body.night-mode .logout-btn {
    border-color: rgba(255, 255, 255, 0.15);
    color: #94a3b8;
}

body.night-mode .logout-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

body.night-mode .child-flip-back {
    background: #1e293b;
    color: #60a5fa;
}

body.night-mode .guest-prompt-msg {
    background: linear-gradient(135deg, #1e293b, #0f172a) !important;
    color: #60a5fa !important;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

h1 {
    padding-top: 20px;
    padding-bottom: 20px;
}

body {
    font-family: var(--font-main);
    line-height: 1.5;
    font-size: 1.1rem;
    color: var(--color-text);
    overflow-x: hidden;
    background: var(--color-sky-top);
}

.hero {
    background: url('../assets/cover.webp') center/cover no-repeat;
    background-attachment: scroll;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Night Mode Toggle */
.overlay-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    min-height: 36px;
    margin-bottom: 20px;
}

.night-toggle {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    width: 60px;
    height: 30px;
    display: flex;
    align-items: center;
    padding: 3px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.night-toggle:hover {
    transform: scale(1.05);
}

body.night-mode .night-toggle {
    background: #0f172a;
    border-color: #3b82f6;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 10px rgba(59, 130, 246, 0.3);
}

.toggle-switch {
    width: 24px;
    height: 24px;
    background: var(--color-yellow);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.toggle-switch::after {
    content: '☀️';
}

body.night-mode .toggle-switch {
    transform: translateX(30px);
    background: #1e293b;
    border: 1px solid rgba(96, 165, 250, 0.5);
    box-shadow: 0 0 15px rgba(96, 165, 250, 0.8), inset -2px -2px 6px rgba(255, 255, 255, 0.2);
}

body.night-mode .toggle-switch::after {
    content: '🌙';
}

/* ========================================
   Glass Windows Section
   ======================================== */

.windows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
}

.glass-window {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 0px;
    padding: 40px 10px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-window:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.window-blue {
    background: linear-gradient(135deg, rgba(02, 30, 47, 0.45), rgba(02, 30, 47, 0.25));
}

.window-yellow {
    background: linear-gradient(135deg, rgba(255, 183, 3, 0.45), rgba(255, 183, 3, 0.25));
}

.window-orange {
    background: linear-gradient(135deg, rgba(251, 133, 0, 0.45), rgba(251, 133, 0, 0.25));
}

.window-content {
    color: white;
    font-size: 1.4rem;
}

.window-logo {
    width: 250px;
    height: auto;
}

/* Content hidden until window slides in */
.glass-window>* {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.glass-window.revealed>* {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Sky Section
   ======================================== */
.sky-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--color-sky-top) 0%, var(--color-sky-bottom) 100%);
    overflow: hidden;
}

.sky-animations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Sky Components (Stars/Moon) */
.sky-star {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    will-change: opacity, transform;
    animation: twinkle linear infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: calc(var(--sky-star-opacity) * 0.2);
        transform: scale(0.8);
    }

    50% {
        opacity: calc(var(--sky-star-opacity) * 1);
        transform: scale(1.2);
    }
}

.sky-moon {
    position: absolute;
    top: 15%;
    width: 150px;
    height: 150px;
    background-image: url('../assets/moon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: var(--sky-moon-opacity);
    transition: opacity 1s ease;
    will-change: transform, left;
    z-index: 0;
}

/* Cloud Animations */
.cloud-wrapper {
    position: absolute;
    left: 0;
    will-change: transform;
    transition: opacity 2s ease;
}

body.night-mode .cloud-wrapper {
    opacity: 0.5;
}

.cloud-wrapper[data-depth="0"] {
    z-index: 1;
}

.cloud-wrapper[data-depth="1"] {
    z-index: 3;
}

.cloud-wrapper[data-depth="2"] {
    z-index: 5;
}

.cloud {
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
}

@keyframes cloudFly {
    from {
        transform: translateX(calc(-100% - 100px)) scaleX(var(--cloud-scale-x, 1)) scaleY(var(--cloud-scale-y, 1));
    }

    to {
        transform: translateX(calc(100vw + 200px)) scaleX(var(--cloud-scale-x, 1)) scaleY(var(--cloud-scale-y, 1));
    }
}










/* Flying Objects (Day & Night) */


/* Day: Airplane with Banner */
.airplane-banner-wrapper {
    position: absolute;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: flex-start;
    will-change: transform, left;
    z-index: 4;
}

.airplane-shape {
    width: 90px;
    height: 54px;
    background-image: url('../assets/airplane.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    z-index: 2;
}

.banner-text {
    background: white;
    color: var(--color-blue);
    padding: 2px 8px;
    font-weight: 700;
    font-size: 10px;
    border: 1px solid var(--color-orange);
    border-radius: 6px 2px 2px 6px;
    box-shadow: -1px 2px 4px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    margin-right: 13px;
    /* Distance AWAY from airplane */
    padding-right: 8px;
    /* Internal text padding restored to normal */
    position: relative;
    transform-origin: right center;
    animation: bannerWave 2.5s cubic-bezier(0.4, 0.0, 0.2, 1) infinite alternate;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.3));
}

.banner-text::before {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    width: 15px;
    height: 1px;
    background: #666;
    transform: translateY(-50%);
}

@keyframes bannerWave {
    0% {
        transform: perspective(400px) rotateY(-10deg) skewY(-1deg) translateY(0);
    }

    50% {
        transform: perspective(400px) rotateY(15deg) skewY(3deg) translateY(-2px);
    }

    100% {
        transform: perspective(400px) rotateY(-5deg) skewY(-2deg) translateY(1px);
    }
}

/* Night: Rockets */
.rocket-wrapper {
    position: absolute;
    will-change: transform, left, bottom;
    z-index: 4;
}

.rocket-shape {
    width: 60px;
    height: 60px;
    background-image: url('../assets/rocket.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}

.rocket-shape::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    transform-origin: top center;
    width: 14px;
    height: 30px;
    background: linear-gradient(to bottom, #fff, #ffae00, transparent);
    border-radius: 50% 50% 50% 50% / 60% 60% 100% 100%;
    animation: rocketFire 0.1s infinite alternate;
}

@keyframes rocketFire {
    from {
        transform: translateX(-50%) scaleY(1);
        opacity: 1;
    }

    to {
        transform: translateX(-50%) scaleY(1.4);
        opacity: 0.8;
    }
}

/* Night: Air Balloon (Glow added) */
.balloon-wrapper {
    position: absolute;
    will-change: transform, left, bottom, top;
}

.airballoon {
    position: relative;
    background-image: url('../assets/AirBalloon.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

.airballoon.night-glow::after {
    content: '';
    position: absolute;
    left: 41%;
    bottom: 12%;
    transform: translate(-50%, 50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 180, 50, 0.65) 0%, rgba(255, 100, 0, 0.25) 30%, transparent 65%);
    border-radius: 50%;
    animation: balloonGlow 1.5s infinite alternate;
    mix-blend-mode: screen;
    pointer-events: none;
}

@keyframes balloonGlow {
    from {
        opacity: 0.7;
        transform: translate(-50%, 50%) scale(1);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 50%) scale(1.15);
    }
}


/* Intro Section */
.intro-section {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px 40px;
    text-align: center;
}

/* RLP Logo Container */
.logo-container {
    display: block;
    width: 70%;
    margin: 0 auto;
    padding-bottom: 20px;
}

/* RLP Logo */
.logo {
    display: block;
    width: 100%;
    margin: 0;
    /*transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;*/
}

body.night-mode .logo {
    opacity: 1;
    transform: translateX(-9999px);
    filter: brightness(0) drop-shadow(9999px 0 0 rgba(59, 130, 246, 0.20));
}





























/* ========================================
   SPECIAL EVENT – HERO CARD
   ======================================== */

.special-event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(50px);
    animation: cardAppear 0.6s ease-out forwards;
    background: linear-gradient(145deg, rgba(20, 20, 40, 0.92), rgba(35, 35, 60, 0.88));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.special-event-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 16px 50px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Glow background */
.special-card-glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 200%;
    height: 80%;
    background: radial-gradient(ellipse, var(--hero-glow, rgba(124, 58, 237, 0.25)) 0%, transparent 70%);
    pointer-events: none;
    animation: glowPulse 3s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes glowPulse {
    from {
        opacity: 0.4;
        transform: translateX(-50%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) scale(1.05);
    }
}

/* Badge */
.special-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    text-transform: uppercase;
    z-index: 2;
}

/* Content layout */
.special-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 25px;
}

/* Avatar */
.special-card-avatar-wrap {
    flex-shrink: 0;
    width: 130px;
    height: 160px;
    animation: heroFloat 4s ease-in-out infinite;
}

.special-card-avatar {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.5));
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Info text */
.special-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.special-card-hero-name {
    font-size: 1.4rem;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.special-card-hero-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
    margin: 0;
}

.special-card-event-title {
    font-size: 0.88rem;
    color: var(--color-yellow);
    font-weight: 600;
    padding: 4px 14px;
    background: rgba(255, 183, 3, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(255, 183, 3, 0.2);
    margin-top: 6px;
    display: inline-block;
    width: fit-content;
}

.special-card-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 6px;
    animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}





@media (max-width: 768px) {
    .glass-windows {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0;
    }

    .owl-logo {
        width: 70px;
    }

    .windows-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .glass-window {
        padding: 30px 20px;
    }

    .sky-section {
        padding-bottom: 40px;
    }

    .window-logo {
        width: 180px;
    }

    .window-content {
        font-size: 1.1rem;
    }

    .glass-window:hover {
        transform: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    .glass-window {
        transition: none;
    }
}