:root {
    /* Colors - Vibrant & Playful Child-friendly palette */
    /* Primary: Warm Coral */
    --primary-color: #FF6B6B;
    /* Secondary: Playful Purple */
    --secondary-color: #A45EE5;
    /* Accent: Sunny Yellow */
    --accent-color: #FFD93D;
    /* Turquoise for variety */
    --turquoise: #4ECDC4;
    /* Pink for playfulness */
    --pink: #FF6BA8;
    /* Orange for energy */
    --orange: #FFA559;
    /* Light Blue */
    --light-blue: #6BCF7F;
    /* Background: Soft White */
    --bg-color: #FFFFFF;
    /* Text: Dark Grey for readability */
    --text-color: #2B2D42;
    /* Light Text: White */
    --text-light: #FFFFFF;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Typography */
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-y: scroll;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 9999;
    border-radius: 0 0 4px 0;
    font-weight: 600;
    transition: transform 0.2s;
}
.skip-link:focus {
    transform: translateY(0);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

/* Decorative underline for H2 */
section h2::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

section {
    padding: var(--spacing-lg) var(--spacing-sm);
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* Navigation */
header {
    background-color: var(--text-light);
    box-shadow: var(--shadow-sm);
    position: -webkit-sticky; /* Safari compatibility */
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    width: 100%; /* Ensure full width */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

/* Keep button padding intact and remove underline */
.nav-links a.btn {
    padding: 0.5rem 1.5rem;
}

.nav-links a.btn::after {
    display: none;
}

/* Desktop underline effect */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links .btn {
    color: var(--text-light);
}

.nav-links .btn:hover {
    color: var(--text-light);
}

/* Hide nav icons on desktop */
.nav-icon {
    display: none;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-color), var(--orange));
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 165, 89, 0.3);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.hamburger:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 165, 89, 0.5);
    background: linear-gradient(135deg, var(--orange), var(--accent-color));
}

.hamburger:active {
    transform: scale(0.95);
}

.hamburger-line {
    display: block;
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    position: relative;
}

/* Animated X when menu is open */
.hamburger[aria-expanded="true"] {
    background: linear-gradient(135deg, var(--primary-color), var(--pink));
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(253, 252, 220, 0.9), rgba(255, 255, 255, 0.9));
    text-align: center;
    padding: 6rem 0;
    background-size: cover;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: none !important;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--primary-color);
    font-size: clamp(1.75rem, 5vw, 3rem);
    margin-bottom: var(--spacing-sm);
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
}

/* Hero Polaroid Photos */
.hero-polaroids {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hero-polaroid {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: rotate(var(--rot));
    width: clamp(100px, 12vw, 170px);
    background: white;
    padding: 6px 6px 20px 6px;
    border-radius: 4px;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.12);
    opacity: 0.5;
}

.hero-polaroid img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

/* Round variant */
.hero-polaroid--round {
    border-radius: 50%;
    padding: 6px;
}

.hero-polaroid--round img {
    aspect-ratio: 1 / 1;
    border-radius: 50%;
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

/* Cards (Leistungen, etc) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    align-items: stretch; /* Make all cards equal height when collapsed */
}

/* When any card is expanded, use natural height */
.card-grid.has-expanded {
    align-items: start;
}

.card-grid.has-expanded .card {
    height: auto; /* Override height: 100% when expanded */
}

.card {
    background: linear-gradient(135deg, #ffffff 0%, #fffef8 100%);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-top: 5px solid var(--accent-color);
    border-left: 2px solid rgba(255, 215, 61, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%; /* Use full height from grid */
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at top right, rgba(255, 215, 61, 0.15) 0%, transparent 70%);
    border-radius: 0 var(--radius-md) 0 0;
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at bottom left, rgba(164, 94, 229, 0.1) 0%, transparent 70%);
    border-radius: 0 0 0 var(--radius-md);
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-left-color: rgba(255, 215, 61, 0.6);
}

/* Disable jiggle animation completely for cards containing interactive elements */
.card:has(a),
.card:has(button),
.card:has(input),
.card:has(select),
.card:has(textarea) {
    transform: none !important;
}

