/*
Theme Name: ISSO - Mezinárodní serigrafické sympozium Ostrava
Description: Šablona pro ISSO s custom post types pro autory, díla a ročníky
Version: 1.0
Author: ISSO Team
*/

/* Reset a základní styly */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

p {
    margin-bottom: 1.2rem;
}

/* Centrální hover efekt - JEDINÉ MÍSTO PRO ÚPRAVU */
a, .year-item, .timeline-item, .artwork-card, .author-item {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

a:hover, .year-item:hover, .timeline-item:hover, .artwork-card:hover, .author-item:hover,
a.active, .year-item.active, .timeline-item.active, .artwork-card.active, .author-item.active {
    color: #000;
    text-shadow: 0.8px 0 0 currentColor;
}

/* Specifické padding pro různé elementy */
a {
    padding: 2px 4px;
    margin: -2px -4px;
    border-radius: 3px;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    pointer-events: none;
}

a:hover::after,
a:focus-visible::after {
    transform: scaleX(1);
}

.nav a::after {
    content: none;
}

hr {
    color: #1d1d1b;
    margin-left: -50px;
    margin-right: -50px;
}

.footer {
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.timeline-item {
    padding: 8px 15px;
    margin: 0;
}

.nav a {
    font-weight: 500;
    padding: 8px 12px;
    margin: -8px -12px;
    border-radius: 4px;
}

.year-item {
    /*padding: 5px 10px;*/
    border-radius: 4px;
}

.timeline-item {
    white-space: nowrap;
    padding: 8px 15px;
    background: #f5f5f5;
    border-radius: 20px;
}

/* Grid systém */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

body.full-width-enabled {
    overflow-x: hidden;
}

body.full-width-enabled .container {
    width: 100vw;
    max-width: 100vw;
    padding-left: 40px;
    padding-right: 40px;
}

@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
    }

    body.full-width-enabled .container {
        width: 100%;
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    hr {
        margin-left: 0;
        margin-right: 0;
    }
}


.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* Header */
.header {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    transition: none;
    padding-top: 25px;
    padding-bottom: 10px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: none;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #000;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
    position: relative;
    padding-bottom: 14px;
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.nav li {
    margin: 0;
    padding: 0;
    white-space: nowrap;
    list-style: none;
}

.nav li::marker {
    content: '';
}

.nav a {
    font-weight: 500;
    padding: 8px 12px;
    margin: -8px -12px;
    border-radius: 4px;
    text-transform: lowercase;
}

.nav .current-menu-item > a,
.nav .current-menu-ancestor > a,
.nav .current_page_item > a,
.nav .current_page_ancestor > a {
    font-weight: 600;
    text-shadow: 0.8px 0 0 currentColor;
}

.nav-underline {
    position: absolute;
    left: 0;
    bottom: -17px;
    height: 2px;
    background: #000;
    width: 0;
    transform: translateX(0);
    transition: transform 0.28s ease, width 0.28s ease;
    pointer-events: none;
}

.search-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

body.search-modal-open {
    overflow: hidden;
}

.search-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1200;
}

.search-modal.is-open {
    display: flex;
}

.search-modal__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 0, 0, 0.06), transparent 50%),
        radial-gradient(circle at 80% 10%, rgba(0, 0, 0, 0.05), transparent 45%),
        rgba(248, 248, 248, 0.96);
    backdrop-filter: blur(6px);
}

.search-modal__panel {
    position: relative;
    z-index: 1;
    width: min(720px, 90vw);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 55px 34px 55px;
    border-radius: 0px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.16);
    transform: translateY(12px) scale(0.98);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.search-modal.is-open .search-modal__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.search-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.search-modal__close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #000;
}

