/* Modern Typography & Design System */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;700&display=swap");

:root {
  /* Halo Grow Theme Variables */
  --primary-color: #1a1a1a;
  --secondary-color: #d4af37;
  --accent-color: #d4af37;
  --bg-color: #ffffff;
  --card-bg: #f9f9f9;
  --text-main: #333333;
  --text-muted: #666666;
  --border-color: #e0e0e0;
  --max-width: 1200px;
  --reading-width: 860px;
  --transition: all 0.3s ease;

  /* Preserved Layout vars */
  --navbar-height: 70px;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: "Outfit", sans-serif;
  color: var(--primary-color);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* Layout Containers */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  text-align: center;
  padding: 4rem 0 2rem;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

header p {
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

/* Blog Card Styles */
.blog-card {
  background: var(--bg-color);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-color);
}

.blog-card .card-image {
  width: 100%;
  height: 140px; /* Reduced from 220px (~40% decrease) */
  object-fit: cover;
  transition: var(--transition);
}

.blog-card:hover .card-image {
  filter: brightness(0.9);
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.card-title {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.card-footer {
  margin-top: auto;
  font-weight: 500;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Post Page Styles (Medium-like) */
.post-container {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 500;
}

.back-link:hover {
  color: var(--accent-color);
}

.post-header {
  margin-bottom: 3rem;
}

.post-title {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
}

.post-author-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.author-info h4 {
  font-size: 1.1rem;
}

.author-info span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.featured-image-full {
  width: 60%; /* Reduced from 100% (40% decrease) */
  max-width: 100%;
  margin: 0 auto 3rem;
  border-radius: 12px;
  display: block;
}

.post-body {
  font-size: 1.25rem;
  line-height: 1.8;
}

.post-body p {
  margin-bottom: 2rem;
}

.post-body h2 {
  font-size: 2rem;
  margin: 3rem 0 1.5rem;
}

.post-body h3 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
}

.post-body blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 2rem;
  margin: 3rem 0;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.post-body ul {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.post-body li {
  margin-bottom: 0.75rem;
}

/* Error State */
.error-container {
  text-align: center;
  padding: 5rem 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  header h1 {
    font-size: 2.2rem;
  }
  .post-title {
    font-size: 2.5rem;
  }
  .post-body {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 1rem;
  }
}

/* --- Standard Navbar Styles (Ported from style.css) --- */
.navbar {
  background-color: var(--primary-color);
  color: var(--accent-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.nav-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 2rem;
  position: relative;
}

.logo {
  justify-self: start;
}

.nav-center {
  justify-self: center;
}

.nav-menu-desktop {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-menu-desktop a {
  color: #f5f5f5; /* Explicit light color for dark header */
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  text-decoration: none;
}

.nav-menu-desktop a:hover {
  color: var(--secondary-color);
  background: rgba(212, 175, 55, 0.1);
}

.nav-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-right {
  justify-self: end;
}

.btn-buy-now {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #f4d03f 100%);
  color: var(--primary-color);
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 25px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  text-decoration: none;
  display: inline-block;
}

.btn-buy-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #f4d03f 0%, var(--secondary-color) 100%);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--secondary-color);
  font-size: 1.5rem;
  cursor: pointer;
  grid-column: 3;
  justify-self: end;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

/* Mobile Responsive Navbar */
@media (max-width: 768px) {
  .nav-wrapper {
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
  }
  
  .nav-center, .nav-right {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--primary-color);
    padding: 1rem;
    gap: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 100%;
  }

  .nav-menu.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    z-index: 1000 !important;
  }

  .nav-menu a {
    display: block;
    padding: 1rem;
    color: #f5f5f5;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  header h1 {
    font-size: 2.2rem;
  }
  .post-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 1rem;
  }
}
