/* Magic Platform Hugo Theme — Base Styles */

/* ── Reset & Base ────────────────────────────────────────────────────── */

:root {
  --primary: #3b82f6;
  --secondary: #6366f1;
  --background: #ffffff;
  --text: #1a1a1a;
  --accent: #f59e0b;
  --muted: #6b7280;
  --surface: #f9fafb;
  --border-radius: 0.5rem;
  --max-width: 1200px;
  --section-spacing: 5rem;
  --primary-hover: #2563eb;
  --accent-text: #92400e;
  --testimonial-star: #f59e0b;
  --heading-font: system-ui, -apple-system, sans-serif;
  --body-font: system-ui, -apple-system, sans-serif;
  /* Theme Studio additions (used by presets.css and effects.css) */
  --border-color: rgba(0, 0, 0, 0.08);
  --code-bg: #f2f2f2;
}

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

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

body {
  font-family: var(--body-font);
  color: var(--text);
  background-color: var(--background);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--heading-font);
  line-height: 1.2;
  font-weight: 700;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Container ───────────────────────────────────────────────────────── */

.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ── Section Spacing ─────────────────────────────────────────────────── */

.section {
  padding-top: var(--section-spacing);
  padding-bottom: var(--section-spacing);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Grid Layouts ────────────────────────────────────────────────────── */

.grid-2,
.grid-3,
.grid-auto {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Card ────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius);
  padding: 2rem;
}

.card-popular {
  border-color: var(--primary);
  border-width: 2px;
  position: relative;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover, var(--primary));
  opacity: 1;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: #ffffff;
}

/* ── Hero Section ────────────────────────────────────────────────────── */

.hero-section {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-grid .hero-content {
    text-align: left;
  }
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .hero-content h1 {
    font-size: 3.5rem;
  }
}

.hero-tagline {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 768px) {
  .hero-grid .hero-ctas {
    justify-content: flex-start;
  }
}

.hero-image img {
  border-radius: var(--border-radius);
}

/* ── Features Section ────────────────────────────────────────────────── */

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--border-radius);
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.features-section .card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.features-section .card p {
  color: var(--muted);
}

/* ── Pricing Section ─────────────────────────────────────────────────── */

