:root {
  --bg: #f4f7f4;
  --ink: #142019;
  --muted: #647069;
  --line: #dbe3dc;
  --panel: #ffffff;
  --green: #1f7a4d;
  --green-dark: #135234;
  --gold: #c8932d;
  --blue: #2f6f95;
  --shadow: 0 18px 45px rgba(18, 32, 25, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Tajawal", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(244, 247, 244, 0.86);
  border-bottom: 1px solid rgba(219, 227, 220, 0.7);
  backdrop-filter: blur(14px);
}

.brand,
.nav,
.hero-actions,
.duration-filter {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav {
  gap: 22px;
  color: var(--muted);
  font-weight: 700;
}

.nav a:hover {
  color: var(--green-dark);
}

.hero {
  min-height: 420px;
  display: flex;
  align-items: center;
  padding: 54px clamp(18px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(18, 32, 25, 0.08), rgba(18, 32, 25, 0.86)),
    url("assets/khadra-hero-banner.png") center/cover;
  color: #fff;
}

.hero-inner {
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #d4e7d7;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(46px, 8vw, 86px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 560px;
  margin: 20px 0 0;
  color: #edf4ef;
  font-size: 22px;
  line-height: 1.7;
}

.hero-actions {
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  background: #fff;
  color: var(--green-dark);
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

main {
  padding-bottom: 46px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: end;
  max-width: 1180px;
  margin: -34px auto 18px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-wrap {
  display: grid;
  gap: 8px;
}

.search-wrap label {
  color: var(--muted);
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 122, 77, 0.14);
}

.duration-filter {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.chip.active,
.chip:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 0 18px;
}

.stats div {
  padding: 16px 18px;
  background: #e9f1eb;
  border: 1px solid #d5e2d8;
  border-radius: 8px;
}

.stats strong {
  display: block;
  font-size: 26px;
  color: var(--green-dark);
}

.stats span {
  color: var(--muted);
  font-weight: 700;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
}

.catalog-section {
  max-width: 1180px;
  margin: 0 auto 32px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px 14px;
}

.section-heading p {
  margin: 0 0 4px;
  color: var(--green);
  font-weight: 800;
}

.section-heading h2 {
  margin: 0;
  font-size: 32px;
}

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  justify-content: stretch;
}

.category-tabs {
  display: flex;
  gap: 8px;
  max-width: 1180px;
  margin: 0 auto 16px;
  padding: 0 18px;
  overflow-x: auto;
}

.category-tab {
  flex: 0 0 auto;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.category-tab.active,
.category-tab:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: #fff;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.card:hover,
.card:focus-visible {
  border-color: rgba(31, 122, 77, 0.42);
  box-shadow: 0 16px 36px rgba(18, 32, 25, 0.1);
  transform: translateY(-2px);
}

.card:focus-visible {
  outline: 3px solid rgba(31, 122, 77, 0.22);
  outline-offset: 3px;
}

.product-image {
  position: relative;
  width: 100%;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
  background: var(--image-bg, #dce9df);
  color: #fff;
  overflow: hidden;
}

.product-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 42%),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.24), transparent 30%),
    rgba(20, 32, 25, 0.18);
}

.image-mark {
  position: relative;
  z-index: 1;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin: 30px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-size: 28px;
  font-weight: 800;
  transition: transform 160ms ease;
}

.icon-shell {
  position: relative;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin: 14px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 26px rgba(9, 15, 12, 0.16);
  transition: transform 160ms ease;
}

