/*
  MUSEUM STYLES
  ============
  The original Next.js project uses a custom SCSS framework at mpg-next/scss/style.scss.
  To apply it here, compile style.scss → wwwroot/css/style.css and add:
      <link rel="stylesheet" href="css/style.css" />  in App.razor.
  Alternatively, add the LibSassBuilder NuGet package and place .scss files under wwwroot/scss/.
  Classes used throughout: container, w3-card-4, d-flex, m-t-*, content-1, header-1,
  hero, fade, kenburns-top-right, hamburger, etc.
*/

/* The `hidden` attribute must win over layout classes such as .d-grid / .section-2
   (display:grid), otherwise JS-toggled views (odjeli grids, news details) stay visible. */
[hidden] {
    display: none !important;
}

/* Content that waits for its images before animating in (mpg.js initWaitImages). */
.aos-wait [data-aos] {
    opacity: 0 !important;
    transition: none !important;
}

html, body {
    font-family: 'Lato', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* ── Home page carousel — slides right to left (Section 4) ── */
.home-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.home-carousel .carousel-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateX(100%);   /* waiting off-screen right */
    transition: transform 0.6s ease-in-out;
}
.home-carousel .carousel-slide.active {
    transform: translateX(0);      /* in view */
}
.home-carousel .carousel-slide.leaving {
    transform: translateX(-100%);  /* exiting to the left */
}

/* Home sections 4/5 — the VIŠE button sits flush in the text panel's bottom corner,
   against the image edge (as in the original: bottom:0; right:0 in home/_media.scss).
   display:flex sizes the container to the button, so no gap is left under it. */
.section-4 .btn-container,
.section-5 .btn-container {
    display: flex;
}

/* Home featured news (HomeSection1). The original used a fixed row height, so long
   titles pushed the text past the card's bottom edge. The row is now a minimum and the
   card grows with its content (the full title is always shown). */
.section-1.home-featured .d-grid {
    grid-template-rows: minmax(350px, auto);
}
.section-1.home-featured .item-1 {
    min-height: 260px;
}
/* Hover: image slowly zooms inside its frame — featured news and the 3 news cards. */
.section-1.home-featured .item-1,
.section-2 .post .item-1 {
    overflow: hidden;
}
.section-1.home-featured .item-1 img,
.section-2 .post .item-1 img {
    display: block;
    transition: transform 0.8s ease;
}
.section-1.home-featured .d-grid:hover .item-1 img,
.section-2 .post:hover .item-1 img {
    transform: scale(1.04);
}
.section-1.home-featured .item-2 {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.section-1.home-featured .post-title {
    margin: 0;
}
.section-1.home-featured .featured-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.section-1.home-featured .d-grid h1 {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 16px;
    overflow-wrap: anywhere;
}
.section-1.home-featured .featured-text {
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.section-1.home-featured .featured-text p {
    margin: 0 0 8px;
    font-size: inherit;
}
.section-1.home-featured .featured-text p:empty {
    display: none;
}
@media (min-width: 768px) {
    .section-1.home-featured .d-grid {
        grid-template-rows: minmax(380px, auto);
    }
    .section-1.home-featured .d-grid h1 { font-size: 26px; }
}
@media (min-width: 992px) {
    .section-1.home-featured .d-grid {
        grid-template-rows: minmax(450px, auto);
    }
    .section-1.home-featured .d-grid h1 { font-size: 30px; }
    .section-1.home-featured .featured-text { font-size: 18px; }
}
@media (min-width: 1200px) {
    .section-1.home-featured .d-grid {
        grid-template-rows: minmax(480px, auto);
    }
    .section-1.home-featured .d-grid h1 { font-size: 38px; margin-bottom: 24px; }
    .section-1.home-featured .featured-text { font-size: 19px; }
}

/* News detail — main image is always shown whole (only the home page cards crop).
   A click opens it in the lightbox. */
.novost-slika {
    display: block;
    text-align: center;
    cursor: zoom-in;
}
.novost-slika img {
    max-width: 100%;
    height: auto;
}

/* Dokumenti — the tabs are <a> links here (a <div> in the original), so they must be
   blocks, or they flow inline and overlap. Narrow screens stack tabs above the list. */
.dokumenti-page a.nav-item {
    display: block;
    text-decoration: none;
}
.dokumenti-page .d-grid {
    grid-template-columns: 1fr;
}
.dokumenti-page .item-1 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.dokumenti-page .item-1 .nav-item {
    margin-bottom: 0;
}
.dokumenti-page .item-2 {
    min-width: 0;
}
.dokumenti-page .item-2 ul {
    padding-left: 20px;
}
.dokumenti-page .item-2 li {
    margin-bottom: 8px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.dokumenti-page .item-2 a {
    text-decoration: none;
}
.dokumenti-page .item-2 a:hover {
    text-decoration: underline;
}
@media (min-width: 992px) {
    .dokumenti-page .d-grid {
        grid-template-columns: minmax(220px, 300px) 1fr;
        align-items: start;
    }
    .dokumenti-page .item-1 {
        display: block;
        position: sticky;
        top: 100px;
    }
    .dokumenti-page .item-1 .nav-item {
        margin-bottom: 20px;
    }
    .dokumenti-page .item-1 .nav-item:last-of-type {
        margin-bottom: 0;
    }
}

/* News detail — automatic photo gallery (Fotogalerija/[NovostID]): uniform tiles,
   portrait and landscape photos are cropped to the same 4:3 frame; full image in lightbox. */
.novost-galerija .thumb-container {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.novost-galerija .thumb-container a {
    display: block;
    width: 100%;
    height: 100%;
}
/* Keep the site gallery's slide-on-hover (img is 50px wider, see gallery/_gallery.scss). */
.novost-galerija .thumb-container img {
    display: block;
    height: 100%;
    object-fit: cover;
}

/* News detail — CMS text: images/embeds never wider than the column; text size as for p. */
.novost-tekst img,
.novost-tekst video,
.novost-tekst iframe {
    max-width: 100%;
}
.novost-tekst img,
.novost-tekst video {
    height: auto;
}
.novost-tekst {
    overflow-wrap: anywhere;
}
@media (min-width: 768px) {
    .detaljan-prikaz .novost-tekst { font-size: 18px; }
}
@media (min-width: 1200px) {
    .detaljan-prikaz .novost-tekst { font-size: 21px; }
}

/* Home section 5 (castle): _section-5.scss sets overflow-x:hidden on the text overlay,
   which makes overflow-y compute to auto — the overlay becomes its own scroll box and
   the mouse wheel nudges the blue panel up a few px whenever the text is a hair taller
   than the banner (fractional pixels at Windows scaling). Clip instead of scroll. */
.section-5 .item-2 {
    overflow: hidden;
    overflow: clip;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}