@import url("fonts.css");

/* ============================================================
   Villa Medveja / Apartmani Brubnjak
   Statička rekonstrukcija originalne Divi stranice
   ============================================================ */

:root {
  --coral: #d06962;
  --cream: #efe8d7;
  --navy: #264059;
  --text: #666;
  --heading: #333;
  --menu: #928571;
  --row: 1080px;
  --serif: Alice, Georgia, "Times New Roman", serif;
  --sans: "Open Sans", Arial, sans-serif;
  --topbar-h: 31px;
  --header-h: 108px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--coral);
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--heading);
  margin: 0;
  padding: 0;
}

p {
  margin: 0 0 1em;
  padding: 0;
}

p:last-child {
  margin-bottom: 0;
}

.row {
  width: 80%;
  max-width: var(--row);
  margin: 0 auto;
  padding: 27px 0;
}

/* širi red — kontakt sekcija u originalu koristi 1325px */
.row--wide {
  max-width: 1325px;
}

.section {
  position: relative;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------------------------------
   Top bar + header
   ------------------------------------------------------------ */

.topbar {
  background: var(--cream);
  color: rgba(0, 0, 0, 0.8);
  font-size: 12px;
  line-height: 1;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topbar a {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar a:hover {
  color: var(--coral);
}

/* Bez globalnog fill-a — svaka ikona nosi vlastite atribute.
   Telefon je puna silueta, omotnica je obris. */
.topbar svg {
  width: 12px;
  height: 12px;
  flex: none;
}

.topbar svg:not([stroke]) {
  fill: currentColor;
}

.header {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  height: var(--header-h);
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
  z-index: 99;
  transition: height 0.3s ease, top 0.3s ease;
}

.header__inner {
  width: 80%;
  max-width: var(--row);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: block;
  flex: none;
}

.logo img {
  max-height: 65px;
  width: auto;
  transition: max-height 0.3s ease;
}

/* Navigacija */

.nav {
  display: flex;
  align-items: center;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list > li {
  position: relative;
}

.nav__list > li > a {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--menu);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav__list > li > a:hover {
  color: var(--coral);
}

/* Jezični izbornik */

.lang > button {
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--menu);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.lang > button:hover {
  color: var(--coral);
}

.lang__flag {
  width: 16px;
  height: 11px;
  flex: none;
  object-fit: cover;
}

.lang__caret {
  width: 9px;
  height: 9px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.lang.is-open .lang__caret {
  transform: rotate(180deg);
}

.lang__menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 190px;
  background: #fff;
  border-top: 3px solid var(--coral);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  list-style: none;
  margin: 0;
  padding: 12px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.lang.is-open .lang__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang__menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--menu);
}

.lang__menu a:hover {
  color: var(--coral);
  background: rgba(0, 0, 0, 0.02);
}

/* Hamburger (mobitel) */

.nav-toggle {
  display: none;
  width: 34px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--menu);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle span:nth-child(1) {
  top: 7px;
}
.nav-toggle span:nth-child(2) {
  top: 14px;
}
.nav-toggle span:nth-child(3) {
  top: 21px;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ------------------------------------------------------------
   Hero (YouTube video)
   ------------------------------------------------------------ */

.page {
  padding-top: calc(var(--topbar-h) + var(--header-h));
}

.hero {
  position: relative;
  width: 100%;
  padding-top: 56.54%; /* 566 x 320 */
  overflow: hidden;
  background: #000;
}

.hero iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ------------------------------------------------------------
   Coral trake
   ------------------------------------------------------------ */

.band {
  background: var(--coral);
  text-align: center;
  color: #fff;
}

.band .row {
  padding: 27px 0;
}

.band h2 {
  font-size: 26px;
  line-height: 1.5;
  color: #fff;
  padding-bottom: 10px;
}

.band p {
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  margin: 0;
}

/* ------------------------------------------------------------
   Zajednički naslovi sekcija
   ------------------------------------------------------------ */

.section-title {
  font-size: 42px;
  line-height: 1.3;
  text-align: center;
  color: var(--heading);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

/* Divi divider modul: blok 23px s linijom na 17px, pa 10px razmaka.
   Blok (a ne margina) da se ne skupi s margin-bottom naslova. */
.divider {
  position: relative;
  width: 50px;
  height: 23px;
  background: none;
  border: 0;
  margin: 0 auto 10px;
}

.divider::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 0;
  width: 50px;
  height: 1px;
  background: var(--text);
}

/* ------------------------------------------------------------
   O nama / info
   ------------------------------------------------------------ */

.about {
  padding: 110px 0;
  background: #fff;
}

.about__text {
  max-width: 700px;
  margin: 0 auto 29.7px;
  text-align: center;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

/* Divi koristi 1em razmaka između odlomaka, ne 1.8em */
.about__text p {
  margin-bottom: 1em;
}

.about__actions {
  text-align: center;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.7;
  color: var(--coral);
  background: transparent;
  border: 2px solid var(--coral);
  border-radius: 3px;
  padding: 6px 20px;
  transition: background-color 0.3s ease, color 0.3s ease, padding 0.3s ease;
}

.btn:hover {
  background: var(--coral);
  color: #fff;
}

/* 3 blurba sa slikama */

/* red s 3 blurba — u originalu zaseban red s margin-top 40px */
.about__features-row {
  margin-top: 40px;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 5.556%;
}

.feature img {
  width: 100%;
  height: auto;
}

.feature h3 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 30px;
  color: var(--heading);
  margin-top: 40px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

/* ------------------------------------------------------------
   Info sekcija (plava, brojači)
   ------------------------------------------------------------ */

.info {
  padding: 189px 0;
  background-color: var(--navy);
  background-image: linear-gradient(
      90deg,
      var(--navy) 30%,
      rgba(38, 64, 89, 0) 100%
    ),
    url("../img/apartments-brubnjak-plaza.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Naslov i brojači su u originalu dva odvojena reda */
.info__title-row {
  padding-bottom: 0;
}

.info h2 {
  font-size: 42px;
  line-height: 1.3;
  color: #fff;
  text-align: center;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.counters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
}

.counter__value {
  font-family: var(--serif);
  font-size: 72px;
  font-weight: 500;
  line-height: 72px;
  color: var(--coral);
}

.counter__title {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  line-height: 18px;
  color: #fff;
  margin-top: 30px;
}

/* ------------------------------------------------------------
   Smještaj
   ------------------------------------------------------------ */

.stay {
  padding: 54px 0;
  background: var(--cream);
}

.stay__intro {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

/* Svaki par kartica je u originalu zaseban red (27px padding gore/dolje) */
.units {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 54px 5.556%;
}

.unit h2 {
  font-size: 30px;
  line-height: 1.3;
  color: var(--heading);
}

.unit__meta {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin: 10px 0 31px;
}

.stay__actions {
  text-align: center;
}

/* Slider unutar kartice */

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

.slider__track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.slider__slide {
  flex: 0 0 100%;
  min-width: 100%;
}

.slider__slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: grid;
  place-items: center;
  padding: 0;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.slider:hover .slider__nav {
  opacity: 1;
}

.slider__nav:hover {
  color: var(--coral);
}

.slider__nav svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.slider__nav--prev {
  left: 4px;
}

.slider__nav--next {
  right: 4px;
}

.slider__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.slider__dot.is-active {
  background: #fff;
}

/* ------------------------------------------------------------
   Galerija
   ------------------------------------------------------------ */

.gallery-section {
  padding: 54px 0;
  background: #fff;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.gallery__item {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 400 / 284;
  cursor: pointer;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.gallery__item:hover img {
  opacity: 0.82;
  transform: scale(1.04);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.9);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.lightbox__btn {
  position: absolute;
  background: none;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 10px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.lightbox__btn:hover {
  opacity: 1;
}

.lightbox__btn svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.lightbox__close {
  top: 14px;
  right: 20px;
}

.lightbox__close svg {
  width: 26px;
  height: 26px;
}

.lightbox__prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__counter {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #bbb;
  font-size: 13px;
}

/* ------------------------------------------------------------
   Kontakt
   ------------------------------------------------------------ */

/* original: krem boja + slika u luminosity blendu (izblijedjeli efekt) */
.contact {
  padding: 110px 0;
  background-color: var(--cream);
  background-image: url("../img/medveja-plaza.jpg");
  background-size: cover;
  background-position: right 0 bottom 0;
  background-repeat: no-repeat;
  background-blend-mode: luminosity;
}

/* 5 kolona u redu od 1325px. Prve četiri ostaju 207px kao u originalu,
   zadnja je 306px da email stane u jedan red (treba mu 259px + 47px ikona). */
.contact__list {
  display: grid;
  grid-template-columns: repeat(4, 15.623%) 23.094%;
  gap: 0 3.604%;
}

.contact__item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.contact__icon {
  width: 32px;
  height: 32px;
  flex: none;
  color: var(--coral);
}

.contact__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact__item h4 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.8;
  color: var(--heading);
  padding-bottom: 10px;
  word-break: break-word;
}

.contact__item a {
  color: inherit;
}

.contact__item a:hover {
  color: var(--coral);
}

/* ------------------------------------------------------------
   Karta + footer
   ------------------------------------------------------------ */

.map {
  line-height: 0;
  padding-bottom: 7px; /* original ima 507px ukupno uz 500px iframe */
}

.map iframe {
  width: 100%;
  height: 500px;
  border: 0;
  display: block;
}

/* original: #222 s 32% crnog preljeva, ukupno 54px */
.footer {
  background: #171717;
  padding: 15px 0 5px;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 14px;
  line-height: 24px;
  padding-bottom: 10px;
  color: #666;
}

.footer a {
  color: #888;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--coral);
}

.footer strong {
  font-weight: 700;
}

/* ------------------------------------------------------------
   Animacije pri skrolu
   ------------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .slider__track {
    transition: none;
  }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1200px) {
  .nav__list {
    gap: 15px;
  }
  .nav__list > li > a,
  .lang > button {
    font-size: 15px;
    letter-spacing: 0.5px;
  }
}

/* ------------------------------------------------------------
   Mobitel / tablet (Divi breakpoint 980px).
   Vrijednosti izmjerene na originalu — fontovi se NE smanjuju,
   header prestaje biti fiksiran, redovi dobivaju 30px padding.
   ------------------------------------------------------------ */

@media (max-width: 980px) {
  :root {
    --header-h: 80px;
  }

  /* header ide u normalan tok — u originalu se skrola s
     ostatkom stranice umjesto da ostaje zalijepljen */
  .topbar,
  .header {
    position: static;
  }

  .page {
    padding-top: 0;
  }

  .header__inner {
    width: 88%;
    position: relative;
  }

  .logo img {
    max-height: 43px;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    display: block; /* desktop je flex — lista bi se skupila na širinu sadržaja */
    position: absolute;
    top: 100%;
    left: -6.8%;
    right: -6.8%;
    background: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    z-index: 98;
  }

  .nav.is-open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 0 18px;
  }

  .nav__list > li > a {
    display: block;
    padding: 12px 26px;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .lang {
    padding: 12px 26px;
  }

  .lang__menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: 0;
    padding: 6px 0 0;
    display: none;
  }

  .lang.is-open .lang__menu {
    display: block;
  }

  .lang__menu a {
    padding: 8px 0;
  }

  /* redovi: 80% širine, 30px padding (desktop ima 27px) */
  .row,
  .band .row {
    width: 80%;
    padding: 30px 0;
  }

  .info__title-row {
    padding-top: 27px;
    padding-bottom: 0;
  }

  /* galerija i kontakt idu preko cijele širine */
  .gallery-section .row,
  .row--wide {
    width: 100%;
    max-width: none;
  }

  /* razmaci sekcija — izmjereno na originalu */
  .about {
    padding: 110px 0;
  }

  .info {
    padding: 48.68px 0;
  }

  .stay,
  .gallery-section {
    padding: 50px 0;
  }

  .contact {
    padding: 110px 0;
  }

  /* jedna kolona, 30px razmaka (kao margin-bottom kolona u Diviju) */
  .features,
  .units {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .counters {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 0;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  /* kontakt ostaje u 2 kolone po 230px unutar reda pune širine */
  .contact__list {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 5.54%;
  }

  /* email je predugačak za stupac od ~177px pa bi ga break-word
     razlomio nasred riječi — zadnja stavka ide preko oba stupca */
  .contact__item:last-child {
    grid-column: 1 / -1;
  }

  /* u originalu kontakt divider ima 150px razmaka do stavki */
  .contact .divider {
    margin-bottom: 150px;
  }

  /* tekst više nije ograničen na 700px kad je red uži */
  .about__text,
  .stay__intro {
    max-width: 100%;
  }
}
