/* GrowRockets Ghost Theme — Brand-matched styles */

/* Override Ghost's injected accent color with our brand orange */
:root {
  --ghost-accent-color: #F97316 !important;
}

/* ========================================
   Reset & Base
   ======================================== */

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #334155;
  background: #fff;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  color: #3b82f6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   Layout
   ======================================== */

.gr-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gr-container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gr-main {
  min-height: calc(100vh - 160px);
}

/* ========================================
   Header
   ======================================== */

.gr-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #f1f5f9;
}

.gr-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gr-logo {
  text-decoration: none;
}

.gr-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: #0f172a;
}

.gr-logo-img {
  height: 32px;
  width: auto;
}

.gr-logo-accent {
  color: #2563eb;
}

.gr-footer-logo {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.gr-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.gr-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}

.gr-nav-link:hover {
  color: #0f172a;
}

.gr-nav-active {
  color: #0f172a;
  font-weight: 600;
}

.gr-nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #0f172a;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: background 0.15s;
}

.gr-nav-cta:hover {
  background: #1e293b;
  color: #fff;
}

.gr-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #334155;
  cursor: pointer;
  padding: 0.5rem;
}

/* ========================================
   Blog Hero
   ======================================== */

.gr-blog-hero {
  padding: 4rem 0 3rem;
  text-align: center;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #f8fafc 100%);
}

.gr-blog-hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  color: #0f172a;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.gr-blog-hero-desc {
  font-size: 1.125rem;
  color: #64748b;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.gr-author-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  text-align: left;
}

.gr-author-hero-avatar {
  width: 80px;
  height: 80px;
  border-radius: 1rem;
  object-fit: cover;
}

/* ========================================
   Post Feed (Grid)
   ======================================== */

.gr-post-feed-section {
  padding: 3rem 0 4rem;
}

.gr-post-feed-section,
.gr-post-feed {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ========================================
   Post Card
   ======================================== */

.gr-post-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

.gr-post-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.gr-post-card-image-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.gr-post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gr-post-card:hover .gr-post-card-image {
  transform: scale(1.03);
}

.gr-post-card-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.gr-post-card-content {
  padding: 1.5rem;
}

.gr-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.gr-tag:hover {
  background: #dbeafe;
  color: #2563eb;
}

.gr-post-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.gr-post-card-title a {
  color: #0f172a;
  text-decoration: none;
}

.gr-post-card-title a:hover {
  color: #2563eb;
}

.gr-post-card-excerpt {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.gr-post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.gr-post-card-author {
  font-weight: 500;
}

/* ========================================
   Single Post
   ======================================== */

.gr-post-header {
  padding: 3rem 0 2rem;
  text-align: center;
}

.gr-post-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 2.5rem;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.gr-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

.gr-post-author {
  font-weight: 500;
  color: #64748b;
}

.gr-post-feature-image {
  max-width: 960px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
}

.gr-post-feature-image img {
  border-radius: 1rem;
  width: 100%;
}

.gr-post-feature-image figcaption {
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-top: 0.75rem;
}

/* ========================================
   Post Content (Ghost editor output)
   ======================================== */

.gr-post-content {
  padding-bottom: 3rem;
}

.gr-post-content h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: #0f172a;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.gr-post-content h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.375rem;
  color: #0f172a;
  margin: 2rem 0 0.75rem;
}

.gr-post-content h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  color: #0f172a;
  margin: 1.5rem 0 0.5rem;
}

.gr-post-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.gr-post-content ul,
.gr-post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.gr-post-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.gr-post-content blockquote {
  border-left: 3px solid #2563eb;
  padding: 0.75rem 1.5rem;
  margin: 1.5rem 0;
  color: #475569;
  background: #f8fafc;
  border-radius: 0 0.5rem 0.5rem 0;
}

.gr-post-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

.gr-post-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.875em;
}

.gr-post-content p code {
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  color: #e11d48;
  font-size: 0.85em;
}

