/* Custom styles for bio section */
.align-justify {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}


/* Simple responsive signature image - more specific selector */
.signature-image img {
    display: block !important;
    margin-top: 0rem !important;
    margin-bottom: 2rem;
    margin-left: auto !important;
    margin-right: 1rem !important;
    max-width: 540px !important;
    width: 100%;
    height: auto !important;
}

/* Item container for consistent alignment */
.item-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 150px;
}

/* SVG icon styling */
.svg-icon {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 45px;
    width: 45px;
    margin: 0 auto 1rem auto;
    flex-shrink: 0;
}

.svg-icon img,
.svg-icon svg {
    max-width: 60px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Content styling */
.item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.item-content h3 {
    margin: 0 0 0.5rem 0;
}

.item-content p {
    margin: 0;
}

/* Bio content layout - side by side 2:1 ratio */
.bio-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
}

.bio-text {
    flex: 2; /* Takes 2/3 of the space */
    text-align: left;
}

.bio-image {
    flex: 1; /* Takes 1/3 of the space */
    text-align: center;
}

.bio-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px; /* Optional: adds rounded corners */
}

/* Responsive: stack on smaller screens */
@media (max-width: 768px) {
    .bio-content {
        flex-direction: column;
    }
    
    .bio-text {
        text-align: justify;
    }
}


/* Stop horizontal trackpad swipes from triggering browser back/forward */
html, body {
    overscroll-behavior-x: none;
}

/* Keep gallery carousel scrolling from chaining to page navigation */
.gallery .inner {
    overscroll-behavior-x: contain;
}


/* Homepage works gallery (style2 carousel):
   every cover shares the same height; the box width follows the image's
   aspect ratio up to a max-width. Wide images are capped (and letterboxed
   within the fixed height) so they don't become huge. */
.gallery.style2 article {
    width: auto;
    min-width: 17rem;
    max-width: 26rem;
    height: 17rem;
    justify-content: center;
}

.gallery.style2 article .image,
.gallery.style2 article a.image {
    display: block;
    width: auto;
    height: 100%;
}

.gallery.style2 article .image img {
    width: auto;
    height: 100%;
    max-width: 26rem;
    object-fit: contain;
}

/* Hover caption: keep it fluid inside the smaller/narrower boxes */
.gallery.style2 article .caption {
    padding: 1.25rem;
    font-size: 0.68rem;
    overflow-y: auto;
}

.gallery.style2 article .caption h2,
.gallery.style2 article .caption h3,
.gallery.style2 article .caption h4 {
    font-size: 1rem;
    line-height: 1.2;
}

.gallery.style2 article .caption > * {
    margin-bottom: 0.6rem;
}

.gallery.style2 article .caption br {
    display: none;
}

/* Label aligns to the top of its row; value aligns to the bottom, so when a
   long label (e.g. "Dátum reštaurovania:") wraps, the year sits beside its
   last line instead of floating at the top. */
.gallery.style2 article .caption dt {
    align-self: start !important;
}

.gallery.style2 article .caption dd {
    align-self: end !important;
}

/* Space above the "Viac" button */
.gallery.style2 article .caption .actions {
    margin-top: 0.6rem;
}

@media (max-width: 736px) {
    .gallery.style2 article {
        min-width: 14rem;
        max-width: 22rem;
        height: 20rem;
    }
    .gallery.style2 article .image img {
        max-width: 22rem;
    }
}
