
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #517293;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --background-color: #f9f9f9;
    --card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    margin: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.schedule {
    font-size: 0.8rem;
    font-style: italic;
    margin: 2em 0;
}

.noselect {
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                supported by Chrome, Edge, Opera and Firefox */
}

.artwork-year {
    display: none!important;
}



.nav-btn:hover {
    color: white!important;
}

.artists-grid {
    display: none!important;
}
.artist-detail .back-btn {
    display: none!important;
}

html {
    scroll-padding-top: 80px; 
}

.map-toggle-btn {
    display: none;
}

.ZZdetail-location {
    display: none!important;
}

.artwork-detail .artworks-section {
    display: none;
}

.artwork-type {
    display: none!important;
}

header {
    padding: 0 1rem!important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.museum-title {
    font-weight: 300;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    padding-top: 0;
    transition: var(--transition);
}

.nav-btn:hover {
    color: var(--secondary-color);
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.25rem;
}

.lang-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: var(--transition);
    opacity: 0.6;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    opacity: 0.9;
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

.flag-icon {
    font-size: 1.4rem;
    display: block;
    line-height: 1;
}

.menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: var(--primary-color);
    z-index: 1000;
    transition: 0.4s;
    padding: 20px;
    color: white;
    overflow-y: auto;
}

.menu.active {
    left: 0;
}

.menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.menu-header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

.menu-options a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-options a:hover {
    color: var(--secondary-color);
}

.search-container {
    position: relative;
    margin: 20px 0;
}

#search-input {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.filter-container {
    margin: 20px 0;
}

.filter-title {
    margin-bottom: 10px;
    font-weight: bold;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-option {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-option.active {
    background: var(--secondary-color);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.artist-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.artist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.artist-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.artist-info {
    padding: 1rem;
}

.artist-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.artist-dates {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.artist-detail {
    display: none;
    padding: 1.5rem;
    background-color: white;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.detail-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.detail-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.detail-info {
    flex: 1;
    min-width: 250px;
}

.detail-name {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.detail-dates {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.detail-places {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1rem;
}

.detail-bio {
    line-height: 1.8;
    /*margin-bottom: 1.5rem;*/
}

.back-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    margin-bottom: 1rem;
}

.artworks-section {
    margin-top: 2rem;
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.artworks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.artwork-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
}

.artwork-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.artwork-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.artwork-img[alt="Confidente"],
.artwork-img[alt="Femeie citind"],
.artwork-img[alt="Femeie in interior"],
.artwork-img[alt="Privind in oglinda"],
.artwork-img[alt="Interior"],
.artwork-img[alt="In rochie vernil pe fotoliu rosu"],
.artwork-img[alt="Pe ganduri"],
.artwork-img[alt="Portretul Berthei Bovy"],
.artwork-img[alt="Femeie in interior – Place Dauphine"],
.artwork-img[alt="Nud in interior"],
.artwork-img[alt="Nud in atelier"],
.artwork-img[alt="Nud cu sal alb"],
.artwork-img[alt="Nud in fotoliu albastru"],
.artwork-img[alt="Nud pe fotoliu verde"] {
    object-position: center top;
}

.artwork-info {
    padding: 1rem;
}

.artwork-title {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--dark-color);
}

.artwork-year {
    font-size: 0.9rem;
    color: #666;
}

.artwork-type {
    font-size: 0.8rem;
    background-color: var(--accent-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
    margin-top: 0.5rem;
}

.artwork-detail {
    display: none;
    padding: 1.5rem;
    background-color: white;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.artwork-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-img:hover {
    transform: scale(1.03);
}

.artwork-description {
    margin-top: 1.5rem;
    line-height: 1.8;
}

.detail-bio p,
.artwork-description p {
    margin-bottom: clamp(17px, 0.9vw, 20px);
}

/* Force sup elements and their parent links/spans to inherit color from content */
.artwork-description sup,
.detail-bio sup,
.artwork-description a sup,
.detail-bio a sup,
.artwork-description span a sup,
.detail-bio span a sup {
    color: inherit !important;
    font-weight: 600;
}

/* Force links containing sup to inherit color */
.artwork-description a:has(sup),
.detail-bio a:has(sup) {
    color: inherit !important;
    text-decoration: none;
}

/* Force spans with inline styles containing sup links */
.artwork-description span[style*="color"],
.detail-bio span[style*="color"],
.artwork-description span[style*="font-family"],
.detail-bio span[style*="font-family"] {
    color: inherit !important;
}

/* Force footnote elements to inherit color */
.artwork-description .sdfootnote-western,
.detail-bio .sdfootnote-western,
.artwork-description .sdfootnotesym,
.detail-bio .sdfootnotesym,
.artwork-description .sdfootnoteanc,
.detail-bio .sdfootnoteanc {
    color: inherit !important;
}

.artwork-metadata {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-gap: 1rem;
}

.metadata-item {
    background-color: var(--light-color);
    padding: 0.8rem;
    border-radius: 4px;
}

.metadata-label {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--dark-color);
    margin-bottom: 0.3rem;
}

.metadata-value {
    font-size: 0.9rem;
}

.museum-map {
    margin-top: 2rem;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.map-container {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1rem;
}

.map-area {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.map-area:hover {
    border-color: var(--secondary-color);
    background-color: rgba(231, 76, 60, 0.2);
}

.map-area.active {
    border-color: var(--secondary-color);
    background-color: rgba(231, 76, 60, 0.3);
}

.map-tooltip {
    position: absolute;
    background-color: var(--dark-color);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 10;
    white-space: nowrap;
    display: none;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    transition: var(--transition);
}

.lightbox-btn:hover {
    color: var(--secondary-color);
}

.qr-explanation {
    display: none!important;
    text-align: center;
    margin: 2rem 0;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.qr-code {
    max-width: 200px;
    margin: 0 auto;
    display: block;
}

@media (max-width: 768px) {
    .detail-header {
        flex-direction: column;
    }

    .detail-img {
        margin-right: 0;
        margin-bottom: 1rem;
        max-width: 100%;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* read more detail bio */
.detail-bio {
    position: relative;
    max-height: 150px; /* înălțime inițială */
    overflow: hidden;
    transition: max-height 0.5s ease;
}

/* Fade effect la finalul textului */
.detail-bio::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3em;
    width: 100%;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
}

/* Clasa activă pentru a arăta tot textul */
.detail-bio.expanded {
    max-height: none; /* sau auto cu JS dacă vrei dinamic */
}

.detail-bio.expanded::after {
    display: none;
}

.read-more-toggle {
    cursor: pointer;
    color: var(--primary-color);
    font-weight: bold;
    /*margin-top: 10px;*/
    display: inline-block;
    text-decoration: underline;
}