.pricing-section .card {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.popular-badge {
  display: inline-block;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.plan-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.plan-period {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.plan-description {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.plan-features {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.plan-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.plan-features li::before {
  content: "\2713\0020";
  color: var(--primary);
  font-weight: 700;
}

.pricing-section .btn {
  margin-top: auto;
  width: 100%;
}

/* ── Testimonials Section ────────────────────────────────────────────── */

.testimonial-card {
  display: flex;
  flex-direction: column;
}

.testimonial-stars {
  color: var(--testimonial-star, var(--accent));
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.testimonial-quote {
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-name {
  font-weight: 700;
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ── CTA Section ─────────────────────────────────────────────────────── */

.cta-section .cta-box {
  background-color: var(--primary);
  color: #ffffff;
  border-radius: var(--border-radius);
  padding: 4rem 2rem;
  text-align: center;
}

.cta-box h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.cta-box p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-box .btn {
  background-color: #ffffff;
  color: var(--primary);
}

.cta-box .btn:hover {
  opacity: 0.95;
}

/* ── FAQ Section ─────────────────────────────────────────────────────── */

.faq-section {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.faq-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.faq-item {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.faq-item summary {
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding-bottom: 1.25rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Stats Section ───────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--heading-font);
  color: var(--primary);
}

.stat-label {
  font-size: 0.95rem;
  color: var(--muted);
}

/* ── About Section ──────────────────────────────────────────────────── */

.about-section .section-header h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.about-content {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.about-with-image {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  max-width: none;
}

@media (min-width: 768px) {
  .about-with-image {
    grid-template-columns: 1fr 1fr;
  }
}

.about-image img {
  width: 100%;
  border-radius: var(--border-radius);
  object-fit: cover;
}

.about-body {
  color: var(--text);
  line-height: 1.8;
}

.about-body p {
  margin-bottom: 1rem;
}

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer-section {
  background-color: var(--surface);
  padding-top: 4rem;
  padding-bottom: 2rem;
  margin-top: var(--section-spacing);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand p {
  color: var(--muted);
  margin-top: 0.5rem;
}

.footer-nav h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text);
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-nav a:hover {
  color: var(--text);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.social-links a {
  color: var(--muted);
  font-size: 0.875rem;
  text-transform: capitalize;
}

.social-links a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 1.5rem;
  text-align: center;
}

.copyright {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--background);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

.header-brand:hover {
  text-decoration: none;
}

.header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.header-nav {
  display: none;
}

@media (min-width: 768px) {
  .header-nav {
    display: block;
  }
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.header-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.header-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.header-nav a.nav-active {
  color: var(--primary);
  font-weight: 600;
}

/* ── Dropdown (desktop) ── */

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  padding: 0.5rem 0;
  background-color: var(--background);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 200;
}

.nav-item:hover .nav-dropdown {
  display: block;
}

.nav-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-dropdown a:hover {
  color: var(--text);
  background-color: var(--surface);
}

.header-ctas {
  display: none;
  gap: 0.75rem;
  align-items: center;
}

@media (min-width: 768px) {
  .header-ctas {
    display: flex;
  }
}

/* ── Mobile hamburger menu ── */

.nav-mobile-toggle {
  display: block;
}

@media (min-width: 768px) {
  .nav-mobile-toggle {
    display: none;
  }
}

.nav-hamburger {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  padding: 0.25rem;
}

.nav-hamburger::-webkit-details-marker {
  display: none;
}

.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animate to X when open */
.nav-mobile-toggle[open] .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-mobile-toggle[open] .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.nav-mobile-toggle[open] .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background-color: var(--background);
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-mobile-menu > a {
  display: block;
  padding: 0.625rem 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
}

.nav-mobile-menu > a:hover {
  color: var(--primary);
  text-decoration: none;
}

.nav-mobile-menu > a.nav-active {
  color: var(--primary);
  font-weight: 600;
}

.nav-mobile-children {
  padding-left: 1rem;
}

.nav-mobile-children a {
  display: block;
  padding: 0.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-mobile-children a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-mobile-children a.nav-active {
  color: var(--primary);
}

.nav-mobile-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.nav-mobile-ctas .btn {
  text-align: center;
}

/* ── Hero Badge & Accent ────────────────────────────────────────────── */

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.hero-badge-icon {
  font-size: 1rem;
}

.headline-accent {
  color: var(--accent-text, var(--primary));
}

/* ── Hero Image Variants ────────────────────────────────────────────── */

.hero-image-right {
  direction: ltr;
}

.hero-image-left .hero-image {
  order: -1;
}

.hero-image-size-small img {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.hero-image-size-medium img {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-image-size-large img {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-image-size-full img {
  width: 100%;
}

.img-fit-cover {
  object-fit: cover;
}

.img-fit-contain {
  object-fit: contain;
}

.img-fit-fill {
  object-fit: fill;
}

/* ── Feature Highlights ─────────────────────────────────────────────── */

.feature-highlights {
  list-style: none;
  margin-top: 0.75rem;
  padding: 0;
}

.feature-highlights li {
  padding: 0.25rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.feature-highlights li::before {
  content: "\2713\0020";
  color: var(--primary);
  font-weight: 700;
}

/* ── FAQ Tagline ────────────────────────────────────────────────────── */

.faq-section .section-tagline {
  text-align: center;
  color: var(--muted);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* ── Gallery Section ────────────────────────────────────────────────── */

.gallery-grid {
  margin-top: 2rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: var(--border-radius);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item figcaption {
  padding: 0.75rem 0;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}

/* ── Contact Section ────────────────────────────────────────────────── */

.contact-body {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Pricing Footnote ───────────────────────────────────────────────── */

.pricing-footnote {
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 2rem;
}

/* ── Legal Pages ────────────────────────────────────────────────────── */

.legal-section {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.legal-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.legal-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-tagline {
  font-size: 1.125rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.legal-updated {
  font-size: 0.875rem;
  color: var(--muted);
}

.legal-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.legal-summary {
  background-color: var(--surface);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 3rem;
}

.legal-summary h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.legal-summary ul {
  list-style: none;
  padding: 0;
}

.legal-summary li {
  padding: 0.375rem 0;
  color: var(--muted);
}

.legal-summary li::before {
  content: "\2713\0020";
  color: var(--primary);
  font-weight: 700;
}

.legal-card {
  background: var(--surface);
  border-radius: var(--border-radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.legal-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.legal-card p {
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.legal-card ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.legal-card li {
  color: var(--muted);
  margin-bottom: 0.375rem;
}

.legal-subsection {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.legal-subsection h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.legal-contact {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background-color: var(--surface);
  border-radius: var(--border-radius);
}

.legal-contact p {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.legal-contact a {
  color: var(--primary);
  font-weight: 600;
}

/* ── Products Section ───────────────────────────────────────────────── */

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
}

.product-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.product-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.product-card p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.products-subheadline {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 0.5rem;
}
.contact-email,
.contact-phone,
.contact-address {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.contact-form {
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--border-radius);
  font-family: var(--body-font);
  font-size: 1rem;
  color: var(--text);
  background-color: var(--background);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.contact-form .btn {
  width: 100%;
}

/* ── Custom Section (Catch-All) ─────────────────────────────────────── */

.custom-section-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.custom-body {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}

.custom-body p {
  margin-bottom: 1rem;
}

/* ── Blog Post Detail ────────────────────────────────────────────────── */

.blog-post-container {
  max-width: 760px;
}

.blog-post-hero {
  margin-bottom: 2.5rem;
}

.blog-post-hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.blog-post-header {
  margin-bottom: 2.5rem;
}

.blog-post-title {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .blog-post-title {
    font-size: 2.75rem;
  }
}

.blog-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.blog-post-date {
  font-weight: 500;
}

.blog-post-author::before {
  content: "\00B7\0020";
}

.blog-post-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-category-badge {
  display: inline-block;
  background-color: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
}

.blog-post-body {
  line-height: 1.85;
  color: var(--text);
}

.blog-post-body h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post-body h3 {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.blog-post-body p {
  margin-bottom: 1.25rem;
}

.blog-post-body ul,
.blog-post-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.blog-post-body li {
  margin-bottom: 0.375rem;
}

.blog-post-body blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 1.25rem;
  margin-left: 0;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-style: italic;
}

.blog-post-body code {
  background-color: var(--code-bg, #f2f2f2);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.875em;
}

.blog-post-body pre {
  background-color: var(--code-bg, #f2f2f2);
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.blog-post-body pre code {
  background: none;
  padding: 0;
}

.blog-post-body img {
  border-radius: var(--border-radius);
  margin-bottom: 1.25rem;
}

.blog-post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ── Blog Listing ────────────────────────────────────────────────────── */

.blog-listing .section-header h1 {
  font-size: 2rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.blog-card-image-link {
  display: block;
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-img {
  transform: scale(1.02);
}

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.blog-card-title a {
  color: var(--text);
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--primary);
}

.blog-card-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.blog-card-author::before {
  content: "\00B7\0020";
}

.blog-card-excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.blog-card-categories {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.blog-card-readmore {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
}

.blog-card-readmore:hover {
  text-decoration: underline;
}

.blog-empty {
  text-align: center;
  color: var(--muted);
  font-size: 1.125rem;
  padding: 3rem 0;
}

/* ── Blog Pagination ─────────────────────────────────────────────────── */

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.blog-pagination-info {
  font-size: 0.875rem;
  color: var(--muted);
}
