/* --- IMPORT FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&family=Amiri:wght@400;700&display=swap');

/* --- COLOR TOKENS --- */
:root {
  --bg-dark:          #2d3e5a;   /* primary dark navy — hero, cover, section headers */
  --bg-dark-mid:      #3a4f6e;   /* mid navy — cards on dark pages, info boxes */
  --bg-dark-deep:     #1e2d42;   /* deepest navy — footer, overlays */
  --bg-light:         #f5e6d0;   /* warm peach — content page background */
  --bg-light-deep:    #ede0cc;   /* deeper peach — gradient bottom */
  --accent:           #c2714f;   /* copper orange — diamonds, labels, CTAs, dates */
  --accent-hover:     #d4835f;   /* lighter orange — hover states */
  --accent-sand:      #e8c5a0;   /* sand — secondary text on dark pages */
  --text-on-dark:     #f0f4ff;   /* near white — headings on dark */
  --text-on-light:    #2d3e5a;   /* navy — body text on peach pages */
  --text-muted-dark:  #a0b4cc;   /* muted on dark */
  --text-muted-light: #6b7f96;   /* muted on peach */
  --border-dark:      rgba(255,255,255,0.1);
  --border-light:     rgba(45,62,90,0.15);
  --radius-card:      12px;
  --radius-btn:       6px;
}

/* --- BASE STYLES & LAYOUT --- */
body {
  font-family: 'Tajawal', 'Segoe UI', system-ui, sans-serif;
  direction: rtl;
  text-align: right;
  /* LIGHT PAGES — default for all content sections */
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-light-deep) 100%);
  color: var(--text-on-light);
  min-height: 100vh;
}

