/* ==========================================================================
   Raspored: kontejner, sekcije, header, meni, footer, mobilna traka
   ========================================================================== */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--white {
  background: var(--white);
}

.section--light {
  background: var(--bg-light);
}

.section--dark {
  background: var(--navy-900);
  color: var(--on-dark);
}

.section--dark p {
  color: var(--on-dark-muted);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px -14px rgba(18, 27, 45, 0.35);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

/* Logo: originalni vertikalni logotip (public/images/logo) + opcioni tekstualni naziv */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}

.logo .logo__img {
  display: block;
  height: 56px;
  width: auto;
}

.logo--light .logo__img {
  height: 112px;
}

/* Naziv pored logotipa u zaglavlju (samo „AQUA PRIME“) */
.logo__word {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #02264e; /* boja teksta u originalnom logotipu */
  white-space: nowrap;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: var(--navy-900);
}

.logo__name span {
  margin-left: 0.22em;
  font-weight: 600;
}

.logo__tag {
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.logo--light .logo__name {
  color: var(--white);
}

.logo--light .logo__tag {
  color: var(--on-dark-muted);
}

/* Meni - desktop */
.site-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav__list {
  display: flex;
  gap: 4px;
}

.site-nav__list a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  color: var(--text);
  transition:
    background-color var(--dur) var(--ease),
    color var(--dur) var(--ease);
}

.site-nav__list a:hover {
  background: var(--bg-light);
}

.site-nav__list a[aria-current='page'] {
  color: var(--navy-900);
  box-shadow: inset 0 -3px 0 var(--yellow);
  border-radius: 0;
}

.site-menu__extra {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang-switch ul {
  display: flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
}

.lang-switch a {
  display: block;
  min-width: 40px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  color: var(--text-muted);
}

.lang-switch a:hover {
  color: var(--navy-900);
}

.lang-switch a[aria-current='true'] {
  background: var(--navy-900);
  color: var(--white);
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
  color: var(--navy-900);
}

.header-phone .icon {
  color: var(--navy-900);
  padding: 6px;
  width: 32px;
  height: 32px;
  background: var(--yellow-soft);
  border-radius: 50%;
}

.header-phone:hover span {
  text-decoration: underline;
}

.header-call,
.nav-toggle {
  display: none;
}

/* Meni - tablet i mobilni */
@media (max-width: 1099px) {
  .header-call {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: var(--yellow);
    color: var(--navy-900);
  }

  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 14px;
    gap: 8px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--white);
    font-weight: 700;
    font-size: 0.95rem;
  }

  .nav-toggle__open,
  .nav-toggle__close {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .nav-toggle__close,
  .nav-toggle[aria-expanded='true'] .nav-toggle__open {
    display: none;
  }

  .nav-toggle[aria-expanded='true'] .nav-toggle__close {
    display: inline-flex;
  }

  /* Bez JS-a: meni je uvijek vidljiv ispod logoa */
  .no-js .site-header {
    position: static;
  }

  .no-js .site-header__inner {
    flex-wrap: wrap;
    padding-block: 10px;
  }

  .no-js .site-menu {
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 12px;
  }

  .no-js .site-nav__list {
    flex-wrap: wrap;
  }

  /* Uz JS: padajući panel */
  .js .site-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 16px var(--gutter) 24px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -24px rgba(18, 27, 45, 0.4);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }

  .js .site-menu.is-open {
    display: flex;
  }

  .js .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  .js .site-nav__list a {
    padding: 14px 4px;
    font-size: 1.15rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .js .site-nav__list a[aria-current='page'] {
    box-shadow: inset 4px 0 0 var(--yellow);
    padding-left: 16px;
  }

  .js .site-menu__extra {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .js .site-menu__extra .lang-switch ul {
    align-self: flex-start;
    width: max-content;
  }

  .js .site-menu__extra .btn {
    width: 100%;
  }

  .js .site-menu__extra .header-phone {
    font-size: 1.1rem;
  }
}

@media (max-width: 420px) {
  .logo__tag {
    display: none;
  }

  .logo .logo__img {
    height: 46px;
  }

  .logo__word {
    font-size: 1.08rem;
  }

  .logo__name {
    font-size: 1.15rem;
  }

  .js .nav-toggle span span {
    display: none;
  }

  .js .nav-toggle {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
}

html.menu-open {
  overflow: hidden;
}

/* ---------- Page hero (unutrašnje stranice) ---------- */

.page-hero {
  background: var(--navy-900);
  color: var(--on-dark);
  padding-block: clamp(40px, 6vw, 80px);
}

.page-hero__grid {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.page-hero--media .page-hero__grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.page-hero__title {
  font-size: var(--fs-h1-page);
  margin-bottom: 0.4em;
  max-width: 20ch;
}

.page-hero__lead {
  font-size: clamp(1.1rem, 0.5vw + 1rem, 1.25rem);
  color: var(--on-dark-muted);
  max-width: 60ch;
}

.page-hero .btn-row {
  margin-top: 28px;
}

.page-hero__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--navy-800);
}

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 899px) {
  .page-hero--media .page-hero__grid {
    grid-template-columns: 1fr;
  }

  .page-hero__media {
    aspect-ratio: 16 / 10;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 22px;
  font-size: 0.92rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--on-dark-muted);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs li + li::before {
  content: '/';
  opacity: 0.5;
}

.breadcrumbs a {
  color: var(--white);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs [aria-current='page'] {
  color: var(--on-dark-muted);
}

/* ---------- Završni CTA ---------- */

.cta-final {
  background: var(--navy-800);
  color: var(--on-dark);
  padding-block: var(--section-y);
  position: relative;
  overflow: hidden;
}

.cta-final::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--yellow);
}

