/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #ffffff;
    --secondary-bg: #f7f7f8;
    --text-primary: #2d2d2d;
    --text-secondary: #6b6b6b;
    --text-light: #8e8e8e;
    --border-color: #e5e5e5;
    --hover-bg: #f0f0f0;
    --accent: #2d2d2d;
    --max-width: 1200px;
    --nav-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--primary-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background: var(--primary-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    height: var(--nav-height);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-icon {
    height: 32px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 180px;
    margin-top: 4px;
    padding: 4px;
    list-style: none;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Hero Section */
.hero {
    padding: 120px 24px 80px;
    text-align: center;
    background: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)), 
                url('data/thumbs/paintings/where_is_the_truth_pogrebinsky_painting_thumb.jpg') center/cover no-repeat;
    background-attachment: fixed;
    position: relative;
    min-height: 500px;
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 400;
}

.hero-description {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--primary-bg);
}

.btn-primary:hover {
    background: var(--text-secondary);
}

.btn-secondary {
    background: var(--secondary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--hover-bg);
}

.btn-text {
    color: var(--text-secondary);
    padding: 8px 0;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: color 0.2s ease;
}

.btn-text:hover {
    color: var(--text-primary);
}

/* Sections */
.featured, .about-preview {
    padding: 80px 24px;
}

.featured {
    background: var(--secondary-bg);
}

.featured h2, .about-preview h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 48px;
    text-align: center;
    letter-spacing: -0.02em;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.gallery-item {
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.gallery-item:hover {
    border-color: var(--text-light);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.gallery-item-info {
    padding: 16px;
}

.gallery-item-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.gallery-item-meta {
    font-size: 13px;
    color: var(--text-light);
}

/* About Preview */
.about-content {
    max-width: 720px;
    margin: 0 auto;
}

.about-content h2 {
    text-align: left;
    margin-bottom: 24px;
}

.about-content p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Page Header */
.page-header {
    text-align: center;
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Page Content */
.page-content {
    padding: 60px 24px;
}

/* Biography Styles */
.bio-section {
    max-width: 800px;
    margin: 0 auto 48px;
}

.bio-photo {
    text-align: center;
    margin-bottom: 40px;
}

.bio-photo img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.bio-section h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.bio-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--text-secondary);
}

.bio-section p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.bio-section ul {
    list-style-position: inside;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.bio-section li {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 8px;
}

/* News Styles */
.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    padding: 32px 0;
    border-bottom: 1px solid var(--border-color);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.news-item h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.news-item p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Contact Styles */
.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    margin-bottom: 32px;
}

.contact-info h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.contact-info a {
    color: var(--text-primary);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    padding: 0;
    overflow: hidden;
    align-items: stretch;
    justify-content: flex-start;
}

.modal.active {
    display: flex;
}

.modal-sidebar {
    width: 190px;
    background: rgba(20, 20, 20, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    transition: all 0.3s ease;
}

.modal-sidebar.collapsed {
    width: 0 !important;
    padding: 0;
    overflow: hidden;
    border: none;
}

/* Custom Scrollbar for Sidebar */
.modal-sidebar::-webkit-scrollbar {
    width: 8px;
}

.modal-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

.modal-sidebar::-webkit-scrollbar-thumb {
    background: rgba(100, 100, 100, 0.8);
    border-radius: 4px;
}

.modal-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(130, 130, 130, 0.9);
}

/* Firefox Scrollbar */
.modal-sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 100, 100, 0.8) rgba(0, 0, 0, 0.5);
}

.modal-sidebar-header {
    position: sticky;
    top: 0;
    background: rgba(20, 20, 20, 0.98);
    padding: 20px 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.modal-logo {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #D4AF37;
    text-align: center;
    margin-bottom: 12px;
}

.modal-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #D4AF37, transparent);
    margin-bottom: 16px;
}

