/* القيروان الحديثة — أخضر غابات + أحمر طازج (من الشعار والبطاقة) */
:root {
  --green: #1b5e20;
  --green-deep: #0d3d12;
  --green-mid: #2e7d32;
  --green-soft: #e8f5e9;
  --red: #d32f2f;
  --red-deep: #b71c1c;
  --red-soft: #ffebee;
  --cream: #fafafa;
  --ivory: #ffffff;
  --ink: #1a2e1c;
  --muted: #5f6f61;
  --line: rgba(27, 94, 32, 0.12);
  --shadow: 0 18px 48px rgba(13, 61, 18, 0.1);
  --shadow-red: 0 12px 32px rgba(211, 47, 47, 0.18);
  --radius: 20px;
  --font: "Noto Kufi Arabic", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
}

img {
  max-width: 100%;
  display: block;
}

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

.container {
  width: min(1180px, 92%);
  margin-inline: auto;
}

/* Preloader */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--ivory);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__inner {
  text-align: center;
}

.preloader__logo {
  max-width: min(280px, 78vw);
  margin: 0 auto 1rem;
}

.preloader__bar {
  width: 120px;
  height: 3px;
  margin: 1rem auto 0;
  background: var(--green-soft);
  border-radius: 999px;
  overflow: hidden;
}

.preloader__bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--green), var(--red));
  border-radius: inherit;
  animation: loadSlide 1s ease-in-out infinite;
}

@keyframes loadSlide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* Nav */
.kq-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.kq-nav__shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
  position: relative;
}

.kq-nav__shell::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: calc(-1 * clamp(12px, 4vw, 20px));
  width: 6px;
  background: linear-gradient(180deg, var(--green), var(--green-mid));
  border-radius: 0 4px 4px 0;
}

.kq-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kq-nav__brand img {
  height: 52px;
  width: auto;
}

.kq-nav__links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.kq-nav__links a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--green-deep);
  transition: color 0.2s ease;
}

.kq-nav__links a:hover {
  color: var(--red);
}

.kq-nav__cta {
  padding: 0.62rem 1.15rem;
  border-radius: 999px;
  background: var(--red);
  color: #fff !important;
  box-shadow: var(--shadow-red);
}

.kq-nav__cta:hover {
  background: var(--red-deep);
  color: #fff !important;
}

.kq-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.kq-nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.kq-nav__drawer {
  display: none;
  padding: 1rem 0 1.25rem;
  border-top: 1px solid var(--line);
}

.kq-nav__drawer a {
  display: block;
  padding: 0.65rem 0;
  font-weight: 600;
  color: var(--green-deep);
}

@media (max-width: 992px) {
  .kq-nav__links {
    display: none;
  }

  .kq-nav__toggle {
    display: flex;
  }

  body.kq-nav-open .kq-nav__drawer {
    display: block;
  }

  body.kq-nav-open .kq-nav__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.kq-nav-open .kq-nav__toggle span:nth-child(2) {
    opacity: 0;
  }

  body.kq-nav-open .kq-nav__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(72px, 10vw, 110px) 0 clamp(64px, 8vw, 96px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(211, 47, 47, 0.08), transparent 42%),
    radial-gradient(circle at 10% 80%, rgba(27, 94, 32, 0.1), transparent 45%),
    linear-gradient(180deg, #fff 0%, var(--green-soft) 100%);
}

.hero__pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 10c8 12 8 20 0 32-8-12-8-20 0-32z' fill='%231B5E20'/%3E%3C/svg%3E");
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2rem, 4.8vw, 3.35rem);
  line-height: 1.18;
  margin: 0 0 1rem;
  color: var(--green-deep);
}

.hero__title em {
  font-style: normal;
  color: var(--red);
}

.hero__lead {
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  max-width: 52ch;
  margin: 0 0 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--red {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-red);
}

.btn--red:hover {
  background: var(--red-deep);
}

.btn--green {
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn--green:hover {
  background: var(--green-deep);
}

.btn--outline {
  border-color: var(--green);
  color: var(--green);
  background: #fff;
}

.btn--outline:hover {
  background: var(--green-soft);
}

.hero__pills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero__pills li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-deep);
}

.hero__pills i {
  color: var(--red);
}

.hero__visual {
  position: relative;
}

.hero__card {
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: #fff;
}

.hero__card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.hero__card-cap {
  padding: 1rem 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 3px solid var(--green);
}

.hero__card-cap strong {
  display: block;
  color: var(--green-deep);
}

.hero__card-cap span {
  font-size: 0.82rem;
  color: var(--muted);
}

.hero__float {
  position: absolute;
  bottom: -1rem;
  inset-inline-start: -1rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero__float-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--red-soft);
  color: var(--red);
  font-size: 1.1rem;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__float {
    inset-inline-start: auto;
    inset-inline-end: 0;
  }
}

/* Strip */
.kq-strip {
  background: var(--green);
  color: #fff;
  padding: 1.35rem 0;
}

.kq-strip__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.kq-strip__item strong {
  display: block;
  font-size: 1.35rem;
  color: #fff;
}

.kq-strip__item span {
  font-size: 0.82rem;
  opacity: 0.88;
}

