/* ============================================================
   IPTVW Style Refresh (keeps current dark theme)
   ============================================================ */

/* Decorative feather SVGs -> solid white */
svg[viewBox="0 0 43 81"] stop {
  stop-color: #ffffff !important;
}
svg[viewBox="0 0 43 81"] g {
  opacity: 0.55 !important;
}

/* ============================================================
   Hero phone screenshots — horizontal carousel on mobile
   (the 3 stacked design-mode screenshots become swipeable)
   ============================================================ */
@media (max-width: 1023px) {
  /* Tighter gap between phone carousel and the metrics below */
  [class*="pb-8"] {
    padding-bottom: 1rem !important;
  }
  #heroPhonesMobile {
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
    padding: 0 0 0.625rem 0;
    justify-content: flex-start;
    align-items: flex-start;
  }
  #heroPhonesMobile::-webkit-scrollbar {
    display: none;
  }
  #heroPhonesMobile > div {
    flex: 0 0 auto;
  }
  #heroPhonesMobile > div:nth-child(2) {
    margin-top: 0;
  }
}

/* ============================================================
   Social / Rating section — mobile branch layout
   rating on top-center, loved-by & download-by as branches
   on both sides in the next row; connecting stick invisible
   ============================================================ */
@media (max-width: 767px) {
  .grid.w-fit.grid-cols-3 {
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "rating rating"
      "loved download" !important;
    width: 100% !important;
    gap: 0.75rem 1.25rem !important;
    justify-items: center;
    align-items: center;
    margin-top: 0.375rem !important;
    margin-bottom: 1.5rem !important;
  }
  .grid.w-fit.grid-cols-3 > :nth-child(1) { grid-area: rating; }
  .grid.w-fit.grid-cols-3 > :nth-child(2) { grid-area: loved; }
  .grid.w-fit.grid-cols-3 > :nth-child(3) { grid-area: download; }

  /* Feathers on BOTH sides of each metric (not under the text) */
  .grid.w-fit.grid-cols-3 > div {
    grid-template-columns: 26px auto 26px !important;
    width: max-content !important;
    align-items: center;
    gap: 0.6rem;
  }
  .grid.w-fit.grid-cols-3 > div > div {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .grid.w-fit.grid-cols-3 > div > svg {
    width: 26px !important;
    height: 48px !important;
    position: relative;
    z-index: 2;
  }

  /* Rating dominates */
  .grid.w-fit.grid-cols-3 > :nth-child(1) [class*="text-amber-400"] svg {
    width: 24px !important;
    height: 24px !important;
  }
  .grid.w-fit.grid-cols-3 > :nth-child(1) p.text-xl {
    font-size: 3rem !important;
    line-height: 3.25rem !important;
    font-weight: 800 !important;
  }
  .grid.w-fit.grid-cols-3 > :nth-child(1) p.mb-0\.5 {
    font-size: 0.9rem !important;
    letter-spacing: 0.02em;
  }

  /* Loved / Download text bigger & readable */
  .grid.w-fit.grid-cols-3 > :nth-child(2) p,
  .grid.w-fit.grid-cols-3 > :nth-child(3) p {
    font-size: 1.05rem !important;
    line-height: 1.35rem !important;
    font-weight: 700 !important;
  }
  .grid.w-fit.grid-cols-3 > :nth-child(2) p.mt-1\.5,
  .grid.w-fit.grid-cols-3 > :nth-child(3) p.mt-1\.5 {
    font-size: 1.35rem !important;
    line-height: 1.5rem !important;
  }
  .grid.w-fit.grid-cols-3 > :nth-child(2) p.mb-0\.5,
  .grid.w-fit.grid-cols-3 > :nth-child(3) p.mb-0\.5 {
    font-size: 0.9rem !important;
  }
}

/* ============================================================
   Features carousel — horizontal swipe on mobile
   ============================================================ */
@media (max-width: 767px) {
  [data-slot="carousel-content"] {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  [data-slot="carousel-content"]::-webkit-scrollbar {
    display: none;
  }
  [data-slot="carousel-item"] {
    scroll-snap-align: center;
  }
}

/* ============================================================
   FAQ — center on mobile, chevron down -> rotates up when open
   ============================================================ */
@media (max-width: 767px) {
  #faqs {
    text-align: center;
  }
  #faqs > div:first-child {
    align-items: center !important;
  }
  #faqs [data-slot="badge"] {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  #faqs h2,
  #faqs p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  #faqs [data-slot="button"] {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Chevron faces down by default, rotates up when open */
[data-slot="accordion-trigger"] svg {
  transform: rotate(0deg) !important;
}
[data-slot="accordion-item"][data-state="open"] [data-slot="accordion-trigger"] svg {
  transform: rotate(180deg) !important;
}

/* ============================================================
   Footer — two centered columns (IPTVW & Legal), copyright in a
   single centered line below; same on mobile and desktop
   ============================================================ */
footer .grid.grid-cols-2 {
  grid-template-columns: 1fr 1fr !important;
  grid-template-areas:
    "brand legal"
    "copyright copyright" !important;
  gap: 1.25rem !important;
  text-align: center;
  align-items: center;
  justify-items: center;
}
footer .grid.grid-cols-2 > div:nth-child(1) { grid-area: brand; }
footer .grid.grid-cols-2 > div:nth-child(2) { grid-area: legal; }
footer .grid.grid-cols-2 > div:nth-child(3) { grid-area: copyright; }
footer .grid.grid-cols-2 > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}
footer ul li a {
  justify-content: center;
}
footer .col-span-2 {
  grid-column: span 2 / span 2 !important;
  text-align: center !important;
}
footer .col-span-2 p {
  white-space: nowrap;
  margin-top: 1rem !important;
}

