/**
 * Samozashtita Pro — Responsive Design & Mobile Adaptations
 * Version: 2.2.0
 */

/* ==========================================================================
   FRONT PAGE STAGE & HEADER COHESION
   ========================================================================== */

/* Hide floating brand right in absolute header on front page to eliminate overlap */
body.home .sz-site-header .sz-brand-right {
  display: none !important;
}

/* Wide Desktop (> 1440px, e.g. 1920px) */
@media (min-width: 1441px) {
  body.home .sz-stage-wing-left {
    transform: translateX(-35px);
  }
  body.home .sz-stage-wing-right {
    transform: translateX(35px);
  }
}

/* Medium Desktop (1281px - 1440px) */
@media (min-width: 1281px) and (max-width: 1440px) {
  body.home .sz-stage-wing-left {
    transform: translateX(-20px);
  }
  body.home .sz-stage-wing-right {
    transform: translateX(20px);
  }
}

/* Compact Desktop / Laptop (1024px - 1280px) */
@media (min-width: 1024px) and (max-width: 1280px) {
  body.home .sz-stage-wing-left {
    transform: translateX(-12px);
  }
  body.home .sz-stage-wing-right {
    transform: translateX(12px);
  }
}

/* Tablets & Mobile (<= 1023px): No lateral offset, keep centered column */
@media (max-width: 1023px) {
  body.home .sz-stage-wing-left,
  body.home .sz-stage-wing-right {
    transform: none !important;
  }
}

/* COMPACT DESKTOP & LAPTOP (1200px - 1440px) */
@media (max-width: 1440px) {
  .sz-stage-composition {
    gap: 2rem;
  }
  .sz-stage-wing-left {
    flex: 0 0 210px;
  }
  .sz-stage-wing-right {
    flex: 0 0 auto;
    max-width: none;
    align-items: flex-end;
  }
  .sz-video-card {
    height: clamp(380px, calc(100vh - 340px), 520px);
    max-height: calc(100vh - 290px);
  }
  .sz-capsule-wrapper {
    width: 580px;
    height: 860px;
  }
  .sz-ellipse-item-btn {
    width: 92px;
    height: 92px;
  }
}

/* SMALL LAPTOP (1024px - 1200px) */
@media (max-width: 1200px) {
  .sz-stage-composition {
    gap: 1.5rem;
  }
  .sz-stage-wing-left {
    flex: 0 0 190px;
  }
  .sz-store-card {
    padding: 1.2rem 1rem;
  }
  .sz-store-action-btn {
    font-size: 0.74rem;
    padding: 0.75rem 0.9rem;
  }
  .sz-stage-wing-right {
    flex: 0 0 auto;
    max-width: none;
    align-items: flex-end;
  }
  .sz-video-card {
    height: clamp(360px, calc(100vh - 330px), 460px);
    max-height: calc(100vh - 280px);
  }
  .sz-capsule-wrapper {
    width: 520px;
    height: 800px;
  }
  .sz-ellipse-item-btn {
    width: 86px;
    height: 86px;
  }
  .sz-focal-title {
    font-size: 1.9rem;
  }
}

/* TABLET (768px - 1023px) */
@media (max-width: 1023px) {
  .sz-site-header {
    padding: 1.8rem 2rem;
  }
  .sz-editorial-stage {
    padding: 6rem 1.5rem 4rem;
    min-height: auto;
    overflow-y: auto;
  }
  .sz-stage-composition {
    flex-direction: column;
    align-items: center;
    gap: 3rem;
  }
  .sz-stage-wing-left {
    flex: 0 0 auto;
    width: 100%;
    max-width: 520px;
    align-items: center;
    order: 3;
  }
  .sz-stage-center {
    order: 1;
  }
  .sz-stage-wing-right {
    order: 2;
    flex: 0 0 auto;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .sz-stage-video-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .sz-video-editorial-header {
    text-align: center;
    align-items: center;
    margin-bottom: 16px;
    max-width: 100%;
  }
  .sz-video-card {
    height: clamp(380px, 55vh, 480px);
    width: auto;
    max-height: none;
    max-width: 300px;
  }
  .sz-capsule-wrapper {
    width: 520px;
    height: 780px;
  }
  .sz-ellipse-item-btn {
    width: 84px;
    height: 84px;
  }
  .sz-editorial-accents {
    display: none !important;
  }
  .sz-hover-info-panel {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.95);
    width: calc(100% - 3rem);
    max-width: 420px;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.2);
    border-radius: 16px;
    padding: 1.35rem 1.5rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }
  .sz-hover-info-panel.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto !important;
  }
  .sz-panel-close-btn {
    display: flex !important;
  }
  .sz-social-bar {
    left: 2rem;
    bottom: 2rem;
  }
  .sz-site-footer {
    right: 2rem;
  }
}

