/* === zeLar Design System — Inspired by Pillarix/Meetdoctor === */

:root {
  --zelar-primary: #4F46E5;
  --zelar-primary-dark: #4338CA;
  --zelar-primary-light: #EEF2FF;
  --zelar-primary-rgb: 79, 70, 229;
  --zelar-accent: #F59E0B;
  --zelar-accent-dark: #D97706;
  --zelar-accent-light: #FEF3C7;
  --zelar-success: #10B981;
  --zelar-success-light: #D1FAE5;
  --zelar-danger: #EF4444;
  --zelar-dark: #1E293B;
  --zelar-body: #334155;
  --zelar-muted: #94A3B8;
  --zelar-bg: #F8FAFC;
  --zelar-white: #FFFFFF;
  --zelar-border: #E2E8F0;
  --zelar-shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --zelar-shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --zelar-shadow-lg: 0 10px 25px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.05);
  --zelar-radius: 16px;
  --zelar-radius-sm: 10px;
  --zelar-radius-full: 50px;
}

/* === Base === */
html {
  font-size: 15px;
  position: relative;
  min-height: 100%;
  scroll-behavior: smooth;
}
@media (min-width: 768px) { html { font-size: 16px; } }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--zelar-bg);
  color: var(--zelar-body);
  line-height: 1.6;
}

/* === Focus === */
.btn:focus, .btn:active:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
  box-shadow: 0 0 0 3px rgba(var(--zelar-primary-rgb), 0.15);
  border-color: var(--zelar-primary);
}

/* ============================================
   NAVBAR — Glassmorphism style
   ============================================ */
.navbar-zelar {
  background: var(--zelar-white);
  border-bottom: 1px solid var(--zelar-border);
  padding: 0.5rem 0;
  backdrop-filter: blur(10px);
}

.navbar-zelar .navbar-brand {
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  color: var(--zelar-primary) !important;
}
.navbar-zelar .navbar-brand strong {
  color: var(--zelar-dark);
}

.navbar-zelar .nav-link {
  color: var(--zelar-body) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: var(--zelar-radius-sm);
  transition: all 0.2s;
}
.navbar-zelar .nav-link:hover {
  color: var(--zelar-primary) !important;
  background: var(--zelar-primary-light);
}

/* ============================================
   HERO — Large gradient with pattern
   ============================================ */
.hero-section {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #9333EA 100%);
  color: white;
  padding: 5rem 0 4rem;
  margin: 0 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  top: -200px; right: -100px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-section::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  bottom: -100px; left: -50px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-section h1 {
  font-weight: 800;
  font-size: 2.8rem;
  letter-spacing: -1.5px;
  line-height: 1.15;
  color: white;
}
.hero-section p { color: rgba(255,255,255,0.8); font-size: 1.15rem; }
.hero-section .btn-light {
  font-weight: 700; padding: 0.8rem 2rem;
  border-radius: var(--zelar-radius-full);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.hero-section .btn-outline-light {
  font-weight: 600; padding: 0.8rem 2rem;
  border-radius: var(--zelar-radius-full); border-width: 2px;
}

/* ============================================
   QUICK ACTIONS — Icon circles (like Meetdoctor)
   ============================================ */
.quick-action {
  text-align: center;
  padding: 1.2rem 0.5rem;
  transition: transform 0.2s;
  cursor: default;
}
.quick-action:hover { transform: translateY(-3px); }
.quick-action .qa-icon {
  width: 64px; height: 64px;
  border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--zelar-shadow);
}
.quick-action h6 { font-weight: 600; font-size: 0.85rem; margin: 0; color: var(--zelar-dark); }
.quick-action small { color: var(--zelar-muted); font-size: 0.75rem; }

/* ============================================
   CARDS — Pillarix style with image overlay
   ============================================ */
.card {
  border: 1px solid var(--zelar-border);
  border-radius: var(--zelar-radius);
  box-shadow: var(--zelar-shadow-sm);
  transition: all 0.3s ease;
  overflow: hidden;
  background: var(--zelar-white);
}
.card:hover {
  box-shadow: var(--zelar-shadow-lg);
  transform: translateY(-4px);
}
.card-footer {
  background: transparent;
  border-top: 1px solid var(--zelar-border);
}

/* ============================================
   CLEANER CARD — Profile style
   ============================================ */
.pro-card {
  position: relative;
}
.pro-card .card-img-top-wrap {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, var(--zelar-primary-light), #E0E7FF);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pro-card .card-img-top-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}
.pro-card .card-img-top-wrap .avatar-placeholder {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--zelar-primary), #7C3AED);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 700;
  border: 4px solid white;
  box-shadow: var(--zelar-shadow);
}
.pro-card .card-img-overlay-badges {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.pro-card .price-badge {
  background: var(--zelar-success);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--zelar-radius-full);
  box-shadow: var(--zelar-shadow);
}
.pro-card .rating-badge {
  background: rgba(0,0,0,0.6);
  color: white;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--zelar-radius-full);
  backdrop-filter: blur(4px);
}
.pro-card .rating-badge i { color: var(--zelar-accent); }

