/* KafClub - Cafe categories section */
:root {
  --kaf-green: #0F3D3E;
  --kaf-gold: #D4A017;
  --cream: #FBF6EE;
  --ink: #242321;
  --muted: #77736c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #f5f2ed;
  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, sans-serif;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 48px auto;
}

.categories-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 48px 34px 30px;
  border: 1px solid #eee5d9;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 3% 3%, rgba(212,160,23,.08), transparent 24%),
    radial-gradient(ellipse at 98% 96%, rgba(15,61,62,.06), transparent 26%),
    var(--cream);
  box-shadow: 0 12px 35px rgba(48, 38, 24, .06);
}

.section-heading {
  position: relative;
  z-index: 1;
  margin: 0 auto 28px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 5px;
  color: #bd8120;
  font-family: Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
}

.section-heading h1 {
  margin: 0;
  color: #171918;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 800;
  line-height: 1.55;
}

.section-description {
  margin: 5px 0 0;
  color: #77736c;
  font-size: 14px;
  line-height: 1.9;
}

.category-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  border-radius: 13px;
  background: #d8c9b4;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 5px 15px rgba(28, 25, 20, .12);
  transform: translateZ(0);
}

.category-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 35%,
    rgba(0,0,0,.18) 58%,
    rgba(0,0,0,.76) 100%
  );
  transition: background .25s ease;
}

.category-name {
  position: absolute;
  right: 14px;
  bottom: 39px;
  left: 14px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.card-arrow {
  position: absolute;
  bottom: 12px;
  left: 50%;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  color: var(--kaf-green);
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  transform: translateX(-50%);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.category-card:hover img,
.category-card:focus-visible img { transform: scale(1.07); }

.category-card:hover .card-arrow,
.category-card:focus-visible .card-arrow {
  background: var(--kaf-gold);
  color: #fff;
  transform: translateX(-50%) translateX(-3px);
}

.category-card:focus-visible,
.all-categories:focus-visible {
  outline: 3px solid var(--kaf-gold);
  outline-offset: 4px;
}

.all-categories-wrap {
  display: flex;
  justify-content: center;
  margin-top: 29px;
}

.all-categories {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 8px 23px;
  border: 1px solid var(--kaf-green);
  border-radius: 999px;
  color: var(--kaf-green);
  background: rgba(255,255,255,.32);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.all-categories:hover {
  color: #fff;
  background: var(--kaf-green);
}

.grid-icon {
  font-size: 20px;
  line-height: 1;
}

/* Decorative botanical details */
.leaf {
  position: absolute;
  z-index: 0;
  color: rgba(69, 103, 57, .2);
  font-family: Georgia, serif;
  font-size: 145px;
  line-height: 1;
  pointer-events: none;
}

.leaf--top {
  top: -24px;
  right: -12px;
  transform: rotate(28deg);
}

.leaf--bottom {
  bottom: -56px;
  left: -18px;
  transform: rotate(205deg);
}

/* Tablet */
@media (max-width: 900px) {
  .categories-section { padding: 38px 24px 27px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-card { height: 260px; }
}

/* Mobile */
@media (max-width: 560px) {
  .page {
    width: min(100% - 20px, 440px);
    margin: 22px auto;
  }

  .categories-section {
    padding: 31px 14px 22px;
    border-radius: 14px;
  }

  .section-heading { margin-bottom: 20px; }
  .eyebrow { font-size: 10px; letter-spacing: 2.5px; }
  .section-heading h1 { font-size: 24px; }
  .section-description { max-width: 290px; margin: 5px auto 0; font-size: 12px; }

  .category-grid { gap: 10px; }
  .category-card { height: 205px; border-radius: 10px; }
  .category-name { right: 7px; left: 7px; bottom: 37px; font-size: 13px; }
  .card-arrow { width: 27px; height: 27px; bottom: 9px; font-size: 16px; }
  .all-categories-wrap { margin-top: 22px; }
  .all-categories { min-height: 41px; padding-inline: 18px; font-size: 12px; }
  .leaf { font-size: 95px; }
}
