/* ═══════════════════════════════════════
   VYOMA BLOG — DESIGN TOKENS
   ═══════════════════════════════════════ */
:root {
  --orange: #e8622a;
  --orange-hover: #d4561f;
  --bg: #f8f6f2;
  --bg-card: #f0ece6;
  --bg-dark: #0f0e0c;
  --text: #1a1714;
  --text-muted: #6b6560;
  --text-light: #f0ece6;
  --border: #e0ddd8;
  --border-dark: #2a2722;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
  --radius-card: 16px;
  --radius-btn: 10px;
  --section-pad: 100px;
  --nav-height: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ═══════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-anim {
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) forwards;
}
.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.2s; }
.hero-anim:nth-child(3) { animation-delay: 0.3s; }

/* ═══════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(248, 246, 242, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 1px 0 var(--border), 0 4px 20px rgba(0,0,0,0.04);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  width: 36px; height: 36px;
  background: var(--orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg { width: 18px; height: 18px; }

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-back:hover {
  background: rgba(26, 23, 20, 0.05);
  color: var(--text);
}

.nav-back svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
  padding-top: calc(var(--nav-height) + 88px);
  padding-bottom: 88px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
  margin-bottom: 16px;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--orange);
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════
   DIVIDER
   ═══════════════════════════════════════ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  border: none;
}

/* ═══════════════════════════════════════
   SECTION LABEL
   ═══════════════════════════════════════ */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--orange);
  margin-bottom: 14px;
}

/* ═══════════════════════════════════════
   CONTROLS BAR
   ═══════════════════════════════════════ */
.controls-section {
  padding: 36px 0 40px;
}

.controls-bar {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Search ── */
.search-wrap {
  position: relative;
  flex: 0 1 260px;
  min-width: 180px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.25s ease;
}

.search-wrap.focused .search-icon {
  color: var(--orange);
}

.search-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 16px 10px 40px;
  outline: none;
  transition: border-color 0.25s ease,
              box-shadow 0.25s ease,
              background 0.25s ease;
}

.search-input::placeholder {
  color: rgba(107, 101, 96, 0.45);
  transition: color 0.25s ease;
}

.search-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(232, 98, 42, 0.06);
  background: #fff;
}

.search-input:focus::placeholder {
  color: rgba(107, 101, 96, 0.3);
}

/* ── Categories ── */
.categories-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px;
}

.categories-wrap::-webkit-scrollbar {
  display: none;
}

.category-tab {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: 100px;
  padding: 8px 18px;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.25s ease,
              background 0.25s ease,
              border-color 0.25s ease,
              transform 0.2s ease,
              box-shadow 0.25s ease;
}

.category-tab:hover {
  color: var(--text);
  background: rgba(0,0,0,0.03);
  transform: translateY(-1px);
}

.category-tab:active {
  transform: translateY(0);
}

.category-tab.active {
  color: var(--text);
  background: #fff;
  border-color: var(--border);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* ── Sort ── */
.sort-wrap {
  position: relative;
  flex-shrink: 0;
}

.sort-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.25s ease,
              color 0.25s ease,
              box-shadow 0.25s ease,
              transform 0.2s ease;
}

.sort-toggle:hover {
  border-color: var(--text-muted);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.sort-toggle:active {
  transform: translateY(0);
}

.sort-toggle[aria-expanded="true"] {
  border-color: var(--orange);
  color: var(--text);
  box-shadow: 0 0 0 3px rgba(232, 98, 42, 0.06);
}

.sort-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.3s var(--ease-out);
}

.sort-toggle[aria-expanded="true"] .sort-chevron {
  transform: rotate(180deg);
}

.sort-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08),
              0 1px 3px rgba(0,0,0,0.04);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transition: opacity 0.2s ease,
              transform 0.25s var(--ease-out),
              visibility 0.2s ease;
  z-index: 50;
}

.sort-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.sort-option {
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease,
              color 0.2s ease,
              padding-left 0.2s ease;
}