/* MOBILE (< 768px) */
@media (max-width: 768px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sz-site-header {
    position: relative;
    padding: 1.5rem 1.25rem 0.5rem;
    flex-direction: column;
    gap: 0.9rem;
    pointer-events: auto;
  }

  .sz-header-meta-row {
    gap: 0.6rem;
  }

  .sz-pillars-indicator {
    flex-wrap: wrap;
    font-size: 0.6rem;
  }

  .sz-brand-right {
    text-align: left;
    max-width: 100%;
  }

  .sz-brand-text-logo {
    font-size: 1.95rem;
  }

  .sz-editorial-stage {
    padding: 1.5rem 0.75rem 3rem;
    min-height: auto;
  }

  .sz-stage-composition {
    flex-direction: column;
    gap: 2.5rem;
    width: 100%;
  }

  .sz-stage-center {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .sz-capsule-wrapper {
    width: 350px;
    height: 600px;
  }

  .sz-capsule-outline {
    border-radius: 175px;
  }

  /* Hide decorative corner pills on mobile to prevent overlap with central title */
  .sz-editorial-accents {
    display: none !important;
  }

  .sz-ellipse-item-btn {
    width: 66px;
    height: 66px;
    border-radius: 9px;
  }

  .sz-item-badge-pill {
    font-size: 0.52rem;
    padding: 1px 4px;
  }

  .sz-focal-title {
    font-size: 1.4rem;
  }

  .sz-focal-tagline {
    font-size: 0.65rem;
  }

  .sz-stage-wing-right {
    width: 100%;
    max-width: 360px;
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .sz-stage-video-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .sz-video-editorial-header {
    width: 100%;
    max-width: 320px;
    text-align: center;
    align-items: center;
    margin-bottom: 14px;
  }

  .sz-video-card {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 9 / 16;
  }

  .sz-stage-wing-left {
    width: 100%;
    max-width: 350px;
    align-items: center;
  }

  .sz-video-play-btn {
    padding: 0.75rem 1.6rem;
    font-size: 0.75rem;
  }

  .sz-social-bar {
    position: relative;
    bottom: auto;
    left: auto;
    padding: 1.5rem 1rem 1rem;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .sz-social-label {
    writing-mode: horizontal-tb;
    transform: none;
    margin-bottom: 0;
  }

  .sz-social-list {
    flex-direction: row;
  }

  .sz-site-footer {
    position: relative;
    bottom: auto;
    right: auto;
    text-align: center;
    padding: 0.5rem 1rem 2rem;
  }

  .sz-footer-content {
    flex-direction: column;
    gap: 0.4rem;
  }

  /* MOBILE INFO PANEL: BOTTOM SHEET DRAWER */
  .sz-hover-info-panel {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px) scale(0.95);
    width: calc(100% - 2rem);
    max-width: 360px;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    z-index: 1000;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    padding: 1.25rem 1.4rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .sz-hover-info-panel.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto !important;
  }
  .sz-panel-close-btn {
    display: flex !important;
  }

  .sz-panel-inner {
    position: relative;
    padding-right: 1.8rem;
  }

  .sz-panel-close-btn {
    position: absolute;
    top: -0.25rem;
    right: -0.5rem;
    width: 32px;
    height: 32px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
    pointer-events: auto !important;
    transition: all 0.2s ease;
  }

  .sz-panel-close-btn:hover,
  .sz-panel-close-btn:active {
    background: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    border-color: #38bdf8;
  }
}

/* VERY SMALL MOBILE (< 380px) */
@media (max-width: 380px) {
  .sz-capsule-wrapper {
    width: 300px;
    height: 520px;
  }
  .sz-ellipse-item-btn {
    width: 56px;
    height: 56px;
  }
  .sz-logo-card {
    width: 88px;
    height: 88px;
  }
  .sz-stage-wing-right,
  .sz-stage-wing-left {
    max-width: 300px;
  }
  .sz-hover-info-panel {
    bottom: 1rem;
    width: calc(100% - 1.5rem);
    max-width: 320px;
    padding: 1.1rem 1.2rem;
  }
}

/* BASE CLOSE BUTTON (DEFAULT HIDDEN ON DESKTOP) */
.sz-panel-close-btn {
  display: none;
}

/* DESKTOP HOVER PANEL POINTER EVENTS ON ACTIVE */
.sz-hover-info-panel.is-visible {
  pointer-events: auto !important;
}

/* ACCESSIBILITY: PREFERS-REDUCED-MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .sz-ellipse-item-btn:hover,
  .sz-ellipse-item-btn.is-active {
    transform: translate(-50%, -50%) !important;
  }
}
