/* ==========================================================================
   Gruvora Living — Premium Blog CSS
   Covers: blog.html (listing/grid) + all frontend/blog/*.html (article pages)
   Drop this file in as: frontend/css/pages/blog.css
   Then link it in <head> of blog.html and every blog/*.html AFTER styles.css:
   <link href="/css/pages/blog.css?v=1" rel="stylesheet">
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --brand: #FF385C;
  --brand-dark: #E31C5F;
  --brand-light: #FFF0F2;
  --brand-glow: rgba(255, 56, 92, .22);
  --ink: #14100E;
  --muted: #6B6560;
  --border: #ECE7E4;
  --bg: #FBFAF9;
  --white: #FFFFFF;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20,16,14,.04), 0 2px 8px rgba(20,16,14,.05);
  --shadow: 0 4px 16px rgba(20,16,14,.06), 0 12px 32px rgba(20,16,14,.08);
  --shadow-lg: 0 8px 24px rgba(20,16,14,.10), 0 24px 60px rgba(20,16,14,.14);
  --ease: cubic-bezier(.16,1,.3,1);
}

body { background: var(--bg); color: var(--ink); }

/* ---------- Hero (listing + article) ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(255,56,92,.35), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(255,140,90,.20), transparent 55%),
    linear-gradient(155deg, #14100E 10%, #241512 55%, #3A1512 100%);
  color: #fff;
  padding: 88px 32px 68px;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,56,92,.16); border: 1px solid rgba(255,56,92,.45);
  color: #FFB4C2; font-size: .74rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 99px; margin-bottom: 20px;
  backdrop-filter: blur(6px);
}
.hero h1 {
  position: relative; z-index: 1;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.15;
  margin-bottom: 14px;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.75));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p {
  position: relative; z-index: 1;
  color: rgba(255,255,255,.72); font-size: 1.02rem;
  max-width: 560px; margin: 0 auto; font-weight: 400;
}
.hero-meta {
  position: relative; z-index: 1;
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  margin-top: 22px; font-size: .85rem; color: rgba(255,255,255,.65);
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }

/* ---------- Category filter pills ---------- */
.filter-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 40px; padding-bottom: 4px;
}
.filter-btn {
  padding: 9px 20px; border: 1.5px solid var(--border);
  border-radius: 99px; font-size: .85rem; font-weight: 600;
  cursor: pointer; background: var(--white); color: var(--muted);
  transition: all .2s var(--ease);
}
.filter-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.filter-btn.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px var(--brand-glow);
}

/* ---------- Blog grid & cards ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 60px 24px 90px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.blog-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  text-decoration: none; color: inherit; display: block;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255,56,92,.25);
}

.card-img {
  width: 100%; height: 210px; object-fit: cover;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.2rem;
  position: relative;
  transition: transform .5s var(--ease);
}
.blog-card:hover .card-img { transform: scale(1.03); }
.card-img.emoji-cover {
  background: linear-gradient(145deg, var(--brand-light) 0%, #FFF6ED 60%, #fff 100%);
}
.card-img.emoji-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20,16,14,.06), transparent 40%);
}

.card-body { padding: 22px 22px 24px; }
.card-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--brand-light); color: var(--brand-dark);
  font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 4px 12px; border-radius: 99px; margin-bottom: 12px;
}
.card-title {
  font-size: 1.04rem; font-weight: 750; line-height: 1.4;
  letter-spacing: -.01em; margin-bottom: 9px;
  transition: color .2s;
}
.blog-card:hover .card-title { color: var(--brand-dark); }
.card-excerpt {
  font-size: .87rem; color: var(--muted); line-height: 1.65;
  margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--muted);
  padding-top: 14px; border-top: 1px dashed var(--border);
}
.card-meta .read-time { display: flex; align-items: center; gap: 5px; }
.read-more {
  font-size: .83rem; font-weight: 700; color: var(--brand);
  display: inline-flex; align-items: center; gap: 5px;
  transition: gap .2s;
}
.blog-card:hover .read-more { gap: 9px; }

/* Featured hero card */
.blog-card.featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1.15fr 1fr;
  box-shadow: var(--shadow);
}
.blog-card.featured .card-img { height: 100%; min-height: 280px; font-size: 4.5rem; }
.blog-card.featured .card-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.blog-card.featured .card-title { font-size: 1.45rem; line-height: 1.3; }
.blog-card.featured .card-excerpt { -webkit-line-clamp: 3; font-size: .92rem; }

/* ---------- Article layout ---------- */
.breadcrumb { max-width: 1060px; margin: 0 auto; padding: 20px 24px 0; font-size: .82rem; color: var(--muted); }
.breadcrumb a { color: var(--brand); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 8px; opacity: .5; }

.layout {
  max-width: 1080px; margin: 0 auto; padding: 60px 24px 90px;
  display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start;
}

