/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #faf5fc;
    --accent-color: #666;
    --text-color: #333;
    --border-color: #e0e0e0;
    --nav-width: 250px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--secondary-color);
    overflow-x: hidden;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loader-text {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    margin-bottom: 30px;
}

.loader-bar {
    width: 150px;
    height: 2px;
    background: var(--border-color);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    animation: loadingBar 2s infinite;
}

@keyframes loadingBar {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Left Navigation */
.navbar-left {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--nav-width);
    height: 100vh;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 40px 30px;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.nav-logo {
    display: inline-block;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 30px;
}

/* Language Switcher - Desktop: hidden (shown in sidebar), Mobile: shown fixed top-right */
.language-switcher {
    display: none;
}

/* Language switcher inside sidebar for desktop */
.navbar-left .language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.lang-btn:hover {
    color: var(--primary-color);
}

.lang-btn.active {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lang-separator {
    color: var(--border-color);
    font-size: 0.9rem;
}

.nav-footer {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    text-align: left;
    font-size: 0.7rem;
    color: #999;
    line-height: 1.6;
}

.nav-footer p {
    margin: 3px 0;
}

.nav-footer .version {
    margin-top: 8px;
    font-size: 0.65rem;
    color: #bbb;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 25px;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Mobile Navigation Toggle - Hidden by default */
.nav-toggle {
    display: none;
}

/* Show on mobile screens */
@media (max-width: 1024px) {
    .nav-toggle {
        position: fixed;
        top: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        cursor: pointer;
        z-index: 1001;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 5px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        font-family: 'Playfair Display', serif;
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--primary-color);
        transition: var(--transition);
        line-height: 50px;
        text-align: center;
    }

    .nav-toggle:hover {
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
}

/* Main Content */
.main-content {
    margin-left: var(--nav-width);
    min-height: 100vh;
}

/* Sections */
.section {
    padding: 80px 0;
    min-height: auto;
    scroll-margin-top: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: 0.05em;
    text-align: center;
}

/* HOME Section */
.home-section {
    background: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.home-image {
    max-width: 900px;
    margin: 0 auto 40px;
    width: 100%;
}

/* Parallax Container */
.parallax-container {
    position: relative;
    height: 70vh;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Parallax Image */
.parallax-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 130%;
    object-fit: cover;
    will-change: transform;
    transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1.5s ease;
    transform: translateY(0) scale(1);
    transform-origin: top center;
    opacity: 0;
}

.parallax-image.loaded {
    opacity: 1;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .parallax-image {
        transform: none !important;
        transition: none !important;
    }
}

.home-text {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.home-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.home-intro {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--accent-color);
    font-style: italic;
}

/* VISION ARTIST Section */
.vision-section {
    background: var(--secondary-color);
    padding: 100px 0;
}

.vision-content p {
    margin-bottom: 25px;
    line-height: 1.8;
    text-align: justify;
}

/* Series Description */
.series-description {
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
}

.series-description h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--primary-color);
    text-align: center;
}

.series-list {
    display: grid;
    gap: 25px;
}

.series-item {
    border-left: 3px solid var(--accent-color);
    padding-left: 20px;
}

.series-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.series-item p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
}

/* AMALIA BRAVA Section */
.about-section {
    background: white;
    padding: 100px 0;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text-with-image {
    text-align: justify;
}

.about-photo-embedded {
    float: left;
    width: 300px;
    height: auto;
    margin-right: 30px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.about-text-with-image p {
    margin-bottom: 20px;
    line-height: 1.8;
    text-align: justify;
}

/* WORKS Section */
.works-section {
    background: var(--secondary-color);
    padding: 100px 0;
}

/* Series Groups */
.series-group {
    margin-bottom: 60px;
}

.series-header {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.series-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.series-header p {
    line-height: 1.8;
    color: var(--text-color);
}

.series-works {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

/* Custom layout for Dynastie series */
.dynastie-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.dynastie-grid .work-item:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / 3;
}

.dynastie-grid .work-item:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.dynastie-grid .work-item:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.dynastie-grid .work-item:nth-child(4) {
    grid-column: 3;
    grid-row: 1;
}

.dynastie-grid .work-item:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
}

.dynastie-grid .work-item:nth-child(6) {
    grid-column: 1;
    grid-row: 3;
}

.dynastie-grid .work-item:nth-child(7) {
    grid-column: 2;
    grid-row: 3;
}

@media (max-width: 1024px) {
    .dynastie-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dynastie-grid .work-item:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .dynastie-grid .work-item:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }

    .dynastie-grid .work-item:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }

    .dynastie-grid .work-item:nth-child(4) {
        grid-column: 1;
        grid-row: 3;
    }

    .dynastie-grid .work-item:nth-child(5) {
        grid-column: 2;
        grid-row: 3;
    }

    .dynastie-grid .work-item:nth-child(6) {
        grid-column: 1 / 3;
        grid-row: 4;
    }

    .dynastie-grid .work-item:nth-child(7) {
        grid-column: 1 / 3;
        grid-row: 5;
    }
}

@media (max-width: 768px) {
    .dynastie-grid {
        grid-template-columns: 1fr;
    }

    .dynastie-grid .work-item {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}

.series-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    background: var(--secondary-color);
    padding: 20px 0;
    z-index: 100;
}

.series-btn {
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.series-btn:hover,
.series-btn.active {
    background: var(--primary-color);
    color: white;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.work-item {
    background: white;
    padding: 20px;
    transition: var(--transition);
    cursor: pointer;
}

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

.image-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.sold-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #666;
    font-size: 1.5rem;
    font-weight: 500;
    padding: 15px 30px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 10;
    pointer-events: none;
    letter-spacing: 0.15em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.work-item img {
    width: 100%;
    height: auto;
    display: block;
}

.work-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.work-info p {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* FOR ART BUYERS Section */
.buyers-section {
    background: white;
    padding: 100px 0;
}

.buyers-intro {
    text-align: center;
    margin-bottom: 50px;
}

.buyers-text {
    font-size: 1rem;
    line-height: 1.8;
}

.lang-de {
    display: block;
    margin-bottom: 10px;
}

.available-works {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.available-item {
    text-align: center;
    padding: 20px;
    background: var(--secondary-color);
    transition: var(--transition);
}

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

.available-item img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.available-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.available-item p {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.request-btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.request-btn:hover {
    background: var(--accent-color);
}

/* EXHIBITIONS Section */
.exhibitions-section {
    background: var(--secondary-color);
    padding: 100px 0;
}

.exhibitions-list {
    max-width: 800px;
    margin: 0 auto;
}

.exhibition-item {
    margin-bottom: 40px;
    padding: 30px;
    background: white;
}

.exhibition-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.exhibition-item p {
    line-height: 1.8;
    color: var(--accent-color);
}

.exhibition-item em {
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* CONTACT Section */
.contact-section {
    background: white;
    padding: 100px 0;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar-left {
        transform: translateX(-100%);
    }

    .navbar-left.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    /* Language switcher at top of mobile sidebar */
    .navbar-left .language-switcher {
        display: flex;
        margin-top: 20px;
        margin-bottom: 30px;
    }

    .about-photo-embedded {
        float: none;
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 30px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .container {
        padding: 0 20px;
    }

    .section-title {
        font-size: 2rem;
    }

    .home-title {
        font-size: 1.2rem;
    }

    /* Adjust parallax container for mobile */
    .parallax-container {
        height: 50vh;
    }

    .parallax-image {
        min-height: 110%; /* Less overflow on mobile for performance */
    }

    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .series-nav {
        gap: 10px;
    }

    .series-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }

}

@media (max-width: 480px) {
    .loader-text {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .works-grid,
    .available-works {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 30px;
    }

}