/* ============================================================
   The Druze Phone Book - Main Stylesheet
   Druze Heritage: Warm Olive Green, Deep Gold, Cream
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lateef:wght@400;600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300&display=swap');

/* ============================================================
   CSS Variables
   ============================================================ */
:root {
  --olive:        #4a5e34;
  --olive-dark:   #344225;
  --olive-light:  #6b7f50;
  --gold:         #b8892a;
  --gold-light:   #d4a843;
  --gold-pale:    #f0daa0;
  --cream:        #f9f4e8;
  --cream-dark:   #ede5cd;
  --text-dark:    #2a2012;
  --text-muted:   #6b5d45;
  --white:        #ffffff;
  --border:       #d6c99a;
  --shadow:       rgba(74, 94, 52, 0.15);
  --shadow-gold:  rgba(184, 137, 42, 0.2);

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'Source Serif 4', 'Georgia', serif;
  --font-arabic:  'Lateef', serif;

  --radius:       8px;
  --radius-lg:    16px;
  --transition:   0.25s ease;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background-color: var(--cream);
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--olive-dark);
  line-height: 1.3;
}

a {
  color: var(--olive);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; }

/* ============================================================
   Druze Pattern Divider
   ============================================================ */
.druze-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  color: var(--gold);
  font-size: 1.2rem;
}
.druze-divider::before,
.druze-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-pale), var(--gold), var(--gold-pale), transparent);
}

/* Decorative star-like motif */
.druze-star {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: var(--gold);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  background: linear-gradient(135deg, var(--olive-dark) 0%, var(--olive) 100%);
  border-bottom: 3px solid var(--gold);
  padding: 0.75rem 0;
  box-shadow: 0 2px 12px var(--shadow);
}

.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-light) !important;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.navbar-brand:hover { color: var(--gold-pale) !important; }

.navbar-brand .brand-icon {
  width: 38px;
  height: 38px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--olive-dark);
  flex-shrink: 0;
}

.nav-link {
  color: var(--cream) !important;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-link:hover {
  color: var(--gold-light) !important;
  background: rgba(255,255,255,0.08);
}
.nav-link.active-nav {
  color: var(--gold-light) !important;
}

.navbar-toggler {
  border-color: var(--gold) !important;
}
.navbar-toggler-icon {
  filter: invert(1);
}

.nav-btn-primary {
  background: var(--gold) !important;
  color: var(--olive-dark) !important;
  font-weight: 600;
  border-radius: var(--radius) !important;
  padding: 0.4rem 1.2rem !important;
}
.nav-btn-primary:hover {
  background: var(--gold-light) !important;
  color: var(--olive-dark) !important;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  background: linear-gradient(150deg, var(--olive-dark) 0%, var(--olive) 60%, #5c7042 100%);
  color: var(--cream);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(184,137,42,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(184,137,42,0.08) 0%, transparent 40%);
  pointer-events: none;
}

/* Decorative geometric pattern */
.hero::after {
  content: '';
  position: absolute;
  right: -100px;
  top: -100px;
  width: 400px;
  height: 400px;
  border: 2px solid rgba(184,137,42,0.15);
  border-radius: 50%;
  pointer-events: none;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.1rem;
  color: var(--gold-pale);
  margin-bottom: 2rem;
  font-style: italic;
}

.hero-arabic {
  font-family: var(--font-arabic);
  font-size: 1.4rem;
  color: var(--gold-light);
  display: block;
  margin-bottom: 0.5rem;
  direction: rtl;
}

/* ============================================================
   Search Bar
   ============================================================ */
.search-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
  box-shadow: 0 8px 32px var(--shadow);
  max-width: 680px;
}

.search-wrap input {
  border: none;
  outline: none;
  flex: 1;
  padding: 0.7rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-dark);
  background: transparent;
}

.search-wrap select {
  border: none;
  outline: none;
  padding: 0.7rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--cream);
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-search {
  background: var(--olive);
  color: var(--white);
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.btn-search:hover { background: var(--olive-dark); }

/* ============================================================
   Buttons
   ============================================================ */
.btn-druze {
  background: var(--olive);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
}
.btn-druze:hover {
  background: var(--olive-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
}

.btn-gold {
  background: var(--gold);
  color: var(--olive-dark);
  border: none;
  border-radius: var(--radius);
  padding: 0.6rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
}
.btn-gold:hover {
  background: var(--gold-light);
  color: var(--olive-dark);
  transform: translateY(-1px);
}

.btn-outline-druze {
  background: transparent;
  color: var(--olive);
  border: 2px solid var(--olive);
  border-radius: var(--radius);
  padding: 0.5rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  text-decoration: none;
}
.btn-outline-druze:hover {
  background: var(--olive);
  color: var(--white);
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 2px 8px var(--shadow);
  transition: all var(--transition);
  overflow: hidden;
}

.business-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.business-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow-gold);
  border-color: var(--gold-pale);
}

.business-card .card-img-top {
  height: 180px;
  object-fit: cover;
  background: var(--cream-dark);
}

.business-card .card-logo-placeholder {
  height: 180px;
  background: linear-gradient(135deg, var(--cream-dark), var(--gold-pale));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--gold);
}

.business-card .card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.business-card .card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--olive-dark);
  margin-bottom: 0.4rem;
}

.business-card .card-category {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.business-card .card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.business-card .card-footer-wrap {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--cream-dark);
}

/* ============================================================
   Category Cards
   ============================================================ */
.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1rem;
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: var(--text-dark);
}
.cat-card:hover {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--shadow);
}
.cat-card:hover .cat-icon { color: var(--gold-light); }
.cat-card:hover .cat-name { color: var(--white); }

