/*
File: amc-blog.css
Purpose: Shared blog post styling for Auto MOT Centre WordPress posts.
Usage: Enqueue this file in your theme/child theme, then remove the <style> block from each blog post.
Recommended article wrapper: <article class="amc-blog-post">
*/

.amc-blog-post,
.amc-blog-cost-guide,
.amc-blog-time-guide {
  max-width: 980px;
  margin: 0 auto;
  font-family: inherit;
  line-height: 1.75;
  color: #1f2937;
}

.amc-blog-post *,
.amc-blog-cost-guide *,
.amc-blog-time-guide * {
  box-sizing: border-box;
}

.amc-blog-post h1,
.amc-blog-post h2,
.amc-blog-post h3,
.amc-blog-cost-guide h1,
.amc-blog-cost-guide h2,
.amc-blog-cost-guide h3,
.amc-blog-time-guide h1,
.amc-blog-time-guide h2,
.amc-blog-time-guide h3 {
  line-height: 1.25;
  color: #111827;
  margin-top: 1.4em;
  margin-bottom: 0.6em;
}

.amc-blog-post h1,
.amc-blog-cost-guide h1,
.amc-blog-time-guide h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-top: 0;
}

.amc-blog-post h2,
.amc-blog-cost-guide h2,
.amc-blog-time-guide h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.amc-blog-post h3,
.amc-blog-cost-guide h3,
.amc-blog-time-guide h3 {
  font-size: 1.25rem;
}

.amc-blog-post p,
.amc-blog-cost-guide p,
.amc-blog-time-guide p {
  margin: 0 0 1.1em;
}

.amc-blog-post a,
.amc-blog-cost-guide a,
.amc-blog-time-guide a {
  color: #b91c1c;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Hero */

.amc-blog-hero {
  background: linear-gradient(135deg, #111827 0%, #1f2937 55%, #7f1d1d 100%);
  color: #ffffff;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 24px;
  margin-bottom: 2rem;
}

.amc-blog-hero h1,
.amc-blog-hero p {
  color: #ffffff;
}

.amc-blog-eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.amc-blog-hero-intro {
  font-size: 1.12rem;
  max-width: 760px;
}

/* Buttons and CTAs */

.amc-blog-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.amc-blog-btn {
  display: inline-block;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  text-decoration: none !important;
  font-weight: 800;
}

.amc-blog-btn-primary {
  background: #dc2626;
  color: #ffffff !important;
}

.amc-blog-btn-secondary {
  background: #ffffff;
  color: #111827 !important;
}

.amc-blog-cta {
  background: #111827;
  color: #ffffff;
  border-radius: 20px;
  padding: 1.35rem;
  margin: 1.5rem 0;
}

.amc-blog-cta h2,
.amc-blog-cta h3,
.amc-blog-cta p {
  color: #ffffff;
}

/* Summary cards */

.amc-blog-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.amc-blog-summary-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  padding: 1.25rem;
}

.amc-blog-summary-card strong {
  display: block;
  font-size: 1.55rem;
  color: #b91c1c;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

/* Content boxes */

.amc-blog-note,
.amc-blog-warning,
.amc-blog-timeline {
  border-radius: 20px;
  padding: 1.35rem;
  margin: 1.5rem 0;
}

.amc-blog-note {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.amc-blog-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

/* Tables */

.amc-blog-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
}

.amc-blog-post table,
.amc-blog-cost-guide table,
.amc-blog-time-guide table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
  background: #ffffff;
}

.amc-blog-post th,
.amc-blog-post td,
.amc-blog-cost-guide th,
.amc-blog-cost-guide td,
.amc-blog-time-guide th,
.amc-blog-time-guide td {
  text-align: left;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.amc-blog-post th,
.amc-blog-cost-guide th,
.amc-blog-time-guide th {
  background: #f3f4f6;
  color: #111827;
  font-weight: 800;
}

.amc-blog-post tr:last-child td,
.amc-blog-cost-guide tr:last-child td,
.amc-blog-time-guide tr:last-child td {
  border-bottom: 0;
}

/* Checklists */

.amc-blog-checklist {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 1.5rem;
}

.amc-blog-checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
}

.amc-blog-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #16a34a;
  font-weight: 900;
}

/* Numbered step cards */

.amc-blog-step-list {
  counter-reset: motsteps;
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 1.5rem;
}

.amc-blog-step-list li {
  counter-increment: motsteps;
  position: relative;
  padding: 1rem 1rem 1rem 4rem;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  margin-bottom: 0.85rem;
  background: #ffffff;
}

