/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    --header-height: 60px;
    --page-padding-width: 2rem;
    --color-mathis-manufact-red: rgb(84, 23, 36);
    --color-separator: color-mix(in srgb-linear, var(--color-mathis-manufact-red), white);
    --color-background-light: #f8f8f8
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-wrapper {
    flex: 1;
}

/* Header */
header {
    background-color: #fff;
    padding-right: var(--page-padding-width);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 14px 0;
}

.logo-split {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-decoration: none;
}

.logo-split .logo-left {
    height: 32px;
    width: auto;
    display: block;
}

.logo-split .logo-right {
    height: 18px;
    width: auto;
    display: block;
    margin-top: 12px
}

/* Burger Menu */
.menu-container {
    position: relative;
}

.menu-toggle {
    display: none;
}

.burger-icon {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    justify-content: space-between;
    gap: 5px;
    height: 50px;
    width: 53px;
    padding: 14px;
    border-radius: 4px;
}

.burger-icon:hover {
    background-color: var(--color-background-light);
}

.burger-icon span {
    width: 100%;
    height: 3px;
    background-color: var(--color-mathis-manufact-red);
    transition: all 0.3s ease;
}

/* Animate burger icon when menu is open */
.menu-toggle:checked ~ .page-wrapper .burger-icon span:nth-child(1) {
    transform: rotate(45deg) translateX(2.5px) translateY(-2.5px);
    transform-origin: top left;
    width: 28px;
}

.menu-toggle:checked ~ .page-wrapper .burger-icon span:nth-child(2) {
    background-color: transparent;
}

.menu-toggle:checked ~ .page-wrapper .burger-icon span:nth-child(3) {
    transform: rotate(-45deg) translateX(2.5px) translateY(2.5px);
    transform-origin: bottom left;
    width: 28px;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: var(--header-height);
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.menu-toggle:checked ~ .menu-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Navigation Menu */
.nav-menu {
    position: absolute;
    top: 100%;
    width: 280px;
    right: calc(var(--page-padding-width) * -1);
    margin-top: calc((var(--header-height) - 50px) / 2);
    background-color: #fff;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    flex-direction: column;
    z-index: 20;
}

.menu-toggle:checked ~ .page-wrapper .nav-menu {
    display: flex;
    opacity: 1;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    padding: 1rem var(--page-padding-width);
    text-transform: lowercase;
    transition: background-color 0.3s, color 0.3s;
    border-left: 3px solid transparent;
}

.nav-menu a:hover {
    background-color: var(--color-background-light);
    color: #666;
    border-left-color: var(--color-mathis-manufact-red);
}

h1, h2 {
    font-weight: 300;
    text-transform: lowercase;
    letter-spacing: 0.5rch;
}

/* Hero Section */
.hero {
    padding: 4rem var(--page-padding-width);
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    max-width: 800px;
    margin: 0 auto;
    color: #666;
}

/* Content Sections */
section {
    padding: 4rem var(--page-padding-width);
    max-width: 1200px;
    margin: 0 auto;
}

section:not(.hero) {
    /*border-top: solid var(--color-separator);*/
}

section:nth-child(even) {
    background-color: var(--color-background-light);
}

section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

section p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 1rem;
}

/* Image Gallery */
.image-container.series {
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.image-container.series img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

/* Lightbox */
.lightbox {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(3px);
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 600;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    width: 95vw;
    height: calc(95vh - var(--header-height));
    transform: translateY(2.5vh);
    object-fit: contain;
    z-index: 700;
}

.lightbox button {
    position: absolute;
    color: white;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(3px) brightness(80%);
    border: none;
    cursor: pointer;
    font-size: 0;
    border-radius: 4px;
    z-index: 800;
}

.lightbox button:hover {
    background: rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    top: 20px;
    right: 20px;
    padding: 18px;
}

.lightbox-nav {
    top: calc(50% - 0.5*var(--header-height));
    transform: translateY(-50%);
    user-select: none;
    padding: 20px 10px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    margin-top: 2rem;
    align-items: stretch;
}

.contact-info {
    background-color: #fff;
    padding: 0.5rem var(--page-padding-width);
    border-left: 3px solid var(--color-mathis-manufact-red);
    align-content: center;
}

.contact-info p {
    margin: 1rem 0;
}

.contact-info a {
    color: #333;
    text-decoration: none;
    border-bottom: 1px dotted #333;
    transition: color 0.3s;
}

.contact-info a.external-link {
    font-size: 1rem;
    color: #666;
}

.contact-info a:hover {
    color: #666;
    border-bottom-style: solid;
}

.contact-map {
    width: 100%;
    height: 300px;
    display: block;
    object-fit: cover;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    text-align: center;
    z-index: 500;
}

footer a {
    color: #fff;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
}

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

/* Responsive Design */
@media (max-width: 750px) {
    * {
        --header-height: 78px;
    }

    .logo-split {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }

    .logo-split .logo-left {
        height: 28px;
    }

    .logo-split .logo-right {
        height: 14px;
        margin-top: 0;
    }

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

    .hero h1 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 1.7rem;
    }

    section {
        padding: 2rem 1rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
