@import url('fonts.css');

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #800020;
    --sidebar-width: 250px;
    --font-serif: "EB Garamond", serif;
    --font-sans: "Montserrat", sans-serif;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Layout Structure */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
aside.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 60px 40px;
    background: var(--bg-color);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.logo h1 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 60px;
}

.logo a {
    text-decoration: none;
    color: var(--text-color);
}

nav.main-nav ul {
    list-style: none;
}

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

nav.main-nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color var(--transition-speed);
    position: relative;
    display: inline-block;
}

nav.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -3px;
    left: 0;
    background-color: transparent;
    border-bottom: 1px solid var(--accent-color);
    transition: width var(--transition-speed) ease;
}

nav.main-nav ul li a:hover::after,
nav.main-nav ul li a.active::after {
    width: 100%;
}

nav.main-nav ul li a:hover,
nav.main-nav ul li a.active {
    color: var(--accent-color);
}

.nav-label {
    font-size: 0.75rem;
    color: #767676;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 30px 0 15px;
    display: block;
}

.sub-nav {
    margin-left: 10px;
}

.sub-nav li {
    margin-bottom: 10px !important;
}

.sub-nav li a {
    text-transform: none !important;
    font-style: italic;
    font-family: var(--font-serif);
    font-size: 0.95rem !important;
    letter-spacing: 0.5px !important;
}

.footer-nav {
    margin-top: auto;
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 1px;
}

/* Language Switcher */
.lang-switcher {
    margin-top: 20px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lang-switcher button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    text-decoration: none;
    color: #767676;
    transition: color 0.3s;
    cursor: pointer;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lang-switcher button:hover,
.lang-switcher button.active {
    color: #000;
}

.lang-switcher span {
    margin: 0 5px;
    color: #ccc;
}

/* Hamburger Menu (Mobile Only) */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-btn span {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
}

/* Main Content Area */
main.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 0;
}

/* Series Page Styles */
.hero-section {
    width: 100%;
    height: 70vh;
    overflow: hidden;
    margin-bottom: 60px;
    position: relative;
    background-color: #f9f9f9;
}

.hero-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter 0.5s ease;
}

.hero-section img:hover {
    filter: grayscale(0%);
}

/* Hero Slideshow */
.slideshow-container .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.slideshow-container .slide img,
.slideshow-container img.slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(10%);
}

.slideshow-container .slide.active {
    opacity: 1;
    z-index: 2;
}

.slideshow-container:hover .slide img,
.slideshow-container:hover img.slide {
    filter: grayscale(0%);
}


.series-info {
    max-width: 800px;
    margin: 0 auto 80px;
    padding: 0 40px;
}

.series-years {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: #767676;
    margin-bottom: 10px;
}

.series-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 30px;
    font-style: italic;
}

.series-description {
    font-size: 1.1rem;
    color: #333;
    max-width: 650px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 40px 100px;
}

.gallery-item {
    cursor: pointer;
    overflow: hidden;
    background: #f9f9f9;
    aspect-ratio: 1/1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

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

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: none;
    z-index: 2000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    background: white;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-container {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    margin-bottom: 20px;
    transition: transform 0.1s ease-out;
    transform-origin: center;
}

.lightbox-image-container:hover .lightbox-image {
    transform: scale(3);
}

.lightbox-metadata {
    text-align: center;
    font-family: var(--font-serif);
    width: 100%;
}

.artwork-title {
    font-weight: 400;
    font-size: 1.3rem;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.artwork-details {
    font-size: 0.95rem;
    color: #333;
    font-style: italic;
    margin-bottom: 10px;
}

.artwork-more a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    cursor: pointer;
    color: #000;
    transition: color 0.3s;
    line-height: 1;
    z-index: 2100;
}

/* Navigation Arrows */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: #000;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: color 0.3s;
    z-index: 2100;
}

.lightbox-arrow:hover {
    color: var(--accent-color);
}

.arrow-left {
    left: 20px;
}

.arrow-right {
    right: 20px;
}

.close-lightbox:hover {
    color: var(--accent-color);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    aside.sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px 30px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    .logo h1 {
        margin-bottom: 0;
        font-size: 1.5rem;
    }
    .hamburger-btn {
        display: block;
    }
    nav.main-nav, .footer-nav {
        display: none;
        width: 100%;
    }
    /* When mobile menu is active */
    aside.sidebar.mobile-active nav.main-nav,
    aside.sidebar.mobile-active .footer-nav {
        display: block;
        margin-top: 30px;
    }
    aside.sidebar.mobile-active .hamburger-btn span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    aside.sidebar.mobile-active .hamburger-btn span:nth-child(2) {
        opacity: 0;
    }
    aside.sidebar.mobile-active .hamburger-btn span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    main.content {
        margin-left: 0;
    }
    .hero-section {
        height: 50vh;
    }
    .series-title {
        font-size: 2rem;
    }
    .lightbox-arrow {
        display: none !important;
    }
}

/* UX Enhancements for Series Pages */
.jump-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
    position: sticky;
    top: 20px;
    z-index: 900;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0,0,0,0.05);
}

.jump-links a {
    text-decoration: none;
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--transition-speed);
}

.jump-links a:hover {
    color: var(--accent-color);
}

.curatorial-text {
    font-size: 1rem;
    color: #555;
    margin-top: 10px;
    max-width: 600px;
    line-height: 1.6;
    border-left: 3px solid var(--accent-color);
    padding-left: 15px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background-color: #600018;
}

@media (max-width: 992px) {
    .jump-links {
        top: 80px; /* Account for mobile header */
        padding: 10px;
        justify-content: center;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
