/* Herbs Asrar Life — natural botanical theme */
:root {
  --leaf-900: #1a3a2a;
  --leaf-800: #234d36;
  --leaf-700: #2f6b48;
  --leaf-600: #3d8a5a;
  --leaf-500: #4fa06a;
  --sage-100: #e8f2eb;
  --sage-50: #f3f8f4;
  --earth-700: #5c4a32;
  --earth-500: #8a7355;
  --clay: #c4785a;
  --mist: #f7faf8;
  --ink: #1c2b22;
  --muted: #5a6b60;
  --card-bg: rgba(255, 255, 255, 0.72);
  --radius: 1rem;
  --shadow: 0 12px 40px rgba(26, 58, 42, 0.08);
  --font-display: "Source Serif 4", "Cairo", Georgia, serif;
  --font-body: "DM Sans", "Cairo", system-ui, sans-serif;
}

.lang-ar {
  --font-display: "Cairo", "Source Serif 4", sans-serif;
  --font-body: "Cairo", "DM Sans", sans-serif;
}

* { box-sizing: border-box; }

body.site-body,
body.install-page,
body.admin-body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(79, 160, 106, 0.18), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(196, 120, 90, 0.12), transparent 45%),
    linear-gradient(180deg, var(--mist) 0%, var(--sage-50) 40%, #eef5f0 100%);
  min-height: 100vh;
}

.brand-title,
.brand-text,
.hero-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--leaf-800);
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none !important;
}

.brand-leaf {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 60% 40% 55% 45%;
  background: linear-gradient(145deg, var(--leaf-500), var(--leaf-800));
  box-shadow: inset -4px -4px 0 rgba(255,255,255,0.15);
  display: inline-block;
  transform: rotate(-18deg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(247, 250, 248, 0.85);
  border-bottom: 1px solid rgba(47, 107, 72, 0.08);
}

.nav-link {
  color: var(--leaf-800) !important;
  font-weight: 500;
}

.nav-link:hover,
.lang-switch {
  color: var(--leaf-600) !important;
}

/* Hero — one composition */
.hero {
  position: relative;
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(247,250,248,0.92) 0%, rgba(247,250,248,0.75) 42%, rgba(26,58,42,0.25) 100%),
    url("../img/hero-botanical.svg") center right / cover no-repeat;
  z-index: 0;
  animation: heroFade 1.2s ease both;
}

.lang-ar .hero::before {
  background:
    linear-gradient(-105deg, rgba(247,250,248,0.92) 0%, rgba(247,250,248,0.75) 42%, rgba(26,58,42,0.25) 100%),
    url("../img/hero-botanical.svg") center left / cover no-repeat;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 3rem 0 4rem;
  max-width: 36rem;
  animation: riseIn 0.9s ease 0.15s both;
}

.hero-brand {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.search-shell {
  display: flex;
  gap: 0.5rem;
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(47, 107, 72, 0.12);
}

.search-shell input {
  border: 0;
  box-shadow: none !important;
  background: transparent;
  padding: 0.65rem 1.1rem;
  flex: 1;
  min-width: 0;
}

.search-shell .btn {
  border-radius: 999px;
  padding-inline: 1.4rem;
  white-space: nowrap;
}

.btn-leaf {
  background: var(--leaf-700);
  border-color: var(--leaf-700);
  color: #fff;
}

.btn-leaf:hover,
.btn-leaf:focus {
  background: var(--leaf-800);
  border-color: var(--leaf-800);
  color: #fff;
}

.btn-outline-leaf {
  color: var(--leaf-700);
  border-color: var(--leaf-600);
  background: transparent;
}

.btn-outline-leaf:hover {
  background: var(--sage-100);
  color: var(--leaf-800);
  border-color: var(--leaf-700);
}

.section {
  padding: 3.5rem 0;
}

.section-title {
  font-family: var(--font-display);
  color: var(--leaf-800);
  margin-bottom: 0.4rem;
}

.section-lead {
  color: var(--muted);
  margin-bottom: 2rem;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

.item-tile {
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 0.25s ease;
}

.item-tile:hover {
  transform: translateY(-4px);
  color: inherit;
}

.item-tile img,
.item-thumb {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 8px 24px rgba(26, 58, 42, 0.12);
  background: var(--sage-100);
  margin: 0 auto 0.75rem;
  display: block;
}

.item-tile .name {
  font-weight: 600;
  color: var(--leaf-800);
  font-size: 0.95rem;
}

.herb-use-block {
  background: var(--card-bg);
  border: 1px solid rgba(47, 107, 72, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(6px);
}

.vote-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.vote-count {
  font-size: 0.9rem;
  color: var(--muted);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pill-list li {
  background: var(--sage-100);
  color: var(--leaf-800);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-list li {
  border-bottom: 1px solid rgba(47, 107, 72, 0.08);
  padding: 0.85rem 0;
}

.comment-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.disclaimer-block {
  background: rgba(255, 255, 255, 0.65);
  border-inline-start: 4px solid var(--clay);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
}

.site-footer {
  border-top: 1px solid rgba(47, 107, 72, 0.1);
  background: rgba(232, 242, 235, 0.5);
}

.footer-copy {
  color: var(--muted);
  font-size: 0.9rem;
}

.page-hero {
  padding: 2rem 0 1rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  color: var(--leaf-800);
}

.flash-wrap {
  position: sticky;
  top: 76px;
  z-index: 90;
}

/* Admin */
.admin-body {
  background: var(--mist);
}

.admin-sidebar {
  min-height: 100vh;
  background: var(--leaf-900);
  color: #e8f2eb;
  padding: 1.5rem 1rem;
}

.admin-sidebar a {
  color: #cfe6d6;
  text-decoration: none;
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.stat-tile {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.stat-tile .num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--leaf-700);
}

.img-pick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.img-pick-grid label {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  overflow: hidden;
  display: block;
}

.img-pick-grid input:checked + img,
.img-pick-grid label:has(input:checked) {
  border-color: var(--leaf-600);
}

.img-pick-grid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes heroFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.item-tile,
.herb-use-block {
  animation: riseIn 0.55s ease both;
}

@media (max-width: 767.98px) {
  .hero { min-height: auto; }
  .hero::before { opacity: 0.55; }
  .search-shell { flex-direction: column; border-radius: 1rem; }
  .search-shell .btn { width: 100%; border-radius: 0.75rem; }
  .item-tile img, .item-thumb { width: 110px; height: 110px; }
}
