/* ==========================================================================
   INDIA SATSANG SCHEDULES STYLESHEET (satsang_schedules.css)
   Mobile-First Interactive Document Viewer
   ========================================================================== */


.schedules-page .page-title {
  font-family: var(--font-sans);
  font-size: clamp(1.8rem, 5.5vw, 2.3rem);
  font-weight: 700;
  color: var(--text-heading);
  border-bottom: 2px solid var(--brand-maroon);
  padding-bottom: 8px;
  margin-top: 0; /* Changed from 10px to 0 */
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}

.schedules-page .lead-intro {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* --- 1. INTERACTIVE CONTROL DECK --- */
.schedule-control-deck {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 3px 12px rgba(60, 40, 20, 0.04);
  /* REMOVED: position: sticky; */
  /* REMOVED: top: 56px; */
  /* REMOVED: z-index: 1020; */
}

.deck-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.deck-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

/* Segmented Button Groups */
.year-selector,
.language-selector {
  display: inline-flex;
  background-color: #f4ede2;
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.year-btn,
.lang-btn {
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 5px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.3;
}

.year-btn.active,
.lang-btn.active {
  background-color: var(--brand-maroon);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(122, 26, 26, 0.25);
}

/* Specific Script Typography for Indic Language Tabs */
.lang-btn[data-lang="hi"] {
  font-family: "Noto Serif Devanagari", sans-serif;
  font-size: 0.85rem;
}

.lang-btn[data-lang="pb"] {
  font-family: "Noto Serif Gurmukhi", sans-serif;
  font-size: 0.85rem;
}

/* --- 2. DOCUMENT DISPLAY CANVAS --- */
.schedule-canvas-wrapper {
  margin-top: 16px;
}

.year-schedule-pane {
  display: none;
}
.year-schedule-pane.active-year {
  display: block;
}

.schedule-view-pane {
  display: none;
  animation: fadeInDoc 0.25s ease-in-out;
}
.schedule-view-pane.active-pane {
  display: block;
}

@keyframes fadeInDoc {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Document Frame (Matte and Border) */
.document-frame {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 18px rgba(60, 40, 20, 0.05);
  overflow: hidden;
}

.schedule-zoom-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  text-decoration: none !important;
}

.schedule-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
}

.schedule-zoom-link:hover .schedule-img {
  transform: scale(1.01);
}

/* Floating Zoom Badge Overlay */
.zoom-pill-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background-color: rgba(36, 32, 29, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.schedule-zoom-link:hover .zoom-pill-overlay {
  background-color: var(--brand-maroon);
}

/* --- 3. DOWNLOAD ACTION BUTTON --- */
.btn-download-pdf {
  background-color: #ffffff;
  border: 1.5px solid var(--brand-maroon);
  color: var(--brand-maroon);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.94rem;
  padding: 10px 24px;
  border-radius: 24px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(122, 26, 26, 0.1);
  transition: all 0.15s ease;
}

.btn-download-pdf:hover {
  background-color: var(--brand-maroon);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(122, 26, 26, 0.25);
}

/* --- 4. GUIDANCE CALLOUT CARD --- */
.schedule-guidance-card {
  background: #fdfbf7;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-gold);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(60, 40, 20, 0.02);
}

.guidance-icon {
  font-size: 1.35rem;
  color: var(--brand-gold);
  margin-top: 2px;
  flex-shrink: 0;
}

.guidance-title {
  font-family: var(--font-sans);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 0;
  margin-bottom: 6px;
}

.guidance-text p {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--text-main);
}

.guidance-text a {
  color: var(--brand-maroon);
  font-weight: 700;
  text-decoration: underline;
}

/* --- 5. FLOATING BACK TO TOP --- */
.btn-back-to-top {
  position: fixed;
  bottom: 22px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--brand-maroon);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(122, 26, 26, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 1040;
}

.btn-back-to-top.show {
  opacity: 0.92;
  visibility: visible;
}

/* Mobile Adjustments (< 576px) */
@media (max-width: 575.98px) {
  .schedule-control-deck {
    top: 50px;
    padding: 10px 12px;
  }

  .deck-row {
    justify-content: center;
  }

  .deck-label {
    width: 100%;
    text-align: center;
    font-size: 0.74rem;
    margin-bottom: 2px;
  }

  .year-selector,
  .language-selector {
    width: 100%;
    justify-content: center;
  }

  .year-btn,
  .lang-btn {
    flex: 1 1 auto;
    text-align: center;
    padding: 6px 8px;
    font-size: 0.78rem;
  }

  .btn-download-pdf {
    width: 100%;
    justify-content: center;
  }

  .zoom-pill-overlay {
    bottom: 8px;
    right: 8px;
    font-size: 0.7rem;
    padding: 4px 10px;
  }
}