/**
 * FILE: assets/css/patch-mobile.css
 * VERSION: 1.0.7 | 2026-01-17 (Europe/Berlin)
 * SCOP:
 *  - patch-uri STRICT pentru mobil
 *  - NU atinge PC
 *  - WHEEL MODE doar cand body are clasa wheel-mobile
 */

/* 1) Header “invizibil” (dar păstrează logo + hamburger) */
@media (max-width: 1024px) {
  .site-header {
    background: rgba(0,0,0,0.10) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .site-header,
  .site-brand,
  .nav-toggle,
  .main-nav,
  .nav-overlay {
    z-index: 5000 !important;
  }
}

/* 2) Pe index/submeniu: împinge conținutul sub header */
@media (max-width: 1024px) {
  body.home-page .coverflow-wrapper,
  body.submeniu-page .coverflow-wrapper {
    padding-top: calc(78px + env(safe-area-inset-top)) !important;
  }

  body.home-page .info,
  body.submeniu-page .info {
    top: calc(92px + env(safe-area-inset-top)) !important;
    width: min(92vw, 980px) !important;
    padding: 0 12px !important;
  }

  body.home-page .info h2,
  body.submeniu-page .info h2 {
    font-size: clamp(18px, 5vw, 26px) !important;
    line-height: 1.08 !important;
    margin-bottom: 8px !important;
  }

  body.home-page .info p,
  body.submeniu-page .info p {
    font-size: clamp(13px, 3.6vw, 16px) !important;
    line-height: 1.25 !important;
    opacity: 0.92 !important;
  }
}

/* 3) Landscape: info mai lat + mai puține rânduri */
@media (max-width: 1024px) and (orientation: landscape) {
  body.home-page .info,
  body.submeniu-page .info {
    width: min(96vw, 1200px) !important;
    top: calc(78px + env(safe-area-inset-top)) !important;
  }

  body.home-page .info p,
  body.submeniu-page .info p {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
}

/* =========================================================
   COVERFLOW MOBILE – CONTROL CU VARIABILE (ramane)
   ========================================================= */
@media (max-width: 1024px) {
  body.home-page,
  body.submeniu-page {
    --cf-x: -100px;
    --cf-y: -18px;
    --ui-x: -100px;
    --card-w: 245px;
    --card-h: 245px;
    --label-bottom: 16px;
    --nav-inset: 14px;
  }

  html, body {
    overflow-x: hidden !important;
    overscroll-behavior-x: none !important;
  }

  body.home-page .coverflow-wrapper,
  body.submeniu-page .coverflow-wrapper {
    width: 100% !important;
    max-width: none !important;
    overflow-x: hidden !important;
  }

  body.home-page .coverflow-container,
  body.submeniu-page .coverflow-container {
    width: 100% !important;
    max-width: none !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.home-page .coverflow,
  body.submeniu-page .coverflow {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    left: 50% !important;
    margin: 0 !important;
    transform: translateX(calc(-50% + var(--cf-x))) translateY(var(--cf-y)) !important;
  }

  body.home-page .coverflow-item,
  body.submeniu-page .coverflow-item {
    width: var(--card-w) !important;
    height: var(--card-h) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  body.home-page .coverflow-item .card-label,
  body.submeniu-page .coverflow-item .card-label {
    top: auto !important;
    bottom: var(--label-bottom) !important;
    left: 18px !important;
    right: 18px !important;
    text-align: left !important;
    z-index: 9999 !important;
  }

  body.home-page .info,
  body.submeniu-page .info {
    left: 50% !important;
    transform: translateX(calc(-50% + var(--ui-x))) !important;
  }

  body.home-page .dots-container,
  body.submeniu-page .dots-container,
  body.home-page .play-pause-button,
  body.submeniu-page .play-pause-button {
    left: 50% !important;
    transform: translateX(calc(-50% + var(--ui-x))) !important;
  }

  body.home-page .nav-button.prev,
  body.submeniu-page .nav-button.prev {
    left: max(6px, var(--nav-inset)) !important;
  }

  body.home-page .nav-button.next,
  body.submeniu-page .nav-button.next {
    right: max(6px, var(--nav-inset)) !important;
  }
}

/* 5) PORTRAIT */
@media (max-width: 768px) and (orientation: portrait) {
  body.home-page,
  body.submeniu-page {
    --cf-x: -100px;
    --cf-y: -24px;
    --ui-x: -100px;
    --card-w: 150px;
    --card-h: 150px;
    --label-bottom: 16px;
    --nav-inset: 14px;
  }

  body.home-page .info,
  body.submeniu-page .info {
    top: 110px !important;
  }

  body.home-page .coverflow-item .card-label h3,
  body.submeniu-page .coverflow-item .card-label h3 {
    font-size: 18px !important;
    line-height: 1.15 !important;
    margin-bottom: 6px !important;
  }

  body.home-page .coverflow-item .card-label p,
  body.submeniu-page .coverflow-item .card-label p {
    font-size: 13px !important;
    line-height: 1.25 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
}

/* 6) LANDSCAPE */
@media (max-width: 1024px) and (orientation: landscape) {
  body.home-page,
  body.submeniu-page {
    --cf-x: -100px;
    --cf-y: -10px;
    --ui-x: -100px;
    --card-w: 160px;
    --card-h: 160px;
    --label-bottom: 10px;
    --nav-inset: 10px;
  }

  body.home-page .coverflow-item .card-label h3,
  body.submeniu-page .coverflow-item .card-label h3 {
    font-size: 14px !important;
    line-height: 1.10 !important;
    margin-bottom: 4px !important;
  }

  body.home-page .coverflow-item .card-label p,
  body.submeniu-page .coverflow-item .card-label p {
    font-size: 11px !important;
    line-height: 1.20 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .site-header,
  .main-nav,
  .nav-overlay {
    max-width: 100vw !important;
  }
}

/* =========================================================
   WHEEL MODE (MOBILE ONLY)
   activ doar cand JS pune body.wheel-mobile
   ========================================================= */
@media (max-width: 1024px) {

  body.wheel-mobile.home-page .coverflow,
  body.wheel-mobile.submeniu-page .coverflow {
    left: 0 !important;
    transform: none !important;
    width: 100% !important;
    height: clamp(360px, 62vh, 560px) !important;
  }

  body.wheel-mobile.home-page .coverflow-container,
  body.wheel-mobile.submeniu-page .coverflow-container {
    position: relative !important;
    overflow: hidden !important;
    touch-action: pan-y !important;
  }

  body.wheel-mobile.home-page .coverflow-item,
  body.wheel-mobile.submeniu-page .coverflow-item {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important; /* JS pune transform complet cu !important */
    will-change: transform, opacity !important;
  }

  body.wheel-mobile.home-page .coverflow-item.active .cover,
  body.wheel-mobile.submeniu-page .coverflow-item.active .cover {
    outline: 2px solid rgba(59,130,246,0.85) !important;
    box-shadow: 0 0 0 6px rgba(59,130,246,0.18), 0 12px 28px rgba(0,0,0,0.45) !important;
    filter: saturate(1.05) contrast(1.04) !important;
  }

  body.wheel-mobile.home-page .dots-container,
  body.wheel-mobile.submeniu-page .dots-container,
  body.wheel-mobile.home-page .play-pause-button,
  body.wheel-mobile.submeniu-page .play-pause-button {
    display: none !important;
  }

  body.wheel-mobile.home-page .nav-button.prev,
  body.wheel-mobile.submeniu-page .nav-button.prev {
    left: 8px !important;
  }

  body.wheel-mobile.home-page .nav-button.next,
  body.wheel-mobile.submeniu-page .nav-button.next {
    right: 8px !important;
  }

  body.wheel-mobile.home-page .info,
  body.wheel-mobile.submeniu-page .info {
    position: relative !important;
    top: 0 !important;
    margin: 0 auto 10px auto !important;
    left: auto !important;
    transform: none !important;
    z-index: 100 !important;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  body.wheel-mobile.home-page .coverflow,
  body.wheel-mobile.submeniu-page .coverflow {
    height: clamp(420px, 68vh, 620px) !important;
  }
}

@media (max-width: 1024px) and (orientation: landscape) {
  body.wheel-mobile.home-page .coverflow,
  body.wheel-mobile.submeniu-page .coverflow {
    height: clamp(280px, 70vh, 420px) !important;
  }
}