.service-icon {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.card:hover .icon-shell,
.card:focus-visible .icon-shell {
  transform: scale(1.05);
}

.image-hint {
  display: none;
}

.card-head {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
}

.service {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.package {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.package-count {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 8px;
  padding: 0 8px;
  border-radius: 8px;
  background: #eef5f0;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.prices {
  display: grid;
  gap: 0;
  padding: 8px 10px 10px;
}

.price-row,
.start-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #f7faf7;
}

.price-row .label,
.start-price span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.price,
.start-price strong {
  color: var(--green-dark);
  font-size: 19px;
  font-weight: 800;
}

.duration-note {
  display: none;
}

.badge {
  align-self: flex-start;
  margin: 0 10px 10px;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(200, 147, 45, 0.16);
  color: #75520f;
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 15, 0.58);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(9, 15, 12, 0.32);
}

.modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.modal-visual {
  display: grid;
  min-height: 178px;
  place-items: center;
  background: var(--image-bg, #dce9df);
  color: #fff;
}

.modal-visual .image-mark {
  margin: 0;
  width: 88px;
  height: 88px;
  font-size: 34px;
}

.modal-visual .icon-shell {
  width: 86px;
  height: 86px;
  margin: 0;
  border-radius: 22px;
}

.modal-visual .service-icon {
  padding: 14px;
}

.modal-content {
  padding: 22px;
}

.modal-kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-weight: 800;
}

.modal-content h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.modal-content p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.modal-prices {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.modal-package-block {
  display: grid;
  gap: 10px;
  padding-top: 16px;
}

.modal-package-block + .modal-package-block {
  border-top: 1px solid var(--line);
}

.modal-package-title {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
}

.modal-price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
}

.modal-price-row strong {
  color: var(--green-dark);
  font-size: 24px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(18px, 4vw, 56px);
  background: var(--ink);
  color: #fff;
}

.footer p {
  margin: 0;
  color: #d5ddd8;
}

.footer-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--gold);
  color: #221707;
  font-weight: 800;
}

.floating-social {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 10px;
}

.floating-social a {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(9, 15, 12, 0.2);
}

.floating-social span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.float-whatsapp {
  background: #25d366;
}

.float-instagram {
  background: linear-gradient(135deg, #feda75, #fa7e1e 32%, #d62976 62%, #4f5bd5);
}

.float-whatsapp::before,
.float-instagram::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background: #fff;
}

.float-whatsapp::before {
  clip-path: path("M12 2.2C6.6 2.2 2.2 6.5 2.2 11.8c0 1.8.5 3.5 1.4 5L2 22l5.4-1.5c1.4.8 3 1.2 4.6 1.2 5.4 0 9.8-4.3 9.8-9.6S17.4 2.2 12 2.2Zm0 17.5c-1.5 0-2.9-.4-4.1-1.2l-.3-.2-3.2.9.9-3.1-.2-.3c-.8-1.2-1.2-2.6-1.2-4.1C3.9 7.5 7.5 4 12 4s8.1 3.5 8.1 7.8-3.6 7.9-8.1 7.9Zm4.5-5.8c-.2-.1-1.4-.7-1.6-.8-.2-.1-.4-.1-.5.1-.2.2-.6.8-.8.9-.1.2-.3.2-.5.1-.2-.1-1-.4-1.9-1.1-.7-.6-1.2-1.4-1.3-1.6-.1-.2 0-.3.1-.5l.4-.4c.1-.1.2-.2.2-.4.1-.1 0-.3 0-.4 0-.1-.5-1.2-.7-1.7-.2-.5-.4-.4-.5-.4h-.5c-.2 0-.4.1-.6.3-.2.2-.8.8-.8 1.9s.8 2.2.9 2.3c.1.2 1.6 2.5 3.9 3.5.5.2 1 .4 1.3.5.6.2 1.1.2 1.5.1.5-.1 1.4-.6 1.6-1.1.2-.5.2-1 .1-1.1-.1-.1-.2-.1-.4-.2Z");
}

.float-instagram::before {
  clip-path: path("M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4c0 3.2-2.6 5.8-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8C2 4.6 4.6 2 7.8 2Zm0 2C5.7 4 4 5.7 4 7.8v8.4C4 18.3 5.7 20 7.8 20h8.4c2.1 0 3.8-1.7 3.8-3.8V7.8C20 5.7 18.3 4 16.2 4H7.8Zm4.2 3.1A4.9 4.9 0 1 1 12 17a4.9 4.9 0 0 1 0-9.9Zm0 2A2.9 2.9 0 1 0 12 15a2.9 2.9 0 0 0 0-5.9ZM17.3 6.6a1.1 1.1 0 1 1 0 2.2 1.1 1.1 0 0 1 0-2.2Z");
}