/* Smooth transitions */
* {
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

/* --- TYPOGRAPHY SCALE --- */
.page-title, .cover-title {
  font-family: 'Tajawal', sans-serif;
  font-weight: 800;
  font-size: 32px; /* Scales between 28-36px */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Tajawal', sans-serif;
}

.section-heading {
  font-weight: 700;
  font-size: 20px; /* Scales between 18-22px */
}

.card-title {
  font-weight: 700;
  font-size: 17px; /* Scales between 16-18px */
}

p, .body-text {
  font-weight: 500;
  font-size: 15px; /* Scales between 14-16px */
  line-height: 1.8;
  color: var(--text-on-light);
}

.label-text, .tag-text {
  font-weight: 500;
  font-size: 13px; /* Scales between 12-13px */
}

.date-number {
  font-weight: 700;
  color: var(--accent);
}

.brand-calligraphic {
  font-family: 'Amiri', serif;
  font-weight: 700;
}

/* --- PAGE BACKGROUND MODES --- */
/* DARK PAGES — cover, hero sections, final page */
.dark-mode-page {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.dark-mode-page .body-text, .dark-mode-page p {
  color: var(--text-on-dark);
}
.dark-mode-page .page-title, .dark-mode-page .section-heading {
  color: var(--text-on-dark);
}

/* --- DIAMOND MOTIF --- */
/* Bullet diamond (before every list item and label) */
.dm {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-left: 8px; /* RTL margin */
}

/* Dark variant (contrast on peach pages) */
.dm-dark {
  background: var(--bg-dark);
}

/* Large decorative corner diamond */
.dm-lg {
  width: 20px; height: 20px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* Photo frame — diamond clip */
.photo-diamond {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

/* --- COMPONENTS --- */

/* SECTION LABEL PILL */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #ffffff;
  font-family: 'Tajawal', sans-serif;
  font-size: 18px;
  font-weight: 700;
  padding: 6px 20px 6px 28px;
  border-radius: 5px;
  /* Arrow pointing right (RTL start direction) */
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
  margin-bottom: 12px;
}
/* White diamond bullet inside the pill */
.section-label::before {
  content: '';
  width: 10px; height: 10px;
  background: #fff;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* DARK INFO BOX */
.info-box {
  background: var(--bg-dark-mid);
  border-radius: 12px;
  padding: 16px 18px;
  color: var(--text-on-dark);
  font-family: 'Tajawal', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
  text-align: center;
  margin: 12px 0;
}

/* ORANGE BOX (DATES, PRICES, CTAS) */
.orange-box {
  background: var(--accent);
  border-radius: 14px;
  padding: 18px 20px;
  color: #ffffff;
  font-family: 'Tajawal', sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 2;
  text-align: center;
  position: relative;
  margin-top: 16px;
}
.orange-box::before {
  content: '';
  position: absolute;
  top: -12px;
  right: 50%;
  transform: translateX(50%);
  border: 8px solid transparent;
  border-bottom-color: var(--accent);
}

/* FEATURE GRID */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 16px;
  margin: 14px 0;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.feature-title {
  font-family: 'Tajawal', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-on-light);
  text-align: right;
  line-height: 1.5;
  display: flex;
  align-items: center;
}
/* Orange underline accent */
.feature-line {
  width: 60%;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  align-self: flex-end;
}

/* PHOTO DIAMOND GRID */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: 12px 0;
}
.photo-cell {
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  clip-path: polygon(50% 3%, 97% 50%, 50% 97%, 3% 50%);
}
.photo-cell img {
  width: 100%; height: 100%; object-fit: cover;
}
.photo-num {
  position: absolute;
  top: 20%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.grid-center-label {
  background: var(--accent);
  color: #fff;
  font-family: 'Tajawal', sans-serif;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  clip-path: polygon(50% 3%, 97% 50%, 50% 97%, 3% 50%);
}

/* COVER PAGE LAYOUT */
.session-row {
  display: flex;
  align-items: stretch;
  border-radius: 6px;
  overflow: hidden;
  margin: 14px 0 10px;
  justify-content: center;
}
.session-number {
  background: var(--accent);
  color: #fff;
  font-size: 48px;
  font-weight: 800;
  padding: 8px 18px;
  font-family: 'Tajawal', sans-serif;
}
.session-text {
  background: var(--bg-dark-mid);
  color: var(--text-on-dark);
  font-size: 24px;
  font-weight: 700;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  font-family: 'Tajawal', sans-serif;
}

/* FOOTER / CONTACT BAR */
.footer {
  background: var(--bg-dark-deep);
  border-radius: 12px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 12px;
  align-items: start;
}
.footer-divider {
  background: rgba(255,255,255,0.12);
  height: 100%;
  width: 1px;
}
.footer-heading {
  font-family: 'Tajawal', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--text-on-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-bottom: 6px;
}
.footer-value {
  font-size: 14px; color: var(--accent-sand); line-height: 1.6;
}
.footer-phone {
  font-family: 'Tajawal', sans-serif;
  font-size: 20px; font-weight: 800;
  color: var(--accent);
  direction: ltr;
  display: block; margin-top: 6px;
}
.footer-cta {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 6px;
  margin-top: 6px; cursor: pointer;
}

/* LABEL LIST ITEMS (BULLET-STYLE, PEACH PAGES) */
.label-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.label-list-item .label-text {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-on-light);
}

/* ORANGE SECTION SUBTITLE (CENTER) */
.orange-subtitle {
  font-family: 'Tajawal', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  text-align: center;
}

/* SCROLLBAR */
::-webkit-scrollbar       { width: 4px; background: var(--bg-dark-deep); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* --- BOOTSTRAP OVERRIDES FOR CONSISTENCY --- */

header {
  background: var(--bg-dark);
  position: relative;
  z-index: 10;
  box-shadow: 0 4px 25px rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.navbar-brand span {
  font-family: 'Amiri', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent) !important;
}

.nav-link {
  font-family: 'Tajawal', sans-serif;
  color: var(--text-on-dark) !important;
}
.nav-link:hover, .nav-link.active {
  color: var(--accent) !important;
}

.card {
  background-color: var(--bg-dark-mid) !important;
  color: var(--text-on-dark) !important;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-dark);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}
body:not(.dark-mode-page) .card {
  background-color: #ffffff !important;
  color: var(--text-on-light) !important;
  border: 1px solid var(--border-light);
}
body:not(.dark-mode-page) .card .card-title {
  color: var(--text-on-light) !important;
}
.card-header {
  background-color: transparent !important;
  border-bottom: 1px solid var(--border-light);
}

.btn {
  font-family: 'Tajawal', sans-serif;
  border-radius: var(--radius-btn);
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  letter-spacing: 0.3px;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary, .btn-success, .btn-info, .btn-warning, .btn-danger, .btn-outline-primary, .btn-outline-success {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
.btn-primary:hover, .btn-success:hover, .btn-info:hover, .btn-warning:hover, .btn-danger:hover {
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  box-shadow: 0 6px 15px var(--border-accent);
}
.btn-outline-light {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.btn-outline-light:hover {
  background-color: var(--accent) !important;
  color: #fff !important;
}

.form-control, .form-select {
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-light);
  background-color: #fff;
  text-align: right;
  padding: 0.75rem 1rem;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--border-accent);
  outline: none;
}
label {
  text-align: right;
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: inherit;
}

.table {
  color: var(--text-on-light);
}
body:not(.dark-mode-page) .table {
  background-color: #fff;
}