/* ============================================================
   TG Hidden Destinations Widget — Frontend Styles
   Font: Roboto (inherits from theme) + Roboto Slab for headings
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&family=Roboto+Slab:wght@400;600;700;800&display=swap');

/* ---- CSS Variables ---- */
.tghd-widget {
  --tghd-accent:        #FF6B6B;
  --tghd-accent-light:  #FF8E8E;
  --tghd-peach:         #FFB347;
  --tghd-sunshine:      #FFD93D;
  --tghd-mint:          #6BCB77;
  --tghd-sky:           #4ECDC4;
  --tghd-charcoal:      #2D3436;
  --tghd-gray:          #636E72;
  --tghd-light:         #F0F4F8;
  --tghd-card-shadow:   0 8px 32px rgba(0,0,0,0.08);
  --tghd-hover-shadow:  0 16px 48px rgba(0,0,0,0.14);
  --tghd-radius:        22px;
  --tghd-radius-sm:     12px;
  font-family: 'Roboto', sans-serif;
  color: var(--tghd-charcoal);
}

/* ---- Section Header ---- */
.tghd-section-header {
  text-align: center;
  margin-bottom: 44px;
}

.tghd-section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--tghd-accent);
  margin-bottom: 14px;
}

.tghd-label-line {
  display: block;
  width: 32px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--tghd-accent), transparent);
}

.tghd-section-title {
  font-family: 'Roboto Slab', serif;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  color: var(--tghd-charcoal);
  margin: 0 0 14px;
  line-height: 1.25;
}

.tghd-section-sub {
  font-size: 16px;
  color: var(--tghd-gray);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.75;
  font-weight: 300;
}

/* ---- Filter Tabs ---- */
.tghd-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.tghd-tab {
  padding: 9px 20px;
  border-radius: 25px;
  border: 2px solid var(--tghd-light);
  background: #fff;
  color: var(--tghd-gray);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tghd-tab:hover {
  border-color: var(--tghd-accent);
  color: var(--tghd-accent);
  background: rgba(255,107,107,0.04);
}

.tghd-tab.active {
  border-color: var(--tghd-accent);
  color: var(--tghd-accent);
  background: rgba(255,107,107,0.06);
  box-shadow: 0 2px 10px rgba(255,107,107,0.15);
}

/* ---- Grid ---- */
.tghd-grid {
  display: grid;
  gap: 24px;
  transition: opacity 0.3s ease;
}

.tghd-cols-2 { grid-template-columns: repeat(2, 1fr); }
.tghd-cols-3 { grid-template-columns: repeat(3, 1fr); }
.tghd-cols-4 { grid-template-columns: repeat(4, 1fr); }

.tghd-grid.tghd-loading-grid { opacity: 0.4; pointer-events: none; }

/* ---- Card ---- */
.tghd-card {
  display: block;
  text-decoration: none;
  color: var(--tghd-charcoal);
  background: #fff;
  border-radius: var(--tghd-radius);
  overflow: hidden;
  box-shadow: var(--tghd-card-shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  position: relative;
}

.tghd-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--tghd-hover-shadow);
  text-decoration: none;
  color: var(--tghd-charcoal);
}

.tghd-card--featured {
  ring: 2px solid var(--tghd-sunshine);
  outline: 2px solid var(--tghd-sunshine);
}

/* ---- Card Image / Emoji area ---- */
.tghd-card-img {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.tghd-card-emoji {
  font-size: 64px;
  line-height: 1;
  z-index: 1;
  position: relative;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
  transition: transform 0.3s ease;
}

.tghd-card:hover .tghd-card-emoji {
  transform: scale(1.1) rotate(-4deg);
}

.tghd-card-img-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px;
  background: linear-gradient(transparent 40%, rgba(0,0,0,0.42));
}

.tghd-badge {
  background: rgba(255,107,107,0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 4px 11px;
  border-radius: 20px;
  text-transform: uppercase;
}

.tghd-featured-star {
  font-size: 18px;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
}

/* ---- Card Body ---- */
.tghd-card-body {
  padding: 20px 22px 22px;
}

.tghd-card-region {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tghd-card-title {
  font-family: 'Roboto Slab', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--tghd-charcoal);
  margin: 0 0 10px;
  line-height: 1.35;
}

.tghd-card-excerpt {
  font-size: 13px;
  color: var(--tghd-gray);
  line-height: 1.65;
  margin: 0 0 16px;
  font-weight: 300;
}

.tghd-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--tghd-gray);
  flex-wrap: wrap;
}

.tghd-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tghd-card-meta svg {
  color: var(--tghd-accent);
  flex-shrink: 0;
}

.tghd-read-more {
  margin-left: auto;
  color: var(--tghd-accent) !important;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  transition: gap 0.2s;
}

.tghd-card:hover .tghd-read-more {
  text-decoration: underline;
}

/* ---- No Results ---- */
.tghd-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--tghd-gray);
}
.tghd-no-results-icon { font-size: 52px; margin-bottom: 16px; }
.tghd-no-results p { font-size: 16px; }
.tghd-no-results a { color: var(--tghd-accent); text-decoration: underline; }

/* ---- Loading Spinner ---- */
.tghd-loading {
  display: flex;
  justify-content: center;
  padding: 32px;
}
.tghd-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--tghd-light);
  border-top-color: var(--tghd-accent);
  border-radius: 50%;
  animation: tghd-spin 0.75s linear infinite;
}
@keyframes tghd-spin { to { transform: rotate(360deg); } }

/* ---- Card entrance animation ---- */
@keyframes tghd-fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tghd-card {
  animation: tghd-fade-in-up 0.45s ease both;
}
.tghd-card:nth-child(1) { animation-delay: 0.00s; }
.tghd-card:nth-child(2) { animation-delay: 0.07s; }
.tghd-card:nth-child(3) { animation-delay: 0.14s; }
.tghd-card:nth-child(4) { animation-delay: 0.21s; }
.tghd-card:nth-child(5) { animation-delay: 0.28s; }
.tghd-card:nth-child(6) { animation-delay: 0.35s; }
.tghd-card:nth-child(7) { animation-delay: 0.42s; }
.tghd-card:nth-child(8) { animation-delay: 0.49s; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .tghd-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .tghd-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .tghd-cols-2,
  .tghd-cols-3,
  .tghd-cols-4 {
    grid-template-columns: 1fr;
  }
  .tghd-section-title { font-size: 24px; }
  .tghd-tab { padding: 7px 14px; font-size: 13px; }
}
