/* Custom styles for new sections (scoped) */

/* Hero phone screenshots in the blue hero area */
.hero_media{ overflow: visible; }
.hero_media-screens{
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  justify-items: center;
  gap: 1rem;
  padding: 1rem 0;
}
.hero_screen-img{
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: none; /* removed shadow as requested */
  background: transparent;
}
.hero_screen--center .hero_screen-img{ transform: translateY(-8px); }
@media (max-width: 991.98px){
  .hero_media-screens{ grid-template-columns: 1fr 1fr; }
  .hero_screen--center{ grid-column: 1 / -1; }
  .hero_screen--center .hero_screen-img{ transform: none; }
}

/* Desktop: move closer to the right and scale up slightly */
@media (min-width: 992px){
  .hero_media-screens{
    justify-content: end;           /* push grid to the right within container */
    transform-origin: right center; /* scale from the right side */
    transform: translateX(12px) scale(1.08);
  }
  /* Emphasize the center screenshot and calm the sides */
  .hero_screen--center{ z-index: 2; }
  .hero_screen--center .hero_screen-img{ transform: translateY(-6px); }
  .hero_screen--left .hero_screen-img,
  .hero_screen--right .hero_screen-img{ transform: none; }
  /* Explicit widths to control proportions */
  .hero_screen--center .hero_screen-img{ width: clamp(220px, 18vw, 300px); }
  .hero_screen--left .hero_screen-img,
  .hero_screen--right .hero_screen-img{ width: clamp(180px, 14vw, 240px); }
}

/* Larger desktops: move 50% towards the right edge */
@media (min-width: 1200px){
  /* Precise placement using absolute positioning */
  .hero_media-screens{
    position: relative;
    display: block;            /* override grid */
    width: var(--hero-screens-w, 760px);
    height: var(--hero-screens-h, 520px);
    margin-left: auto;         /* stick to the right within container */
    right: 0;
  transform: translateX(-20%) translateY(30px);           /* move group 20% left and a bit down */
  }
  .hero_screen{ position: absolute; }
  /* Sizes */
  .hero_screen--center .hero_screen-img{ width: var(--center-w, 360px); border-radius: 22px; }
  .hero_screen--left   .hero_screen-img{ width: var(--left-w,   240px); border-radius: 22px; }
  .hero_screen--right  .hero_screen-img{ width: var(--right-w,  260px); border-radius: 22px; }
  /* Positions (relative to the right edge of the wrapper) */
  .hero_screen--center{ right: var(--center-right, 140px); top: var(--center-top, 0px); z-index: 2; }
  .hero_screen--left  { right: calc(var(--center-right, 140px) + 275px); top: var(--left-top, 40px); }
  .hero_screen--right { right: var(--right-right, -20px); top: var(--right-top, 60px); }
}

/* Laptop range: keep absolute layout but with smaller sizes */
@media (min-width: 992px) and (max-width: 1199.98px){
  .hero_media-screens{ position: relative; display: block; width: 640px; height: 460px; margin-left: auto; transform: translateX(-20%) translateY(20px); }
  .hero_screen{ position: absolute; }
  .hero_screen--center .hero_screen-img{ width: 300px; }
  .hero_screen--left   .hero_screen-img{ width: 200px; }
  .hero_screen--right  .hero_screen-img{ width: 220px; }
  .hero_screen--center{ right: 110px; top: 0; z-index: 2; }
  .hero_screen--left  { right: 295px; top: 30px; }
  .hero_screen--right { right: -10px; top: 50px; }
}

.app-screens {
  position: relative;
  padding: 4rem 0 2rem;
}

/* Grid wrapper */
.app-screens_wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: end;
  justify-items: center;
}

/* Cards */
.app-screens_item {
  margin: 0;
}

/* Subtle depth without frames (for transparent screenshots) */
.app-screens_img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 22px;
  /* Soft shadow to float the image (no frame) */
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.20);
  background: transparent;
}

/* Center image slightly larger on wide screens */
.app-screens_item--center .app-screens_img {
  transform: translateY(-6px);
}

/* Responsive layout */
@media (min-width: 576px) {
  .app-screens_wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .app-screens {
    padding: 5rem 0 3rem;
  }
  .app-screens_wrap {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
  .app-screens_item--center .app-screens_img {
    transform: translateY(-12px);
  }
}

/* Respect existing container widths if provided by theme */
.container.app-screens_wrap {
  max-width: 1200px;
}

/* APK Modal */
.apk-modal{ position: fixed; inset:0; display: none; z-index: 1050; }
.apk-modal.is-open{ display: block; }
.apk-modal_backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.5); }
.apk-modal_dialog{ position: relative; margin: 8vh auto 0; background: #111827; color: #fff; max-width: 640px; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.4); overflow: hidden; }
.apk-modal_body{ padding: 24px; }
.apk-modal_body h3{ margin: 0 0 12px; font-size: 22px; }
.apk-modal_body p{ margin: 10px 0; line-height: 1.6; }
.apk-modal_actions{ margin-top: 18px; display: flex; gap: 12px; justify-content: flex-end; }
.apk-modal_close{ position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border-radius: 50%; background: #1f2937; color:#fff; border: none; font-size: 22px; cursor: pointer; }
.apk-modal_close:hover{ background: #374151; }
.apk-modal a.btn{ text-decoration: none; }

@media (max-width: 575.98px){
  .apk-modal_dialog{ margin: 12vh 16px 0; max-width: none; }
  .apk-modal_body{ padding: 20px; }
}