.card:hover::before {
    background: radial-gradient(circle at top right, rgba(255, 215, 61, 0.25) 0%, transparent 70%);
}

.card:hover::after {
    background: radial-gradient(circle at bottom left, rgba(164, 94, 229, 0.2) 0%, transparent 70%);
}

.card h3 {
    color: var(--secondary-color);
    position: relative;
    z-index: 1;
}

.card > * {
    position: relative;
    z-index: 1;
}

/* Nutrition Card - Full Width on Desktop */
.nutrition-card {
    grid-column: 1 / -1; /* Spans full width */
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.nutrition-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, #FFFEF8 0%, #FFF9E6 100%);
    border-radius: var(--radius-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nutrition-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nutrition-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.nutrition-item h4 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.nutrition-item p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-color);
    margin: 0;
}

/* Responsive: Compact on Mobile */
@media (max-width: 768px) {
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .nutrition-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .nutrition-item {
        padding: 0.75rem 0.5rem;
    }
    
    .nutrition-item h4 {
        font-size: 1rem;
        margin-bottom: 0.35rem;
    }
    
    .nutrition-item p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .nutrition-icon {
        font-size: 1.75rem;
        margin-bottom: 0.35rem;
    }
    
    .nutrition-item {
        padding: 0.6rem 0.4rem;
    }
    
    .nutrition-item h4 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .nutrition-item p {
        font-size: 0.75rem;
        line-height: 1.25;
    }
}

/* Person Details */
.person-details {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--accent-color);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card > p:last-of-type,
.card .person-details {
    margin-bottom: var(--spacing-md); /* Spacing before button */
}

.read-more-btn {
    margin-top: auto; /* Push button to bottom of card */
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.read-more-btn:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

.read-more-btn:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

/* Alternate card border colors */
.card:nth-child(1) { border-top-color: var(--primary-color); }
.card:nth-child(2) { border-top-color: var(--turquoise); }
.card:nth-child(3) { border-top-color: var(--pink); }
.card:nth-child(4) { border-top-color: var(--orange); }
.card:nth-child(5) { border-top-color: var(--light-blue); }
.card:nth-child(6) { border-top-color: var(--secondary-color); }

/* Accessible Slider Styles */
.slider-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    overflow: visible;
}

.slider-wrapper {
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-slide {
    min-width: 100%;
    box-sizing: border-box;
}

.slide-content {
    position: relative;
    width: 100%;
    /* Fixed height container so portrait and landscape images render uniformly */
    height: 520px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: #f5f5f5;
}

.slide-content img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.slide-caption {
    text-align: center;
    margin-top: var(--spacing-sm);
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Slider Controls */
.slider-controls {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.slider-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: var(--shadow-sm);
}

.slider-btn:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.slider-btn:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

.slider-btn:active {
    transform: scale(0.95);
}

/* Dot Indicators */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #ddd;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.dot:hover {
    background-color: var(--turquoise);
    transform: scale(1.2);
}

.dot:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

.dot.active {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
    transform: scale(1.3);
}

/* Screen Reader Only */
.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;
}

/* Contact Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(164, 94, 229, 0.1);
}

/* Honeypot anti-spam field */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Form animations */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    text-align: center;
    padding: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

footer a {
    color: var(--text-light);
    text-decoration: underline;
}

/* Scroll to Top */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrollTopBtn:hover {
    background-color: var(--accent-color);
}

/* Decorative Elements */
.handprint {
    position: absolute;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.crayon-doodle {
    position: absolute;
    opacity: 0.2;
    z-index: 0;
    pointer-events: none;
    stroke-width: 3;
    stroke-linecap: round;
    animation: wiggle 8s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.star-doodle {
    position: absolute;
    opacity: 0.25;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.1); }
}

/* Playful backgrounds */
.bg-pattern-dots {
    background-image: radial-gradient(circle, var(--accent-color) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
}

.bg-pattern-wavy {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 107, 107, 0.05) 10px,
        rgba(255, 107, 107, 0.05) 20px
    );
}

/* Reduced Motion Support for Accessibility */
@media (prefers-reduced-motion: reduce) {
    .slider-track {
        transition: none;
    }

    .slider-btn,
    .dot,
    .card,
    .handprint,
    .star-doodle,
    .crayon-doodle {
        animation: none !important;
        transition: none !important;
    }

    .hamburger:hover,
    .btn:hover,
    .card:hover,
    .nutrition-item:hover,
    .read-more-btn:hover,
    .slider-btn:hover,
    .dot:hover,
    .room-images img:hover,
    .nav-links .btn:hover .nav-icon {
        transform: none !important;
    }
}

/* Room Section Layout (Das Zwergenstübchen) */
.room-section {
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(135deg, #ffffff 0%, #fffef8 100%);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-top: 5px solid var(--accent-color);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    position: relative;
}

.room-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at top right, rgba(255, 215, 61, 0.15) 0%, transparent 70%);
    border-radius: 0 var(--radius-md) 0 0;
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
}

.room-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at bottom left, rgba(164, 94, 229, 0.1) 0%, transparent 70%);
    border-radius: 0 0 0 var(--radius-md);
    pointer-events: none;
    z-index: 0;
    transition: all 0.3s ease;
}

.room-section:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-top-color: rgba(255, 215, 61, 0.6);
}

.room-section:hover::before {
    background: radial-gradient(circle at top right, rgba(255, 215, 61, 0.25) 0%, transparent 70%);
}

.room-section:hover::after {
    background: radial-gradient(circle at bottom left, rgba(164, 94, 229, 0.2) 0%, transparent 70%);
}

.room-title {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.room-preview {
    display: block;
}

.room-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.room-content.expanded {
    max-height: 5000px;
}

.room-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.room-text {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.room-text p {
    margin: 0;
    line-height: 1.8;
    text-align: left;
}

.room-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-sm);
    align-content: start;
}

.room-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.room-images img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Hide extra images on desktop when collapsed */
.room-images-preview .mobile-only {
    display: none;
}

/* Hide expanded images section by default on desktop */
.room-images-expanded {
    display: none;
}

/* Show expanded images when content is expanded on desktop */
.room-content.expanded .room-images-expanded {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-sm);
    align-content: start;
    margin-top: var(--spacing-sm);
}

.expand-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
}

.btn[aria-expanded="true"] .expand-icon {
    transform: rotate(180deg);
}

.room-section .btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: var(--spacing-md);
}

