/*
Theme Name: EL Theme 2025 7 March
Theme URI: https://example.com/elsa-leo-theme 
Description: Artist portfolio theme for Elsa Leo.
Author: Eliot Kristofer Axelsson B.XYZ
Author URI: https://bosmanxyz.xyz 
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elsa-leo-theme
*/

* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

*::-webkit-scrollbar {
    display: none;
}


p, a, a:active, a:visited, a:hover, sup, li, ol, i, ul, b, html, body, nav, header, footer,
h1, h2, h3, h4, h5, h6, figcaption, caption, .gallery-nav {
	color: #443731 !important;
}

body, .work-section {
	background: whitesmoke !important;
}

html::-webkit-scrollbar, body::-webkit-scrollbar, .worksection::-webkit-scrollbar {
	display: none;
}

footer {
	font-family: inherit; font-size: 1.3rem; position: fixed; bottom: 20px; left: 20px; display: block;
}

/* Base Layout */
body {
    margin: 0;
    padding: 0;
    font-family: 'Junicode', serif;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.gallery-nav {
	font-family: 'Junicode', serif !important;
}

.content {
    max-width: 100%;
    margin: 0 auto;
    padding-top: 4rem;
    position: relative;
    z-index: 1;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 1.5vw;
    left: 0;
    right: 0;
    z-index: 1000; /* Keep nav on top */
    display: flex;
    justify-content: space-between;
    background-color: whitesmoke; /* Add background color to header */
    padding: 5px 20px; /* Add padding for better appearance */
    width: 100%;
    box-sizing: border-box;
}

@media screen and (min-width: 768px) {
    header {
        background-color: transparent;
    }
}

.site-title {
    font-size: 2rem;
    text-decoration: none;
    color: inherit;
}

nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

nav a {
    text-decoration: none;
    color: inherit;
    font-size: 1.3rem;
}

/* Window Section */
.window {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.window.viewing-image {
    background: rgba(0, 0, 0, 0.8);
}

@media (min-width: 769px) {
    .window {
        padding: 8rem 4rem 4rem;
        align-items: flex-start;
    }
}

.window-image {
    width: 100%;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (min-width: 769px) {
    .window-image {
        height: 100vh;
        width: 100%;
        margin: 0;
        display: flex;
    }
}

.window-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.window-image img {
    display: block;
    max-width: 100%;
    max-height: 100vh;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 768px) {
    .window-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        aspect-ratio: 4/5;
    }
}

.window-caption {
    color: white;
    margin: 1rem 2rem;
    font-size: 0.9em;
    line-height: 1.4;
    font-family: 'Junicode', serif;
    width: calc(100% - 4rem);
}

@media (min-width: 769px) {
    .window-caption {
        margin: 1rem 0;
        width: auto;
    }
}

.window-text {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 1rem;
    background-color: whitesmoke; /* Add background to ensure text is visible */
    position: relative; /* Ensure proper stacking context */
    z-index: 5;
    padding: 0.5rem;
    box-sizing: border-box;
}

.window-text figcaption {
    margin: 0;
    text-align: left;
    font-size: 1.3rem;
    line-height: 1.4;
    width: 100%; /* Full width to align with image */
    box-sizing: border-box;
}

/* Ensure italic tags are rendered properly */
.window-text figcaption i {
    font-style: italic;
}

.window-text .top-link {
    text-decoration: none;
    color: #443731 !important; /* Ensure top link is not blue */
    font-size: 1.3rem;
}

#work-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: whitesmoke !important;
    z-index: 100;
    overflow-y: auto;
    padding: 8rem 1.5vw 2rem; /* Increased top padding and added horizontal padding */
    box-sizing: border-box;
    box-shadow: 0 -2vh 12px 12px whitesmoke;
}

/* CV and Contact Sections */
#cv-section,
#contact-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: whitesmoke !important;
    z-index: 100;
    margin-top: 0;
    padding-top: 6rem;
    box-sizing: border-box;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
}

#cv-section h1, #cv-section h2,
#contact-section h1, #contact-section h2 {
    margin-top: 0;
    padding-top: 0;
}

.contact-content,
.cv-content {
    margin: 0;
    padding: 0;
}

/* Contact Section Grid Layout */
#contact-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.contact-columns {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) minmax(400px, 2fr);
    gap: 4rem;
    align-items: flex-start;
    padding: 1.5vw;
}

