/* =====================================================================
   category.css  (NEW FILE)
   Styles for pages/category.php and the DB-driven parts of pages/tours.php
   ===================================================================== */

/* ---------- image placeholder (used when no image was uploaded in admin) ---------- */
.ph-img,
.img-box.no-img,
.city-card-img.no-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,255,255,.28), transparent 45%),
    linear-gradient(135deg, #0878c9 0%, #35a7e8 55%, #7fd0f5 100%);
}
.ph-img i,
.img-box.no-img i,
.city-card-img.no-img i {
  font-size: 2.6rem;
  color: rgba(255, 255, 255, .85);
}

/* ---------- tours.php: slider with few cards, empty state ---------- */
.cards-track.few { justify-content: center; }

.empty-state {
  max-width: 560px;
  margin: 2rem auto;
  padding: 44px 28px;
  text-align: center;
  background: #fff;
  border: 1px dashed #bae6fd;
  border-radius: 22px;
  color: var(--text-body);
}
.empty-state i { font-size: 2.2rem; color: var(--primary); margin-bottom: 14px; }
.empty-state h3 { font-size: 1.25rem; color: var(--text-dark); margin-bottom: 8px; }
.empty-state p { font-size: .95rem; line-height: 1.6; margin-bottom: 18px; }

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-pill:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-pill.ghost { background: #fff; color: var(--primary); border: 1.5px solid #bae6fd; }
.btn-pill.ghost:hover { background: #f0f9ff; box-shadow: none; }

/* =====================================================================
   CATEGORY PAGE
   ===================================================================== */
.cat-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: clamp(460px, 64vh, 720px);
  padding: 48px 24px 0;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #0878c9 0%, #0d3b66 100%);
}
/* photo uploaded in admin (an <img> so the path is always relative to the page) */
.cat-hero .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.cat-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10, 18, 30, .38) 0%, rgba(10, 18, 30, .10) 40%, rgba(10, 18, 30, .42) 100%);
  pointer-events: none;
}
.cat-hero-inner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(255,255,255,.85);
  text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.crumbs a { color: rgba(255,255,255,.85); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs span { color: #fff; }
.crumbs i { font-size: .7rem; opacity: .8; }

.cat-hero h1 {
  margin: auto 0;
  padding: 40px 0 110px;
  text-align: center;
  font-family: 'Caveat', 'Segoe Script', 'Comic Sans MS', cursive;
  font-size: clamp(3rem, 8.2vw, 6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .01em;
  text-shadow: 0 3px 24px rgba(0,0,0,.45);
}

.cat-wrap { max-width: 1200px; margin: 0 auto; padding: 56px 20px 24px; }
.cat-block + .cat-block { margin-top: 64px; }

.block-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.block-head h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; color: var(--text-dark); }
.block-head p { color: var(--text-muted); font-size: .92rem; margin-top: 4px; }

/* ---------- sub-category cards ---------- */
.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }

.dest-card {
  position: relative;
  display: block;
  height: 280px;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 8px 22px rgba(8, 120, 201, .14);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease;
}
.dest-card:hover { transform: translateY(-8px); box-shadow: 0 18px 36px rgba(8, 120, 201, .28); }
.dest-card .dest-img, .dest-card .dest-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.dest-card .dest-img img { object-fit: cover; transition: transform .6s ease; }
.dest-card:hover .dest-img img { transform: scale(1.09); }
.dest-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(7, 30, 56, .88) 100%);
}
.dest-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 20px 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.dest-info h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.dest-info small { display: block; margin-top: 4px; font-size: .8rem; font-weight: 500; opacity: .85; }
.dest-arrow {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  transition: background .25s ease, transform .25s ease;
}
.dest-card:hover .dest-arrow { background: var(--primary); border-color: var(--primary); transform: translateX(3px); }

/* ---------- chips (switch between sub-categories) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  padding: 9px 20px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid #d7ebfa;
  color: var(--text-body);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(8,120,201,.28); }

/* ---------- tour cards ---------- */
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px; }

.tour-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #e6f1fb;
  box-shadow: 0 6px 18px rgba(13, 27, 46, .06);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease;
  text-align: left;
}
.tour-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.tour-media { display: block; position: relative; height: 210px; overflow: hidden; cursor: pointer; background: #e8f3fc; }
.tour-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; display: block; }
.tour-card:hover .tour-media img { transform: scale(1.07); }
.tour-media .ph-img { position: absolute; inset: 0; }
.tour-badge {
  position: absolute; top: 14px; left: 14px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.95);
  color: var(--primary);
  font-size: .78rem; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.tour-badge i { margin-right: 5px; }
.tour-tag {
  position: absolute; bottom: 12px; right: 12px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(7,30,56,.72); color: #fff; font-size: .74rem; font-weight: 600;
}

.tour-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.tour-body h3 { font-size: 1.08rem; font-weight: 700; line-height: 1.35; color: var(--text-dark); margin-bottom: 8px; }
.tour-body p {
  font-size: .88rem; line-height: 1.6; color: var(--text-body);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 16px;
}
.tour-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px dashed #dbeafe; }
.tour-price small { display: block; font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.tour-price strong { font-size: 1.2rem; font-weight: 800; color: var(--text-dark); }
.tour-price .on-request { font-size: .95rem; font-weight: 600; color: var(--primary); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .cat-hero { padding: 32px 18px 0; min-height: 420px; }
  .cat-hero h1 { padding-bottom: 70px; }
  .crumbs { font-size: .95rem; }
  .cat-wrap { padding: 40px 16px 16px; }
}
@media (max-width: 520px) {
  .dest-card { height: 220px; }
  .tour-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .dest-card, .tour-card, .dest-card img, .tour-media img { transition: none; }
}

/* ---------- testimonial avatars: initials instead of stock photos ---------- */
.user-avatar.initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0878c9, #35a7e8);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
}