.pro-card .card-body { padding: 1rem 1.2rem; }
.pro-card .cleaner-name {
  font-weight: 700; font-size: 1.05rem; color: var(--zelar-dark); margin-bottom: 0.15rem;
}
.pro-card .cleaner-region {
  font-size: 0.8rem; color: var(--zelar-muted);
}
.pro-card .cleaner-desc {
  font-size: 0.85rem; color: var(--zelar-muted); margin: 0.5rem 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pro-card .availability-row {
  display: flex; gap: 3px; flex-wrap: wrap;
}
.pro-card .day-badge {
  font-size: 0.65rem; font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--zelar-success-light); color: var(--zelar-success);
}
.pro-card .day-badge.off {
  background: #F1F5F9; color: #CBD5E1;
}

/* Verified badge */
.badge-verified {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--zelar-primary-light);
  color: var(--zelar-primary);
  font-size: 0.7rem; font-weight: 700;
  padding: 0.2em 0.55em;
  border-radius: var(--zelar-radius-full);
}

/* Premium card */
.card-premium {
  border-color: var(--zelar-accent) !important;
  border-width: 2px !important;
}
.card-premium .premium-ribbon {
  background: linear-gradient(135deg, var(--zelar-accent), var(--zelar-accent-dark));
  color: white; text-align: center;
  font-size: 0.7rem; font-weight: 700;
  padding: 0.2rem 0; letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  font-weight: 600;
  border-radius: var(--zelar-radius-sm);
  transition: all 0.2s;
}
.btn-primary {
  background: var(--zelar-primary); border-color: var(--zelar-primary);
}
.btn-primary:hover {
  background: var(--zelar-primary-dark); border-color: var(--zelar-primary-dark);
  box-shadow: 0 4px 12px rgba(var(--zelar-primary-rgb), 0.35);
}
.btn-outline-primary {
  color: var(--zelar-primary); border-color: var(--zelar-primary);
}
.btn-outline-primary:hover {
  background: var(--zelar-primary); border-color: var(--zelar-primary);
}
.btn-warning {
  background: var(--zelar-accent); border-color: var(--zelar-accent); color: white;
}
.btn-warning:hover {
  background: var(--zelar-accent-dark); border-color: var(--zelar-accent-dark); color: white;
}
.btn-success {
  background: var(--zelar-success); border-color: var(--zelar-success);
}
.btn-lg {
  padding: 0.8rem 1.8rem;
  border-radius: var(--zelar-radius-sm);
  font-size: 1rem;
}
.btn-book {
  background: var(--zelar-primary);
  color: white;
  border: none;
  border-radius: var(--zelar-radius-sm);
  font-weight: 700;
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: 100%;
}
.btn-book:hover {
  background: var(--zelar-primary-dark); color: white;
  box-shadow: 0 4px 12px rgba(var(--zelar-primary-rgb), 0.4);
}

/* ============================================
   FORMS
   ============================================ */
