/* ============================================================
   ECR Services — Custom Stylesheet
   Font: System / Bootstrap native
   Primary: #FF6B35 (orange) · Secondary: #1a237e (deep blue)
   ============================================================ */

:root {
  --ecr-primary:   #FF6B35;
  --ecr-dark:      #1a237e;
  --ecr-yellow:    #FFD700;
  --ecr-green:     #2e7d32;
  --ecr-light:     #f8f9fa;
  --ecr-card-radius: 14px;
  --ecr-shadow:    0 2px 16px rgba(0,0,0,0.09);
  --ecr-shadow-hover: 0 6px 28px rgba(0,0,0,0.15);
}

* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f6fa; }

/* ── NAVBAR ──────────────────────────────────────────────── */
.ecr-navbar {
  background: linear-gradient(135deg, #1a237e 0%, #283593 60%, #1565c0 100%);
  box-shadow: 0 2px 12px rgba(26,35,126,0.3);
}
.ecr-navbar .navbar-brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.3px;
  color: #fff !important;
}
.ecr-navbar .navbar-brand i { color: #FF6B35; }
.ecr-navbar .nav-link { color: rgba(255,255,255,0.85) !important; font-weight: 500; }
.ecr-navbar .nav-link:hover, .ecr-navbar .nav-link.active { color: #fff !important; }
.ecr-navbar .btn-warning { background: #FF6B35; border-color: #FF6B35; color: #fff; font-weight: 700; }
.ecr-navbar .btn-warning:hover { background: #e55a20; border-color: #e55a20; }

/* ── HERO ────────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #1a237e 0%, #283593 40%, #1565c0 70%, #FF6B35 150%);
  padding: 60px 20px 70px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero-title {
  color: #fff;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
}
.hero-subtitle { color: rgba(255,255,255,0.82); font-size: 1rem; }
.ecr-route {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 4px 16px;
  font-size: 0.85rem;
  margin-top: 6px;
  color: #FFD700;
}
.hero-search .input-group {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.hero-search .form-control, .hero-search .form-select { border: none; box-shadow: none; }
.hero-search .form-control:focus, .hero-search .form-select:focus { box-shadow: none; }
.hero-stats { gap: 16px; }
.stat-pill {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
}

/* ── SECTION TITLE ──────────────────────────────────────── */
.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1a237e;
}

/* ── CATEGORY CARDS ──────────────────────────────────────── */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: var(--ecr-card-radius);
  padding: 18px 10px 14px;
  box-shadow: var(--ecr-shadow);
  transition: all 0.2s ease;
  text-align: center;
  height: 100%;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ecr-shadow-hover);
}
.cat-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 10px;
  transition: transform 0.2s;
}
.category-card:hover .cat-icon { transform: scale(1.12); }
.cat-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}

/* ── AREA PILLS ──────────────────────────────────────────── */
.area-pill {
  display: inline-block;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: all 0.18s;
}
.area-pill:hover, .area-pill.active {
  background: #1a237e;
  border-color: #1a237e;
  color: #fff;
}
.area-pill-sm {
  display: inline-block;
  background: #e8eaf6;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1a237e;
}

/* ── LISTING CARD ────────────────────────────────────────── */
.listing-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--ecr-card-radius);
  padding: 16px;
  box-shadow: var(--ecr-shadow);
  transition: all 0.2s;
  color: #222;
  height: 100%;
  border: 1.5px solid transparent;
}
.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ecr-shadow-hover);
  border-color: var(--ecr-primary);
}
.listing-cat-badge {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.listing-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a237e;
  margin-bottom: 6px;
  line-height: 1.3;
}
.listing-desc {
  font-size: 0.82rem;
  color: #666;
  margin-bottom: 8px;
  flex-grow: 1;
  line-height: 1.5;
}
.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #888;
  border-top: 1px solid #f0f0f0;
  padding-top: 8px;
}
.listing-contact-hint {
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 4px 10px;
  text-align: center;
  margin-top: 6px;
}

