/* --- General Styles --- */
:root {
    /*--primary-bg: #f8f7f2; /* Soft cream */*/
    --primary-bg: #fff;
    /*--secondary-bg: #efebe9; /* Light beige */
    --secondary-bg: #f6f3ee;
    --text-color: #4e4a47; /* Deep muted brown */
    /*--accent-color: #a1887f; /* Muted terracotta/rose */
    --accent-color: #b1b1b1;
    --border-color: #d7ccc8; /* Very light grey-brown */
    /*--link-hover-color: #795548; /* Darker brown */
    --link-hover-color: #555;
}

body {
    /*font-family: 'Montserrat', sans-serif;*/
    font-family: "Quicksand", sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--primary-bg);
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

h1, h2, h3 {
    /*font-family: 'Playfair Display', serif;*/
    font-family: "PT Sans", sans-serif;
    color: var(--text-color);
    margin-bottom: 0.75em;
    font-weight: 700;
}

h1 {
    font-size: 3em;
    margin-bottom: 0.2em;
}

h2 {
    font-size: 2em;
    text-align: center;
    margin-top: 1em;
    margin-bottom: 1.5em;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

p {
    margin-bottom: 1.5em;
    font-weight: 300;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    margin-bottom: 0.75em;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover-color);
}

.section {
    padding: 80px 40px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.section img.bio{
    width: auto;
    height: 300px;
    float:  left;
    margin:  0 15px;
}

div.sm-box{
    display: block;
    position: relative;
    /*border: solid 1px red;*/
    overflow: hidden;
    padding-bottom: 30px;
}
div.sm-box::before {
    content: "";
    display: block;
    width: 100%;
    height: 200px;
    background: linear-gradient(to bottom, transparent, #fff);
    position: absolute;
    left: 0;
    bottom: 0;
}
div.sm-box.opened::before{
    display: none;
}
div.sm-box#bio-smb::before,
div.sm-box#med-smb::before{
    background: linear-gradient(to bottom, transparent, var(--secondary-bg));
}
div.sm-box#bio-smb{
    height: 540px;
}
div.sm-box#exh-smb{
    height: 540px;
}
div.sm-box#med-smb{
    height: 540px;
}
.opened div#bio-smb,
.opened div#exh-smb,
.opened div#med-smb
{
    height: auto;
    /*border: solid 1px blue;*/
}
.opened div#bio-smb::before,
.opened div#exh-smb::before,
.opened div#med-smb::before
{
    display: none;
}
.section.opened .cta-button b.open{
    display: none;
}
.section.opened .cta-button b.close {
    display: inline-block;
}




/*.section:nth-child(even) {
    background-color: var(--secondary-bg);
}*/

.section#bio, .section#media{
   background-color: var(--secondary-bg); 
}

/* --- Header --- */
header {
    position: relative;
    height: 30vh; /* Full viewport height */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white; /* Text color */
    background-image: url('sergeev1.jpg'); /* Optional: a subtle background image for the header */
    background-position: center top;
    background-size: cover;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3); /* Subtle dark overlay to make text readable */
    /*padding: 20px;*/
}

.artist-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid var(--accent-color);
    margin-bottom: 30px;
    object-fit: cover; /* Ensures image covers the area without distortion */
}

.header-text{
    /*margin-top: 120px;*/
    max-width: 1000px;
    width:90%;
    position: relative;
}
.header-text h1 {
    font-size: 4.5em;
    /*margin-bottom: 0.1em;*/
    margin-top: 1em;
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    text-align: left;
}

.header-text h2 {
    font-size: 1.5em;
    font-weight: 100;
    color: white;
    margin-top: 0;
    text-align: left;
}
.header-text h2::after{
    display: none;
}

span.video{
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    text-align: center;
}
span.video img{
    width:65%;
    height: auto;
}

/* --- Navigation Menu --- */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--secondary-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.menu {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.menu li {
    margin: 0;
}

.menu a {
    /*font-family: 'Montserrat', sans-serif;*/
    font-family: "Quicksand", sans-serif;
    font-size: 1em;
    font-weight: 400;
    color: var(--text-color);
    padding: 10px 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.menu a:hover {
    color: var(--link-hover-color);
}






.switches{
    display: flex;
    /*background-color: #ccc;*/
    /*height: 80px;*/
    width: 1000px;
    max-width: 1000px;
    margin: 80px auto 0;
    align-items: center;
    justify-content: center;
}
.switches .switch{
    display: block;
    width:  auto;
    height: 30px;
    /*background-color: #333;*/
    margin: 0 15px;
    cursor: pointer;
}

.switches .switch:before{
    content: "";
    display: inline-block;
    width: 32px; height: 32px;
    background-color: #fff;
    vertical-align: middle;
    margin-right: 7px;
    border-radius: 5px;
    border: solid #fff 2px;
    background-image: url('rc/img/icon1_1.png');
    background-repeat: no-repeat;
    background-size: 16px 16px; 
    background-position: center center;
}
.switches .switch.set:before{
    background-image: url('rc/img/icon2_1.png');
}
.switches .switch:hover:before{
    background-color: #ccc;
}
.switches .switch.selected:before{
    background-color: #eee;
}

.gallery-window {
    display: block;
    height: 540px;
    overflow: hidden;
    position: relative;
    margin-bottom: 30px;
}
section#gallery-int{
    padding-top: 40px;
}
#gallery-int.opened .gallery-window{
    height: auto;
}
#gallery-int.opened .gallery-window::before{
    display: none;
}
.gallery-window::before{
    content: "";
    display: block;
    width: 100%;
    height: 200px;
    background:  linear-gradient(to bottom, transparent, #fff);
    position: absolute;
    left: 0;
    bottom: 0;
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}


#gallery-full{
    /*width: 100%;
    max-width: 100%;*/
    max-width: 100%;
    /*padding: 80px 0;*/
    /*max-width: 1080px;*/
    padding-top: 40px;
}
#gallery-full .gallery-window{
    /*height: auto;*/
    height: 400px;
    position: relative;
    overflow: initial;
}
#gallery-full .gallery-window::before{
    display: none;
}
#gallery-full .gallery-window .set{
    display: flex;
    /*height: 600px;*/
}
#gallery-full .gallery-window .set-info{
    width: 20%;
    min-width: 300px;
    max-width: 300px;
    width: 300px;
    margin-right: 20px;
    text-align: right;
    /*display: none;*/