.cat-icon {
  font-size: 2.5rem;
  color: var(--olive);
  margin-bottom: 0.75rem;
  display: block;
  transition: color var(--transition);
}
.cat-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--olive-dark);
  transition: color var(--transition);
}

/* ============================================================
   Section Titles
   ============================================================ */
.section-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--olive-dark);
  position: relative;
  padding-bottom: 0.75rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}
.section-title.centered::after { left: 50%; transform: translateX(-50%); }
.section-title.centered { text-align: center; }

/* ============================================================
   Forms
   ============================================================ */
.form-label {
  font-weight: 600;
  color: var(--olive-dark);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background-color: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(74, 94, 52, 0.15);
  outline: none;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 4px 20px var(--shadow);
}

/* ============================================================
   Status Badges
   ============================================================ */
.badge-status {
  display: inline-block;
  padding: 0.3em 0.8em;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pending  { background: #fff3cd; color: #856404; }
.status-approved { background: #d1e7dd; color: #0f5132; }
.status-rejected { background: #f8d7da; color: #842029; }
.status-unverified { background: var(--cream-dark); color: var(--text-muted); }

/* ============================================================
   Business Detail Page
   ============================================================ */
.business-header {
  background: linear-gradient(135deg, var(--olive-dark), var(--olive));
  color: var(--white);
  padding: 3rem 0;
}

.business-logo {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 4px solid var(--gold);
  background: var(--cream);
}

.business-logo-placeholder {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  background: var(--gold-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--gold);
  border: 4px solid var(--gold);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cream-dark);
  font-size: 0.95rem;
}
.contact-item:last-child { border-bottom: none; }
.contact-item .contact-icon {
  width: 36px;
  height: 36px;
  background: var(--cream-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--olive);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ============================================================
   Dashboard
   ============================================================ */
.dashboard-sidebar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.dashboard-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  color: var(--text-dark);
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.dashboard-nav-link:hover, .dashboard-nav-link.active {
  background: var(--olive);
  color: var(--white);
}

/* ============================================================
   Admin Panel
   ============================================================ */
.admin-sidebar {
  background: var(--olive-dark);
  min-height: 100vh;
  padding: 1.5rem 1rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  color: var(--cream);
  font-size: 0.9rem;
  transition: all var(--transition);
  text-decoration: none;
  margin-bottom: 0.2rem;
}
.admin-nav-link:hover, .admin-nav-link.active {
  background: rgba(184,137,42,0.25);
  color: var(--gold-light);
}

.admin-header {
  background: linear-gradient(135deg, var(--olive-dark), var(--olive));
  color: var(--white);
  padding: 1.25rem 2rem;
  border-bottom: 3px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px var(--shadow);
}

.admin-stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-olive { background: rgba(74,94,52,0.1); color: var(--olive); }
.stat-gold  { background: rgba(184,137,42,0.1); color: var(--gold); }
.stat-red   { background: rgba(220,53,69,0.1); color: #dc3545; }

/* ============================================================
   Alert / Status Banners
   ============================================================ */
.status-banner {
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.status-banner-icon { font-size: 2rem; }

.banner-pending  { background: #fff3cd; border-left: 4px solid #ffc107; }
.banner-rejected { background: #f8d7da; border-left: 4px solid #dc3545; }
.banner-info     { background: #cff4fc; border-left: 4px solid #0dcaf0; }

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: var(--olive-dark);
  color: var(--cream);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  border-top: 3px solid var(--gold);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-style: italic;
  color: var(--cream-dark);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--cream);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.4rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

/* ============================================================
   Table
   ============================================================ */
.table-druze thead th {
  background: var(--olive-dark);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 600;
  padding: 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.table-druze tbody tr:hover { background: var(--cream); }
.table-druze td { padding: 0.85rem 1rem; vertical-align: middle; }

/* ============================================================
   Page Header
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, var(--olive-dark), var(--olive));
  color: var(--white);
  padding: 3rem 0 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 40px;
  background: var(--cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-header h1 { color: var(--white); margin-bottom: 0.3rem; }
.page-header p  { color: var(--gold-pale); margin: 0; }

/* ============================================================
   Utilities
   ============================================================ */
.text-olive { color: var(--olive); }
.text-gold  { color: var(--gold); }
.text-muted-druze { color: var(--text-muted); }

.bg-cream { background: var(--cream); }
.bg-olive { background: var(--olive); }
.bg-gold  { background: var(--gold); }

.section-pad { padding: 4rem 0; }
.section-pad-sm { padding: 2.5rem 0; }

.logo-thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 2px solid var(--border);
}

/* ============================================================
   Alerts override with Druze palette
   ============================================================ */
.alert-success { background: #d1e7dd; border-color: #badbcc; color: #0f5132; }
.alert-danger   { background: #f8d7da; border-color: #f5c2c7; color: #842029; }
.alert-warning  { background: #fff3cd; border-color: #ffecb5; color: #664d03; }
.alert-info     { background: var(--cream-dark); border-color: var(--border); color: var(--olive-dark); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .hero { padding: 3rem 0 2.5rem; }
  .search-wrap { flex-wrap: wrap; }
  .form-card { padding: 1.5rem; }
  .admin-sidebar { min-height: auto; }
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state-icon {
  font-size: 4rem;
  color: var(--cream-dark);
  margin-bottom: 1rem;
}
.empty-state h3 { color: var(--olive-dark); font-size: 1.3rem; }

/* ============================================================
   Verification Status Banner
   ============================================================ */
.verify-cta {
  background: linear-gradient(135deg, var(--gold-pale), var(--cream));
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