.modal-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-thumb-size {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.thumb-size-btn {
    background: rgba(60, 60, 60, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.thumb-size-btn:hover {
    background: rgba(80, 80, 80, 0.9);
    color: rgba(255, 255, 255, 0.9);
}

.thumb-size-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: rgba(20, 20, 20, 1);
    border-color: rgba(255, 255, 255, 0.9);
}

.year-filter {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(180, 180, 180, 0.9);
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.year-filter:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: #D4AF37;
}

.year-filter:focus {
    outline: none;
    border-color: #D4AF37;
    color: #D4AF37;
}

.year-filter option {
    background: rgba(0, 0, 0, 0.95);
    color: rgba(180, 180, 180, 0.9);
}

.year-filter option:hover {
    background: rgba(40, 40, 40, 1);
    color: #D4AF37;
}

.modal-sidebar-toggle {
    position: fixed;
    left: 0;
    top: 20px;
    transform: none;
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    width: 36px;
    height: 50px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
    padding: 0;
}

.modal-sidebar-toggle.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-sidebar-toggle:hover {
    background: rgba(60, 60, 60, 1);
    color: rgba(255, 255, 255, 1);
    border-color: #D4AF37;
}

.toggle-icon {
    line-height: 1;
}

.modal-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.modal-thumbnails[data-size="small"] .modal-thumb img {
    width: 150px;
    height: auto;
    object-fit: cover;
}

.modal-thumbnails[data-size="medium"] .modal-thumb img {
    width: 200px;
    height: auto;
    object-fit: cover;
}

.modal-thumbnails[data-size="large"] .modal-thumb img {
    width: 250px;
    height: auto;
    object-fit: cover;
}

.modal-thumb {
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: rgba(40, 40, 40, 0.5);
}

.modal-thumb:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(50, 50, 50, 0.7);
}

.modal-thumb.active {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(60, 60, 60, 0.9);
}

.modal-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-thumb-title {
    padding: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    line-height: 1.3;
}

.modal-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: auto;
}

.modal-content {
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-image-wrapper {
    position: relative;
    display: inline-block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.modal-image {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 4px;
    pointer-events: none;
}

.modal-watermark {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    pointer-events: none;
    user-select: none;
    backdrop-filter: blur(4px);
}

.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(45, 45, 45, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2001;
}

.modal-close:hover {
    background: rgba(45, 45, 45, 1);
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(45, 45, 45, 0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 2001;
    font-weight: 300;
    line-height: 1;
}

.modal-nav:hover {
    background: rgba(45, 45, 45, 1);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.modal-image {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 4px;
}

.modal-caption {
    margin-top: 20px;
    text-align: center;
    color: var(--primary-bg);
}

.modal-title-year {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-copyright {
    font-size: 13px;
    opacity: 0.7;
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    border-top: 1px solid var(--border-color);
    padding: 32px 24px;
    text-align: center;
}

.footer p {
    font-size: 14px;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-sidebar {
        display: none;
    }
    
    .modal-sidebar-toggle {
        display: none;
    }
    
    .modal-main {
        padding: 20px;
    }
    
    .modal-nav {
        position: fixed;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--primary-bg);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 12px;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        border: none;
        margin-top: 4px;
        padding-left: 16px;
    }

    .dropdown:hover .dropdown-menu {
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-description {
        font-size: 15px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .featured h2, .about-preview h2 {
        font-size: 28px;
    }

    .modal-content {
        margin: 20px;
        padding: 0;
    }

    .modal-image {
        max-height: 70vh;
        border-radius: 4px;
    }
    
    .modal-watermark {
        bottom: 10px;
        right: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }

    .modal-caption {
        margin-top: 16px;
    }

    .modal-title-year {
        font-size: 14px;
    }

    .modal-copyright {
        font-size: 12px;
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 20px;
        top: 16px;
        right: 16px;
    }

    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .modal-prev {
        left: 12px;
    }

    .modal-next {
        right: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .hero {
        padding: 80px 16px 60px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .featured, .about-preview, .page-content {
        padding: 60px 16px;
    }

    .page-header {
    }

    .page-header h1 {
        font-size: 28px;
    }
}
