:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --background-color: #FFF8F0;
    --text-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    padding-top: 70px;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.section {
    padding: 5rem 2rem 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

#home {
    text-align: center;
    background: linear-gradient(
        rgba(255, 255, 255, 0.7),
        rgba(255, 255, 255, 0.9) 70%
    ),
    url('images/background.jpg') center/cover fixed;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 5rem;
}

#home h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    z-index: 2;
    display: inline-block;
}

#home p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-color);
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

/* Gallery Styles */
#gallery-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

#gallery-container:has(.gallery-items-grid),
#gallery-container:has(.category-header) {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-items-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.gallery-category-card {
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: transform 0.3s;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.gallery-category-card:hover {
    transform: translateY(-5px);
}

.gallery-category-card .category-item {
    width: 100%;
    height: 300px;
    position: relative;
}

.gallery-category-card .category-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 1rem;
    transform: translateY(0);
}

.category-overlay h3 {
    margin-bottom: 0.5rem;
}

.gallery-back-button {
    align-self: flex-start;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 2rem;
    transition: background-color 0.3s;
}

.gallery-back-button:hover {
    background: var(--secondary-color);
}

.category-header {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

.category-header h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-header p {
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.gallery-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.item-details {
    padding: 1rem;
    background: white;
}

.item-details h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.item-details p {
    color: #666;
    font-size: 0.9rem;
}

.subcategory-item .item-details {
    text-align: center;
}

/* Workshop Styles */
.workshop-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.workshop-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.workshop-sessions {
    margin: 2rem 0;
    border-left: 3px solid var(--primary-color);
    padding-left: 1.5rem;
}

.workshop-session {
    margin-bottom: 1.5rem;
    position: relative;
}

.workshop-session::before {
    content: '';
    position: absolute;
    left: -1.65rem;
    width: 1rem;
    height: 1rem;
    background: var(--primary-color);
    border-radius: 50%;
}

.session-date {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.session-description {
    color: #666;
}

.workshop-price {
    margin: 2rem 0;
    padding: 1rem;
    background: var(--background-color);
    border-radius: 4px;
    text-align: center;
}

.workshop-info p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* About Section Styles */
.about-content {
    display: flex;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

.about-text {
    flex: 1;
}

/* Contact Section Styles */
.contact-info {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contact-info p {
    margin-bottom: 1rem;
}

footer {
    text-align: center;
    padding: 2rem;
    background: var(--primary-color);
    color: white;
    margin-top: auto;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1100;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-caption {
    color: white;
    padding: 1rem;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Legal sections styling */
#imprint.section,
#privacy.section {
    min-height: auto;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

#imprint .imprint-content,
#privacy .privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Adjust spacing between sections */
#imprint + #privacy {
    margin-top: -2rem;
}

/* Home Image Styles */
.home-image {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.center-image {
    width: fit-content;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

#home h1 {
    display: inline-block;
}

.center-image {
    width: auto;
    max-width: none;
    height: auto;
    border-radius: 8px;
}

/* Match the image width to the h1 text width */
.home-image img {
    width: 100%;
    max-width: 600px; /* Approximate width of the header text */
}

/* Responsive Styles */
@media (max-width: 1400px) {
    #gallery-container,
    .gallery-items-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    #home {
        padding: 6rem 1.5rem 4rem;
    }

    #home h1 {
        font-size: 2.5rem;
    }

    #home p {
        font-size: 1.1rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
        display: flex;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
    }

    .profile-image {
        width: 100%;
        max-width: 300px;
    }

    #gallery-container,
    .gallery-items-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .gallery-item img {
        height: 250px;
    }

    .category-item {
        height: 250px;
    }

    .lightbox-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    #gallery-container,
    .gallery-items-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .gallery-item img {
        height: 200px;
    }

    .category-item {
        height: 200px;
    }

    .lightbox-close {
        top: -30px;
        right: -10px;
    }
}