/* filimonovic.com — uredjen CSS
   Karuseli: racunar 42svh / 400px; telefon 28svh / 230px.
   Sirine prate originalne proporcije fotografija.
*/

/* OSNOVNA PRAVILA */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #161616;
  color: #000;
  font-family: 'Crimson Text',Georgia,serif;
  font-size: 18px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button:focus-visible,a:focus-visible {
  outline: 2px solid #977c43;
  outline-offset: 5px;
}

main {
  background: #fff;
}


/* ZAGLAVLJE I NAVIGACIJA */
.site-header {
  background: #fff;
  padding: 0 3.75%;
  position: relative;
  z-index: 10;
}

.site-header nav {
  height: 73px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid #b5b5b5;
  gap: 28px;
}

.nav-left,.nav-right {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-right {
  justify-content: flex-end;
}

.site-header nav a:not(.brand),#mobile-menu a {
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.site-header a:hover {
  opacity: .6;
}

.site-header [aria-current=page] {
  font-weight: 600;
}

.brand {
  font-family: Cinzel,Georgia,serif;
  font-size: 20px;
  white-space: nowrap;
  font-weight: 400;
}

.menu-toggle {
  display: none;
}


/* PODNOZJE I NASLOVI */
footer {
  min-height: 108px;
  padding: 32px 24px;
  text-align: center;
  color: #bbb;
  background: #161616;
  font-size: 14px;
}

h1,h2 {
  font-family: Cinzel,Georgia,serif;
  font-weight: 400;
  line-height: 1.25;
}

h1 {
  font-size: 32px;
}


/* POCETNA STRANICA */
.page-index .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
}

.page-index nav {
  border: 0;
}

.home-photo {
  height: 85vh;
  min-height: 430px;
  background: url('home.jpg') center center/cover no-repeat;
}


/* PRISTUPACNOST */
.skip-link {
  position: fixed;
  top: -100px;
  left: 10px;
  background: #fff;
  padding: 10px;
  z-index: 50;
}

.skip-link:focus {
  top: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


/* GALERIJE — VELICINU ZA RACUNAR MENJAJ U --gallery-height */
.section-title {
  font-size: 36px;
  text-align: center;
  margin: 0;
  padding: 28px 20px 20px;
}

.section-title:after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: #e5e5e5;
  margin: 18px auto 0;
}

.gallery-section {
  --gallery-height: min(50svh, 480px, calc(92vw / var(--max-ratio)));
  padding-bottom: 8px;
}

.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 5px;
  align-items: center;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 50%;
  overscroll-behavior-x: contain;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.slide {
  border: 0;
  padding: 0;
  background: #fff;
  flex: 0 0 auto;
  height: var(--gallery-height);
  scroll-snap-align: center;
  opacity: .42;
  transition: opacity .4s;
  width: calc(var(--gallery-height) * var(--ratio));
  max-height: none;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: #ffffffd9;
  width: 48px;
  height: 64px;
  font-size: 44px;
  line-height: 1;
  z-index: 2;
}

.previous {
  left: 20px;
}

.next {
  right: 20px;
}

.gallery-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 5px 15px;
  font-size: 14px;
  color: #555;
}

.gallery-tools .counter {
  display: none;
}

.autoplay {
  border: 0;
  background: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 8px;
}


/* VELIKA FOTOGRAFIJA NAKON KLIKA */
.lightbox {
  border: 0;
  padding: 48px 64px;
  background: #101010;
  color: white;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
}

.lightbox::backdrop {
  background: #101010;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 100%;
  max-height: calc(100dvh - 130px);
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  background: transparent;
  border: 0;
  color: white;
  font-size: 44px;
  min-width: 48px;
  min-height: 48px;
}

.lightbox-close {
  right: 15px;
  top: 5px;
}

.lightbox-prev {
  left: 10px;
  top: 45%;
}

.lightbox-next {
  right: 10px;
  top: 45%;
}

.lightbox-caption {
  position: absolute;
  bottom: 15px;
  left: 15px;
  right: 15px;
  text-align: center;
  font-size: 16px;
}