@media (max-width: 768px) {
    .contact-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .right-column {
        order: -1; /* Move image to top on mobile */
        padding-top: 0;
    }

    .right-column img {
        aspect-ratio: 4/5;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 0;
}

.left-column a {
    display: block;
    text-decoration: none;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.left-column a:hover {
    color: #666 !important;
}

.right-column {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 3rem; /* Align with navigation links */
}

.right-column img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.work-section {
    width: 100%;
    height: 100%;
    padding: 6rem 1.5vw 1.5vw 1.5vw;
    box-sizing: border-box;
    overflow-y: visible;
    display: flex;
    align-items: flex-start;
}

.years-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: visible;
}

.year-group {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.year-link {
    font-size: 6rem;
    cursor: pointer;
    font-weight: normal;
    color: inherit;
    text-decoration: none;
    display: block;
    margin: 0;
    line-height: 1.2;
    width: 100%;
    text-align: center;
}

.year-content {
    display: none;
    opacity: 0;
    margin-top: 2rem;
    margin-bottom: 4rem;
    overflow-y: visible;
    width: 100%;
    transform: none !important; /* Override the transform from section styles */
}

.year-content.active {
    display: block !important;
    opacity: 1 !important;
}

.work-item {
    margin-bottom: 6rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    overflow-y: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.work-item:last-child {
    margin-bottom: 0;
}

.work-item h3 {
    margin-bottom: 2rem;
    font-weight: normal;
    font-size: 1.3rem;
    text-align: center;
}

/* Gallery Styles */
.gallery {
    position: relative;
    width: 100%;
    margin: 2rem 0;
    overflow-y: visible;
}

.horizontal-gallery {
    overflow-x: hidden;
    overflow-y: visible;
}

.horizontal-gallery .gallery-container {
    display: flex;
    width: 100%;
    transform: translateX(0);
}

.horizontal-gallery figure {
    flex: 0 0 100%;
    margin: 0;
    padding: 0 1rem;
    box-sizing: border-box;
}

.single-gallery .gallery-item {
    display: none;
    opacity: 0;
}

.single-gallery .gallery-item.active {
    display: block;
    opacity: 1;
}

.gallery img {
    width: auto;
    max-width: 90%;
    max-height: 70vh;
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

.gallery-nav {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #443731;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.gallery-nav.prev {
    left: -2rem;
}

.gallery-nav.next {
    right: -2rem;
}

.gallery-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.gallery-container {
    background-color: whitesmoke;
}

figure {
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    display: block;
}

.gallery-item {
    margin-bottom: 1rem;
    background-color: whitesmoke;
}

figcaption {
    background-color: whitesmoke;
    padding: 15px 5px;
    position: relative;
    z-index: 5;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

/* Center figcaption text on desktop */
@media (min-width: 768px) {
    figcaption {
        text-align: center;
    }
}

/* Navigation */
nav, body, a, p, h1, h2, sup {
    font-size: 1.3rem;
    color: black;
    font-family: 'Junicode';
    letter-spacing: 0.025em;
}

nav {
    display: flex;
    justify-content: space-between;
}

ol, ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    padding-left: 0;
    margin-left: 0;
}

.work-section .year-link {
    display: flex;
    justify-content: center;
    font-size: 4rem;
    text-decoration: none;
    color: black;
    padding: 1vh;
    cursor: pointer;
}

.contact-content {
    width: calc(100% - 3vw);
    margin: 0;
    padding: 0;
}

.contact-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2vw;
    align-items: start;
}

.left-column {
    padding-left: 1.5vw;
}

.left-column a {
    display: block;
    margin-bottom: 1vh;
    text-decoration: none;
    transition: color 0.3s ease;
    color: #443731;
}

.left-column a:first-child {
    font-style: italic;
}

.left-column a:hover {
    color: #666;
}

.right-column {
    align-self: flex-end;
    justify-self: flex-end;
    padding-right: 1.5vw;
}

.right-column img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .contact-section {
        grid-template-columns: 1fr;
        gap: 4vh;
        width: 100%;
        padding: 0;
    }

    .contact-info {
        grid-row: 2;
        grid-column: 1;
        padding: 0 1rem;
    }

    .contact-image {
        grid-row: 1;
        grid-column: 1;
        padding: 0;
        justify-self: center;
    }

    .contact-image img {
        width: 100%;
        max-width: none;
        margin: 0;
    }
}

#cv-section, #contact-section {
    padding-top: -10vh !important;
	margin: 2vw !important;
}

.contact-info, .cv-info {
    margin-top: 0;
}

#work-section, #cv-section, #contact-section {
    opacity: 0;
    transform: translateY(30px);
}

/* Year content needs separate rules */
.year-content {
    opacity: 0;
    display: none;
}

#cv-section, #contact-section {
    display: none;
}

#cv-section, #contact-section {
    padding-top: 8.333vh;
}

@font-face {
    font-family: 'Junicode';
    src: url('./assets/fonts/Junicode.woff2') format('woff2'),
        url('./assets/fonts/Junicode.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Typography */
body, p, h1, h2, h3, figcaption {
    font-family: 'Junicode', serif;
    font-size: 1.3rem;
    line-height: 1.4;
    color: black;
    font-weight: normal;
    letter-spacing: 0.025em;
}

/* Hide WordPress admin bar */
#wpadminbar {
    display: none !important;
}
html {
    margin-top: 0 !important;
}