.amc-blog-step-list li::before {
  content: counter(motsteps);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 2rem;
  height: 2rem;
  background: #dc2626;
  color: #ffffff;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

/* Timeline */

.amc-blog-timeline {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.amc-blog-timeline-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.amc-blog-timeline-item:last-child {
  border-bottom: 0;
}

.amc-blog-timeline-time {
  font-weight: 900;
  color: #b91c1c;
}

/* FAQs */

.amc-blog-faq details {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.85rem;
  background: #ffffff;
}

.amc-blog-faq summary {
  cursor: pointer;
  font-weight: 800;
  color: #111827;
}

/* Sources */

.amc-blog-source-list {
  font-size: 0.95rem;
  color: #4b5563;
}

/* Responsive */

@media (max-width: 760px) {
  .amc-blog-summary {
    grid-template-columns: 1fr;
  }

  .amc-blog-hero {
    border-radius: 18px;
  }

  .amc-blog-timeline-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* Blog index, archive and post template styles */

.amc-blog-main {
  background: #ffffff;
}

.amc-blog-main .container {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.amc-blog-index-hero {
  background: linear-gradient(135deg, #111827 0%, #1f2937 55%, #7f1d1d 100%);
  color: #ffffff;
  padding: clamp(3rem, 7vw, 6rem) 0;
  margin-bottom: 3rem;
}

.amc-blog-index-hero h1,
.amc-blog-index-hero p,
.amc-blog-index-hero .amc-blog-hero-intro {
  color: #ffffff;
}

.amc-blog-index-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.amc-blog-list-section {
  padding: 0 0 clamp(3rem, 6vw, 5rem);
}

.amc-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.amc-blog-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.amc-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.12);
}

.amc-blog-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
}

.amc-blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.amc-blog-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.35rem;
}

.amc-blog-card-content h2 {
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0.55rem 0 0.75rem;
}

.amc-blog-card-content h2 a {
  color: #111827;
  text-decoration: none;
}

.amc-blog-card-content h2 a:hover {
  color: #b91c1c;
}

.amc-blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  color: #6b7280;
  font-size: 0.92rem;
}

.amc-blog-meta a {
  color: #b91c1c;
  text-decoration: none;
  font-weight: 800;
}

.amc-blog-card-excerpt {
  color: #4b5563;
  margin-bottom: 1rem;
}

.amc-blog-card-excerpt p {
  margin-bottom: 0;
}

.amc-blog-read-more {
  margin-top: auto;
  color: #b91c1c;
  font-weight: 900;
  text-decoration: none;
}

.amc-blog-card-type {
  display: inline-block;
  width: fit-content;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 900;
}

.amc-blog-pagination {
  margin-top: 2.5rem;
  text-align: center;
}

.amc-blog-pagination .nav-links,
.amc-blog-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.amc-blog-pagination a,
.amc-blog-pagination span {
  display: inline-flex;
  min-width: 2.6rem;
  min-height: 2.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  padding: 0.55rem 0.8rem;
  text-decoration: none;
  font-weight: 800;
}

.amc-blog-pagination .current {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.amc-blog-empty {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.amc-blog-single {
  padding: clamp(2rem, 5vw, 4rem) 1.25rem;
}

.amc-blog-single .amc-blog-hero {
  margin-bottom: 2rem;
}

.amc-blog-single-meta {
  color: rgba(255, 255, 255, 0.82);
  margin-top: 1rem;
}

.amc-blog-featured-image {
  margin: 0 0 2rem;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

.amc-blog-featured-image img {
  display: block;
  width: 100%;
  height: auto;
}

.amc-blog-entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

.amc-blog-entry-content ul:not(.amc-blog-checklist),
.amc-blog-entry-content ol:not(.amc-blog-step-list) {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.amc-blog-entry-content li {
  margin-bottom: 0.55rem;
}

.amc-blog-custom-layout {
  padding: clamp(2rem, 5vw, 4rem) 1.25rem;
}

.amc-blog-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0 0;
}

.amc-blog-post-nav a {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1rem;
  text-decoration: none;
  color: #111827;
  font-weight: 900;
  background: #ffffff;
}

.amc-blog-post-nav-next {
  text-align: right;
}

.amc-blog-page-links {
  margin: 1.5rem 0;
  font-weight: 800;
}

@media (max-width: 960px) {
  .amc-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .amc-blog-grid,
  .amc-blog-post-nav {
    grid-template-columns: 1fr;
  }

  .amc-blog-post-nav-next {
    text-align: left;
  }
}

/* Featured image for Custom HTML blog posts */
.amc-blog-custom-layout .amc-blog-featured-image-custom {
  width: min(980px, calc(100% - 32px));
  margin: 64px auto 32px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.16);
}

.amc-blog-custom-layout .amc-blog-featured-image-custom img {
  display: block;
  width: 100%;
  height: auto;
}

/* If the post has a featured image, reduce the hero top spacing */
.amc-blog-custom-layout .amc-blog-featured-image-custom + .amc-blog-post .amc-blog-hero {
  margin-top: 0;
}

@media (max-width: 760px) {
  .amc-blog-custom-layout .amc-blog-featured-image-custom {
    width: min(100% - 20px, 980px);
    margin: 32px auto 24px;
    border-radius: 18px;
  }
}