.article h2 {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em;
  margin: 44px 0 14px; color: var(--ink);
  padding-left: 16px; border-left: 4px solid var(--brand);
  scroll-margin-top: 90px;
}
.article h3 { font-size: 1.08rem; font-weight: 750; margin: 24px 0 10px; color: var(--ink); }
.article p { color: #3C3733; margin-bottom: 15px; font-size: .98rem; line-height: 1.75; }
.article ul { margin: 12px 0 20px; padding-left: 0; list-style: none; }
.article ul li {
  padding: 9px 14px 9px 32px; position: relative;
  font-size: .95rem; color: #3C3733; margin-bottom: 6px;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
}
.article ul li::before { content: '→'; position: absolute; left: 12px; color: var(--brand); font-weight: 700; }
.article img { width: 100%; border-radius: var(--radius); margin: 20px 0; box-shadow: var(--shadow); }

.article .intro-text {
  font-size: 1.08rem; color: #3C3733; line-height: 1.85;
  margin-bottom: 36px; padding: 24px 26px;
  background: linear-gradient(135deg, var(--brand-light), #fff);
  border: 1px solid rgba(255,56,92,.12);
  border-radius: var(--radius-lg);
  position: relative;
}
.article .intro-text::before {
  content: '"'; position: absolute; top: -6px; left: 18px;
  font-size: 3.5rem; color: rgba(255,56,92,.18); font-family: Georgia, serif;
}

.location-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; color: var(--brand-dark); background: var(--brand-light);
  padding: 4px 12px; border-radius: 99px; margin-bottom: 8px; font-weight: 700;
}

/* Tips box */
.tips-box {
  background: linear-gradient(160deg, #1B1512, #241512);
  color: #fff; border-radius: var(--radius-lg);
  padding: 28px 30px; margin: 36px 0;
  box-shadow: var(--shadow-lg);
}
.tips-box h3 { font-size: 1rem; font-weight: 800; margin-bottom: 16px; color: #FFB199; }
.tips-box ul { list-style: none; }
.tips-box ul li {
  font-size: .9rem; color: rgba(255,255,255,.82);
  padding: 9px 0 9px 24px; position: relative;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.tips-box ul li:last-child { border-bottom: none; }
.tips-box ul li::before { content: '→'; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* FAQ accordion */
.faq-section { margin: 48px 0; }
.faq-section h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 22px; letter-spacing: -.02em; border: none; padding: 0; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 12px; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq-item:hover { border-color: rgba(255,56,92,.3); }
.faq-item.open { box-shadow: var(--shadow-sm); }
.faq-q {
  padding: 18px 22px; font-weight: 700; font-size: .95rem; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--white); transition: background .2s;
}
.faq-q:hover { background: var(--brand-light); }
.faq-q .arr { transition: transform .3s var(--ease); color: var(--brand); font-size: .8rem; }
.faq-item.open .faq-q .arr { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  font-size: .9rem; color: var(--muted); line-height: 1.75; background: var(--white);
}
.faq-item.open .faq-a { max-height: 260px; padding: 0 22px 18px; }

/* CTA box */
.cta-box {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border-radius: var(--radius-lg);
  padding: 40px 32px; text-align: center; margin: 48px 0;
  box-shadow: 0 16px 40px var(--brand-glow);
}
.cta-box::before {
  content: ''; position: absolute; width: 260px; height: 260px;
  background: rgba(255,255,255,.12); border-radius: 50%;
  top: -120px; right: -80px;
}
.cta-box h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; position: relative; }
.cta-box p { font-size: .92rem; opacity: .9; margin-bottom: 22px; position: relative; }
.cta-box a {
  position: relative;
  display: inline-block; background: #fff; color: var(--brand-dark);
  font-weight: 800; padding: 13px 30px; border-radius: 10px;
  text-decoration: none; font-size: .95rem;
  transition: transform .2s, box-shadow .2s;
}
.cta-box a:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.18); }

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 90px; }
.sidebar-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm); margin-bottom: 20px;
  transition: box-shadow .2s;
}
.sidebar-card:hover { box-shadow: var(--shadow); }
.sidebar-card h4 {
  font-size: .78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted); margin-bottom: 16px;
}
.sidebar-card a {
  display: block; font-size: .87rem; color: #3C3733; text-decoration: none;
  padding: 9px 0; border-bottom: 1px solid var(--border);
  transition: color .15s, padding-left .15s;
}
.sidebar-card a:last-child { border-bottom: none; }
.sidebar-card a:hover { color: var(--brand); padding-left: 4px; }

.contact-sidebar { background: var(--brand-light); border: 1px solid rgba(255,56,92,.18); }
.contact-sidebar .contact-item { display: flex; gap: 10px; align-items: center; padding: 9px 0; font-size: .875rem; color: var(--ink); }
.contact-sidebar a { color: var(--brand-dark) !important; font-weight: 700; border: none !important; padding: 0 !important; }

/* ---------- Footer (blog pages) ---------- */
footer.blog-footer {
  background: #14100E; color: rgba(255,255,255,.65);
  padding: 48px 32px 28px; margin-top: 0;
}
.footer-inner { max-width: 1120px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-copy { font-size: .8rem; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: .8rem; color: rgba(255,255,255,.6); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 680px) {
  .blog-card.featured { grid-template-columns: 1fr; }
  .blog-card.featured .card-img { height: 200px; }
  .hero { padding: 64px 20px 48px; }
  .container, .layout { padding-left: 18px; padding-right: 18px; }
}