/* Nav: Hamburger menu — activates below 1280px */
@media (max-width: 1279px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, #ffffff 0%, #fffef8 100%);
        padding: var(--spacing-md);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        text-align: center;
        gap: 0;
        border-radius: 0 0 20px 20px;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Show and animate nav icon on mobile (only for contact button) */
    .nav-icon {
        display: inline-block;
        font-size: 1.2rem;
        margin-right: 0.4rem;
        transition: transform 0.3s ease;
        vertical-align: middle;
    }

    .nav-links .btn:hover .nav-icon,
    .nav-links .btn:active .nav-icon {
        transform: scale(1.15) rotate(-5deg);
    }

    /* Mobile menu items styling */
    .nav-links li {
        border-bottom: 1px solid rgba(164, 94, 229, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 1rem var(--spacing-md);
        font-size: 1.1rem;
        border-radius: 12px;
        margin: 0.25rem 0;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    /* Remove desktop underline on mobile */
    .nav-links a::after {
        display: none;
    }

    /* Mobile hover effect - colorful background */
    .nav-links a::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg,
            rgba(255, 107, 107, 0.1) 0%,
            rgba(164, 94, 229, 0.1) 50%,
            rgba(255, 215, 61, 0.1) 100%);
        transition: left 0.4s ease;
        z-index: -1;
    }

    .nav-links a:hover::before,
    .nav-links a:active::before {
        left: 0;
    }

    .nav-links a:hover,
    .nav-links a:active {
        background: linear-gradient(135deg,
            rgba(255, 215, 61, 0.15) 0%,
            rgba(255, 165, 89, 0.15) 100%);
        transform: translateX(8px);
        color: var(--secondary-color);
        box-shadow: 0 2px 8px rgba(164, 94, 229, 0.2);
    }

    /* Special styling for contact button in mobile menu */
    .nav-links .btn {
        background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
        color: white !important;
        margin-top: 0.5rem;
        padding: 1rem 1.5rem !important;
        box-shadow: 0 4px 12px rgba(164, 94, 229, 0.3);
        border-radius: 50px;
        overflow: visible;
    }

    /* Disable before effect for button */
    .nav-links .btn::before {
        display: none;
    }

    .nav-links .btn:hover,
    .nav-links .btn:active {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
        transform: translateX(0) scale(1.05);
        box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
        color: white !important;
    }

    .hamburger {
        display: flex;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    /* Slider Mobile Adjustments */
    .slider-container {
        padding: 0 var(--spacing-sm);
    }

    .slider-slide {
        /* Let the slide-content height drive the overall height on mobile */
    }

    .slide-content {
        height: 260px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .dot {
        width: 12px;
        height: 12px;
    }

    .slide-caption {
        font-size: 1rem;
    }

    /* Adjust decorative elements for mobile viewport */
    .handprint {
        width: 40px !important;
        max-width: 40px !important;
    }
    
    .star-doodle {
        width: 25px !important;
        max-width: 25px !important;
    }
    
    .crayon-doodle {
        width: 50px !important;
        max-width: 50px !important;
    }
    
    /* Ensure decorative elements stay within viewport */
    section .handprint,
    section .star-doodle,
    section .crayon-doodle {
        position: absolute;
    }
    
    /* Adjust specific positions to stay within mobile viewport */
    [style*="left: 3%"] {
        left: 5% !important;
    }
    
    [style*="right: 8%"] {
        right: 5% !important;
    }
    
    [style*="left: 10%"] {
        left: 5% !important;
    }
    
    [style*="right: 5%"] {
        right: 3% !important;
    }
    
    [style*="left: 15%"] {
        left: 5% !important;
    }
    
    [style*="right: 20%"] {
        right: 5% !important;
    }
    
    [style*="right: 15%"] {
        right: 5% !important;
    }
    
    [style*="right: 10%"] {
        right: 5% !important;
    }

    section {
        padding: var(--spacing-md) var(--spacing-xs);
    }

    /* Room Section Mobile Layout */
    .room-section {
        padding: var(--spacing-sm);
        display: flex;
        flex-direction: column;
    }

    .room-title {
        order: 1;
        margin-bottom: var(--spacing-sm);
    }

    .room-preview {
        order: 2;
    }

    .room-content,
    .room-details {
        order: 3;
    }

    .room-section .btn {
        order: 4;
        margin: var(--spacing-sm) 0;
    }

    .room-details > summary.btn {
        margin: var(--spacing-sm) 0;
    }

    .room-images {
        order: 5;
    }

    /* Make room-layout transparent so we can reorder its children */
    .room-preview .room-layout,
    .room-content .room-layout,
    .room-content-inner .room-layout {
        display: contents;
    }

    .room-layout {
        padding: 0;
    }

    /* Images as horizontal slider */
    .room-images {
        display: flex;
        overflow-x: auto;
        gap: var(--spacing-sm);
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--spacing-xs);
        margin-top: var(--spacing-sm);
    }

    .room-images picture {
        flex: 0 0 85%;
        min-width: 0;
        scroll-snap-align: center;
    }

    .room-images img {
        width: 100%;
        aspect-ratio: 4 / 3;
        height: auto;
        min-height: 200px;
    }

    /* Show all images in slider on mobile */
    .room-images-preview .mobile-only {
        display: block;
    }

    /* Hide images in expandable content on mobile */
    .room-content .room-images,
    .room-content .room-images-expanded,
    .room-content.expanded .room-images-expanded,
    .room-content-inner .room-images,
    .room-content-inner .room-images-expanded,
    .room-details[open] .room-content-inner .room-images-expanded {
        display: none !important;
    }

    .room-text {
        margin-bottom: var(--spacing-sm);
    }

    .card {
        padding: var(--spacing-sm);
    }

    /* Prevent long German compound words from overflowing card headings */
    .card h2,
    .card h3 {
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-polaroids {
        display: none;
    }

    .hero {
        background:
            linear-gradient(135deg, rgba(253, 252, 220, 0.92), rgba(255, 255, 255, 0.92)),
            url('assets/gallery/gruppenraum-stapelturm-400w.webp') center / cover no-repeat;
    }
}

/* Slider responsive heights by breakpoint */
@media (max-width: 480px) {
    /* Small mobile: shorter slider to leave room for content */
    .slide-content {
        height: 220px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet / medium screens */
    .slide-content {
        height: 420px;
    }

    .hero-polaroid {
        width: clamp(110px, 14vw, 150px);
    }

    .hero-polaroid:nth-child(1) {
        top: auto;
        bottom: 5%;
        left: 2%;
    }

    .hero-polaroid:nth-child(2) {
        top: auto;
        bottom: 5%;
        left: 78%;
    }

    .hero-polaroid:nth-child(3) {
        top: auto;
        bottom: 5%;
        left: 40%;
    }

    .hero-polaroid:nth-child(n+4) {
        display: none;
    }
}

@media (min-width: 1025px) {
    /* Desktop: use full height */
    .slide-content {
        height: 520px;
    }
}

/* Lightbox overlay for room images */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.97);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-overlay img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    min-width: 44px;
    min-height: 44px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    .lightbox-overlay {
        transition: none;
    }
}

@media (prefers-contrast: more) {
    .hero-polaroid {
        opacity: 0.3;
    }
}

/* ==========================================================================
   <details>/<summary> — used for person bios, Kooperation detail,
   and Räumlichkeiten expanders. Replaces the former JS-driven toggles so
   non-JS crawlers index the full content.
   ========================================================================== */

/* Remove default disclosure markers across all details we use */
details > summary {
    list-style: none;
    cursor: pointer;
}

details > summary::-webkit-details-marker {
    display: none;
}

/* Person bio / Kooperation: summary is a read-more button */
.person-details-wrapper {
    margin-top: auto;
}

.person-details-wrapper > summary.read-more-btn {
    display: inline-block;
    width: auto;
    text-align: center;
}

/* Kooperation card centers its button */
#kooperationen .person-details-wrapper > summary.read-more-btn {
    display: inline-block;
    margin: 0 auto;
}

/* Room details: summary is a full .btn with expand-text/expand-icon spans */
.room-details {
    /* Replaces former .room-content wrapper */
}

/* .room-details > summary.btn reuses .btn + .room-section .btn styling
   from earlier in this stylesheet (display: flex; justify-content: center). */
.room-details > summary.btn {
    margin-top: var(--spacing-md);
}

/* Rotate chevron when open (matches former .btn[aria-expanded="true"] rule) */
.room-details[open] > summary.btn .expand-icon {
    transform: rotate(180deg);
}

/* Breathing room between the summary button and the revealed content.
   Scoped to .room-details only, so person bios (#dana-details, #sarah-details)
   and #kooperation-details keep their existing layout. */
.room-details[open] > summary + * {
    margin-top: var(--spacing-sm);
}

/* Show the "expanded" images group inside Gruppenraum when details is open
   (mirrors the former .room-content.expanded .room-images-expanded rule) */
.room-details[open] .room-images-expanded {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-sm);
    align-content: start;
    margin-top: var(--spacing-sm);
}

/* Hours definition list inside Betreuungszeiten card */
.hours-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    row-gap: 0.25rem;
}

.hours-list dt {
    font-weight: 600;
}

.hours-list dd {
    margin: 0;
}

/* Static gallery captions for crawlers — already visually hidden via .sr-only */
.gallery-captions {
    margin: 0;
    padding: 0;
    list-style: none;
}