.form-control, .form-select {
  border-radius: var(--zelar-radius-sm);
  border-color: var(--zelar-border);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
}
.form-floating > label { color: var(--zelar-muted); }

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
  background: var(--zelar-white);
  border-radius: var(--zelar-radius);
  padding: 1.2rem 1.5rem;
  box-shadow: var(--zelar-shadow);
  margin-bottom: 2rem;
}
.filter-bar label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.2rem;
}
.section-header h3 {
  font-weight: 700; font-size: 1.4rem; color: var(--zelar-dark); margin: 0;
}
.section-header a {
  font-size: 0.85rem; font-weight: 600; color: var(--zelar-primary); text-decoration: none;
}

.section-title {
  font-weight: 700; font-size: 1.5rem; color: var(--zelar-dark);
  position: relative; padding-bottom: 0.6rem;
}
.section-title::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 40px; height: 3px;
  background: var(--zelar-primary); border-radius: 3px;
}

/* ============================================
   STATS ROW (like Meetdoctor doctor profile)
   ============================================ */
.stats-row {
  display: flex; gap: 1rem; justify-content: center; margin: 1.5rem 0;
}
.stat-box {
  text-align: center; padding: 1rem 1.5rem;
  background: var(--zelar-white);
  border-radius: var(--zelar-radius);
  box-shadow: var(--zelar-shadow-sm);
  border: 1px solid var(--zelar-border);
  flex: 1;
}
.stat-box .stat-value {
  font-size: 1.5rem; font-weight: 800; color: var(--zelar-primary);
}
.stat-box .stat-label {
  font-size: 0.75rem; color: var(--zelar-muted); text-transform: uppercase; letter-spacing: 0.5px;
}