/* BIOGRAFIJA */
.biography {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.biography-copy {
  padding: 50px clamp(35px,8vw,160px);
  padding-right: clamp(35px,5vw,100px);
  color: #5e5e5e;
}

.biography-copy h1 {
  color: #111;
  margin: 0 0 28px;
}

.biography-copy p {
  margin: 0;
  line-height: 1.5;
}

.biography-copy strong {
  font-weight: 400;
}

.biography-photo {
  background: url('biography.jpg') 39.2746% 51.2319%/cover no-repeat;
}


/* CV */
.resume {
  text-align: center;
  max-width: 1100px;
  margin: auto;
  padding: 48px 30px 56px;
  color: #5e5e5e;
}

.resume h2 {
  font-family: 'Crimson Text',Georgia,serif;
  font-weight: 600;
  font-size: 24px;
  color: #111;
  margin: 28px 0 16px;
}

.resume h2:first-of-type {
  margin-top: 20px;
}

.resume p {
  margin: 0;
  line-height: 1.5;
}

.resume strong {
  font-weight: 400;
}


/* DUGMAD I KONTAKT */
.pill {
  display: block;
  background: #000;
  color: #fff;
  text-align: center;
  border-radius: 40px;
  padding: 18px 24px;
  font-size: 14px;
  letter-spacing: .5px;
  font-weight: 600;
}

.pill:hover {
  background: #343434;
}

.resume-imdb {
  max-width: 726px;
  margin: 30px auto 0;
}

.contact-links {
  max-width: 774px;
  padding: 56px 24px;
  margin: auto;
  display: grid;
  gap: 16px;
}


/* VIDEO SNIMCI */
.reels {
  max-width: 1160px;
  margin: auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 55px 32px;
}

.reel.wide {
  grid-column: 1/-1;
}

.reel h2 {
  text-align: center;
  font-size: 32px;
  margin: 0 0 25px;
}

.video-wrap {
  aspect-ratio: 16/9;
  background: #101010;
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.reel p {
  text-align: center;
  color: #5e5e5e;
  margin: 18px 0 5px;
}

.video-fallback {
  display: block;
  text-align: center;
  font-size: 14px;
  text-decoration: underline;
  color: #555;
  margin-top: 9px;
}

.reel-note {
  text-align: center;
  margin: 0;
  padding: 0 24px 50px;
  font-size: 22px;
}

#mobile-menu[hidden] {
  display: none;
}

/* VELIKI EKRANI */
@media(min-width:1600px) {
  .site-header nav {
    height: 90px;
  }
}

/* TABLETI I UZI RACUNARSKI EKRANI */
@media(max-width:1050px) {
  .nav-left,.nav-right {
    gap: 18px;
  }

  .brand {
    font-size: 18px;
  }

  .site-header nav {
    gap: 18px;
  }

  .biography-copy {
    padding: 40px;
  }
}

/* TELEFON — VELICINU KARUSELA MENJAJ U --gallery-height */
@media(max-width:800px) {
  .site-header {
    padding: 0 24px;
  }

  .site-header nav {
    height: 76px;
    display: flex;
    justify-content: space-between;
  }

  .nav-left,.nav-right {
    display: none;
  }

  .brand {
    white-space: normal;
    max-width: calc(100% - 60px);
  }

  .menu-toggle {
    display: grid;
    gap: 5px;
    border: 0;
    background: transparent;
    padding: 14px 10px;
  }

  .menu-toggle span {
    display: block;
    width: 24px;
    height: 1px;
    background: #111;
  }

  #mobile-menu {
    padding: 15px 0 25px;
    display: grid;
    gap: 4px;
    background: white;
  }

  #mobile-menu a {
    padding: 10px 16px;
  }

  .page-index .site-header:has([aria-expanded=true]) {
    background: #fff;
  }

  .home-photo {
    height: 85svh;
    min-height: 500px;
    background-position: 48% center;
  }

  .section-title {
    font-size: 30px;
    padding: 24px 20px 18px;
  }

  .carousel-arrow {
    width: 38px;
    height: 52px;
    font-size: 36px;
  }

  .previous {
    left: 8px;
  }

  .next {
    right: 8px;
  }

  .biography {
    display: flex;
    flex-direction: column;
  }

  .biography-copy {
    padding: 35px 26px;
  }

  .biography-photo {
    height: 100vw;
    max-height: 650px;
    background-position: center 35%;
  }

  .resume {
    padding: 24px 24px 42px;
  }

  .reels {
    grid-template-columns: 1fr;
    padding: 32px 20px;
    gap: 36px;
  }

  .reel.wide {
    grid-column: auto;
  }

  .reel h2 {
    font-size: 26px;
  }

  .contact-links {
    padding: 40px 24px;
  }

  .lightbox {
    padding: 52px 40px;
  }

  .lightbox button {
    font-size: 34px;
    min-width: 36px;
  }

  .lightbox-prev {
    left: 0;
  }

  .lightbox-next {
    right: 0;
  }

  footer {
    padding: 28px 24px;
  }

  .gallery-section {
    --gallery-height: min(28svh, 230px, calc(88vw / var(--max-ratio)));
  }
}

/* SMANJENE ANIMACIJE */
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  .slide {
    transition: none;
  }
}

/* FIKSNA NASLOVNA FOTOGRAFIJA NA RACUNARU */
@media(min-width:801px) {
  .home-photo {
    background-attachment: fixed;
  }
}