@media (max-width: 768px) {
  .kq-strip__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Sections */
.section {
  padding: clamp(68px, 9vw, 104px) 0;
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head--center {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.eyebrow {
  color: var(--red);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.25;
  color: var(--green-deep);
  margin: 0 0 0.75rem;
}

.section-sub {
  color: var(--muted);
  margin: 0;
}

/* Bento categories */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.bento__cell {
  grid-column: span 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(13, 61, 18, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bento__cell:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.bento__cell--wide {
  grid-column: span 8;
}

.bento__cell--tall {
  grid-column: span 4;
  grid-row: span 2;
}

.bento__media {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.bento__cell--tall .bento__media {
  aspect-ratio: auto;
  height: 55%;
}

.bento__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.bento__cell:hover .bento__media img {
  transform: scale(1.05);
}

.bento__body {
  padding: 1.1rem 1.15rem 1.25rem;
}

.bento__body h3 {
  margin: 0 0 0.35rem;
  color: var(--green-deep);
  font-size: 1.05rem;
}

.bento__body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.bento__tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
  .bento__cell,
  .bento__cell--wide,
  .bento__cell--tall {
    grid-column: span 12;
    grid-row: auto;
  }

  .bento__cell--tall .bento__media {
    height: auto;
    aspect-ratio: 16/10;
  }
}

/* Marquee */
.marquee {
  overflow: hidden;
  padding: 1.5rem 0;
  background: var(--green-soft);
  border-block: 1px solid var(--line);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee__item {
  flex-shrink: 0;
  padding: 0.55rem 1.25rem;
  margin-inline: 0.5rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 600;
  color: var(--green-deep);
  white-space: nowrap;
}

.marquee__item i {
  color: var(--red);
  margin-inline-end: 0.4rem;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Why grid */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.15rem;
}

.why-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.why-card:hover {
  border-color: rgba(27, 94, 32, 0.35);
  transform: translateY(-3px);
}

.why-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

.why-card h3 {
  margin: 0 0 0.45rem;
  color: var(--green-deep);
}

.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Product gallery */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(13, 61, 18, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-card--hidden {
  display: none;
}

.product-card--revealed {
  display: block;
  animation: productReveal 0.45s ease both;
}

@keyframes productReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card__media {
  aspect-ratio: 1;
  overflow: hidden;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.product-card:hover .product-card__media img {
  transform: scale(1.06);
}

.product-card__body {
  padding: 0.85rem 0.9rem 1rem;
  text-align: center;
}

.product-card__body h3 {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  color: var(--green-deep);
}

.product-card__body span {
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}

.product-grid__actions {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
}

.product-grid__actions.is-done {
  display: none;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* Locations */
.loc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.loc-card {
  display: flex;
  gap: 1rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(13, 61, 18, 0.04);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.loc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(27, 94, 32, 0.3);
}

.loc-card__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--green-soft), #fff);
  color: var(--green);
  font-size: 1.2rem;
}

.loc-card h3 {
  margin: 0 0 0.25rem;
  color: var(--green-deep);
}

.loc-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 700px) {
  .loc-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact */
.contact-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
}

.glass {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.35rem, 3vw, 2rem);
  box-shadow: var(--shadow);
}

.glass--accent {
  border-top: 4px solid var(--red);
}

.contact-phones {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: grid;
  gap: 0.65rem;
}

.contact-phones a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 700;
  font-size: 1.05rem;
  transition: background 0.2s ease;
}

.contact-phones a:hover {
  background: #dcedc8;
}

.contact-meta {
  display: grid;
  gap: 0.85rem;
}

.contact-meta a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-weight: 600;
}

.contact-meta a:hover {
  color: var(--red);
}

.contact-meta i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--red-soft);
  color: var(--red);
}

@media (max-width: 900px) {
  .contact-wrap {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.kq-footer {
  background: var(--green-deep);
  color: rgba(255, 255, 255, 0.88);
  padding: 2.5rem 0 1.25rem;
}

.kq-footer__top {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.kq-footer__logo {
  max-width: 220px;
  margin-bottom: 1rem;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
}

.kq-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.kq-footer__links a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  font-size: 0.9rem;
}

.kq-footer__links a:hover {
  color: #fff;
}

.kq-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

.kq-footer__bottom a {
  color: #fff;
  font-weight: 700;
}

@media (max-width: 768px) {
  .kq-footer__top {
    grid-template-columns: 1fr;
  }
}

/* FAB */
.fab-wa {
  position: fixed;
  bottom: 1.35rem;
  inset-inline-start: 1.35rem;
  z-index: 900;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease;
}

.fab-wa:hover {
  transform: scale(1.06);
}

.back-top {
  position: fixed;
  bottom: 1.35rem;
  inset-inline-end: 1.35rem;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.section--green {
  background: linear-gradient(180deg, var(--green-soft), #fff);
}

.section--white {
  background: #fff;
}

.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.about-split__img {
  border-radius: calc(var(--radius) + 8px);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.about-split__img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.about-stat {
  text-align: center;
  padding: 1rem 0.5rem;
  border-radius: 16px;
  background: var(--green-soft);
}

.about-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--red);
}

.about-stat span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

@media (max-width: 900px) {
  .about-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .about-stats {
    grid-template-columns: 1fr;
  }
}
