﻿/* ============================================================
   MOBILE — portfolio.html responsive styles
   Breakpoint: ≤ 768px
   Tokens: inherit from index mobile query
   ============================================================ */

@media (max-width: 768px) {

  body { overflow-x: hidden; }

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

  .h2-anchor { display: none; }
  .h1-mont, .h1-dutch, .h2-mont, .h2-dutch {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .container { padding-left: 20px; padding-right: 20px; }


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

  .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; }
  .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; }
  .nav__links, .nav__cta { display: none; }
  .nav__brand { display: none; }

  .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;
  }
  .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); }

  .nav__mobile {
    display: block; position: fixed; inset: 0;
    background: #111111; z-index: 999; overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
  }
  .nav-open .nav__mobile { transform: translateX(0); }

  .nav__mob-panel {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    padding: 120px 20px 60px;
    transition: transform 0.36s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
  }
  .nav__mob-panel--main   { transform: translateX(0); }
  .nav__mob-panel--pushed { transform: translateX(-100%) !important; }
  .nav__mob-panel--sub    { transform: translateX(100%); }
  .nav__mob-panel--sub.nav__mob-panel--active { transform: translateX(0); }

  .nav__mob-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; flex: 1; }
  .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; }

  .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; }

  .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;
  }

  .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; }


  /* ══════════════════════════════════════════
     HERO — dark bg
     ══════════════════════════════════════════ */

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

  .hero--contact.hero--dark .hero__content {
    position: relative;
    top: auto; left: auto; transform: none;
    width: 100%;
    padding: 140px 20px 80px;
    box-sizing: border-box;
    display: block;
  }

  .hero--contact.hero--dark .hero__heading {
    margin-top: 20px;
    display: block;
    text-align: left;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
  }

  .hero__heading-line         { display: inline; }
  .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--contact.hero--dark .hero__sub {
    text-align: left;
    max-width: 100%;
    margin: 20px 0 0;
    font-size: var(--fs-p);
    line-height: 1.65;
  }

  .hero--contact.hero--dark .hero__sub br { display: none; }

  .port-filters {
    margin-top: 28px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
  }
  .port-filters__row { display: contents; }
  .port-filter {
    font-size: 13px;
    padding: 7px 16px;
  }


  /* ══════════════════════════════════════════
     CURTAIN — disable sticky
     ══════════════════════════════════════════ */

  .port-curtain-wrap  { position: static !important; }
  .section-featured   { position: static !important; }
  .port-curtain-top   { position: static !important; z-index: auto !important; }


  /* ══════════════════════════════════════════
     FEATURED CASES
     ══════════════════════════════════════════ */

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

  .featured__case {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 0;
    padding: 0 0 52px;
  }

  .featured__case + .featured__case {
    padding-top: 52px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .featured__media {
    width: 100%;
    order: 0 !important;
    border-radius: 10px;
  }

  .featured__media img {
    width: 100%;
    height: auto;
    display: block;
  }

  .featured__body {
    width: 100%;
    order: 1 !important;
    padding: 0;
  }

  .featured__title {
    margin-bottom: 14px;
  }

  .featured__title .h2-mont,
  .featured__title .h2-dutch {
    font-size: var(--fs-h2-mont);
    line-height: 1.15;
  }

  .featured__desc {
    font-size: var(--fs-p);
    line-height: 1.65;
    margin-bottom: 20px;
  }

  .featured__services {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
  }

  .featured__cta { font-size: 14px; }


  /* ══════════════════════════════════════════
     PGRID — 4-col → 2-col
     ══════════════════════════════════════════ */

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

  .pgrid__head {
    text-align: left;
    margin-bottom: 32px;
    padding: 0;
  }

  .pgrid__tag { margin-left: 0; }

  .pgrid__heading {
    text-align: left;
    margin-bottom: 14px;
  }

  .pgrid__heading .h2-mont {
    font-size: var(--fs-h2-mont);
    line-height: 1.15;
  }

  .pgrid__heading .h2-dutch {
    font-size: var(--fs-h2-dutch);
    line-height: 1.05;
  }

  .pgrid__sub {
    font-size: var(--fs-p);
    line-height: 1.65;
    text-align: left;
    max-width: 100%;
    margin: 0;
  }

  .pgrid__sub br { display: none; }

  .pgrid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px 12px;
  }

  .pcard:nth-child(n+7) { display: none; }

  .pcard__title    { font-size: 14px; line-height: 1.3; }
  .pcard__services { font-size: 11px; }


  /* ══════════════════════════════════════════
     TESTIMONIALS — 2 scrollable rows
     ══════════════════════════════════════════ */

  .section-tests {
    padding-top: 40px;
    padding-bottom: 20px;
  }

  /* Remove container padding so rows can scroll full-width */
  .section-tests .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
  }

  .tests__head {
    text-align: left;
    margin-bottom: 0;
    padding: 0 20px 36px;
  }

  .tests__heading { line-height: 1.15; }
  .tests__heading .h2-mont { font-size: var(--fs-h2-mont); line-height: 1.15; }
  .tests__heading .h2-dutch { font-size: var(--fs-h2-dutch); line-height: 1.05; }

  .tests__grid {
    column-count: unset;
    column-gap: unset;
    display: flex;
    flex-direction: row;
    gap: 14px;
    overflow-x: auto;
    width: 100%;
    padding: 0 20px 22px;
    box-sizing: border-box;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  .tests__row { display: contents; }

  /* Show only first 2 rows */
  .tests__row:nth-child(n+3) { display: none; }

  .testc {
    min-width: min(310px, calc(100vw - 56px));
    max-width: min(310px, calc(100vw - 56px));
    min-height: 280px;
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 24px 22px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    scroll-snap-align: none;
  }

  .testc__body {
    font-size: 14px;
    line-height: 1.6;
    padding-right: 0;
    margin-bottom: 28px;
  }

  .testc__image {
    width: 34px;
    height: 34px;
    background: #e5e5e5;
  }

  .testc__name { font-size: 12.5px; }
  .testc__role { font-size: 11px; }

  .testc__bottom { gap: 10px; }

  /* Hide the bottom fade gradient — no longer needed with 2 rows */
  .community_overlay-gray { display: none !important; }


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

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

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

  .faq__heading .h2-mont { font-size: var(--fs-h2-mont); line-height: 1.15; }
  .faq__heading .h2-dutch { font-size: var(--fs-h2-dutch); line-height: 1.05; }

  .faq__question     { gap: 16px; padding: 20px 0; }
  .faq__question-text { font-size: 14px; }
  .faq__answer-inner  { max-width: 100%; font-size: var(--fs-p); }


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

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

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

  .cta__heading .h2-mont  { font-size: var(--fs-h2-mont);  line-height: 1.15; }
  .cta__heading .h2-dutch { font-size: var(--fs-h2-dutch); line-height: 1.05; }
  .cta__heading-line { display: inline; }
  .cta__dimmed       { display: inline; }

  .cta__sub {
    font-size: var(--fs-p);
    line-height: 1.65;
    text-align: left;
    margin: 0 0 32px;
  }

  .cta__sub br { display: none; }

  .cta__btn-wrap { text-align: left; }

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

}
/* 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;
}

