:root {
    color-scheme: light;
    --blue: #1072b9;
    --red: #cf181e;
    --green: #3fab37;
    --yellow: #fcc137;
    --black: #000000;
    --white: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--black);
    background: var(--white);
    font-family: "Open Sans", Arial, sans-serif;
    line-height: 1.65;
}

a { color: inherit; }
button { font: inherit; }

.gallery-hero {
    position: relative;
    min-height: min(720px, 78vh);
    display: flex;
    flex-direction: column;
    color: var(--white);
    background-image: url("assets/large/MEZISKLEPY6-26-125.jpg");
    background-position: center;
    background-size: cover;
}

.gallery-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background: var(--black);
    opacity: .48;
}

.hero-nav {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.festival-mark {
    padding: 5px 11px;
    border: 2px solid currentColor;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
}

.home-link { font-size: 14px; font-weight: 700; text-underline-offset: 5px; }

.hero-copy {
    position: relative;
    z-index: 1;
    width: min(900px, calc(100% - 40px));
    margin: auto;
    padding: 80px 0 110px;
    text-align: center;
}

.script-heading {
    margin: 0 0 -18px;
    color: var(--yellow);
    font-family: "Parisienne", cursive;
    font-size: clamp(54px, 8vw, 92px);
    line-height: 1;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.08;
    letter-spacing: 0;
}

.hero-copy > p:not(.script-heading) { margin: 18px 0 30px; font-size: 18px; }

.hero-button {
    display: inline-block;
    padding: 12px 19px;
    border: 2px solid var(--white);
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
}
.hero-button:hover, .hero-button:focus-visible { background: var(--white); color: var(--black); }

.gallery-intro {
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;
    padding: 84px 0;
    text-align: center;
}

.section-label {
    margin: 0 0 8px;
    color: var(--black);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.gallery-intro h2, .gallery-toolbar h2 {
    margin: 0;
    font-size: clamp(29px, 4vw, 45px);
    line-height: 1.2;
    letter-spacing: 0;
}

.gallery-toolbar h2 {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
}

.color-title span { display: inline-block; white-space: nowrap; }
.color-title .title-wine { color: var(--green); }
.color-title .title-music { color: var(--blue); }
.color-title .title-experiences { color: var(--red); }

.intro-text { max-width: 850px; margin: 24px auto 0; color: var(--black); font-size: 17px; }
.festival-hearts { display: block; width: 170px; max-width: 45%; height: auto; margin: 28px auto 0; }
.next-edition { margin: 32px auto 0; color: var(--black); font-size: 17px; }
.next-edition strong { color: var(--blue); }
.next-edition span { display: block; margin-top: 4px; color: var(--red); font-weight: 700; }

.gallery-section { padding: 56px max(20px, calc((100vw - 1500px) / 2)) 80px; background: var(--white); border-top: 8px solid var(--blue); }
.gallery-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 30px;
}

.gallery-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.gallery-filters button {
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--black);
    border-radius: 5px;
    background: transparent;
    color: var(--black);
    cursor: pointer;
}
.gallery-filters button:hover, .gallery-filters button:focus-visible { border-color: var(--black); box-shadow: inset 0 0 0 2px var(--black); }
.gallery-filters button[data-category="all"].active { border-color: var(--blue); background: var(--blue); color: var(--white); }
.gallery-filters button[data-category="atmosfera"].active { border-color: var(--red); background: var(--red); color: var(--white); }
.gallery-filters button[data-category="navstevnici"].active { border-color: var(--green); background: var(--green); color: var(--white); }
.gallery-filters button[data-category="vinari"].active { border-color: var(--yellow); background: var(--yellow); color: var(--black); }

.photo-grid { columns: 4 280px; column-gap: 12px; }
.photo-item {
    display: block;
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 4px;
    background: var(--black);
    cursor: zoom-in;
    break-inside: avoid;
    animation: galleryIn .35s ease both;
}
.photo-item img { display: block; width: 100%; height: auto; transition: transform .35s ease; }
.photo-item:hover img, .photo-item:focus-visible img { transform: scale(1.018); }
.photo-item:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.lightbox {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    margin: 0;
    padding: 24px 76px;
    border: 0;
    background: var(--black);
    color: var(--white);
}
.lightbox::backdrop { background: var(--black); }
.lightbox[open] { display: grid; grid-template-columns: 1fr; place-items: center; }
.lightbox figure { display: grid; place-items: center; gap: 10px; width: 100%; height: 100%; margin: 0; }
.lightbox img { display: block; max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.lightbox figcaption { position: absolute; bottom: 24px; left: 50%; max-width: calc(100% - 40px); transform: translateX(-50%); color: var(--white); font-size: 13px; line-height: 1.35; text-align: center; white-space: normal; }
.lightbox-close, .lightbox-arrow {
    position: fixed;
    z-index: 2;
    border: 0;
    background: var(--black);
    color: var(--white);
    cursor: pointer;
}
.lightbox-close { top: 14px; right: 16px; width: 46px; height: 46px; border-radius: 50%; font-size: 31px; line-height: 1; }
.lightbox-arrow { top: 50%; width: 54px; height: 72px; transform: translateY(-50%); border-radius: 5px; font-size: 54px; line-height: .8; }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-close:hover, .lightbox-close:focus-visible, .lightbox-arrow:hover, .lightbox-arrow:focus-visible { background: var(--red); }

/* FACEBOOK SHARING START: remove this block to roll back the sharing UI. */
.facebook-share {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 3;
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 7px;
    padding: 5px 7px 5px 12px;
    border: 2px solid var(--blue);
    border-radius: 5px;
    background: var(--blue);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}
.facebook-share:hover, .facebook-share:focus-visible { border-color: var(--yellow); outline: 0; }
.facebook-share-icon { display: block; width: 22px; height: 22px; flex: 0 0 22px; color: var(--white); }
/* FACEBOOK SHARING END */

.gallery-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 32px max(20px, calc((100vw - 1180px) / 2));
    background: var(--black);
    color: var(--white);
    font-size: 13px;
}
.gallery-footer p { margin: 0; }
.gallery-footer div { display: flex; flex-wrap: wrap; gap: 20px; }
.gallery-footer a { text-underline-offset: 4px; }
.gallery-footer .social-link { display: inline-flex; align-items: center; justify-content: center; }
.gallery-footer .social-link:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

@keyframes galleryIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
    .gallery-hero { min-height: 620px; }
    .gallery-toolbar { align-items: flex-start; flex-direction: column; }
    .gallery-filters { justify-content: flex-start; }
    .gallery-footer { flex-direction: column; }
}

@media (max-width: 560px) {
    .hero-nav { align-items: flex-start; }
    .home-link { max-width: 130px; text-align: right; }
    .gallery-intro { padding: 64px 0; }
    .gallery-section { padding-top: 42px; }
    .photo-grid { columns: 2 140px; column-gap: 8px; }
    .photo-item { margin-bottom: 8px; }
    .lightbox { padding: 54px 10px 170px; }
    .lightbox img { max-height: calc(100vh - 210px); }
    .lightbox-arrow { top: 50%; bottom: auto; width: 46px; height: 62px; transform: translateY(-50%); font-size: 42px; }
    .lightbox figcaption { right: 10px; bottom: 82px; left: 10px; transform: none; text-align: center; }
    .facebook-share { right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .photo-item { animation: none; }
    .photo-item img { transition: none; }
}
