/* ── Fonts ─────────────────────────────────────────── */
@font-face {
  font-family: 'FbMetali';
  src: url('fonts/FbMetali-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'FbMetali';
  src: url('fonts/FbMetali-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'FtOrik';
  src: url('fonts/FtOrik-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'buDrakonit';
  src: url('fonts/buDrakonit-1.2-700-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #2F3E56;
  --navy-dark: #1e2d3d;
  --blush:     #E58E7E;
  --coral:     #D4705F;
  --terracotta:#D4A79A;
  --cream:     #F7F3ED;
  --cream-dark:#EDE8DF;
  --beige:     #C9B99A;
  --gold:      #C9973A;
  --white:     #FDFAF6;
  --text-dark: #2F3E56;
  --text-mid:  #5a6a7a;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow:    0 4px 20px rgba(47, 62, 86, 0.10);
  --shadow-sm: 0 2px 8px rgba(47, 62, 86, 0.08);
  --font-h:    'FbMetali', 'Arial Hebrew', Arial, sans-serif;
  --font-b:    'FtOrik', 'Arial Hebrew', Arial, sans-serif;
  --font-a:    'buDrakonit', 'Arial Hebrew', Arial, sans-serif;
}

html {
  height: 100%;
  font-size: 16px;
}

body {
  height: 100%;
  background: var(--cream);
  color: var(--text-dark);
  font-family: var(--font-b);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ── App Shell ─────────────────────────────────────── */
.app-header {
  background: var(--navy);
  padding: 52px 24px 20px;
  text-align: center;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.header-hero {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 14px;
  border: 3px solid rgba(229, 142, 126, 0.35);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

.app-header::before {
  content: '';
  position: absolute;
  top: -40px;
  left: -40px;
  width: 160px;
  height: 160px;
  background: rgba(229, 142, 126, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(229, 142, 126, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.header-badge {
  display: inline-block;
  background: rgba(229, 142, 126, 0.18);
  border: 1px solid rgba(229, 142, 126, 0.35);
  color: var(--terracotta);
  font-family: var(--font-b);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.header-title {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 28px;
  color: var(--cream);
  line-height: 1.2;
}

.header-title span {
  color: var(--blush);
}

.header-tagline {
  font-family: var(--font-h);
  font-weight: 400;
  font-size: 15px;
  color: rgba(247, 243, 237, 0.75);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* ── Tab Navigation ────────────────────────────────── */
.tab-nav {
  background: var(--navy);
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px 18px;
  background: none;
  border: none;
  color: rgba(247, 243, 237, 0.45);
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}

.tab-btn svg {
  width: 30px;
  height: 30px;
  transition: transform 0.2s;
}

.tab-btn.active {
  color: var(--blush);
}

.tab-btn.active svg {
  transform: scale(1.1);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--blush);
  border-radius: 3px 3px 0 0;
}

/* ── Content Area ──────────────────────────────────── */
.tab-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 16px 32px;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Section Title ─────────────────────────────────── */
.section-title {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 26px;
  color: var(--navy);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2.5px solid var(--cream-dark);
}

/* ── Live Cards (Tab 1) ────────────────────────────── */
.live-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  overflow: hidden;
  border: 1.5px solid var(--cream-dark);
}

.live-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--cream-dark);
}

.live-number {
  width: 38px;
  height: 38px;
  min-width: 38px;
  background: linear-gradient(135deg, var(--blush), var(--coral));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
}

.live-card-titles { flex: 1; }

.live-card-title {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}

.live-card-subtitle {
  font-family: var(--font-b);
  font-size: 13px;
  color: var(--text-mid);
  margin-top: 2px;
}

.live-card-body {
  padding: 16px;
}

.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--navy);
}

.embed-container iframe {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-md);
}

.embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  background: var(--cream-dark);
  border-radius: var(--radius-md);
  text-align: center;
}

.embed-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--terracotta);
  opacity: 0.6;
}

.embed-placeholder p {
  font-family: var(--font-a);
  font-size: 16px;
  color: var(--text-mid);
}

/* ── Week Accordion (Tab 2) ────────────────────────── */
.week-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  border: 1.5px solid var(--cream-dark);
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.week-item.open {
  box-shadow: var(--shadow);
  border-color: rgba(229, 142, 126, 0.3);
}

.week-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.week-number {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--navy);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 14px;
  color: var(--cream);
  transition: background 0.2s;
}

.week-item.open .week-number {
  background: linear-gradient(135deg, var(--blush), var(--coral));
}

.week-titles { flex: 1; }

.week-title {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 16px;
  color: var(--navy);
}

.week-subtitle {
  font-family: var(--font-b);
  font-size: 13px;
  color: var(--text-mid);
  margin-top: 2px;
}

.week-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-mid);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.week-item.open .week-chevron {
  transform: rotate(180deg);
}