.cta-final__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.cta-final__text {
  color: var(--on-dark-muted);
  font-size: 1.15rem;
  max-width: 46ch;
}

.cta-final__phone {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 28px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 3.4vw + 0.8rem, 3.2rem);
  letter-spacing: -0.02em;
  color: var(--yellow);
  text-decoration: none;
  line-height: 1;
}

.cta-final__phone:hover span {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
}

.contact-list {
  display: grid;
  gap: 0;
  background: var(--navy-900);
  border-radius: var(--radius-lg);
  padding: 8px 24px;
  border: 1px solid var(--line-dark);
}

.contact-list li {
  display: grid;
  grid-template-columns: 40px 132px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-dark);
}

.contact-list li:last-child {
  border-bottom: 0;
}

.contact-list__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--navy-800);
  color: var(--yellow);
}

.contact-list__label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--on-dark-muted);
}

.contact-list__value {
  font-weight: 650;
  color: var(--white);
  text-decoration: none;
  overflow-wrap: anywhere;
}

a.contact-list__value:hover {
  text-decoration: underline;
}

.contact-list__value small {
  display: block;
  color: var(--on-dark-muted);
  font-weight: 500;
}

@media (max-width: 899px) {
  .cta-final__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .contact-list {
    padding: 4px 16px;
  }

  .contact-list li {
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-rows: auto auto;
    row-gap: 0;
  }

  .contact-list__icon {
    grid-row: span 2;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-950);
  color: var(--on-dark-muted);
  padding-top: clamp(56px, 6vw, 80px);
  font-size: 0.98rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr 1.4fr;
  gap: 40px;
  padding-bottom: 48px;
}

.site-footer__brand p {
  margin: 18px 0;
  max-width: 34ch;
}

.site-footer__phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--yellow);
  text-decoration: none;
}

.site-footer__title {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 18px;
}

.site-footer__col ul {
  display: grid;
  gap: 10px;
}

.site-footer a {
  color: var(--on-dark-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.site-footer__phone:hover {
  color: var(--yellow) !important;
}

.site-footer__contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.site-footer__contact .icon {
  margin-top: 4px;
  color: var(--yellow);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 22px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.9rem;
}

.site-footer__bottom p {
  margin: 0;
}

@media (max-width: 1023px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 599px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---------- Mobilna kontakt traka ---------- */

.mobile-bar {
  display: none;
}

@media (max-width: 899px) {
  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    height: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    background: var(--navy-900);
    border-top: 1px solid var(--line-dark);
    box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.4);
  }

  .mobile-bar__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    padding: 0 8px;
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    border-left: 1px solid var(--line-dark);
  }

  .mobile-bar__item .icon {
    flex-shrink: 0;
    width: 19px;
    height: 19px;
  }

  .mobile-bar__item span {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-bar__item:first-child {
    border-left: 0;
  }

  .mobile-bar__item--call {
    background: var(--yellow);
    color: var(--navy-900);
  }

  .mobile-bar__item:not(.mobile-bar__item--call) .icon:not(.icon--brand) {
    color: var(--yellow);
  }

  .mobile-bar :focus-visible {
    outline-offset: -4px;
  }
}

@media (max-width: 359px) {
  .mobile-bar__item {
    gap: 5px;
    padding: 0 5px;
    font-size: 0.82rem;
  }

  .mobile-bar__item .icon {
    width: 17px;
    height: 17px;
  }
}

/* ---------- Viber pomoć (kada aplikacija nije instalirana) ---------- */

.viber-help {
  position: fixed;
  z-index: 60;
  right: 16px;
  bottom: calc(16px + var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px));
  width: min(380px, calc(100vw - 32px));
  padding: 20px;
  background: var(--white);
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}

.viber-help[hidden] {
  display: none;
}

.viber-help__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.viber-help__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.viber-help__close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--bg-light);
}

.viber-help p {
  color: var(--text-muted);
  font-size: 0.98rem;
}

.viber-help__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.site-footer a.site-footer__credit {
  color: var(--white);
  text-decoration: underline;
  text-decoration-color: var(--yellow);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-footer a.site-footer__credit:hover {
  color: var(--yellow);
}