/* Gradient stat cards (dashboard) */
.stat-card {
  border: none; border-radius: var(--zelar-radius);
  color: white; overflow: hidden;
}
.stat-card.stat-primary { background: linear-gradient(135deg, #4F46E5, #7C3AED); }
.stat-card.stat-success { background: linear-gradient(135deg, #059669, #10B981); }
.stat-card.stat-warning { background: linear-gradient(135deg, #D97706, #F59E0B); }
.stat-card.stat-info    { background: linear-gradient(135deg, #0891B2, #06B6D4); }

/* ============================================
   FOOTER
   ============================================ */
.footer-zelar {
  background: var(--zelar-dark);
  color: rgba(255,255,255,0.65);
  padding: 3.5rem 0 1.5rem;
  margin-top: 5rem;
}
.footer-zelar a { color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.2s; }
.footer-zelar a:hover { color: white; }
.footer-zelar .footer-brand { font-size: 1.5rem; color: white; font-weight: 700; }
.footer-zelar h6 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }

/* ============================================
   ALERTS
   ============================================ */
.alert { border-radius: var(--zelar-radius-sm); border: none; }

/* ============================================
   ACCORDION / FAQ
   ============================================ */
.accordion-button:not(.collapsed) {
  background: var(--zelar-primary-light); color: var(--zelar-primary-dark);
  box-shadow: none;
}
.accordion-item { border-radius: var(--zelar-radius-sm) !important; margin-bottom: 0.5rem; border: 1px solid var(--zelar-border); }
.accordion-button { border-radius: var(--zelar-radius-sm) !important; font-weight: 600; }

/* ============================================
   STAR RATING
   ============================================ */
.star-icon { cursor: pointer; transition: color 0.1s; }
.stars-display { color: var(--zelar-accent); font-size: 0.9rem; }
.stars-display .text-muted { font-size: 0.8rem; }

/* ============================================
   REVIEW CARD (like Meetdoctor)
   ============================================ */
.review-card {
  background: var(--zelar-white);
  border-radius: var(--zelar-radius-sm);
  padding: 1rem;
  border: 1px solid var(--zelar-border);
  margin-bottom: 0.75rem;
}
.review-card .review-rating { color: var(--zelar-accent); font-size: 0.85rem; }
.review-card .review-text { font-size: 0.9rem; color: var(--zelar-body); }
.review-card .review-date { font-size: 0.75rem; color: var(--zelar-muted); }

/* ============================================
   UTILITY
   ============================================ */
.object-fit-cover { object-fit: cover; }
.text-primary { color: var(--zelar-primary) !important; }
.bg-primary-light { background: var(--zelar-primary-light) !important; }
.badge { font-weight: 600; }

/* ============================================
   BOTTOM NAV BAR (mobile)
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--zelar-white);
  border-top: 1px solid var(--zelar-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom, 0px));
  z-index: 1050;
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none;
  color: var(--zelar-muted);
  font-size: 0.65rem; font-weight: 600;
  padding: 0.2rem 0.5rem;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item i { font-size: 1.3rem; margin-bottom: 1px; }
.bottom-nav-item:hover,
.bottom-nav-item.active { color: var(--zelar-primary); }

/* Center button (elevated) */
.bottom-nav-center { position: relative; margin-top: -18px; }
.bottom-nav-plus {
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--zelar-primary), #7C3AED);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.4rem;
  box-shadow: 0 4px 15px rgba(var(--zelar-primary-rgb), 0.4);
  margin-bottom: 2px;
}
.bottom-nav-center span { color: var(--zelar-primary); }

/* ============================================
   OFFCANVAS SIDE MENU (mobile)
   ============================================ */
.offcanvas-mobile {
  width: 280px !important;
  border-right: none !important;
}
.offcanvas-mobile .offcanvas-header {
  padding: 1rem 1.2rem;
}
.offcanvas-mobile .offcanvas-title {
  font-size: 1.4rem;
}
.side-user-info {
  border-bottom: 1px solid var(--zelar-border);
}
.side-nav {
  padding: 0.5rem 0;
}
.side-nav li a,
.side-nav li .side-nav-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 0.75rem 1.2rem;
  color: var(--zelar-body);
  text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  transition: background 0.15s;
  width: 100%;
  background: none; border: none; text-align: left; cursor: pointer;
}
.side-nav li a:hover,
.side-nav li .side-nav-btn:hover {
  background: var(--zelar-primary-light);
  color: var(--zelar-primary);
}
.side-nav li a i,
.side-nav li .side-nav-btn i {
  font-size: 1.1rem; width: 22px; text-align: center;
  color: var(--zelar-muted);
}
.side-nav li a:hover i { color: var(--zelar-primary); }
.side-nav-divider {
  height: 1px; background: var(--zelar-border); margin: 0.5rem 0;
}
.side-nav-label {
  padding: 0.5rem 1.2rem 0.25rem;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--zelar-muted);
}

/* ============================================
   MOBILE-FIRST ADJUSTMENTS
   ============================================ */

/* Add padding at bottom on mobile for bottom nav */
@media (max-width: 991.98px) {
  body { padding-bottom: 80px; }
  .footer-zelar { display: none; }

  /* Compact navbar on mobile */
  .navbar-zelar { padding: 0.35rem 0; }
  .navbar-zelar .navbar-brand { font-size: 1.3rem; }

  /* Hero more compact on mobile */
  .hero-section { padding: 3rem 0 2.5rem; margin: 0 0 1.5rem; }
  .hero-section h1 { font-size: 1.8rem; }
  .hero-section p { font-size: 1rem; }

  /* Cards: single column on very small */
  .filter-bar { padding: 0.8rem 1rem; margin-bottom: 1rem; }

  /* Quick actions smaller */
  .quick-action .qa-icon { width: 52px; height: 52px; font-size: 1.2rem; border-radius: 16px; }
  .quick-action h6 { font-size: 0.8rem; }

  /* Section header */
  .section-header h3 { font-size: 1.1rem; }
  .section-header a { font-size: 0.8rem; }

  /* Cleaner card image area smaller on mobile */
  .pro-card .card-img-top-wrap { height: 150px; }
}

/* Tablet tweaks */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section h1 { font-size: 2.2rem; }
}

/* Safe area for iPhones with notch */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: calc(0.4rem + env(safe-area-inset-bottom)); }
}