.week-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.week-item.open .week-body {
  grid-template-rows: 1fr;
}

.week-body-inner {
  overflow: hidden;
}

.week-buttons {
  padding: 0 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Message Buttons ───────────────────────────────── */
.msg-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-b);
  font-size: 15px;
  font-weight: 400;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-align: right;
}

.msg-btn:active {
  transform: scale(0.97);
}

.msg-btn .btn-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.msg-btn .btn-icon svg {
  width: 18px;
  height: 18px;
}

.msg-btn .btn-text { flex: 1; }

.msg-btn .btn-label {
  display: block;
  font-family: var(--font-h);
  font-size: 15px;
  font-weight: 700;
}

.msg-btn .btn-sub {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  margin-top: 1px;
}

/* Button variants */
.btn-sunday {
  background: linear-gradient(135deg, #fdf0ed, #fae5e0);
  color: var(--coral);
  border: 1.5px solid rgba(229, 142, 126, 0.25);
}

.btn-sunday .btn-icon {
  background: linear-gradient(135deg, var(--blush), var(--coral));
  color: var(--white);
}

.btn-tuesday {
  background: linear-gradient(135deg, #edf1f7, #e2e8f2);
  color: var(--navy);
  border: 1.5px solid rgba(47, 62, 86, 0.15);
}

.btn-tuesday .btn-icon {
  background: var(--navy);
  color: var(--cream);
}

.btn-live {
  background: linear-gradient(135deg, var(--blush), var(--coral));
  color: var(--white);
  border: none;
  box-shadow: 0 4px 14px rgba(229, 142, 126, 0.35);
}

.btn-live .btn-icon {
  background: rgba(255,255,255,0.22);
  color: var(--white);
}

.btn-thursday {
  background: linear-gradient(135deg, #fdf6e3, #f7edcc);
  color: var(--gold);
  border: 1.5px solid rgba(201, 151, 58, 0.22);
}

.btn-thursday .btn-icon {
  background: linear-gradient(135deg, var(--gold), #b8832a);
  color: var(--white);
}

/* ── Modal ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 45, 61, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--cream-dark);
  border-radius: 2px;
  margin: 14px auto 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--cream-dark);
}

.modal-title {
  font-family: var(--font-h);
  font-weight: 700;
  font-size: 17px;
  color: var(--navy);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream-dark);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.modal-close:active { background: var(--beige); }

.modal-close svg { width: 14px; height: 14px; }

.modal-body {
  padding: 20px;
}

/* Modal embed */
.modal-body .embed-container { margin-bottom: 8px; }

/* Modal text content */
.text-content {
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  white-space: pre-line;
}

/* Coming soon */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
}

.coming-soon-emoji {
  font-size: 48px;
  line-height: 1;
}

.coming-soon p {
  font-family: var(--font-a);
  font-size: 18px;
  color: var(--text-mid);
}

.coming-soon small {
  font-family: var(--font-b);
  font-size: 13px;
  color: var(--beige);
}

/* ── Opening Item ──────────────────────────────────── */
.opening-item {
  border: 1.5px solid rgba(229,142,126,.4);
  background: linear-gradient(135deg, rgba(229,142,126,.06), rgba(212,112,95,.04));
}

.opening-star {
  font-size: 18px !important;
  background: linear-gradient(135deg, var(--blush), var(--coral)) !important;
  color: white !important;
}

.opening-item.open .opening-star {
  background: linear-gradient(135deg, var(--coral), var(--blush)) !important;
}

.opening-video-btn {
  width: 100%;
}

/* ── Scrollbar ─────────────────────────────────────── */
.tab-content::-webkit-scrollbar { width: 4px; }
.tab-content::-webkit-scrollbar-track { background: transparent; }
.tab-content::-webkit-scrollbar-thumb { background: var(--cream-dark); border-radius: 2px; }

/* ── Utility ───────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