.sort-option:hover {
  background: var(--bg);
  padding-left: 18px;
}

.sort-option.active {
  color: var(--orange);
  font-weight: 600;
  background: rgba(232, 98, 42, 0.04);
}

/* ═══════════════════════════════════════
   POSTS GRID + CARDS
   ═══════════════════════════════════════ */
.posts-section {
  padding: 0 0 var(--section-pad);
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.post-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: #fff;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--orange);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.post-card-body {
  padding: 40px 44px;
}

.post-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  background: rgba(232, 98, 42, 0.06);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 20px;
}

.post-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 14px;
  transition: color 0.2s ease;
}

.post-card:hover .post-title {
  color: var(--orange);
}

.post-excerpt {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 600px;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-date {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.7;
}

.post-read {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--orange);
  transition: gap 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.post-card:hover .post-read {
  gap: 8px;
}

/* ── Empty State (for filtered views) ── */
.empty-state {
  text-align: center;
  padding: 100px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(240, 236, 230, 0.18) 0%, rgba(248, 246, 242, 0) 100%);
  display: none;
}

.empty-state.show {
  display: block;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.empty-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 16px;
}

.empty-hint {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--orange);
  opacity: 0.7;
}

/* ═══════════════════════════════════════
   CTA BANNER
   ═══════════════════════════════════════ */
.cta-banner-section {
  padding: 0 0 var(--section-pad);
}

.cta-banner {
  background: var(--bg-dark);
  border-radius: var(--radius-card);
  padding: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-banner-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.2;
}

.cta-banner-text p {
  font-size: 0.95rem;
  color: rgba(240,236,230,0.5);
}

.cta-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out),
              box-shadow 0.25s ease,
              background 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.btn-orange {
  background: var(--orange);
  color: #fff;
}

.btn-orange:hover {
  background: var(--orange-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-light);
  border: 1.5px solid rgba(240,236,230,0.2);
}

.btn-ghost:hover {
  border-color: rgba(240,236,230,0.5);
  background: rgba(255,255,255,0.05);
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-size: 0.82rem;
  color: rgba(240,236,230,0.35);
}

.footer-heart { color: var(--orange); }

.india-map {
  width: 60px;
  height: auto;
  opacity: 0.7;
  display: inline-block;
  vertical-align: middle;
}

/* ═══════════════════════════════════════
   RESPONSIVE — 900px
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --section-pad: 72px; }

  .hero {
    padding-top: calc(var(--nav-height) + 60px);
    padding-bottom: 64px;
  }

  .controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .search-wrap {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .categories-wrap {
    justify-content: flex-start;
    padding-bottom: 4px;
    mask-image: linear-gradient(to right, #000 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 90%, transparent 100%);
  }

  .sort-wrap {
    align-self: flex-end;
  }

  .post-card-body {
    padding: 32px 28px;
  }

  .empty-state {
    padding: 72px 24px;
  }

  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 48px 32px;
  }

  .cta-banner-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* ═══════════════════════════════════════
   RESPONSIVE — 480px
   ═══════════════════════════════════════ */
@media (max-width: 480px) {
  :root { --section-pad: 56px; }

  .hero {
    padding-top: calc(var(--nav-height) + 44px);
    padding-bottom: 48px;
  }

  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-desc { font-size: 0.95rem; }

  .controls-section { padding: 24px 0 28px; }

  .category-tab {
    font-size: 0.8rem;
    padding: 7px 14px;
  }

  .post-card-body {
    padding: 28px 22px;
  }

  .post-title {
    font-size: 1.25rem;
  }

  .post-excerpt {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .empty-state {
    padding: 56px 20px;
  }

  .empty-title { font-size: 1.25rem; }
  .empty-desc { font-size: 0.9rem; }
  .empty-hint { font-size: 0.8rem; }

  .cta-banner { padding: 36px 24px; }

  .india-map { width: 40px; }
}
