/* =====================================================
   TRAVELICA – search.css
   Search page + hero searchbar autocomplete styles
   ===================================================== */

/* ── Search Hero ─────────────────────────────────── */
.search-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.search-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.search-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.search-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,20,60,.75) 0%, rgba(30,50,100,.6) 100%);
}

.search-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 60px 20px 40px;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
}

.search-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  color: rgba(255,255,255,.75);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.search-title {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 28px;
  line-height: 1.15;
  letter-spacing: -.5px;
}

/* Search bar inside search.php hero */
.search-form { width: 100%; }

.search-bar-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  padding: 6px 6px 6px 18px;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}

.search-bar-icon { display: flex; align-items: center; flex-shrink: 0; }

.search-bar-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: #0f172a;
  background: transparent;
  min-width: 0;
  padding: 8px 0;
}

.search-bar-input::placeholder { color: #94a3b8; }

.search-bar-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 40px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s;
}

.search-bar-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,.35);
}

/* ── Autocomplete Dropdown (hero searchbar on index.php) ─── */
.searchbar { position: relative; }

.sb-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.16);
  z-index: 1000;
  overflow: hidden;
  animation: sbDropIn .15s ease;
}

@keyframes sbDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sb-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  cursor: pointer;
  transition: background .13s;
  border-bottom: 1px solid #f1f5f9;
}

.sb-dropdown-item:last-child { border-bottom: none; }

.sb-dropdown-item:hover { background: #f0f7ff; }

.sb-di-icon { font-size: 16px; flex-shrink: 0; width: 22px; text-align: center; }

.sb-di-main {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-di-sub {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
}

/* ── Search Main Content ─────────────────────────── */
.search-main {
  padding: 48px 0 72px;
  min-height: 60vh;
}

.search-results-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
}

.search-results-count {
  font-size: 15px;
  color: #475569;
}

.search-results-count strong { color: #0f172a; }
.search-results-count em { color: #2563eb; font-style: normal; font-weight: 600; }

/* ── Sections ─────────────────────────────────────── */
.search-section { margin-bottom: 52px; }

.search-section-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.2px;
}

.search-section-title svg { color: #2563eb; }

/* ── Trip Cards ───────────────────────────────────── */
.search-trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.search-trip-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  border: 1.5px solid #f1f5f9;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}

.search-trip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(37,99,235,.12);
  border-color: #bfdbfe;
}

.stc-img-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: #e2e8f0;
}

.stc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .4s;
}

.search-trip-card:hover .stc-img { transform: scale(1.06); }

.stc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.4) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 10px 12px;
}

.stc-code {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  color: rgba(255,255,255,.9);
  background: rgba(37,99,235,.75);
  backdrop-filter: blur(4px);
  padding: 3px 9px;
  border-radius: 6px;
}

.stc-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
}

.stc-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.stc-country {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.stc-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
}

.stc-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stc-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
}

.stc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.stc-price {
  font-size: 16px;
  font-weight: 800;
  color: #2563eb;
}

.stc-price-per {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin-left: 2px;
}

.stc-cta {
  font-size: 12.5px;
  font-weight: 700;
  color: #2563eb;
}

/* ── Country Cards ────────────────────────────────── */
.search-countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.search-country-card {
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  position: relative;
  aspect-ratio: 4/3;
  display: block;
  transition: transform .2s, box-shadow .2s;
}

.search-country-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
}

.scc-img-wrap { position: absolute; inset: 0; }

.scc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.search-country-card:hover .scc-img { transform: scale(1.06); }

.scc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 55%);
}

.scc-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scc-flag { font-size: 20px; }

.scc-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

/* ── Empty State ──────────────────────────────────── */
.search-empty {
  text-align: center;
  padding: 64px 20px;
}

.search-empty-icon { font-size: 60px; margin-bottom: 16px; }

.search-empty-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px;
}

.search-empty-sub {
  font-size: 15px;
  color: #64748b;
  margin: 0 0 28px;
}

.search-all-btn {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s;
}

.search-all-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,.3);
}

.search-popular { margin-top: 32px; }

.search-popular-label {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.search-popular-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.search-tag {
  display: inline-block;
  background: #f0f7ff;
  color: #2563eb;
  border: 1.5px solid #bfdbfe;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, transform .15s;
}

.search-tag:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-2px);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
  .search-trips-grid { grid-template-columns: 1fr; }
  .search-countries-grid { grid-template-columns: repeat(2, 1fr); }
  .search-bar-wrap { border-radius: 14px; flex-wrap: wrap; gap: 6px; }
  .search-bar-btn { width: 100%; border-radius: 10px; text-align: center; }
}
