/* ════════════════════════════════════════
   KAAFALL TRAVELS — BLOG PAGE CSS
   ════════════════════════════════════════ */

:root {
  --green-dark:   #1b4332;
  --green-mid:    #2d6a4f;
  --green-light:  #40916c;
  --green-xlight: #74c69d;
  --green-pale:   #d8f3dc;
  --green-soft:   #f0faf2;
  --white:        #ffffff;
  --text-dark:    #1a2e22;
  --text-body:    #3d5a47;
  --text-muted:   #6b8f76;
  --border:       #c7e4ce;
  --shadow-sm:    0 2px 12px rgba(27,67,50,.07);
  --shadow-md:    0 8px 28px rgba(27,67,50,.13);
  --shadow-lg:    0 20px 55px rgba(27,67,50,.17);
  --radius:       14px;
  --transition:   all 0.3s ease;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--text-dark);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}

img   { display: block; width: 100%; height: 100%; object-fit: cover; }
a     { text-decoration: none; }
input { font-family: inherit; }

/* ── SCROLL PROGRESS ── */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--green-dark), var(--green-xlight));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ════════════════════════════════════════
   HERO — compact like homepage
   ════════════════════════════════════════ */
.hero {
  position: relative;
  height: 280px;
  min-height: 220px;
  background-image: url('https://images.unsplash.com/photo-1469474968028-56623f02e42e?w=1600&q=85');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
    rgba(11,30,20,0.78) 0%,
    rgba(27,67,50,0.65) 50%,
    rgba(11,30,20,0.75) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1.5rem;
  animation: heroFade 0.9s ease both;
}

@keyframes heroFade {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-chip {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--green-pale);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 2rem;
  margin-bottom: 0.7rem;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero h1 em { font-style: italic; color: var(--green-pale); }

.hero-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.68);
  max-width: 460px;
  margin: 0 auto;
}

/* ════════════════════════════════════════
   MAIN
   ════════════════════════════════════════ */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 5% 5rem;
}

/* ════════════════════════════════════════
   TOOLBAR — Search + Filter
   ════════════════════════════════════════ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: 2rem;
  font-size: 0.88rem;
  color: var(--text-dark);
  background: var(--white);
  outline: none;
  transition: var(--transition);
}

.search-wrap input:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(64,145,108,0.12);
}

.search-wrap input::placeholder { color: var(--text-muted); }

/* Filter Buttons */
.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 2rem;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
}

/* ════════════════════════════════════════
   FEATURED POST
   ════════════════════════════════════════ */
.featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  margin-bottom: 3rem;
  background: var(--white);
  transition: var(--transition);
}

.featured:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.featured-img {
  position: relative;
  height: 360px;
}

.featured-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--green-dark);
  color: var(--green-pale);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 2rem;
  z-index: 2;
}

.featured-body {
  padding: 2.2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.25;
  margin: 0.7rem 0 0.9rem;
}

.featured-desc {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  flex: 1;
}

/* ════════════════════════════════════════
   POST META & CATEGORIES
   ════════════════════════════════════════ */
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.post-cat {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
}

.post-cat.char-dham { background: #fff3cd; color: #856404; }
.post-cat.trek      { background: #cfe2ff; color: #084298; }
.post-cat.temple    { background: #f8d7da; color: #842029; }
.post-cat.hill      { background: var(--green-pale); color: var(--green-dark); }
.post-cat.tips      { background: #e2d9f3; color: #432874; }

.post-date,
.post-read {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Post Footer */
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.author img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-body);
}

.btn-read {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-mid);
  border: 1.5px solid var(--green-mid);
  padding: 0.38rem 1rem;
  border-radius: 2rem;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-read:hover {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
}

/* ════════════════════════════════════════
   BLOG GRID
   ════════════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.6rem;
  margin-bottom: 3rem;
}

/* ════════════════════════════════════════
   POST CARD
   ════════════════════════════════════════ */
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-xlight);
}

.post-img {
  position: relative;
  height: 190px;
  overflow: hidden;
  flex-shrink: 0;
}

.post-img img { transition: transform 0.5s ease; }
.post-card:hover .post-img img { transform: scale(1.06); }

.post-cat-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 2rem;
  z-index: 2;
}

.post-cat-badge.char-dham { background: #fff3cd; color: #856404; }
.post-cat-badge.trek      { background: #cfe2ff; color: #084298; }
.post-cat-badge.temple    { background: #f8d7da; color: #842029; }
.post-cat-badge.hill      { background: var(--green-pale); color: var(--green-dark); }
.post-cat-badge.tips      { background: #e2d9f3; color: #432874; }

.post-body {
  padding: 1.3rem 1.4rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.3;
  margin-bottom: 0.55rem;
}

.post-excerpt {
  font-size: 0.86rem;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 1rem;
  flex: 1;
}

/* ── NO RESULTS ── */
.no-results {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ════════════════════════════════════════
   NEWSLETTER
   ════════════════════════════════════════ */
.newsletter {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  margin-top: 1rem;
}

.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.newsletter-inner {
  position: relative;
  z-index: 1;
  padding: 3.5rem 3rem;
  text-align: center;
}

.newsletter-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.6rem;
}

.newsletter-inner p {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 1.8rem;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  min-width: 220px;
  padding: 0.72rem 1.3rem;
  border: none;
  border-radius: 2rem;
  font-size: 0.9rem;
  outline: none;
  color: var(--text-dark);
}

.newsletter-form button {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-pale);
  border: none;
  border-radius: 2rem;
  padding: 0.72rem 1.6rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: #fff;
  transform: translateY(-2px);
}

/* ════════════════════════════════════════
   REVEAL ANIMATION
   ════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════
   HIDDEN (filter)
   ════════════════════════════════════════ */
.post-card.hidden,
.featured.hidden {
  display: none;
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 860px) {
  .featured {
    grid-template-columns: 1fr;
  }
  .featured-img { height: 240px; }
  .featured-body { padding: 1.5rem; }
}

@media (max-width: 640px) {
  main { padding: 2rem 4% 4rem; }
  .hero { height: 200px; }
  .toolbar { flex-direction: column; align-items: flex-start; }
  .search-wrap { max-width: 100%; width: 100%; }
  .blog-grid { grid-template-columns: 1fr; }
  .newsletter-inner { padding: 2.5rem 1.5rem; }
  .featured-title { font-size: 1.2rem; }
}
