/* ==========================================================================
   STANDALONE PAGES — الحلقات · من نحن · اتصل بنا · سياسة الخصوصية
   --------------------------------------------------------------------------
   The shell of these pages — the header, the level bar, the bottom navigation
   and the footer — is the app's own, mounted from one place by app-shell.js.
   Nothing here draws a second header or a second footer: this file only styles
   the content that sits inside the app's frame (the title block, the article,
   the contact cards, the links between pages).

   Loaded *after* main.css / components.css so it only adds what is missing —
   every colour, radius and shadow it uses comes from the same variables the
   rest of the site already uses.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. HERO — the page's identity, and the only <h1> on the page
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 0 14px 16px;
  padding: 20px 18px;
  border-radius: 22px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.28) 0%, transparent 65%),
    linear-gradient(160deg, rgba(6, 78, 59, 0.85), rgba(2, 44, 28, 0.9));
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(250, 204, 21, 0.16), transparent 45%);
  pointer-events: none;
}

.page-hero-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.42);
  color: var(--secondary-gold);
  font-size: 11.5px;
  font-weight: 800;
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 900;
  line-height: 1.4;
  color: #ffffff;
}

.page-hero p {
  margin: 0;
  font-size: 13px;
  line-height: 1.85;
  color: #cbd5e1;
}

/* The series currently selected — filled in by the page's own script. */
.page-hero-series {
  margin: 0 0 8px !important;
  font-size: 13.5px !important;
  font-weight: 900;
  color: var(--secondary-gold) !important;
}

/* A small heading above a block of content (the episode list on the hub). */
.page-section-title {
  margin: 20px 14px 10px;
  font-size: 14.5px;
  font-weight: 900;
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   2. ARTICLE (the three info pages)
   -------------------------------------------------------------------------- */

.page-article {
  margin: 0 14px 18px;
  padding: 18px 16px;
  border-radius: 20px;
  background: rgba(6, 34, 22, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.page-article h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 900;
  color: var(--secondary-gold);
}

.page-article h3 {
  margin: 18px 0 8px;
  font-size: 13.5px;
  font-weight: 900;
  color: #a7f3d0;
}

.page-article h3:first-child {
  margin-top: 0;
}

.page-article p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.95;
  color: #dbe4ee;
}

.page-article ul {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.page-article li {
  position: relative;
  margin-bottom: 9px;
  padding-right: 22px;
  font-size: 12.8px;
  line-height: 1.85;
  color: #dbe4ee;
}

.page-article li::before {
  content: '◆';
  position: absolute;
  right: 4px;
  top: 2px;
  font-size: 9px;
  color: var(--primary-emerald);
}

.page-article strong {
  color: #ffffff;
}

/* A callout used for the honest, plain-language notes. */
.page-note {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border-right: 3px solid var(--secondary-gold);
  background: rgba(250, 204, 21, 0.08);
  font-size: 12.5px;
  line-height: 1.85;
  color: #fde68a;
}

.page-meta-line {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.22);
  font-size: 11.5px;
  color: #94a3b8;
  text-align: center;
}

/* --------------------------------------------------------------------------
   3. CONTACT CARDS
   -------------------------------------------------------------------------- */

.page-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 14px 18px;
}

@media (min-width: 560px) {
  .page-contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.page-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(6, 34, 22, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.page-contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(250, 204, 21, 0.4);
  box-shadow: 0 16px 30px -20px rgba(0, 0, 0, 0.95);
}

.page-contact-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.page-contact-icon svg {
  width: 21px;
  height: 21px;
}

.page-contact-text {
  min-width: 0;
}

.page-contact-text strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
}

.page-contact-text span {
  display: block;
  font-size: 12px;
  color: var(--secondary-gold);
  direction: ltr;
  text-align: right;
  word-break: break-all;
}

/* --------------------------------------------------------------------------
   4. LINKS BETWEEN THE PAGES (also what a crawler follows)
   -------------------------------------------------------------------------- */

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 14px 18px;
}

.page-link-chip {
  flex: 1 1 auto;
  text-align: center;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #d1fae5;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s ease;
}

.page-link-chip:hover {
  background: rgba(16, 185, 129, 0.2);
}

.page-link-chip.active {
  background: linear-gradient(145deg, rgba(250, 204, 21, 0.22), rgba(234, 179, 8, 0.12));
  border-color: rgba(250, 204, 21, 0.5);
  color: var(--secondary-gold);
}


/* The app's own chrome is built from anchors on the standalone pages: same look,
   but a click leaves the page (the account, the store and the bell live in the
   app itself). Anchors bring an underline and a colour of their own, so both are
   reset here — the classes below already decide how each one looks. */
a.header-user-badge,
a.points-wallet-pill,
a.btn-header-icon-btn,
a.btn-notification-bell {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* The bottom navigation turns into links on these pages: same look, real <a href>
   so a crawler can follow them and a middle-click still works. */
.bottom-nav-item.nav-link-item {
  text-decoration: none;
  cursor: pointer;
}

/* A <button> carries «line-height: normal» from the browser, so the label in the
   app is 17.5px tall; a link inherits the page's 1.55 (23.25px), which made both
   the label and the whole navigation item ~3px taller here than in the app.
   Pinning «normal» gives the link the button's own metrics, so the two
   documents measure the same to the pixel. */
.bottom-nav-item.nav-link-item .nav-label {
  line-height: normal;
}

.bottom-nav-item.nav-link-item.active .nav-label,
.bottom-nav-item.nav-link-item.active .nav-icon {
  color: var(--secondary-gold);
}

/* A page with no matching app section (الحلقات · من نحن · اتصل بنا · الخصوصية
   وأي صفحة أخرى): no tab is active, and a floating dot with nothing to point at
   would sit at an arbitrary spot — so it steps aside. */
.bottom-navigation-bar:not(:has(.bottom-nav-item.active)) .nav-floating-dot {
  display: none;
}

/* ---- المحتوى داخل إطار التطبيق ----
   هذه الصفحات كانت وثائق قائمة بذاتها: كل كتلة تضيف حاشيتها الجانبية (14px)
   لنفسها. صارت الآن داخل قسم من أقسام التطبيق، والقسم يحمل الحاشية الجانبية
   (16px) مثل بقية الأقسام — فتُصفَّر الحاشية الجانبية هنا كي تقع البطاقة في
   نفس مكان بطاقات التطبيق بالضبط، بلا حاشيتين متضاعفتين. */
/* A standalone document has nothing to «switch in». The entrance animation is
   the app's tab change: on a real document it only delays the first paint, and
   if the animation clock never advances (a background tab, a reduced-motion
   setting, an occluded webview) it leaves the page stuck at the «from» frame —
   12px low and at opacity 0. So the section arrives already in place. */
.app-section-view.active {
  animation: none;
}

.app-section-view > .page-hero,
.app-section-view > .page-article,
.app-section-view > .page-links,
.app-section-view > .page-section-title {
  margin-left: 0;
  margin-right: 0;
}
