/* Paywall v3 (templates/paywall-v3.php, offer-fleet.php, assets/apa-pw3.js) */
.apa-pw3 { --p3-s1: var(--c-surface, #131a25); --p3-s2: var(--c-surface-2, #18212f); --p3-s3: var(--c-surface-3, #1f2a3b); --p3-line: var(--c-line, rgba(148,163,184,.14)); --p3-line2: var(--c-line-2, rgba(148,163,184,.24)); --p3-tx2: var(--c-text-2, #aab6c5); --p3-tx3: var(--c-text-3, #8492a4); --p3-ac: #2dd4bf; --p3-ac2: #5eead4; }
.apa-pw3 .apa-pw3-hero { display: block; padding: 0; margin: 10px 0 0; background: none; border: 0; box-shadow: none; }
.apa-pw3-sea { position: relative; overflow: hidden; border-radius: 22px; background: #0c2748; min-height: 120px; }
.apa-pw3-scene { display: block; width: 100%; height: 250px; }
.apa-pw3-chip { position: absolute; z-index: 2; left: 18px; top: 16px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(11,15,22,.6); border: 1px solid rgba(255,255,255,.14); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #e2e8f0; max-width: calc(100% - 36px); }
.apa-pw3-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--p3-ac); flex: none; }
.apa-pw3-text { padding: 22px 2px 0; }
.apa-pw3 .apa-pw-lesson { font-size: 15px; font-weight: 600; color: var(--p3-tx3); margin: 0 0 6px; }
.apa-pw3-title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; margin: 0 0 8px; color: var(--c-text, #e7ecf3); }
.apa-pw3-lead { color: var(--p3-tx2); font-size: 18px; margin: 0 0 8px; }
.apa-pw3 .apa-pw3-rdy, .apa-pw3[data-pw3-done] .apa-pw3-cur { display: none; }
.apa-pw3[data-pw3-done] .apa-pw3-rdy { display: block; }
.apa-pw3[data-apa-curious] .apa-pw3-offers, .apa-pw3[data-apa-curious] .apa-pw3-after { display: none; }

/* progress with certificates */
.apa-pw3-route { display: flex; align-items: center; gap: 16px; background: var(--p3-s1); border: 1px solid var(--p3-line); border-radius: 16px; padding: 18px 26px 32px 20px; margin: 18px 0 14px; }
.apa-pw3-route > b { font-size: 14px; white-space: nowrap; }
.apa-pw3-bar { position: relative; flex: 1; height: 10px; border-radius: 99px; background: var(--p3-s3); }
.apa-pw3-fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--p3-ac), #22d3ee); }
.apa-pw3-cert { position: absolute; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; display: grid; place-items: center; color: #64748b; background: var(--p3-s2); border: 2px solid var(--p3-line2); border-radius: 50%; font-style: normal; }
.apa-pw3-cert.is-next { color: #fde68a; border-color: #facc15; background: #1f1a08; box-shadow: 0 0 0 5px rgba(250,204,21,.12), 0 0 18px rgba(250,204,21,.35); }
.apa-pw3-cert.is-done { color: var(--p3-ac2); border-color: var(--p3-ac); background: #0d2a2a; box-shadow: 0 0 14px rgba(45,212,191,.35); }
.apa-pw3-cert u { display: none; position: absolute; right: -6px; top: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--p3-ac); place-items: center; border: 2px solid var(--p3-s1); }
.apa-pw3-cert.is-done u { display: grid; }
.apa-pw3-cert i { display: none; position: absolute; top: 34px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-size: 12px; font-weight: 700; }
.apa-pw3-cert.is-done .apa-pw3-l-done { display: block; color: var(--p3-ac2); }
.apa-pw3-cert.is-next .apa-pw3-l-next { display: block; color: #fde68a; }
.apa-pw3-cert:last-child .apa-pw3-l-next, .apa-pw3-cert:last-child .apa-pw3-l-done { left: auto; right: -6px; transform: none; }

/* next island */
.apa-pw3-next { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 18px; border-radius: 18px; background: linear-gradient(90deg, rgba(250,204,21,.09), rgba(45,212,191,.05) 60%, transparent), var(--p3-s1); border: 1px solid rgba(250,204,21,.22); }
.apa-pw3-isle { flex: none; display: block; width: 78px; height: 60px; }
.apa-pw3-next__t small { display: block; color: var(--p3-tx3); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.apa-pw3-next__t b { font-size: 18px; }
.apa-pw3-next__c { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.apa-pw3-next__c span { font-size: 13px; color: var(--p3-tx2); background: var(--p3-s2); border: 1px solid var(--p3-line); border-radius: 999px; padding: 4px 11px; }

/* vessels */
.apa-pw3-h2 { font-size: 26px; margin: 30px 0 4px; letter-spacing: -.01em; }
.apa-pw3-lead2 { color: var(--p3-tx3); font-size: 15px; margin: 0; }
.apa-pw3-fleet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 22px 0; }
.apa-pw3-fleet--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apa-pw3-fleet--1 { grid-template-columns: minmax(0, 420px); }
.apa-pw3-ship { position: relative; display: flex; flex-direction: column; border-radius: 22px; background: var(--p3-s1); border: 2px solid var(--p3-line); overflow: hidden; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; }
.apa-pw3-ship:hover { transform: translateY(-3px); border-color: var(--p3-line2); }
.apa-pw3-ship.is-selected { border-color: var(--p3-ac); box-shadow: 0 20px 50px -24px rgba(45,212,191,.7); }
.apa-pw3-radio { position: absolute; opacity: 0; pointer-events: none; }
.apa-pw3-ship:has(.apa-pw3-radio:focus-visible) { outline: 3px solid #fde68a; outline-offset: 3px; }
.apa-pw3-pic { display: block; height: 160px; background: #0c2748; }
.apa-pw3-pic svg { display: block; width: 100%; height: 100%; }
.apa-pw3-rib { position: absolute; z-index: 2; top: 16px; right: -36px; transform: rotate(35deg); background: #db2777; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .05em; padding: 4px 42px; text-transform: uppercase; }
.apa-pw3-rib--first { background: #334155; color: #e2e8f0; }
.apa-pw3-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.apa-pw3-kind { color: var(--p3-tx3); font-size: 14px; }
.apa-pw3-name { font-size: 20px; line-height: 1.25; }
.apa-pw3-px { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.apa-pw3-px b { font-size: 30px; letter-spacing: -.02em; }
.apa-pw3-px del { color: var(--p3-tx3); }
.apa-pw3-px i { font-style: normal; font-size: 13px; font-weight: 800; color: #04201c; background: var(--p3-ac); border-radius: 6px; padding: 1px 6px; }
.apa-pw3-per { font-size: 13px; color: var(--p3-ac2); font-weight: 700; }
.apa-pw3-ship .apa-path-logos { display: flex; flex-wrap: wrap; gap: 6px; }
.apa-pw3-ship .apa-path-logos img { width: 28px; height: 28px; border-radius: 7px; background: #fff; padding: 3px; }
.apa-pw3-list { display: grid; gap: 6px; font-size: 14px; color: var(--p3-tx2); margin-top: 2px; }
.apa-pw3-list span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--p3-ac); margin-right: 8px; vertical-align: 2px; }
.apa-pw3-pick { margin-top: auto; padding-top: 10px; font-weight: 700; font-size: 14px; color: var(--p3-tx3); display: flex; gap: 8px; align-items: center; }
.apa-pw3-pick i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--p3-line2); display: inline-block; }
.apa-pw3-ship.is-selected .apa-pw3-pick { color: var(--p3-ac2); }
.apa-pw3-ship.is-selected .apa-pw3-pick i { border: 6px solid var(--p3-ac); }

/* dock: guarantee + one button */
.apa-pw3-dock { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: var(--p3-s1); border: 1px solid var(--p3-line); border-radius: 22px; padding: 18px 22px; }
.apa-pw3-trust { display: flex; gap: 14px; align-items: center; font-size: 15px; }
.apa-pw3-trust small { display: block; color: var(--p3-tx3); font-size: 13px; margin-top: 2px; }
.apa-pw3-buoy { flex: none; }
.apa-pw3-g { color: #fde68a; font-weight: 800; text-decoration: none; }
.apa-pw3-g:hover { text-decoration: underline; }
.apa-pw3-stars { color: #facc15; display: inline-flex; gap: 1px; vertical-align: -1px; }
.apa-pw3-stars svg { fill: currentColor; }
.apa-pw3-cta { display: inline-flex; align-items: center; justify-content: center; gap: 14px; border-radius: 16px; padding: 13px 28px; color: #fff !important; text-decoration: none !important; background: linear-gradient(135deg, #ec4899, #db2777 55%, #be185d); box-shadow: 0 14px 30px -12px rgba(219,39,119,.8); transition: filter .15s; }
.apa-pw3-cta:hover { filter: brightness(1.08); }
.apa-pw3-cta > span { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.apa-pw3-cta b { font-size: 18px; font-weight: 800; }
.apa-pw3-cta small { font-size: 13px; font-weight: 600; opacity: .88; margin-top: 3px; }
.apa-pw3-cta svg { flex: none; transition: transform .2s; }
.apa-pw3-cta:hover svg { transform: translateX(4px); }
.apa-pw3-fine { text-align: center; color: var(--p3-tx3); font-size: 13px; margin: 12px 0 0; }
.apa-pw3-peek { margin-top: 30px; }
.apa-pw3-after { margin-top: 26px; }

/* course page (templates/course.php #optiuni) and /plata/ */
.apa-pw3--course { margin-top: 40px; margin-bottom: 40px; }
.apa-pw3-sea--course { min-height: 0; }
.apa-pw3-scene--course { height: 170px; }
.apa-pw3--course .apa-pw3-h2 { margin-top: 26px; font-size: clamp(26px, 3vw, 34px); }

/* motion */
.p3-bob { animation: p3bob 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes p3bob { 50% { transform: translateY(-3px) rotate(-1.5deg); } }
.p3-wv { animation: p3wv 9s linear infinite; } .p3-wv2 { animation-duration: 13s; } .p3-wv3 { animation-duration: 7s; }
@keyframes p3wv { to { transform: translateX(-80px); } }
.p3-fog { animation: p3fog 12s ease-in-out infinite alternate; } .p3-fog2 { animation-duration: 8s; }
@keyframes p3fog { to { transform: translateX(-24px); } }
.p3-flag { animation: p3flag 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: left center; }
@keyframes p3flag { 50% { transform: scaleX(.8); } }
.p3-arm { animation: p3arm 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes p3arm { 50% { transform: rotate(-150deg); } }
.p3-tw { animation: p3tw 2.6s ease-in-out infinite; } @keyframes p3tw { 50% { opacity: .25; } }
.p3-shim { animation: p3shim 3s ease-in-out infinite; } @keyframes p3shim { 50% { opacity: .55; transform: translateX(3px); } }
.p3-drift { animation: p3drift 30s linear infinite alternate; } @keyframes p3drift { to { transform: translateX(40px); } }
@media (prefers-reduced-motion: reduce) { .apa-pw3 *, .apa-pw3-scene * { animation: none !important; } }

@media (max-width: 900px) {
  .apa-pw3-fleet, .apa-pw3-fleet--2 { grid-template-columns: minmax(0, 1fr); }
  .apa-pw3-dock { grid-template-columns: 1fr; }
  .apa-pw3-cta { width: 100%; }
}
@media (max-width: 600px) {
  .apa-pw3-scene { height: 180px; }
  .apa-pw3-scene--course { height: 130px; }
  .apa-pw3-sea { border-radius: 16px; }
  .apa-pw3-lead { font-size: 16px; }
  .apa-pw3-route { padding: 14px 22px 30px 14px; gap: 12px; }
  .apa-pw3-cert { width: 26px; height: 26px; margin: -13px 0 0 -13px; }
  .apa-pw3-cert svg { width: 14px; height: 14px; }
  /* Courses with many modules (8–9 certificates): smaller marks so they do not overlap on a phone; the next one keeps its size. */
  .apa-pw3-bar.is-many .apa-pw3-cert:not(.is-next) { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-width: 1.5px; }
  .apa-pw3-bar.is-many .apa-pw3-cert:not(.is-next) svg { width: 10px; height: 10px; }
  .apa-pw3-bar.is-many .apa-pw3-cert u { width: 12px; height: 12px; right: -5px; top: -5px; }
  .apa-pw3-bar.is-many .apa-pw3-cert u svg { width: 8px; height: 8px; }
  .apa-pw3-next { padding: 10px 14px; gap: 10px; }
  .apa-pw3-next__c { margin-left: 0; }
  .apa-pw3-pic { height: 130px; }
  .apa-pw3-cert.is-done .apa-pw3-l-done { display: none; }
  .apa-pw3-chip { font-size: 12px; left: 12px; top: 12px; max-width: calc(100% - 24px); }
  .apa-pw3-isle, .apa-pw3-isle svg { width: 58px; height: 45px; }
  .apa-pw3-next__t b { font-size: 16px; }
  .apa-pw3-name { font-size: 18px; }
  .apa-pw3-px b { font-size: 26px; }
  .apa-pw3-cta b { font-size: 16px; }
  .apa-pw3-cta { padding: 14px 16px; }
  .apa-pw3-cta > span { text-align: center; }
}
