/* ===========================
   CSS Custom Properties
   =========================== */
:root {
    --color-bg: #3a3a3a;
    --color-bg-secondary: #4a4a4a;
    --color-text: #f5f5f5;
    --color-rose-gold: #f8bd95;
    --gradient-metallic-gold: linear-gradient(135deg, #fff7d6 0%, #f7e7b8 25%, #e1b84b 55%, #c89b2e 80%);
    --color-text-light: #d0d0d0;
    --color-accent: #8b8b8b;
    --color-white: #ffffff;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}
/* ===========================
   Local fonts (self-hosted fallback)
   =========================== */
@font-face {
    font-family: 'Fuzzy Bubbles';
    src: url('/assets/fonts/FuzzyBubbles-Regular.woff2') format('woff2'),
         url('/assets/fonts/FuzzyBubbles-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    /* prevent the browser from briefly showing fallback text; hide
       until the custom face loads */
    font-display: block;
}
@font-face {
    font-family: 'Fuzzy Bubbles';
    src: url('/assets/fonts/FuzzyBubbles-Bold.woff2') format('woff2'),
         url('/assets/fonts/FuzzyBubbles-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: block;
}

/* ===========================
   Reset & Base Styles
   =========================== */
* {
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fuzzy Bubbles', 'Comic Sans MS', 'Comic Sans', 'Chalkboard SE', 'Chalkboard', cursive;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

/* special emphasis for the first Atelier sentence */
.atelier-intro {
    font-size: 1.25rem;
    font-weight: bold;
}

/* Headings and brand use Fuzzy Bubbles site-wide */
h1, h2, h3, h4, h5, h6, .nav-brand a {
    font-family: 'Fuzzy Bubbles', 'Comic Sans MS', 'Comic Sans', cursive, sans-serif;
}

/* ===========================
   Container & Layout
   =========================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.main-content {
    min-height: 60vh;
    padding: var(--spacing-lg) 0;
}

/* Contact two-column layout */
.contact-grid { display: block; gap: 2rem; }
.contact-left, .contact-right { width: 100%; }
.contact-form { background: rgba(255,255,255,0.02); padding: 1rem; border-radius: 8px; }
.contact-form h3 { margin-top: 0; }
.contact-info { margin-top: 1rem; }

/* mobile contact tweaks */
@media (max-width: 768px) {
    /* restore container padding for general layout */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    /* nav spacing */
    .main-nav .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    /* grey section edge-to-edge with internal padding */
    .content-section {
        padding: 1rem;
        border-radius: 0 !important;
    }
    /* reset form margins/padding to allow container pad handle spacing */
    .contact-form, .contact-info {
        margin: 0;
        padding: 0;
        border-radius: 0;
    }
    /* inputs still full width within padded parent */
    .contact-form input,
    .contact-form textarea {
        width: 100%;
        font-family: Arial, sans-serif;
        font-size: 12px;
    }
}

/* explicitly enforce two‑column grid on desktop */
@media (min-width: 769px) {
    .contact-grid {
        display: grid !important;
        grid-template-columns: 1fr 380px !important;
        align-items: start;
    }
    .contact-form, .contact-info {
        margin: 0;
        padding: 0;
    }
}

.contact-info h3,
.contact-info p {
    padding-left: 1rem;
    padding-right: 1rem;
}

.contact-form h3 {
    padding-top: 1rem;
}

@media (min-width: 768px) {
    .contact-grid { display: grid; grid-template-columns: 1fr 380px; align-items: start; }
    .contact-left { order: 1; }
    .contact-right { order: 2; }
    .contact-info { margin-top: 0; padding-left: 1rem; }
}

/* ===========================
   Navigation
   =========================== */
.main-nav {
    background-color: #2a2a2a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav .container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    transition: box-shadow 220ms ease;
}

/* Brand logo sizing + shrink state */
.nav-brand .brand-logo {
    /* start at the size previously used when shrunk */
    width: 140px;
    height: auto;
    display: block;
    transition: width 220ms ease, transform 220ms ease;
}

/* brand text next to logo */
.brand-text {
    margin-left: 0.5rem;
    font-size: 1.2rem; /* similar to subtitle size */
    line-height: 1;
    align-self: center;
    display: inline-block;
}

.brand-link {
    color: inherit;
    text-decoration: none;
}

/* Shrink header when scrolling (stronger shrink) */
.main-nav.shrink {
    /* this class is no longer used; JS adjusts padding directly */
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

.main-nav.shrink .nav-brand .brand-logo {
    width: 100px; /* even smaller when nav is shrunk */
    transform: none; /* scaling handles it now */
}

.main-nav.shrink .nav-menu a {
    padding: 0.15rem 0;
    font-size: 0.9rem;
}
/* Optional: slightly reduce nav-brand font when shrunk */
.main-nav.shrink .nav-brand a {
    font-size: 1.25rem;
}



.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-text);
    text-decoration: none;
}

.nav-brand {
    flex: 0 0 260px;
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    flex: 1 1 0;
    justify-content: flex-end;
    gap: var(--spacing-xl);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    margin: 3px 0;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-menu a {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-text);
    transition: width 0.3s ease;
}

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

/* ===========================
   Page Header
   =========================== */
.page-header {
    display: flex;
    justify-content: center;
    /* solid black background for consistency */
    background-color: #000;
    color: var(--color-white); /* text remains light on images */
    padding: var(--spacing-xl) var(--spacing-md);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    min-height: 300px; /* consistent header height */
}

.page-header__content {
    display: flex;
    flex-direction: column; /* stack by default on mobile */
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.page-header__text {
    width: 100%;
    text-align: center;
}

/* desktop layout: text left, image right */
@media (min-width: 1025px) {
    .page-header__content {
        flex-direction: row;
        align-items: center;
    }
    .page-header__text {
        flex: 0 0 40%;
        text-align: left;
    }
    .page-header__visual {
        flex: 0 0 60%;
    }
}

.page-header__visual {
    /* full width container for image */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    height: 300px;
}

@media (max-width: 1024px) {
    .page-header {
        flex-direction: column;
        text-align: center;
        padding-left: 0;
        padding-right: 0;
    }
    /* on mobile place text first, image below */
    .page-header__text {
        order: 1;
        width: 100%;
    }
    .page-header__visual {
        order: 2;
        width: 100% !important;
        height: 300px !important;           /* fixed height same as desktop */
    }
    .page-header__img {
        width: 100% !important;            /* image fills visual area */
        height: 100% !important;
        object-fit: contain !important;    /* keep proportions, no distortion */
    }
}

.page-header__img {
    /* maintain aspect ratio inside fixed header box */
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 300ms ease;
}


/* overlay removed - headers are no longer darkened */
.page-header::before {
    display: none;
}

/* generic rose-gold gradient text effect */
.rose-gold-text {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

/* removed old h1 rules */

/* 2. Hauptüberschrift (zentriert und groß) */
.page-header h1.rose-gold-text {
    font-size: clamp(2.2rem, 6vw, 3.5rem); /* etwas kleiner insgesamt */
    line-height: 1.1;
    margin-bottom: 0.75rem; /* Mehr Abstand zum Untertitel */
    letter-spacing: 0.02em;
    
    /* Hochwertiger Gold-Verlauf */
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    
    /* Dezenter Schatten für Tiefe, ohne den Glanz zu dämpfen */
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5));
}

/* 3. Untertitel (dezent darunter) */
.page-header .subtitle {
    font-size: clamp(1.8rem, 4vw, 2.4rem); /* größer, damit besser lesbar */
    font-weight: 600; /* dicker für besseren Kontrast */
    color: #f7e7b8; /* Sanfter Gold-Ton statt hartem Weiß */
    letter-spacing: 0.15em; /* Starke Sperrung wirkt sehr hochwertig */
    margin-top: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    opacity: 0.9;
}
/* (Removed duplicate/garbled block) */

/* ===========================
   Teaser Cards (Homepage)
   =========================== */
.teaser-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.teaser-card {
    background-color: #e5e5e5;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.teaser-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.teaser-card h2 {
    color: #000000;
    margin-bottom: var(--spacing-sm);
}

.teaser-card p {
    color: #1a1a1a;
    margin-bottom: var(--spacing-md);
}

.teaser-card a.read-more {
    display: inline-block;
    color: var(--color-accent);
    font-weight: bold;
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--color-accent);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.teaser-card a.read-more:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* ===========================
   Homepage Alternating Sections
   =========================== */
.homepage-section {
    margin-bottom: var(--spacing-lg);
}

.section-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
}

.section-image {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    display: flex;               /* center image inside container */
    justify-content: center;
    align-items: center;
}

.section-image img {
    width: 100%;
    height: 100%;               /* fill container height as well */
    display: block;
    object-fit: cover;
    object-position: center center; /* ensure cropping is centered */
}

.section-text {
    text-align: center;
    padding: var(--spacing-md);
    background-color: #e5e5e5;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.section-text h2 {
    margin-bottom: var(--spacing-sm);
    color: #000000;
}

.section-text p {
    margin-bottom: var(--spacing-md);
    color: #1a1a1a;
}

.section-text a.read-more {
    display: inline-block;
    color: var(--color-accent);
    font-weight: bold;
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--color-accent);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.section-text a.read-more:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* Desktop layout: alternating left/right */
@media (min-width: 768px) {
    .section-content-wrapper {
        flex-direction: row;
        align-items: center;
    }

    .section-left .section-content-wrapper {
        flex-direction: row;
    }

    .section-right .section-content-wrapper {
        flex-direction: row-reverse;
    }

    .section-image {
        width: 50%;
        flex-shrink: 0;
    }

    .section-text {
        width: 50%;
        flex-shrink: 0;
    }
}


/* ===========================
   Content Sections
   =========================== */
.content-section {
    background-color: #e5e5e5;
    color: #000000;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.content-section h2 {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.content-section ul {
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

/* ===========================
   Two-Column Layout (About)
   =========================== */
.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    align-items: start;
}

.two-column img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* ===========================
   Gallery
   =========================== */
.gallery-section {
    margin-bottom: var(--spacing-lg);
}

.gallery-section h2 {
    margin-bottom: var(--spacing-md);
    text-align: center;
    font-size: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ===========================
   Lightbox / Modal
   =========================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: var(--color-white);
    cursor: pointer;
    z-index: 10000;
    background: none;
    border: none;
    padding: 10px;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: var(--color-white);
    cursor: pointer;
    user-select: none;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* Preview slider styles */
.gallery-grid.preview { display: block; position: relative; overflow: hidden; padding: 0.5rem 0; }
.gallery-grid.preview .gp-track { display:flex; gap:8px; transition: transform .6s ease; will-change: transform; }
.gallery-grid.preview .gp-track img { flex: 0 0 33.3333%; width: 33.3333%; height: 180px; object-fit: cover; border-radius:6px; cursor: pointer }
.gallery-grid.preview .gp-track img:nth-child(n+1) { display: block; }

@media (max-width: 767px) {
    .gallery-grid.preview .gp-track img { flex: 0 0 50%; width: 50%; }
}

.gallery-group { margin: 0.5rem 0; }

/* ===========================
   Contact Form
   =========================== */
.contact-form {
    background-color: #e5e5e5;
    color: #000000;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--color-bg-secondary);
    border-radius: var(--border-radius);
    font-family: 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

@media (max-width: 768px) {
    .contact-form .form-group input,
    .contact-form .form-group textarea {
        font-family: 'Fuzzy Bubbles';
        font-size: 14px;
    }

    /* Ensure the submit button matches on mobile */
    .submit-button {
        font-family: 'Fuzzy Bubbles', 'Comic Sans MS', 'Comic Sans', cursive;
        font-size: 12px;
    }
}

.form-status {
    min-height: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.form-status.success {
    color: #1d7a3a; /* green */
    background: rgba(29,122,58,0.06);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}
.form-status.error {
    color: #b33;
    background: rgba(179,51,51,0.06);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.submit-button {
    background-color: var(--color-accent);
    color: var(--color-white);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Fuzzy Bubbles', 'Comic Sans MS', 'Comic Sans', cursive;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.submit-button:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.contact-info {
    background-color: #e5e5e5;
    color: #000000;
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info h3 {
    margin-bottom: var(--spacing-sm);
}

.contact-info p {
    margin-bottom: var(--spacing-xs);
}

/* ===========================
   CTA Banner
   =========================== */
.cta-banner {
    /* match other content blocks */
    background-color: #e5e5e5; /* same as .content-section */
    color: #000000;
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-sm);
}

.cta-banner p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--color-white);
    color: var(--color-accent);
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: var(--transition);
}

.cta-button:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Light panel for legal pages */
.panel {
    border-radius: 8px;
    padding: 1.25rem;
}
.panel-light {
    background-color: #f5f5f5; /* light grey */
    color: #000000; /* black text */
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ===========================
   Footer
   =========================== */
.site-footer {
    background-color: var(--color-bg);
    color: var(--color-white);
    padding: var(--spacing-md) 0;
}

.site-footer a{ color: #ddd; }

.footer-content {
    text-align: center;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.footer-nav a {
    color: var(--color-white);
    font-size: 0.9rem;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-info p {
    color: #ccc;
    font-size: 0.85rem;
}

/* ===========================
   Responsive Design
   =========================== */

/* Tablet */
@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    .teaser-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-column {
        grid-template-columns: 1fr 2fr;
    }

    .page-header h1 {
        font-size: 4rem;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .teaser-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Navigation */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        max-height: 500px;
    }

    .nav-menu li {
        border-bottom: 1px solid var(--color-bg);
    }

    .nav-menu a {
        display: block;
        padding: var(--spacing-sm);
        color: #000000;
        text-decoration: none;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header .subtitle {
        font-size: 1rem;
    }
}