/*    position: absolute;
    left: -320px;
    top: 0;*/
}
.set-info h1{
    font-size: 18px;
}
.set-info h3{
    font-size: 16px;
    font-weight: normal;
}
#gallery-full .gallery-window .set .artworks-window{
    display: flex;
    overflow: hidden;
    position: relative;
}
#gallery-full .artworks-window .b-scroll.left,
#gallery-full .artworks-window .b-scroll.right{
    content: "<";
    display: block;
    width: 64px; height: 64px;
    background-color: #fff;
    border-radius: 100%;
    position: absolute; left: -3px;
    top: calc(50% - 32px);
    line-height: 64px;
    font-size: 35px;
    text-align: center;
    cursor: pointer;
    /*display: none;*/
    /*opacity: 0.66;*/
}
#gallery-full .artworks-window .b-scroll.right{
    content: ">";
    left: auto; right: -5px;
}
/*#gallery-full .gallery-window.left .set::after{
    display: block;
}
#gallery-full .gallery-window.right::after{
    display: block;
}
*/
#gallery-full .gallery-window .set .artworks{
    display: block;
    /*height: 800px;*/
    white-space: nowrap;
    position: relative;
    left: 0;
    transition: left 0.5s ease-in-out;
}
#gallery-full .gallery-window .set .artworks .artwork-item:first-child{
    /*margin-left: 0;*/
}
#gallery-full .gallery-window .set .artwork-item{
    display: inline-block;
    width: 232px;
    height: 403px;
    margin: 0 5px;
    position: relative;
}
#gallery-full .gallery-window .set .artwork-item .image-place{
    height: 272px;
}
#gallery-full .gallery-window .set .artwork-item .artwork-caption{
    /*height: 70px;*/
    display: block;
    white-space: normal;
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
}






.artwork-item {
    /*background-color: white;*/
    background-color: #f6f3ee;
    /*border: 1px solid var(--border-color);*/
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.artwork-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.artwork-item .image-place{
    margin: 10%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
}

.artwork-item img {
    display: block;
    width: 100%;
    height: auto;
/*    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;*/
}

.artwork-caption {
    /*padding: 15px;*/
    text-align: center;
    font-size: 0.9em;
    font-weight: 400;
    background-color: var(--primary-bg);
    color: var(--text-color);
    /*line-height: 0.2em;*/
    padding: 0 25px 15px 25px;
    text-align: right;
}
.artwork-caption p{
    margin: 0;
    padding: 0;
    font-size: 12px;
}

.cta-button {
    display: block;
    /*margin: 30px auto 0;*/
    padding: 12px 25px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    font-size: 1em;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 5px;
    width: 160px;
    position: absolute;
    /*top:  600px;*/
    left: calc(50% - 80px);
}
.cta-button b{
    font-weight: normal;
}
.cta-button .open{
    display: inline-block;
}
.cta-button .close{
    display: none;
}

.cta-button:hover {
    background-color: var(--link-hover-color);
}
/*.cta-button.cacher{
    display: none;
    top: auto;
    bottom: 58px;
}*/
.cta-buttons{
    text-align: center;
}
.cta-buttons .cta-button{
    display: inline-block;
    position: relative;
    left: auto;
    right:  auto;
    margin:  0 5px;
}
.cta-buttons .cta-button.close{
    display: none;
}
.opening .cta-buttons .cta-button.close{
    display: inline-block;
}
.opened .cta-buttons .cta-button.open{
    display: none;
}
.opened .cta-buttons .cta-button.close{
    display: inline-block;
}


/* Hidden artworks */
.artwork-item.hidden {
    display: none;
}

/* --- Exhibitions & Media --- */
#exhibitions ul,
#media ul {
    padding-left: 20px; /* For bullet points, or remove if you want no indentation */
}

#exhibitions li strong,
#media li a {
    font-weight: 400;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 30px 20px;
    /*background-color: var(--text-color);*/
    background-color: var(--secondary-bg);
    /*color: var(--primary-bg);*/
    color: var(--text-color);
    font-size: 0.9em;
    font-weight: 300;
    margin-top: 50px;
}

footer p {
    margin: 0;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    h1 {
        font-size: 3em;
    }
    .header-text h2 {
        font-size: 1.5em;
    }
    .artist-image {
        width: 150px;
        height: 150px;
    }
    .menu {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 20px;
    }
    .menu li {
        margin: 5px 10px;
    }
    .section {
        padding: 60px 20px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    .artwork-item img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5em;
    }
    .header-text h2 {
        font-size: 1.2em;
    }
    .artist-image {
        width: 120px;
        height: 120px;
    }
    .menu a {
        font-size: 0.9em;
    }
    .gallery-grid {
        grid-template-columns: 1fr; /* Stack artworks on very small screens */
    }
    .artwork-item img {
        height: 250px;
    }
    .cta-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}
