/* Mobile vertical book note on main book section */
.mobile-book-note {
  margin: 18px auto 0;
  padding: 14px 18px;
  max-width: 760px;
  border-radius: 999px;
  border: 1px solid rgba(215,255,112,.26);
  background: rgba(215,255,112,.08);
  color: var(--text);
  font-family: "Noto Serif Hebrew", "Frank Ruhl Libre", serif;
  font-weight: 700;
  text-align: center;
}

.mobile-book-note a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ZIBBLO mobile vertical book page */
.mobile-book-page {
  min-height: 100vh;
}

.mobile-book-section {
  padding-top: 54px;
}

.mobile-book-title {
  font-family: "Noto Serif Hebrew", "Frank Ruhl Libre", serif;
  font-size: clamp(34px, 7vw, 68px);
  line-height: 1.05;
  margin: 0 0 18px;
  color: var(--text);
}

.mobile-book-reader {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.mobile-book-frame {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(215,255,112,.24);
  background: #080d0a;
  box-shadow: 0 34px 90px rgba(0,0,0,.45);
}

.mobile-book-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #080d0a;
  user-select: none;
  -webkit-user-drag: none;
}

.mobile-book-controls {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.mobile-book-controls button,
.mobile-book-controls span {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(215,255,112,.24);
  background: rgba(255,255,255,.045);
  color: var(--text);
  font-family: "Noto Serif Hebrew", "Frank Ruhl Libre", serif;
  font-weight: 700;
}

.mobile-book-controls button {
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.mobile-book-controls button:hover {
  transform: translateY(-2px);
  background: rgba(215,255,112,.12);
}

.mobile-book-controls button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

#mobileBookCounter {
  color: var(--accent);
  background: rgba(215,255,112,.08);
}

.mobile-book-frame.is-turning .mobile-book-image {
  animation: zibbloPageFade .22s ease;
}

.mobile-book-back {
  margin-top: 24px;
  text-align: center;
}

@media (max-width: 680px) {
  .mobile-book-section {
    padding-top: 34px;
  }

  .mobile-book-reader {
    max-width: 100%;
  }

  .mobile-book-frame {
    border-radius: 20px;
  }

  .mobile-book-controls {
    gap: 8px;
  }

  .mobile-book-controls button,
  .mobile-book-controls span {
    min-height: 38px;
    padding: 0 10px;
    font-size: 14px;
  }

  .mobile-book-note {
    border-radius: 20px;
    line-height: 1.7;
  }
}


/* =========================================================
   Responsive
   ========================================================= */

/* Tablet */
@media (max-width: 1100px) {
  .coloring-page-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #stories .stories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .coloring-cover-card {
    width: 100%;
    padding: 12px;
    border-radius: 24px;
  }

  .coloring-cover-card img {
    border-radius: 18px;
  }

  .coloring-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .coloring-page-card {
    padding: 8px;
    border-radius: 18px;
  }

  .coloring-page-card img {
    height: 85px;
    border-radius: 12px;
    padding: 6px;
  }

  .coloring-actions a {
    min-height: 34px;
    font-size: 14px;
    padding: 0 8px;
  }

  #stories .stories-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  #stories .story-card {
    border-radius: 22px !important;
  }

  #stories .story-card img {
    height: 185px !important;
    max-height: 185px !important;
  }

  #stories .story-card div {
    padding: 18px !important;
  }

  #stories .story-card h3 {
    font-size: 22px !important;
  }

  #stories .story-card p {
    font-size: 17px !important;
  }
}

/* Mobile */
@media (max-width: 760px) {
  .youtube-top-link {
    min-height: 42px;
    padding: 0 13px;
    font-size: 15px;
  }

  .youtube-footer-link {
    width: max-content;
    max-width: 100%;
  }
}

/* Footer centered rights text */
.footer-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.footer-centered .footer-rights {
  display: block;
  text-align: center;
  width: 100%;
}

.footer-centered .youtube-footer-link {
  margin: 0;
}

/* =========================================================
   ZIBBLO WhatsApp stickers section
   ========================================================= */

/* Tablet */
@media (max-width: 1100px) {
  .stickers-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 760px) {
  .stickers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .sticker-card {
    padding: 8px;
    border-radius: 18px;
  }

  .sticker-card img {
    height: 105px;
    padding: 8px;
    border-radius: 12px;
  }

  .sticker-download {
    min-height: 34px;
    font-size: 14px;
    padding: 0 8px;
  }
}

/* =========================================================
   MOBILE FIX - ZIBBLO NAV BAR + TOP BANNER
   ========================================================= */

@media (max-width: 760px) {

  /* Header כללי במובייל */
  .site-header.zibblo-header-v3 {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    background: rgba(9,13,10,.96);
  }

  .zibblo-nav-panel {
    width: max-content !important;
    min-width: max-content !important;
  }

  .zibblo-nav-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 18px !important;
    flex-wrap: nowrap !important;
    direction: rtl !important;
    padding: 8px 12px !important;
  }

  /* שני אזורי האייקונים */
  .zibblo-icon-nav {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    direction: rtl !important;
  }

  .zibblo-icon-nav a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    min-width: 58px !important;
    color: #d7ff70 !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
  }

  /* גודל האייקונים במובייל */
  .zibblo-nav-icon {
    width: 58px !important;
    height: 58px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 0 !important;
    flex: 0 0 auto !important;
  }

  .zibblo-nav-icon img {
    width: 58px !important;
    height: 58px !important;
    display: block !important;
    object-fit: contain !important;
  }

  /* אזור הלוגו במובייל */
  .zibblo-logo-zone {
    width: 118px !important;
    height: 118px !important;
    padding-top: 0 !important;
    flex: 0 0 auto !important;
  }

  .zibblo-logo-badge {
    width: 108px !important;
    height: 108px !important;
  }

  .zibblo-logo-dots {
    inset: -2px !important;
    border-width: 2px !important;
  }

  .zibblo-logo-circle {
    width: 100% !important;
    height: 100% !important;
    display: grid !important;
    place-items: center !important;
    overflow: visible !important;
  }

  .zibblo-logo-circle img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    transform: scale(1.18) !important;
    transform-origin: center center !important;
  }

  /* שלא יופיעו כפתורי header במובייל אם נשארו */
  .zibblo-logo-actions {
    display: none !important;
  }

  /* הבאנר הגדול במובייל - רוחב מלא */
  .top-banner-section {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    overflow: visible !important;
    background: #07130c !important;
  }

  .top-banner-image {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}


/* =========================================================
   MOBILE FIX - FOOTER ACTIONS SAME ROW
   ========================================================= */

@media (max-width: 760px) {
  .footer {
    padding: 18px 0 22px !important;
  }

  .footer-centered {
    gap: 10px !important;
  }

  .footer-actions-row {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    direction: rtl !important;
  }

  .footer-built-by {
    font-size: 14px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }

  .footer-sound-btn,
  .footer-actions-row .youtube-footer-link {
    min-height: 34px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }

  .footer-actions-row .youtube-icon {
    width: 22px !important;
    height: 22px !important;
  }

  .footer-actions-row .youtube-icon svg {
    width: 14px !important;
    height: 14px !important;
  }
}