/* ── VIEW PAGE ───────────────────────────────────────────── */
.view-card {
  background: #fff;
  border-radius: var(--ecr-card-radius);
  padding: 28px;
  box-shadow: var(--ecr-shadow);
}
.description-box {
  background: #f8f9ff;
  border-radius: 10px;
  padding: 16px;
  border-left: 4px solid var(--ecr-primary);
}
.contact-box {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border-radius: 14px;
  padding: 24px;
  border: 2px solid #c8e6c9;
}
.contact-btn {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
  color: #fff;
}
.contact-btn:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(0,0,0,0.2); color: #fff; }
.call-btn { background: linear-gradient(135deg, #1565c0, #1976d2); }
.whatsapp-btn { background: linear-gradient(135deg, #1b5e20, #2e7d32); }

/* ── LOGIN ───────────────────────────────────────────────── */
.login-bg { background: linear-gradient(135deg, #e8eaf6 0%, #fce4ec 100%); min-height: 100vh; }
.login-logo {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a237e, #FF6B35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff;
  margin: 0 auto 10px;
  box-shadow: 0 4px 16px rgba(26,35,126,0.3);
}
.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.step-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B35, #ff8a50);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff;
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(255,107,53,0.3);
}

/* ── POST FORM ───────────────────────────────────────────── */
.post-icon-box {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FF6B35, #ff8a50);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  flex-shrink: 0;
}
.form-card {
  background: #fff;
  border-radius: var(--ecr-card-radius);
  padding: 28px;
  box-shadow: var(--ecr-shadow);
}

/* ── MY LISTINGS ─────────────────────────────────────────── */
.my-listing-card {
  background: #fff;
  border-radius: var(--ecr-card-radius);
  padding: 16px;
  box-shadow: var(--ecr-shadow);
  border: 1.5px solid #e0e0e0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.status-active   { background: #e8f5e9; color: #2e7d32; }
.status-pending  { background: #fff8e1; color: #f57f17; }
.status-rejected { background: #ffebee; color: #c62828; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar-box {
  background: #fff;
  border-radius: var(--ecr-card-radius);
  overflow: hidden;
  box-shadow: var(--ecr-shadow);
}
.sidebar-head {
  background: #1a237e;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 12px 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sidebar-item {
  display: block;
  padding: 9px 16px;
  font-size: 0.85rem;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s, color 0.15s;
}
.sidebar-item:hover { background: #e8eaf6; color: #1a237e; }
.sidebar-item.active { background: #e8eaf6; color: #1a237e; font-weight: 700; border-left: 3px solid #1a237e; }

/* ── MOBILE CATEGORY SCROLL ──────────────────────────────── */
.mobile-cat-scroll { position: sticky; bottom: 0; z-index: 100; }
.cat-chip {
  white-space: nowrap;
  background: #f5f5f5;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  border: 1px solid #e0e0e0;
  flex-shrink: 0;
}
.cat-chip.active { background: #1a237e; color: #fff; border-color: #1a237e; }

/* ── CTA SECTION ─────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, #FF6B35 0%, #ff8a50 100%);
  position: relative;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── FOOTER ──────────────────────────────────────────────── */
.ecr-footer {
  background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
  margin-top: auto;
}
.footer-link { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.85rem; }
.footer-link:hover { color: #fff; }

/* ── ADMIN ───────────────────────────────────────────────── */
.admin-body { background: #f0f2f5; }
.admin-navbar {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a237e 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.admin-navbar .navbar-brand { font-weight: 800; font-size: 1.1rem; }
.admin-navbar .nav-link { color: rgba(255,255,255,0.8) !important; font-size: 0.88rem; }
.admin-navbar .nav-link:hover, .admin-navbar .nav-link.active { color: #fff !important; }
.admin-card {
  background: #fff;
  border-radius: var(--ecr-card-radius);
  padding: 20px;
  box-shadow: var(--ecr-shadow);
}
.stat-card {
  border-radius: var(--ecr-card-radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--ecr-shadow);
}
.stat-icon { font-size: 1.5rem; margin-bottom: 6px; opacity: 0.8; }
.stat-num  { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label{ font-size: 0.75rem; font-weight: 600; opacity: 0.8; margin-top: 4px; text-transform: uppercase; }

.cat-admin-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px;
  border: 1.5px solid #e0e0e0;
}
.cat-admin-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.icon-picker-btn { padding: 5px 8px; font-size: 0.8rem; }

/* ── UTILITIES ───────────────────────────────────────────── */
.btn-warning { color: #fff !important; }
.table th { font-size: 0.82rem; font-weight: 700; }
.table td { font-size: 0.85rem; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 576px) {
  .hero-section { padding: 40px 16px 50px; }
  .hero-search .form-select { display: none; }
  .view-card { padding: 16px; }
  .contact-btn { padding: 12px 14px; }
  .login-card { padding: 20px 16px; }
  .form-card { padding: 16px; }
  .admin-card { padding: 14px; }
  .stat-num { font-size: 1.5rem; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 1.7rem; }
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.listing-card, .category-card { animation: fadeInUp 0.3s ease both; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c0c0c0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }
