/* ==========================================================================
   Boris Leskovec - Arhitekt | Pure HTML & CSS Faithful Rebuild
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts (@font-face)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'din-next-w01-light';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/din-next-w02-light.woff2') format('woff2');
  unicode-range: U+000D, U+0100-010F, U+0111-0130, U+0132-0151, U+0154-015F, U+0162-0177, U+0179-017C, U+01FA-01FF, U+0218-021B, U+0237, U+02C9, U+02D8-02D9, U+02DB, U+02DD, U+0394, U+03A9, U+03C0, U+1E80-1E85, U+1EF2-1EF3, U+2070, U+2074-2079, U+2080-2089, U+2113, U+2126, U+212E, U+2153-2154, U+215B-215E, U+2202, U+2206, U+220F, U+2211-2212, U+2215, U+2219-221A, U+221E, U+222B, U+2248, U+2260, U+2264-2265, U+25CA, U+F8FF, U+FB00-FB04;
  font-display: swap;
}

@font-face {
  font-family: 'din-next-w01-light';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/din-next-w01-light.woff2') format('woff2');
  unicode-range: U+0020-007E, U+00A0-00FF, U+0110, U+0131, U+0152-0153, U+0160-0161, U+0178, U+017D-017E, U+0192, U+02C6-02C7, U+02DA, U+02DC, U+03BC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122;
  font-display: swap;
}

:root {
  --font-family: 'din-next-w01-light', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* the original always reserves the vertical scrollbar */
  overflow-y: scroll;
}

html, body {
  min-width: 980px;
  background-color: #ffffff;
  color: #000000;
  font-family: var(--font-family);
  font-synthesis: weight style;
  font-size: 14px;
  line-height: 1.4em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Layout Containers
   -------------------------------------------------------------------------- */
site-header,
site-footer,
slide-gallery {
  display: block;
}

.site-wrapper {
  width: 980px;
  margin: 0 auto;
  position: relative;
  display: flow-root;
}

.main-content {
  width: 980px;
  min-height: 500px;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  margin-top: 80px;
  width: 980px;
  position: relative;
  z-index: 1000;
  display: flow-root;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 979px;
  height: 28px;
}

.main-nav {
  display: block;
}

.menu-list {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-item {
  position: relative;
  height: 28px;
  box-sizing: border-box;
  border-left: 1px solid #000000;
}

.menu-item:nth-child(1) { width: 78px; }
.menu-item:nth-child(2) { width: 83px; }
.menu-item:nth-child(3) { width: 65px; }
.menu-item:nth-child(4) { width: 85px; }
.menu-item:nth-child(5) { width: 94px; }
.menu-item:nth-child(6) { width: 83px; }

.menu-item > a {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: 28px;
  line-height: 28px;
  font-family: var(--font-family);
  font-size: 16px;
  color: #000000;
  padding: 0 0 0 15px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Active top-level item (only Domov on home, Kontakt on kontakt) */
.menu-item.active-top > a {
  background-color: #000000;
  color: #ffffff;
}

/* Hover on top-level item (items that open a submenu stay white, as on the original) */
.menu-item:not(.has-dropdown):hover > a {
  background-color: #000000;
  color: #ffffff;
}

/* Dropdown menus */
.dropdown-menu {
  position: absolute;
  top: 35px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffffff;
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 2000;
  visibility: hidden;
  transition: visibility 0s 0.2s;
  min-width: calc(100% + 1px);
  width: max-content;
  box-shadow: none;
  text-align: center;
}

/* invisible bridge over the gap between the item and its dropdown */
.dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -7px;
  height: 7px;
}

.menu-item:hover .dropdown-menu {
  visibility: visible;
  transition-delay: 0s;
}

.dropdown-menu li {
  height: 32px;
  border-top: 1px solid #000000;
  transition: background-color 0.4s ease;
}

.dropdown-menu li:first-child {
  height: 31px;
  border-top: none;
}

.dropdown-menu li a {
  display: block;
  height: 31px;
  line-height: 31px;
  font-family: var(--font-family);
  font-size: 16px;
  color: #000000;
  padding: 0 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.dropdown-menu li a:hover,
.dropdown-menu li.active-sub a {
  background-color: #000000;
  color: #ffffff;
}

/* Top divider line */
.header-divider {
  width: 980px;
  height: 1px;
  border-top: 1px solid #000000;
  margin: 6px auto 30px auto;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  display: flow-root;
  width: 980px;
  margin: 0 auto;
  padding-bottom: 15px;
}

.footer-divider {
  width: 980px;
  height: 1px;
  border-top: 1px solid #000000;
  margin: 28px 0 16px 0;
}

.footer-content {
  width: 980px;
  margin: 0;
}

.footer-content p {
  font-family: var(--font-family);
  font-size: 12px;
  line-height: normal;
  color: #000000;
  margin: 0;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Homepage: index.html
   -------------------------------------------------------------------------- */
.hero-slider-container {
  position: relative;
  width: 980px;
  height: 500px;
  margin: 0 auto;
  overflow: hidden;
}

.hero-title-overlay {
  position: absolute;
  top: 4px;
  left: 8px;
  z-index: 10;
  pointer-events: none;
}

.hero-title-overlay h1 {
  font-family: var(--font-family);
  font-size: 50px;
  font-weight: 400;
  line-height: normal;
  margin: 0;
  letter-spacing: normal;
}

.hero-title-overlay .title-white {
  color: #ffffff;
}

.hero-title-overlay .title-gray {
  color: rgb(191, 191, 191);
}

.hero-slider {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* slides move horizontally, like the original */
.hero-slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
}

.hero-slide.active,
.hero-slide.is-entering {
  visibility: visible;
}

.hero-slide.is-moving {
  transition: transform 1s cubic-bezier(0.87, 0, 0.13, 1);
}

.hero-slide a {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-slide img {
  width: 980px;
  height: 500px;
  max-width: none;
  object-fit: cover;
  display: block;
}

/* bottom bar with the slide title, shown on hover */
.hero-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 55px;
  padding: 10px 100px 10px 10px;
  background-color: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 25px;
  line-height: 35px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.5s;
}

.hero-counter {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 70px;
  height: 24px;
  padding: 0 10px 10px 0;
  text-align: right;
  font: 12px arial, helvetica, sans-serif;
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.hero-nav {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}

.hero-nav button {
  position: absolute;
  top: 215px;
  width: 45px;
  height: 70px;
  padding: 0;
  border: 0;
  background: url("../images/icons/slideshow-arrows.png") no-repeat;
  opacity: 0.4;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.5s;
}

.hero-nav .hero-prev {
  left: 20px;
  background-position: 0 0;
}

.hero-nav .hero-next {
  right: 20px;
  background-position: 100% 0;
}

.hero-nav button:hover,
.hero-nav button:focus-visible {
  opacity: 1;
}

.hero-slider-container:hover .hero-caption,
.hero-slider-container:hover .hero-counter,
.hero-slider-container:hover .hero-nav,
.hero-slider-container:focus-within .hero-caption,
.hero-slider-container:focus-within .hero-counter,
.hero-slider-container:focus-within .hero-nav {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Biografija: biografija.html
   -------------------------------------------------------------------------- */
.bio-page-header {
  margin-top: 65px;
  margin-bottom: 23px;
}

.bio-title {
  font-family: var(--font-family);
  font-size: 50px;
  font-weight: 400;
  line-height: normal;
  color: #000000;
  margin-bottom: 29px;
  letter-spacing: normal;
}

.bio-subtitle {
  font-family: var(--font-family);
  font-size: 25px;
  font-weight: 400;
  line-height: normal;
  color: #000000;
  letter-spacing: normal;
}

.bio-accent-line {
  width: 314px;
  height: 1px;
  border-top: 1px solid #000000;
  margin-bottom: 28px;
}

.bio-grid {
  display: flex;
  gap: 20px;
  width: 979px;
  margin: 0 0 0 1px;
  align-items: flex-start;
}

.bio-col {
  width: 313px;
  font-family: var(--font-family);
  font-size: 12px;
  line-height: normal;
  color: #000000;
  flex-shrink: 0;
}

.bio-col p {
  margin: 0;
  padding: 0;
}

.bio-col span[style*="font-weight: bold"],
.bio-col strong {
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Projekti (Index): projekti.html
   -------------------------------------------------------------------------- */
.projekti-header {
  margin-top: 65px;
  margin-bottom: 0;
}

.projekti-title {
  font-family: var(--font-family);
  font-size: 50px;
  font-weight: 400;
  line-height: normal;
  color: #000000;
  margin-bottom: 0;
}

.projekti-subtitle {
  font-family: var(--font-family);
  font-size: 25px;
  font-weight: 400;
  line-height: normal;
  color: #000000;
  margin-top: 0;
  margin-bottom: 30px;
}

.projekti-subtitle2 {
  font-family: var(--font-family);
  font-size: 25px;
  font-weight: 400;
  line-height: normal;
  color: #000000;
  margin-bottom: 33px;
}

.projekti-accent-line {
  width: 314px;
  height: 1px;
  border-top: 1px solid #000000;
  margin-bottom: 32px;
  margin-left: 1px;
}

.projekti-grid {
  display: flex;
  gap: 20px;
  width: 979px;
  align-items: flex-start;
  margin: 0 0 0 1px;
}

.projekti-col {
  width: 313px;
  font-family: var(--font-family);
  font-size: 12px;
  line-height: normal;
  color: #000000;
  flex-shrink: 0;
}

.projekti-col p {
  margin: 0;
  padding: 0;
  line-height: normal;
}

.projekti-col ul {
  list-style: outside none disc;
  margin: 0 0 0 6px;
  padding: 0;
}

.projekti-col li {
  list-style: outside none disc;
  margin: 0 0 0 15.6px;
  padding: 0;
  line-height: normal;
}

.projekti-col li::before {
  display: none;
}

.projekti-col li p {
  margin: 0;
}

.spacer-p {
  height: 14px;
}

/* --------------------------------------------------------------------------
   Project Cards (Portfolio pages)
   -------------------------------------------------------------------------- */
/* Cards are laid out with the exact offsets of the original page:
   each card is positioned inside .cards, and its parts inside the card. */
.cards {
  position: relative;
  width: 980px;
}

.project-card {
  position: absolute;
  left: 0;
  width: 980px;
}

.cards > *,
.project-card > * {
  position: absolute;
}

/* Project lists: cards stack in normal flow, each card only sets its height */
.cards-flow > .project-card {
  position: relative;
}

/* Plain image component (server-cropped on the original, so cover-crop here) */
.abs-img img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
}

.abs-img img.zoomable-img {
  cursor: pointer;
}

/* Framed images (home slider, contact photo, book covers) carry a soft shadow */
.hero-slider-container,
.kontakt-photo,
.page-bibliografija .abs-img {
  box-shadow: rgba(0, 0, 0, 0.5) 0 1px 3px 0;
}

.page-bibliografija .abs-img {
  background-color: #aaa8a8;
}

/* Horizontal line component */
.abs-line {
  border-top: 1px solid #000000;
}

/* Grid ("matrix") gallery: white overlay with the name on hover */
.matrix-gallery {
  overflow: hidden;
}

.matrix-item {
  position: absolute;
  overflow: hidden;
  background-color: #ffffff;
  cursor: pointer;
}

.matrix-item img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
}

.matrix-overlay {
  position: absolute;
  inset: 0;
  padding: 10px;
  background-color: #ffffff;
  opacity: 0;
  transition: opacity 0.4s ease;
  overflow: hidden;
}

.matrix-item:hover .matrix-overlay,
.matrix-item:focus-visible .matrix-overlay {
  opacity: 1;
}

.matrix-title {
  font-family: var(--font-family);
  font-size: 25px;
  line-height: 35px;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Slideshow gallery (matches the original slideshow gallery) */
.project-gallery {
  --vh: 300px;
  width: 638px;
  height: 370px;
  overflow: hidden;
}

.gallery-viewport {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: var(--vh);
  overflow: hidden;
  cursor: pointer;
}

.gallery-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
  max-width: none;
  transition: opacity 0.4s ease;
}

.project-gallery.fit-contain .gallery-viewport img {
  object-fit: contain;
}

.gallery-panel {
  position: absolute;
  top: var(--vh);
  left: 0;
  width: calc(100% - 130px);
  cursor: pointer;
}

.gallery-title {
  margin: 10px 0 0;
  font-family: var(--font-family);
  font-size: 25px;
  font-weight: 400;
  line-height: 35px;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-desc {
  margin: 0;
  font-family: var(--font-family);
  font-size: 12px;
  line-height: 16.8px;
  color: #000000;
  white-space: pre-line;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gallery-controls {
  position: absolute;
  top: var(--vh);
  left: 0;
  width: 100%;
  height: 10px;
  text-align: right;
  font: 12px arial, helvetica, sans-serif;
  white-space: nowrap;
}

.gallery-controls button {
  display: inline-block;
  margin: 0;
  padding: 15px;
  border: 0;
  background: transparent;
  box-sizing: border-box;
  font: 13.3333px Arial, sans-serif;
  color: #000000;
  cursor: pointer;
  vertical-align: baseline;
}

.gallery-controls button span {
  display: inline-block;
  box-sizing: content-box;
}

.gal-play {
  width: 40px;
  height: 30px;
  line-height: 10px;
}

/* play: CSS triangle */
.gal-play span {
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-left-color: #000000;
}

/* pause: two bars */
.gal-play.is-playing span {
  width: 1px;
  height: 10px;
  border: 0;
  border-left: 2px solid #000000;
  border-right: 2px solid #000000;
  margin-right: 5px;
}

.gallery-nav {
  display: inline-block;
  height: 45px;
  text-align: right;
}

.gal-prev span,
.gal-next span {
  position: relative;
  width: 6px;
  height: 6px;
  border: 0 solid #000000;
  transform: rotate(-45deg);
}

.gal-prev span {
  border-top-width: 1px;
  border-left-width: 1px;
}

.gal-next span {
  border-right-width: 1px;
  border-bottom-width: 1px;
}

.gallery-counter {
  display: inline-block;
  padding-top: 15px;
  font: 12px arial, helvetica, sans-serif;
  color: #000000;
  text-align: right;
}

/* Rich text blocks (same base styles as the original's font_5 / font_8) */
.rt {
  font-family: var(--font-family);
  color: #000000;
  overflow-wrap: break-word;
}

.rt h1,
.rt h2,
.rt h5,
.rt h6 {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: normal;
}

.rt h1,
.rt h2 {
  font-size: 50px;
}

.rt h6 {
  font-size: 25px;
}

.rt .color_13 {
  color: #aaa8a8;
}

.rt a {
  color: inherit;
}

.rt p,
.rt ul {
  margin: 0;
  font-size: 12px;
  line-height: normal;
}

.rt .lh14 {
  line-height: 1.4em;
}

.rt em {
  font-style: italic;
}

.rt ul {
  margin-left: 6px;
  padding: 0;
  list-style: disc outside;
}

.rt li {
  margin: 0 0 0 15.6px;
  padding: 0;
  list-style: disc outside;
}

/* Gray PROJEKTI button */
.project-btn-link {
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  width: 285px;
  height: 36px;
  border: 1px solid #ffffff;
  background-color: #717070;
  font-family: var(--font-family);
  font-size: 12px;
  line-height: 16.8px;
  text-decoration: none;
  transition: border-color 0.4s ease, background-color 0.4s ease;
}

.project-btn-link span {
  color: #ffffff;
  transition: color 0.4s ease;
}

.project-btn-link:hover {
  background-color: #ffffff;
  border-color: #000000;
}

.project-btn-link:hover span {
  color: #000000;
}

/* --------------------------------------------------------------------------
   Kontakt: kontakt.html
   -------------------------------------------------------------------------- */
.kontakt-grid {
  display: flex;
  width: 979px;
  margin-top: 0;
  margin-left: 1px;
  min-height: 500px;
}

.kontakt-photo {
  width: 514px;
  height: 393px;
  flex-shrink: 0;
}

.kontakt-photo img {
  width: 514px;
  height: 393px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.kontakt-info {
  width: 393px;
  margin-left: 27px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.kontakt-info h1 {
  font-family: var(--font-family);
  font-size: 50px;
  font-weight: 400;
  line-height: normal;
  color: #000000;
  margin: 0;
}

.kontakt-details {
  margin-top: 225px;
  font-family: var(--font-family);
  font-size: 12px;
  line-height: normal;
  color: #000000;
}

.kontakt-details p {
  margin: 0;
  padding: 0;
  line-height: normal;
}

.kontakt-details a {
  text-decoration: underline;
  color: #000000;
}

/* --------------------------------------------------------------------------
   Lightbox (native <dialog>, created by js/site.js)
   -------------------------------------------------------------------------- */
html:has(dialog.lightbox[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

dialog.lightbox {
  outline: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: rgba(0, 0, 0, 0.9);
  color: #ffffff;
}

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

dialog.lightbox::backdrop {
  background: transparent;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-caption {
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 14px;
  margin-top: 15px;
  text-align: center;
}

.lightbox button {
  position: absolute;
  z-index: 1;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.lightbox button:focus-visible {
  outline: 1px solid #ffffff;
  outline-offset: 2px;
}

.lightbox-close {
  top: 20px;
  right: 35px;
  font-family: Arial, sans-serif;
  font-size: 40px;
  font-weight: bold;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  width: 60px;
  height: 80px;
  margin-top: -40px;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev span,
.lightbox-next span {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 0 solid #ffffff;
  transform: rotate(-45deg);
}

.lightbox-prev span { border-top-width: 2px; border-left-width: 2px; }
.lightbox-next span { border-right-width: 2px; border-bottom-width: 2px; }

/* --------------------------------------------------------------------------
   Small screens: like the original, the site keeps its fixed 980px layout
   (phones show it zoomed out; narrow windows scroll horizontally).
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   Keyboard focus (only shown when navigating with the keyboard)
   -------------------------------------------------------------------------- */
.menu-item > a:focus-visible,
.dropdown-menu a:focus-visible,
.gallery-controls button:focus-visible,
.gallery-viewport:focus-visible,
.matrix-item:focus-visible,
img.zoomable-img:focus-visible,
.project-btn-link:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

.gallery-viewport:focus-visible,
.matrix-item:focus-visible {
  outline-offset: -2px;
  outline-color: #ffffff;
  box-shadow: inset 0 0 0 4px #000000;
}

/* keyboard users can open dropdowns too */
.menu-item:focus-within .dropdown-menu {
  visibility: visible;
  transition-delay: 0s;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
  }
}