.gr-post-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gr-post-content a:hover {
  color: #3b82f6;
}

.gr-post-content img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

.gr-post-content figure {
  margin: 2rem 0;
}

.gr-post-content figcaption {
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-top: 0.5rem;
}

.gr-post-content hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2.5rem 0;
}

/* Ghost Koenig editor — width classes */
.kg-width-wide {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.kg-width-full {
  max-width: none;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

.kg-width-full img {
  width: 100%;
}

/* Ghost-specific cards */
.kg-card {
  margin: 2rem 0;
}

.kg-image-card img,
.kg-gallery-image img {
  border-radius: 0.75rem;
}

.kg-bookmark-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
}

.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.kg-bookmark-content {
  padding: 1.25rem;
  flex: 1;
}

.kg-bookmark-title {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.9375rem;
}

.kg-bookmark-description {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.kg-bookmark-icon {
  width: 16px;
  height: 16px;
}

.kg-bookmark-thumbnail {
  width: 160px;
  flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

/* ========================================
   Author Box
   ======================================== */

.gr-author-box {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  margin: 2rem auto;
  background: #f8fafc;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
}

.gr-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  object-fit: cover;
  flex-shrink: 0;
}

.gr-author-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.gr-author-bio {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

/* ========================================
   CTA Banner
   ======================================== */

.gr-cta-banner {
  margin: 3rem auto;
  padding: 2.5rem;
  text-align: center;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  border-radius: 1rem;
  color: #fff;
}

.gr-cta-banner h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.gr-cta-banner p {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.gr-cta-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2563eb;
  background: #fff;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: background 0.15s;
}

.gr-cta-btn:hover {
  background: #eff6ff;
  color: #2563eb;
}

/* ========================================
   Related Posts
   ======================================== */

.gr-related {
  padding: 3rem 0 2rem;
  margin-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.gr-related-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #0f172a;
  margin-bottom: 1.5rem;
}

/* ========================================
   Pagination
   ======================================== */

.gr-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 1.5rem 4rem;
}

.gr-pagination-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.gr-pagination-link:hover {
  color: #3b82f6;
}

.gr-pagination-info {
  font-size: 0.8125rem;
  color: #94a3b8;
}

/* ========================================
   Error Page
   ======================================== */

.gr-error {
  text-align: center;
  padding: 6rem 1.5rem;
}

.gr-error-code {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 6rem;
  color: #e2e8f0;
  line-height: 1;
  margin-bottom: 1rem;
}

.gr-error-message {
  font-size: 1.125rem;
  color: #64748b;
  margin-bottom: 2rem;
}

/* ========================================
   Footer
   ======================================== */

.gr-footer {
  background: #0f172a;
  border-top: 1px solid #1e293b;
  padding: 2.5rem 0;
}

.gr-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.gr-footer-links {
  display: flex;
  gap: 1.5rem;
}

.gr-footer-links a {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}

.gr-footer-links a:hover {
  color: #fff;
}

.gr-footer-copy {
  font-size: 0.75rem;
  color: #64748b;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  .gr-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    gap: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .gr-nav-open {
    display: flex;
  }

  .gr-menu-toggle {
    display: block;
  }

  .gr-blog-hero-title {
    font-size: 1.75rem;
  }

  .gr-post-title {
    font-size: 1.75rem;
  }

  .gr-post-feed-section,
  .gr-post-feed {
    grid-template-columns: 1fr;
  }

  .gr-author-hero {
    flex-direction: column;
    text-align: center;
  }

  .gr-post-meta {
    flex-wrap: wrap;
    justify-content: center;
  }

  .gr-cta-banner {
    padding: 2rem 1.5rem;
  }

  .gr-footer-inner {
    text-align: center;
  }

  .gr-footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .gr-post-card-content {
    padding: 1rem;
  }

  .gr-container,
  .gr-container-narrow {
    padding: 0 1rem;
  }
}