@media (max-width: 760px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    min-height: 64px;
    padding: 9px 12px;
  }

  .brand {
    gap: 8px;
    font-size: 18px;
    white-space: nowrap;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }

  .nav {
    flex: 1;
    justify-content: flex-start;
    gap: 6px;
    overflow: visible;
    font-size: 14px;
  }

  .nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 8px;
    white-space: nowrap;
  }

  .nav a:nth-child(2),
  .nav::-webkit-scrollbar {
    display: none;
  }

  .hero {
    min-height: 286px;
    padding: 26px 18px 30px;
    background:
      linear-gradient(90deg, rgba(7, 27, 21, 0.78), rgba(7, 27, 21, 0.94)),
      url("assets/khadra-logo-source.png") -34px center/260px 260px no-repeat,
      linear-gradient(135deg, #1f7864, #0f3429);
    text-align: center;
    justify-content: center;
  }

  .hero-inner {
    max-width: 360px;
    margin: 0 auto;
  }

  .eyebrow {
    margin-bottom: 8px;
    font-size: 15px;
  }

  h1 {
    font-size: 38px;
    line-height: 1.05;
  }

  .hero-copy {
    max-width: 320px;
    margin: 14px auto 0;
    font-size: 15px;
    line-height: 1.5;
  }

  .hero-actions {
    justify-content: center;
    margin-top: 18px;
  }

  .primary-button,
  .secondary-button {
    min-height: 46px;
    padding: 0 18px;
    font-size: 15px;
  }

  main {
    padding-bottom: 104px;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    grid-template-columns: 1fr;
    margin-left: 18px;
    margin-right: 18px;
  }

  .duration-filter {
    justify-content: stretch;
  }

  .chip {
    flex: 1 1 96px;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 10px;
  }

  .stats div {
    padding: 11px 10px;
  }

  .stats strong {
    font-size: 22px;
  }

  .stats span {
    font-size: 12px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: row;
    padding: 0 14px 12px;
  }

  .section-heading h2 {
    font-size: 25px;
  }

  .section-heading p {
    font-size: 14px;
  }

  .price-grid,
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 12px;
  }

  .card {
    border-radius: 10px;
  }

  .product-image {
    min-height: 70px;
  }

  .icon-shell {
    width: 48px;
    height: 48px;
    margin-top: 11px;
    border-radius: 14px;
  }

  .service-icon {
    padding: 7px;
  }

  .card-head {
    min-height: 66px;
    padding: 10px 10px 9px;
  }

  .service {
    font-size: 16px;
    line-height: 1.15;
  }

  .package {
    font-size: 13px;
    line-height: 1.2;
  }

  .prices {
    padding: 8px;
  }

  .start-price {
    min-height: 38px;
    padding: 6px 7px;
    gap: 4px;
  }

  .start-price span {
    font-size: 12px;
  }

  .start-price strong {
    font-size: 17px;
  }

  .badge {
    margin: 0 8px 8px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .modal-content h2 {
    font-size: 27px;
  }

  .floating-social {
    left: 10px;
    bottom: 10px;
  }

  .floating-social a {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .float-whatsapp::before,
  .float-instagram::before {
    width: 22px;
    height: 22px;
  }
}

@media (min-width: 761px) and (max-width: 1080px) {
  .topbar {
    padding: 14px 28px;
  }

  .hero {
    min-height: 350px;
    padding: 44px 36px;
  }

  h1 {
    font-size: clamp(54px, 8vw, 70px);
  }

  .hero-copy {
    max-width: 520px;
    font-size: 19px;
    line-height: 1.55;
  }

  .stats,
  .catalog-section,
  .category-tabs {
    padding-left: 24px;
    padding-right: 24px;
  }

  .price-grid,
  .featured-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .card-head {
    min-height: 68px;
  }

  .service {
    font-size: 16px;
  }

  .package {
    font-size: 13px;
  }
}