.search-modal__content .search-form,
.search-modal form,
.search-modal .ais-SearchBox-form {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.search-modal__content {
    display: inline-flex;
    width: 100%;
}

.search-modal__content .search-form label,
.search-modal form label {
    flex: 1;
    margin: 0;
}

.search-modal__content .search-field {
    flex: 1;
    font-size: 1.1rem;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    outline: none;
    background: #f8f8f8;
    transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-modal__content .search-field:focus {
    border-color: #000;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.search-modal input[type="search"],
.search-modal input[type="text"],
.search-modal .ais-SearchBox-input,
.search-modal .aa-input {
    width: 100%;
    font-size: 1.1rem;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    outline: none;
    background: #f8f8f8;
    transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-modal input[type="search"]:focus,
.search-modal input[type="text"]:focus,
.search-modal .ais-SearchBox-input:focus,
.search-modal .aa-input:focus {
    border-color: #000;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.search-modal .ais-SearchBox-form,
.search-modal .aa-input-container,
.search-modal .algolia-autocomplete {
    width: 100%;
}

.search-modal__content .search-submit {
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-indent: -9999px;
    overflow: hidden;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.search-modal #searchsubmit {
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    border-radius: 2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-indent: -9999px;
    overflow: hidden;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.search-modal #searchsubmit:hover {
    background: #000;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
}

.search-modal #s {
    width: 100%;
    font-size: 1.1rem;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    outline: none;
    background: #f8f8f8;
    transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-modal #s:focus {
    border-color: #000;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.search-modal__content .search-submit:hover {
    background: #000;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
}

.search-modal form input[type="search"],
.search-modal form input[type="text"],
.search-modal form .search-field,
.search-modal #s {
    flex: 1;
}

.search-modal form.searchform > div {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.search-modal .aa-dropdown-menu,
.search-modal .algolia-autocomplete {
    z-index: 2;
}

.search-modal .aa-dropdown-menu {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    font-size: 1.05rem;
    padding: 6px 0;
}

.search-modal .aa-suggestion {
    padding: 14px 18px;
    line-height: 1.5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-modal .aa-suggestion:last-child {
    border-bottom: none;
}

@media (max-width: 900px) {
    .search-modal__panel {
        width: min(92vw, 620px);
        padding: 28px 24px 30px;
    }
}

@media (max-width: 600px) {
    .search-modal__content .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    .search-modal__panel {
        border-radius: 14px;
        padding: 24px 20px 26px;
    }
}

.autocomplete-footer {
    display: none !important;
}

/* Rok filter */
.year-filter {
    padding: 0px 0;
    border-bottom: 1px solid #eee;
}

.year-filter .container {
    position: relative;
}

.year-list {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: space-between;
    position: relative;
    padding-bottom: 20px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    padding-right: 0;
    -webkit-overflow-scrolling: touch;
    align-items: center;
}

.year-list::-webkit-scrollbar {
    display: none;
}

.year-underline {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    background: #000;
    width: 0;
    transform: translateX(0);
    transition: transform 0.28s ease, width 0.28s ease;
    pointer-events: none;
}

.year-item {
    flex: 0 0 auto;
}

.year-filter .container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}


/* Odkaz na detail ročníku */
.year-detail-link {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.year-detail-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #007cba;
    color: #fff;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.year-detail-btn:hover {
    background: #005a87;
    color: #fff;
}

/* CSS Galerie pro díla - Masonry layout */
.gallery {
    column-count: 3;
    column-gap: 30px;
    padding: 50px 0;
}

.gallery.is-filtering {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
}

.gallery-loading {
    opacity: 0;
}

.gallery-ready {
    opacity: 1;
    transition: opacity 0.15s ease;
}

.gallery.is-loading {
    opacity: 0.6;
}

.gallery-controls {
    text-align: center;
    padding-bottom: 50px;
}

.gallery-sentinel {
    width: 100%;
    height: 1px;
}

.gallery-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border: 1px solid #007cba;
    background: #007cba;
    color: #fff;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gallery-load-more:hover {
    background: #005a87;
    box-shadow: 0 10px 25px rgba(0, 92, 135, 0.25);
    transform: translateY(-1px);
}

.gallery-load-more:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.gallery-empty {
    text-align: center;
    color: #666;
    padding: 30px 0 60px;
    column-span: all;
    width: 100%;
}

body.full-width-enabled .gallery {
    column-count: 4;
}

@media (min-width: 1600px) {
    body.full-width-enabled .gallery {
        column-count: 5;
    }
}


/* Fallback pro prohlížeče bez podpory columns */
@supports not (column-count: 3) {
    .gallery {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 20px 0;
        align-items: start;
    }
    body.full-width-enabled .gallery {
        grid-template-columns: repeat(4, 1fr);
    }

    @media (min-width: 1600px) {
        body.full-width-enabled .gallery {
            grid-template-columns: repeat(5, 1fr);
        }
    }

    
    @media (max-width: 768px) {
        .gallery {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    
    @media (max-width: 480px) {
        .gallery {
            grid-template-columns: 1fr;
        }
    }
}

.artwork-card {
    break-inside: avoid;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0;
    margin-bottom: 35px;
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 0.2s ease, transform 0.2s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.artwork-card.is-hidden {
    opacity: 0;
    transform: translateY(38px);
    pointer-events: none;
}

.artwork-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    animation: artworkRise 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--artwork-delay, 0ms) both;
}

.artwork-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.artwork-card a {
    display: block;
    flex: 1;
    text-decoration: none;
}

.artwork-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.artwork-info {
    padding: 10px 0;
    font-size: 1.1rem;
    color: #333;
    line-height: 1.4;
    position: relative;
}

.artwork-info::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #333;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.artwork-card:hover .artwork-info::after {
    transform: scaleX(1);
}

/* Karty autorů */
.author-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.author-card:hover {
    transform: translateY(-5px);
}

.author-photo {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.author-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.author-nationality {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.author-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
    max-width: 520px;
    width: 100%;
    margin-bottom: 20px;
}

/* Seznam autorů */
.authors-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px 0;
    margin-top: 20vh;
}

.author-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    transition: background 0.3s;
    text-decoration: none;
    color: inherit;
    padding-left: 4px;
}

.author-item::after {
    content: none;
}

.author-item:hover {
    /*background: #f5f5f5;*/
}

.author-item-name {
    font-weight: 500;
    position: relative;
    display: inline-block;
    transition: text-shadow 0.3s ease;
}

.author-item:hover,
.author-item.active {
    text-shadow: none;
}

.author-item:hover .author-item-name,
.author-item.active .author-item-name {
    text-shadow: 0.8px 0 0 currentColor;
}

.author-item-nationality {
    margin-left: 25px;
    color: #666;
    font-size: 0.9rem;
}

.author-item-name::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: #333;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.author-item:hover .author-item-name::after {
    transform: scaleX(1);
}

/* Karty ročníků */
.year-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    color: inherit;
}

