/* ============================================
   CSS Variables — Nishan Sahib Navy & Saffron
   ============================================ */
:root {
  --bg-primary: #081426;
  --bg-secondary: rgba(13, 30, 54, 0.92);
  --bg-card: rgba(19, 42, 70, 0.95);
  --bg-highlight: #102C57;
  --text-primary: #FFF8E8;
  --text-secondary: #C8BDA6;
  --text-muted: #8a7e6e;
  --border: #29496B;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.35);
  --green: #2BCB78;
  --green-bg: rgba(43, 203, 120, 0.12);
  --green-border: rgba(43, 203, 120, 0.3);
  --red: #FF6B5E;
  --red-bg: rgba(255, 107, 94, 0.12);
  --red-border: rgba(255, 107, 94, 0.3);
  --accent: #F4A51C;
  --accent-hover: #FFB72B;
  --accent-secondary: #1D5FA7;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: color var(--transition);
}

.bg-blur {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(12px);
  -webkit-filter: blur(12px);
  transform: scale(1.1);
}

.bg-blur::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 38, 0.75);
}

/* ============================================
   Header
   ============================================ */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  transition: background var(--transition), border var(--transition);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}

.logo img {
  width: 44px;
  height: 44px;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.last-updated {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================
   Filters
   ============================================ */
.filters {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 0;
}

.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select {
  padding: 10px 36px 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23C8BDA6' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border var(--transition);
}

.filter-group select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.filter-toggle-group {
  margin-left: auto;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  padding: 10px 0;
}

.toggle-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #FFF8E8;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-label input:checked + .toggle-switch {
  background: var(--accent);
}

.toggle-label input:checked + .toggle-switch::after {
  transform: translateX(20px);
}

.toggle-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ============================================
   Main
   ============================================ */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

/* ============================================
   Info Section
   ============================================ */
.info-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .info-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: background var(--transition), border var(--transition);
}

.info-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 12px;
}

.info-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.time-slots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.info-card--timings .time-slots {
  margin-top: 8px;
}

.time-slot {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: background var(--transition), border var(--transition);
}

.info-price {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.info-price strong {
  color: var(--text-primary);
  font-size: 1.1rem;
}

/* Bank Details */
.bank-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bank-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.9rem;
}

.bank-label {
  color: var(--text-muted);
}

.bank-value {
  font-weight: 600;
  color: var(--text-primary);
}

.bank-account {
  font-family: monospace;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* Section Divider */
.section-divider {
  margin: 32px 0 0;
  padding-bottom: 8px;
}

.section-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* ============================================
   Loading
   ============================================ */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  color: var(--text-muted);
  gap: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   Error & Empty States
   ============================================ */
.error-state,
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  text-align: center;
  color: var(--text-muted);
  gap: 8px;
}

.error-icon,
.empty-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.error-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   Sessions Grid
   ============================================ */
.sessions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding-top: 24px;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 640px) {
  .sessions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .sessions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   Session Card
   ============================================ */
.session-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition), border var(--transition), background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.session-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.session-card.fade-in {
  animation: fadeIn 0.35s ease;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.session-number {
  font-size: 1.1rem;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-available {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.badge-booked {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.detail-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  min-width: 48px;
  flex-shrink: 0;
}

.detail-value {
  font-weight: 600;
  color: var(--text-primary);
}

.notes-row {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.card-actions {
  margin-top: auto;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), opacity var(--transition);
}

.btn-whatsapp:hover {
  background: var(--accent-hover);
}

.btn-whatsapp:active {
  transform: scale(0.98);
}

.btn-whatsapp svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.booked-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 20, 0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(4, 10, 20, 0.4);
  animation: modalSlide 0.25s ease;
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.modal-close:hover {
  background: var(--bg-primary);
}

.modal-body {
  padding: 20px 24px 24px;
}

.modal-session-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--bg-primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  line-height: 1.5;
  transition: background var(--transition);
}

.modal-prompt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), border var(--transition), box-shadow var(--transition);
}

.contact-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.contact-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.contact-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-phone {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: monospace;
}

.contact-arrow {
  margin-left: auto;
  font-size: 1.3rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================
   QR Code Button & Modal
   ============================================ */
.btn-qr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 20px;
  margin-top: 16px;
  background: var(--bg-primary);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.btn-qr:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-qr svg {
  flex-shrink: 0;
}

.qr-modal {
  max-width: 380px;
}

.qr-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.qr-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  text-align: center;
  padding: 24px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ============================================
   Utility
   ============================================ */
[hidden] {
  display: none !important;
}