/* ============================================================
   Bigger H1 on mobile
   ============================================================ */
@media (max-width: 767px) {
  h1 {
    font-size: 2.25rem !important;
    line-height: 1.2 !important;
  }
}

/* ============================================================
   Rating rows — on mobile keep only the first row, auto vertical
   slide (one card at a time); pause while a card is held
   ============================================================ */
@media (max-width: 767px) {
  .space-y-4 > div[class*="col-span-4"]:nth-child(1) .overflow-hidden {
    overflow: hidden;
    height: 360px;
  }
  .space-y-4 > div[class*="col-span-4"]:nth-child(1) .flex.w-max {
    flex-direction: column !important;
    width: 100% !important;
    animation: iptvw-vslide 28s linear infinite;
  }
  .space-y-4 > div[class*="col-span-4"]:nth-child(1) .flex.w-max .flex.gap-4 {
    flex-direction: column !important;
    width: 100% !important;
    align-items: center;
    animation: none !important;
  }
  /* Cards keep their original desktop size (w-80) in the vertical slide */
  .space-y-4 > div[class*="col-span-4"]:nth-child(1) .pointer-events-none.absolute {
    display: none;
  }

  /* Mobile: keep only the first row — hide the second */
  .space-y-4 > div[class*="col-span-4"]:nth-child(2) {
    display: none !important;
  }

  /* Pause the vertical slide while a card is held/pressed */
  .space-y-4 > div[class*="col-span-4"]:nth-child(1) .flex.w-max:active {
    animation-play-state: paused !important;
  }
}
@keyframes iptvw-vslide {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .space-y-4 > div[class*="col-span-4"]:nth-child(1) .flex.w-max {
    animation: none !important;
  }
}

/* ============================================================
   Hero phones on mobile - auto-advancing carousel: the current
   phone stays centered while the other two sit behind it on
   both sides; advances automatically every few seconds
   ============================================================ */
#heroPhonesMobile {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 660px;
  overflow: hidden !important;
  overflow: clip !important;
  --pw: 260px;
  --off: calc(var(--pw) * 0.7);
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 640px) {
  #heroPhonesMobile {
    height: 800px;
    --pw: 320px;
  }
}
#heroPhonesMobile .hero-phone-item {
  position: absolute;
  top: 6px;
  left: 50%;
  width: var(--pw);
  transform: translate(-50%, 0) scale(0.85);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.9s ease, filter 0.9s ease;
  z-index: 2;
  opacity: 0.6;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.18));
  cursor: pointer;
  will-change: transform;
}
#heroPhonesMobile .hero-phone-item.pos-center {
  transform: translate(-50%, 0) scale(1);
  z-index: 3;
  opacity: 1;
  filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.32));
}
#heroPhonesMobile .hero-phone-item.pos-left {
  transform: translate(calc(-50% - var(--off)), 0) scale(0.85);
  z-index: 1;
  opacity: 0.55;
}
#heroPhonesMobile .hero-phone-item.pos-right {
  transform: translate(calc(-50% + var(--off)), 0) scale(0.85);
  z-index: 2;
  opacity: 0.6;
}

/* ============================================================
   Nav bar menu — slightly larger font on desktop
   ============================================================ */
@media (min-width: 1024px) {
  [data-slot="navigation-menu-link"] {
    font-size: 1rem !important;
  }
}

/* ============================================================
   Halve gaps — hero phones -> metrics, features -> testimonials
   ============================================================ */
/* Hero container: halve bottom padding (py-12 -> 1.5rem; lg:py-20 -> 2.5rem) */
@media (max-width: 1023px) {
  .flex.flex-col.items-center.justify-center.space-y-8.py-12.text-center {
    padding-bottom: 1rem !important;
  }
}
@media (min-width: 1024px) {
  .flex.flex-col.items-center.justify-center.space-y-8.py-12.text-center {
    padding-bottom: 2.5rem !important;
  }
}

/* Stats row: halve top margin on md+ (md:my-24 -> top 3rem) */
@media (min-width: 768px) {
  div.relative.mx-auto.mt-12.mb-8.grid.w-fit.grid-cols-3 {
    margin-top: 3rem !important;
  }
}

/* Features section: halve bottom padding (mobile py-14 56px -> 28px) */
@media (max-width: 767px) {
  #features {
    padding-bottom: 1.75rem !important;
  }
}
/* Features section: halve bottom padding on md+ (md:py-25 100px -> 50px) */
@media (min-width: 768px) {
  #features {
    padding-bottom: 3.125rem !important;
  }
}

/* Testimonials: halve top padding (py-20 80px -> 40px) at all widths */
section.relative.w-full.overflow-hidden.bg-gradient-to-b.from-blue-50.to-white.py-20 {
  padding-top: 2.5rem !important;
}