.year-card:hover {
    transform: translateY(-5px);
}

.year-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.year-info {
    padding: 20px;
    text-align: center;
}

.year-number {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Stránka O projektu */
.about-section {
    margin: 40px 0;
}

.about-content {
    max-width: 800px;
    margin-bottom: 40px;
}

.about-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.project-authors {
    margin: 40px 0;
}

.full-width-enabled .page-about .project-authors,
.full-width-enabled .page-about .catalogs-section {
    max-width: 1400px;
    margin-left: 0px;
    margin-right: auto;
    /*padding-left: 20px;
    padding-right: 20px;*/
}

.project-authors-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.catalogs-section {
    margin: 40px 0;
}

.catalogs-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.catalog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    color: inherit;
}

.catalog-card:hover {
    transform: translateY(-5px);
}

.catalog-cover {
    height: 200px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog-cover.isso {
    background: linear-gradient(45deg, #f093fb 0%, #f5576c 100%);
}

.catalog-cover.isso-text {
    color: rgba(255,255,255,0.8);
    font-size: 2rem;
    font-weight: bold;
}

.catalog-years {
    position: absolute;
    bottom: 10px;
    right: 10px;
    color: rgba(255,255,255,0.9);
    font-size: 0.8rem;
}

.catalog-info {
    padding: 15px;
    text-align: center;
}

/* Detail díla */
.artwork-detail {
    max-width: 800px;
    margin: 40px auto;
    opacity: 0;
    transform: translateY(38px);
    animation: artworkFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes artworkFadeIn {
    from {
        opacity: 0;
        transform: translateY(38px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes artworkRise {
    from {
        opacity: 0;
        transform: translateY(38px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.artwork-detail-image-container {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
}

.artwork-detail-media {
    position: relative;
    display: inline-block;
    max-width: 100%;
    padding-right: 40px;
    align-self: center;
}

.container-detail {
    text-align: center;
}

.artwork-detail-image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
}

.artwork-detail-info {
    /*background: #f9f9f9;*/
    padding: 0;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
    width: 480px;
    max-width: 100%;
}

.artwork-detail-title {
    font-size: 1.8rem;
    /*margin-bottom: 15px;*/
}

.artwork-detail-author {
    font-size: 1.2rem;
    color: #666;
   /* margin-bottom: 10px;*/
}

.artwork-detail-year {
    color: #999;
    margin-bottom: 20px;
}

.artwork-detail-author a,
.artwork-detail-year a {
    position: relative;
    display: inline-block;
    color: inherit;
    text-decoration: none;
}

.artwork-detail-author a::after,
.artwork-detail-year a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 3px;
    width: 100%;
    height: 1px;
    background-color: #000;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.artwork-detail-author a:hover::after,
.artwork-detail-year a:hover::after {
    transform: scaleX(1);
}

.artwork-detail-description {
    line-height: 1.6;
    margin-bottom: 20px;
}

.artwork-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.artwork-link {
    padding: 8px 15px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.artwork-link:hover {
    background: #555;
}

.artwork-zoom-toggle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.9);
    color: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    z-index: 2;
}

.artwork-zoom-toggle:hover {
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    transform: translateY(-1px);
}

.artwork-zoom-toggle:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.artwork-zoom-icon {
    width: 14px;
    height: 14px;
    display: block;
}

body.artwork-lightbox-open {
    overflow: hidden;
}

.artwork-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1300;
}

.artwork-lightbox.is-open {
    display: flex;
}

.artwork-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
}

.artwork-lightbox__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    pointer-events: none;
}

.artwork-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    pointer-events: auto;
}

.artwork-lightbox__close:hover {
    background: rgba(255,255,255,0.24);
    transform: translateY(-1px);
}

.artwork-lightbox__image-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto;
    overscroll-behavior: contain;
    pointer-events: auto;
}

.artwork-lightbox.is-center-vertical .artwork-lightbox__image-wrap {
    align-items: center;
}

.artwork-lightbox.is-zoomed .artwork-lightbox__image-wrap {
    align-items: flex-start;
    justify-content: flex-start;
    cursor: grab;
}

.artwork-lightbox.is-panning .artwork-lightbox__image-wrap {
    cursor: grabbing;
}

.artwork-lightbox__image {
    width: auto;
    height: auto;
    display: block;
    max-width: none;
    max-height: none;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
}

.artwork-lightbox.is-zoomed .artwork-lightbox__image {
    cursor: grab;
}

.artwork-lightbox.is-panning .artwork-lightbox__image {
    cursor: grabbing;
}

/* Oblíbené díla */
.favorite-star {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.favorite-star:hover {
    background: #fff;
    transform: scale(1.1);
}

.favorite-star.active {
    color: #ffd700;
}

/* Časová osa */
.timeline-section {
    margin: 30px 0;
}

.timeline {
    position: relative;
    height: 40px;
    margin: 20px 0;
    border-bottom: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    display: block;
    background: transparent;
    clear: both;
}

.timeline-item {
    position: absolute;
    bottom: 0;
   /* transform: translateX(-50%);*/
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 3px;
    background: transparent;
    border: none;
    color: #333;
    box-sizing: border-box;
    display: inline-block;
    line-height: 1.2;
    vertical-align: baseline;
}

/* Ročníky nejsou v kartách - jen text */
.timeline-item:not([data-year=""]) {
    background: transparent;
    border: none;
    padding: 5px 10px;
    padding-left: 0px;
    border-radius: 3px;
}

.timeline-item:hover {
    /*transform: translateX(-50%) translateY(-2px);*/
}

.timeline-item.active {
   /* transform: translateX(-50%) translateY(-2px);*/
}

/* Hover efekt pro ročníky (ne "vše") */
.timeline-item:not([data-year=""]):hover {
    background: transparent;
    border: none;
    color: #000;
}

.timeline-item:not([data-year=""]).active {
    background: transparent;
    border: none;
    color: #000;
}

/* "Vše" je úplně vpravo */
.timeline-item[data-year=""] {
    right: 0;
    left: auto !important;
    transform: translateX(0);
}

.timeline-item[data-year=""]:hover {
    /*transform: translateX(0) translateY(-2px);*/
}

.timeline-item[data-year=""].active {
   /* transform: translateX(0) translateY(-2px);*/
}


/* Stránky */
.page-content {
    padding: 40px 0;
    flex: 1;
}

/* Homepage */
.homepage { padding: 0; flex: 1; }

.hero-video {
    position: relative;
    height: 100vh;
    overflow: hidden;
}
.hero-video-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #333;
}

.about-section { padding: 60px 0; }
.about-half { width: 50%; }
@media (max-width: 1024px) { .about-half { width: 65%; } }
@media (max-width: 768px) { .about-half { width: 100%; } }
.about-title { font-size: 1.5rem; margin-bottom: 16px; }
.about-text p { margin-bottom: 16px; }
.about-more { display: inline-block; }

/* Carousel years */
.years-carousel-section { padding: 60px 0; }
.years-carousel { position: relative; padding-bottom: 48px; }
.carousel-viewport { overflow: hidden; touch-action: pan-y; }
.carousel-track { display: flex; gap: 28px; will-change: transform; transition: transform .4s ease; }

/* One slide width calculation: show 3.3 on FHD (approx) */
.year-slide { flex: 0 0 calc((100% - 28px*3)/3.3); text-decoration: none; color: inherit; filter: grayscale(100%); transition: filter .3s ease; }
.year-slide:hover { filter: grayscale(0%); }

.a4-portrait { position: relative; width: 100%; aspect-ratio: 210/265; background: #f4f4f4; overflow: hidden; }
.a4-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.year-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #999; }

.year-title { 
    margin-top: 10px; 
    padding-bottom: 4px; 
    border-bottom: 1px solid transparent; 
    display: block; 
    position: relative;
    transition: text-shadow 0.3s ease;
}
.year-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}
.year-slide:hover .year-title::after { 
    width: 100%; 
}

.year-slide:hover .year-title {
    text-shadow: 0.8px 0 0 currentColor;
}

.carousel-arrow { 
    position: absolute; 
    top: auto;
    bottom: 0;
    transform: none; 
    background: none; 
    border: none; 
    width: 44px; 
    height: 44px; 
    cursor: pointer; 
    z-index: 2; 
    color: #333;
    font-size: 32px;
    font-weight: bold;
}
.carousel-arrow.prev { right: 52px; left: auto; }
.carousel-arrow.next { right: 0; }

@media (max-width: 1200px) {
    .year-slide { flex-basis: calc((100% - 28px*2)/2.4); }
}
@media (max-width: 768px) {
    .year-slide { flex-basis: calc(100%/1.4 - 20px); }
}

/* Kontakt a partneři */
.contact-section { padding: 80px 0 40px; }
.contact-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
}
.partners-section { padding: 40px 0 80px; }
.partners-logos { 
    list-style: none; 
    display: flex; 
    gap: 90px; 
    align-items: center; 
    justify-content: flex-start; 
    max-width: 50%;
}
.partners-logos li { 
    color: #333; 
    opacity: .9; 
}

.partners-logos li img {
    opacity: 1;
}
.partners-logos img {
    max-width: 100%;
    height: auto;
    max-height: 30px;
    object-fit: contain;
}

@media (max-width: 1024px) {
    .partners-logos {
        max-width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 48px;
        margin-left: auto;
        margin-right: auto;
    }

    .partners-logos li {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .partners-logos img {
        height: 32px;
        width: auto;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .partners-logos {
        gap: 28px;
    }

    .partners-logos img {
        height: 28px;
    }
}

/* Utility */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.spacer-20 { height: 20vh; }
.spacer-10 { height: 10vh; }

/* O projektu page */
.page-about { flex: 1; }
.page-about .page-title { text-transform: lowercase; }
.about-on-half { padding-top: 5px; padding-bottom: 60px; }
.authors-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }

@media (max-width: 1200px) {
    .authors-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .authors-grid-3 { grid-template-columns: 1fr; }
}
.project-author-card .a4-portrait { margin-bottom: 12px; background: #f4f4f4; }
.project-author-card .a4-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-author-card .author-name { font-weight: 600; margin-bottom: 8px; }
.project-author-card .author-description { color: #333; }

.page-title {
    font-size: 2rem;
    margin-bottom: 30px;
    margin-top: 20vh;
}

/* Kontakt */
.contact-info {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-item {
    margin-bottom: 20px;
}

.contact-label {
    font-weight: 600;
    margin-bottom: 5px;
}
.footer {
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0;
    }
    
    .logo img {
        height: 32px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .authors-list {
        grid-template-columns: 1fr;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Chybějící komponenty */
.letter-group {
    margin-bottom: 30px;
}

.letter-heading {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.author-photo-placeholder {
    width: 100%;
    max-width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
}

.artwork-image-placeholder {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.9rem;
    border-radius: 4px;
}

.year-placeholder {
    color: rgba(255,255,255,0.9);
    font-size: 1.5rem;
    font-weight: bold;
}

.catalog-download {
    display: inline-block;
    padding: 12px 24px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s;
    margin: 20px 0;
}

.catalog-download:hover {
    background: #555;
    color: #fff;
}

.author-header {
    margin-bottom: 65px;
}

.author-meta {
    margin-top: 6px;
    color: #666;
}

.author-nationality,
.author-city {
    display: inline-block;
    margin-right: 15px;
}

.year-header {
    margin-bottom: 30px;
}

.year-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.year-description {
    margin-bottom: 30px;
    line-height: 1.6;
}

.year-catalog {
    margin-bottom: 40px;
}

.year-artworks h2 {
    margin-bottom: 30px;
}

/* Kontaktní odkazy dědí obecné styly pro odkazy */

.contact-content {
    /*margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #eee;*/
}

/* Loading state */
body.loading {
    cursor: wait;
}

body.loading::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    z-index: 9999;
}

/* Responsive masonry grid */
@media (max-width: 768px) {
    .gallery {
        column-count: 2;
    }
    body.full-width-enabled .gallery {
        column-count: 2;
    }
}

@media (max-width: 480px) {
    .gallery {
        column-count: 1;
    }
    body.full-width-enabled .gallery {
        column-count: 1;
    }
}

/* Mobile menu */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        width: 60%;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        padding: 180px 24px 40px;
        transition: right 0.3s;
        border-left: 1px solid #eee;
        box-shadow: none;
        z-index: 1000;
        align-items: flex-start;
        gap: 24px;
    }
    
    .nav.active {
        right: 0;
        left: auto;
    }

    .nav li {
        width: 100%;
    }

    .nav a {
        display: block;
        width: 100%;
    }

    .nav-underline {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        position: absolute;
        right: 20px;
        top: 50%;
        margin-left: 0;
        transform: translateY(-50%);
        background: none;
        border: none;
        font-size: 2rem;
        cursor: pointer;
        z-index: 1101;
    }

    .artwork-detail-media {
        display: inline-flex;
        flex-direction: column;
        align-items: flex-end;
        padding-right: 0;
    }

    .artwork-zoom-toggle {
        position: static;
        margin-top: 12px;
    }
}



/* Utility třídy */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
