﻿/* ============================================================
   MOBILE — index.html responsive styles
   Breakpoint: ≤ 768px
   ============================================================ */

/* Hidden on desktop */
.hero__scroll-hint { display: none; }

.hero--home .hero__heading-line:nth-child(3),
.hero--home .hero__heading-line--spaced {
  display: block !important;
  margin-top: 0 !important;
  padding-top: 14px !important;
}

@media (max-width: 768px) {

  /* ── BASE ── */
  body {
    overflow-x: hidden;
  }

  /* ── TOKENS ── */
  :root {
    --fs-h1-mont:  36px;
    --fs-h1-dutch: 40px;
    --fs-h2-mont:  27.5px;
    --fs-h2-dutch: 30.8px;
    --fs-p:        15px;
    --gutter:      20px;
  }

  /* ── CONTAINER ── */
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* ── INVISIBLE ANCHOR SPANS (zero-width line-height anchors) ── */
  .h2-anchor { display: none; }

  /* ── HEADING OVERFLOW SAFETY ── */
  .h1-mont, .h1-dutch,
  .h2-mont, .h2-dutch {
    word-break: break-word;
    overflow-wrap: break-word;
  }


  /* ══════════════════════════════════════════
     NAV
     ══════════════════════════════════════════ */

  /* Fixed header + scroll hide/show */
  .site-header,
  .hero .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    padding-top: 25px;
    padding-bottom: 16px;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.32s ease;
  }

  .site-header--hidden {
    transform: translateY(-100%);
  }

  .site-header--scrolled {
    background: #111111;
  }

  /* Keep nav items white on dark bg */
  .site-header--scrolled .nav__brand,
  .site-header--scrolled .nav__link { color: #ffffff; }
  .site-header--scrolled .nav__burger span { background: #ffffff; }

  .nav {
    height: 70px;
    padding: 0 20px;
  }

  .nav__left { gap: 12px; }

  .nav__logo,
  .nav__logo img { width: 44px; height: 44px; }

  /* Hide desktop links + CTA */
  .nav__links,
  .nav__cta  { display: none; }
  .nav__brand { display: none; }

  /* Show hamburger */
  .nav__burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
    flex-shrink: 0;
  }

  .nav__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  /* Burger → X when open */
  .nav-open .nav__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav-open .nav__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  /* ── Mobile nav overlay ── */
  .nav__mobile {
    display: block;                /* override nav.css display:none */
    position: fixed;
    inset: 0;
    background: #111111;
    z-index: 999;
    overflow: hidden;              /* clips sliding panels */
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-open .nav__mobile {
    transform: translateX(0);
  }

  /* ── Panels ── */
  .nav__mob-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 220px 20px 60px;
    transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }

  /* Main panel — default visible, slides left when sub opens */
  .nav__mob-panel--main {
    transform: translateX(0);
  }
  .nav__mob-panel--pushed {
    transform: translateX(-100%) !important;
  }

  /* Sub panels — start off-screen right, slide in when active */
  .nav__mob-panel--sub {
    transform: translateX(100%);
  }
  .nav__mob-panel--sub.nav__mob-panel--active {
    transform: translateX(0);
  }

  /* ── Link list ── */
  .nav__mob-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  /* ── Individual link / button ── */
  .nav__mob-link {
    font-family: var(--font-mont);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: -0.04em;
    color: #ffffff;
    text-decoration: none;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    cursor: pointer;
    text-align: left;
  }

  .nav__mob-links > li:last-child .nav__mob-link {
    border-bottom: none;
  }

  .nav__mob-link svg {
    width: 8px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.45;
  }

  /* ── Back button ── */
  .nav__mob-back {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mont);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 40px;
  }

  .nav__mob-back svg {
    width: 8px;
    height: 14px;
    flex-shrink: 0;
  }

  .nav__mob-back:hover { color: rgba(255,255,255,0.75); }

  /* ── Kontaktiraj nas list item ── */
  .nav__mob-link--cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .nav__mob-link-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .nav__mob-link-title {
    font-size: 22px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: -0.04em;
  }

  .nav__mob-link-sub {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,255,255,0.35);
    letter-spacing: 0;
    line-height: 1.4;
  }

  /* ── CTA button (shared) ── */
  .nav__mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mont);
    font-size: 15px;
    font-weight: 600;
    color: #111111;
    background: #ffffff;
    border-radius: 8px;
    padding: 16px 32px;
    text-decoration: none;
    margin-top: 40px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
  }


  /* ══════════════════════════════════════════
     HERO
     ══════════════════════════════════════════ */

  .hero {
    height: auto;
    min-height: 100svh;
  }


  .hero__content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    padding: 200px 20px 80px;
    box-sizing: border-box;
  }

  .bh1 { font-size: 9px; letter-spacing: 0.08em; }

  .hero__heading {
    margin-top: 22px;
    display: block;
  }

  .hero__heading-line {
    display: inline;
  }

  .hero--home .hero__heading-line {
    display: block;
  }

  .hero__heading-line .h1-mont  { font-size: 28px; line-height: 1.15; }
  .hero__heading-line .h1-dutch { font-size: 31px; line-height: 1.15; }

  .hero--home .hero__heading-line .h1-mont  { font-size: calc(28px * 1.21); }
  .hero--home .hero__heading-line .h1-dutch { font-size: calc(31px * 1.21); }

  .hero--home .hero__heading-line:nth-child(3),
  .hero--home .hero__heading-line--spaced {
    padding-top: 4px !important;
  }

  .hero__sub {
    margin-top: 20px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255,255,255,0.75);
  }
  .hero__sub br { display: none; }

  .hero__buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 40px;
  }

  /* Scroll hint — three dots, staggered bounce */
  .hero__scroll-hint {
    position: absolute;
    bottom: 146px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.55;
  }

  .hero__scroll-dot {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ffffff;
    animation: scrollDotBounce 1.6s ease-in-out infinite;
  }

  .hero__scroll-dot:nth-child(1) { animation-delay: 0s; }
  .hero__scroll-dot:nth-child(2) { animation-delay: 0.2s; }
  .hero__scroll-dot:nth-child(3) { animation-delay: 0.4s; }

  @keyframes scrollDotBounce {
    0%, 60%, 100% { opacity: 0.25; transform: scaleX(1); }
    30%            { opacity: 1;    transform: scaleX(1.35); }
  }

  .hero__btn--solid,
  .hero__btn--ghost {
    width: 100%;
    justify-content: center;
    padding: 15px 24px;
    font-size: 14px;
    text-align: center;
  }


  /* ══════════════════════════════════════════
     VJERA (client cards)
     ══════════════════════════════════════════ */

  .section-vjera {
    padding-top: 60px;
    padding-bottom: 60px;
  }


  .vjera__heading { text-align: left; margin-bottom: 20px; }

  .vjera__sub {
    font-size: 15px;
    text-align: left;
    margin-top: 0;
  }
  .vjera__sub br { display: none; }

  /* Replace fan layout with horizontal scroll row */
  .vjera__cards {
    position: relative;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin-top: 36px;
    display: flex;
    flex-direction: row;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 20px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .vjera__cards::-webkit-scrollbar { display: none; }

  .card-slot {
    position: relative;
    left: auto;
    top: auto;
    width: 250px;
    height: 250px;
    flex-shrink: 0;
  }

  .card {
    width: 250px;
    height: 250px;
    border-radius: 12px;
    transform: none !important;
  }

  .card__bubble { display: none; }

  .card:hover::before,
  .card:hover::after { opacity: 0; }

  .card__corner-btn {
    display: flex;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #ffffff;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-decoration: none;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
  }

  .card__corner-btn svg {
    width: 15.1px;
    height: 15.1px;
    transition: stroke 0.3s ease;
  }

  .card__corner-btn:hover { background: #111111; }
  .card__corner-btn:hover svg { stroke: #ffffff; }


  /* ══════════════════════════════════════════
     ZADATAK (3 service boxes)
     ══════════════════════════════════════════ */

  .section-zadatak {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .zadatak__tag { font-size: 12px; margin-left: 0; }

  .zadatak__heading { text-align: left; }
  .box__header { font-size: 24px; line-height: 1.15; }

  .zadatak__sub {
    font-size: 15px;
    margin-top: 20px;
    text-align: left;
  }
  .zadatak__sub br { display: none; }

  .zadatak__shadow--1,
  .zadatak__shadow--2 { display: none; }

  .zadatak__boxes {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 36px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .zadatak__box {
    width: 100%;
    height: 360px;
    flex-shrink: unset;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    gap: 0;
  }

  /* Dissolve wrapper — header and tags become direct flex items of the box */
  .box__body {
    display: contents;
  }

  /* Reorder: header(1) → sub(2) → tags(3)
     z-index:3 needed — without box__body's stacking context, children
     would render behind box__img (z-index:0) and box__overlay (z-index:1) */
  .box__header {
    position: relative;
    z-index: 3;
    order: 1;
  }

  .box__sub {
    position: relative;
    left: unset;
    right: unset;
    z-index: 3;
    order: 2;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    margin-top: 36px;
    padding: 0;
    text-align: left;
  }

  .box__tags {
    position: relative;
    z-index: 3;
    order: 3;
    margin-top: 4px;
  }

  .zadatak__box:hover .box__body { transform: none; }
  .zadatak__box:hover .box__sub  { opacity: 1; transform: none; }


  /* ══════════════════════════════════════════
     SARADNJA (3 steps)
     ══════════════════════════════════════════ */

  .section-saradnja {
    padding-top: 60px;
    padding-bottom: 0;
    background: #f5f5f5;
  }


  .saradnja__heading { text-align: left; margin-bottom: 20px; }

  .saradnja__sub {
    font-size: 15px;
    text-align: left;
    margin-top: 0;
    padding-bottom: 36px;
  }
  .saradnja__sub br { display: none; }

  .saradnja__boxes {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 0 20px 60px;
    width: 100%;
    box-sizing: border-box;
  }

  .saradnja__box {
    width: 100%;
    height: auto;
    min-height: 250px;
    flex-shrink: unset;
  }

  .saradnja__box--1 {
    min-height: 270px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  /* Transparent boxes get a subtle border on mobile */
  .saradnja__box--2,
  .saradnja__box--3 {
    min-height: 200px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
  }

  .sbox__body {
    position: static;
    padding: 20px;
    padding-top: 74px;
  }

  /* Box 1 with CTA */
  .saradnja__box--1 .sbox__body {
    position: static;
    padding-top: 20px;
    padding-bottom: 0;
    bottom: auto;
  }

  .sbox__cta {
    position: static;
    margin: 16px 20px 20px;
    display: flex;
  }

  .sbox__header { font-size: 22px; line-height: 1.15; }
  .sbox__sub    { font-size: 15px; margin-top: 10px; }


  /* ══════════════════════════════════════════
     BENEFITI (bento grid)
     ══════════════════════════════════════════ */

  .section-benefiti {
    padding-top: 20px;
    padding-bottom: 60px;
  }


  .benefiti__heading { text-align: left; margin-bottom: 20px; }

  .benefiti__boxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: calc(100% - 40px);
    margin: 36px auto 0;
    grid-template-columns: unset;
    grid-template-rows: unset;
  }

  .bn-box {
    height: auto;
    min-height: 240px;
    padding: 28px;
    border-radius: 12px;
  }

  .bn-box--1 { order: 1; }
  .bn-box--2 { order: 2; }
  .bn-box--3 { order: 3; }
  .bn-box--4 { order: 4; }
  .bn-box--5 { order: 6; }
  .bn-box--6 { order: 5; }

  .bn-box__header {
    font-size: 18px;
    padding-left: 0;
    padding-right: 0;
  }

  .bn-box__img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-height: 286px;
    width: auto;
    margin: 0;
  }

  .bn-box--5 {
    min-height: 250px;
    padding: 36px 28px;
  }

  .bn-box__pre,
  .bn-box__post { font-size: 12px; }


  /* ══════════════════════════════════════════
     PORTFOLIO (mosaic grid)
     ══════════════════════════════════════════ */

  .section-portfolio {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .portfolio__tag { font-size: 12px; margin-left: 0; }



  .portfolio__heading { text-align: left; margin-bottom: 20px; }

  .portfolio__sub {
    font-size: 15px;
    text-align: left;
    margin-top: 0;
  }
  .portfolio__sub br { display: none; }

  .portfolio__grid-wrap {
    width: 100%;
    max-width: 100%;
    margin: 36px auto 0;
    padding: 0;
    overflow: hidden;
  }

  .portfolio__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    column-gap: 20px;
    row-gap: 20px;
    width: 100%;
    height: auto;
  }

  /* Row 1 — Box A: left margin 40px, reaches right viewport edge */
  .pg-box--a {
    grid-column: 1 / 3;
    grid-row: 1;
    height: 240px;
    width: auto;
    margin: 0 0 0 20px;
  }

  /* Row 2 — B overflows left, C overflows right, both same width as A */
  .pg-box--b {
    grid-column: 1 / 2;
    grid-row: 2;
    height: 240px;
    width: calc(100vw - 40px);
    margin-left: calc(-50vw + 30px);
  }

  .pg-box--c {
    grid-column: 2 / 3;
    grid-row: 2;
    height: 240px;
    width: calc(100vw - 40px);
  }

  /* Row 3 — Box D: fixed 100vw width, shifted left 40px so right edge = viewport - 40px */
  .pg-box--d {
    grid-column: 1 / 3;
    grid-row: 3;
    height: 240px;
    width: 100vw;
    margin-left: -20px;
    margin-right: 0;
  }

  /* Hide remaining boxes */
  .pg-box--e,
  .pg-box--f,
  .pg-box--g { display: none; }

  /* Hide all overlay content on mobile — image only */
  .pg-box__overlay { display: none; }
  .pg-box__bottom  { display: none; }


  /* ══════════════════════════════════════════
     PROBLEMI (3×2 grid)
     ══════════════════════════════════════════ */

  .section-problemi {
    padding-top: 60px;
    padding-bottom: 60px;
  }


  .problemi__heading { text-align: left; margin-bottom: 20px; }

  .problemi__sub {
    font-size: 15px;
    text-align: left;
    margin-top: 0;
  }
  .problemi__sub br { display: none; }

  .problemi__grid {
    display: flex;
    flex-direction: column;
    width: calc(100% - 40px);
    margin: 36px auto 0;
    gap: 12px;
    grid-template-columns: unset;
    grid-template-rows: unset;
  }

  .pr-box {
    height: auto;
    min-height: 220px;
    padding: 20px;
    padding-top: 76px;
  }

  .pr-box--6 { min-height: 220px; }

  .pr-box__header { font-size: 20px; line-height: 1.1; }
  .pr-box__sub    { font-size: 15px; }


  /* ══════════════════════════════════════════
     FAQ
     ══════════════════════════════════════════ */

  .section-faq {
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .faq__heading { margin-bottom: 20px; text-align: left; }


  .faq__question {
    gap: 16px;
    padding: 20px 0;
  }

  .faq__question-text  { font-size: 14px; }
  .faq__answer-inner   { max-width: 100%; font-size: 15px; }


  /* ══════════════════════════════════════════
     CTA
     ══════════════════════════════════════════ */

  .section-cta {
    padding-top: 80px;
    padding-bottom: 80px;
  }


  .cta__heading { margin-bottom: 20px; text-align: left; }
  .cta__heading-line { display: inline; }
  .cta__dimmed { display: inline; }

  .cta__sub {
    font-size: 15px;
    text-align: left;
    margin-bottom: 32px;
  }

  .cta__btn {
    width: 100%;
    justify-content: center;
    padding: 15px 24px;
    font-size: 14px;
  }


  /* ══════════════════════════════════════════
     FOOTER
     ══════════════════════════════════════════ */

  .site-footer {
    padding-top: 56px;
  }

  .footer__top {
    flex-direction: column;
    gap: 0;
    padding-bottom: 0;
  }

  .footer__logo {
    padding-bottom: 36px;
  }

  .footer__logo img {
    width: 56px;
    height: 56px;
  }

  .footer__nav {
    flex-direction: column;
    flex-wrap: unset;
    gap: 0;
    flex: unset;
    width: 100%;
  }

  /* Hide desktop footer nav, show mobile one */
  .footer__nav { display: none; }
  .footer__mob-nav { display: block; width: 100%; border-top: 1px solid rgba(0,0,0,0.08); margin-bottom: 36px; }

  /* Direct links (Početna, Cijene, Portfolio) */
  .footer__mob-link {
    display: block;
    font-family: var(--font-mont);
    font-size: 15px;
    font-weight: 400;
    color: #111111;
    text-decoration: none;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    letter-spacing: var(--ls-default);
  }

  /* L2 links inside accordion */
  .footer__mob-link--l2 {
    font-size: 14px;
    color: #444444;
    padding: 12px 0 12px 16px;
    border-bottom: none;
  }

  /* L3 (deep) links */
  .footer__mob-link--deep {
    font-size: 13px;
    color: #666666;
    padding: 14px 0 14px 32px;
    border-bottom: none;
  }

  /* Accordion group */
  .footer__mob-group {
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }

  .footer__mob-nav > .footer__mob-group:last-of-type {
    border-bottom: none;
  }

  /* Accordion title button */
  .footer__mob-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    font-family: var(--font-mont);
    font-size: 15px;
    font-weight: 400;
    color: #111111;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    letter-spacing: var(--ls-default);
  }

  .footer__mob-title--l2 {
    font-size: 14px;
    color: #444444;
    padding: 12px 0 12px 16px;
  }

  .footer__mob-title svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    opacity: 0.5;
  }

  .footer__mob-group.is-open > .footer__mob-title svg {
    transform: rotate(180deg);
  }

  /* Sub content — hidden by default */
  .footer__mob-sub {
    display: none;
  }

  .footer__mob-group.is-open > .footer__mob-sub {
    display: block;
    padding-bottom: 8px;
  }

  /* Legal links wrap on small screens */
  .footer__legal-links {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 4px 8px;
    margin-bottom: 14px;
  }

  .footer__legal-row {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }

  .footer__legal-sep--desktop {
    display: none;
  }

  .footer__legal-links a,
  .footer__legal-sep {
    font-size: 12px;
  }

  .footer__disclaimer {
    font-size: 12px;
    line-height: 1.55;
  }
  .footer__disclaimer .footer__desktop-break {
    display: none;
  }

  .footer__disclaimer .footer__desktop-break::after {
    content: ' ';
  }

  .footer__meta { gap: 4px; }
  .footer__meta p { font-size: 12px; }

  .footer__back-top {
    position: static;
    margin-top: 20px;
  }

  .footer__bottom { padding-bottom: 28px; }

  .footer__watermark {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    font-size: clamp(76px, 23vw, 118px);
    text-align: center;
  }

  .footer__watermark-wrap {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-top: 28px;
  }

}
/* Solid divider between Kompanija and Kontaktiraj nas in main mobile nav */
#mob-main .nav__mob-links > li:nth-last-child(2) .nav__mob-link {
  border-bottom-color: #ffffff;
}

