/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --secondary: #64748b;
  --background: #f8fafc;
  --white: #ffffff;
  --text-dark: #334155;
  --border: #e2e8f0;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Merriweather", serif;
  color: var(--primary);
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
}

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

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background-color: var(--primary-light);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--primary);
}
.btn-outline:hover {
  background-color: #f1f5f9;
}

.btn-white {
  background-color: var(--white);
  color: var(--primary);
}
.btn-white:hover {
  background-color: #f8fafc;
}

.btn-outline-white {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
}
.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

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

.full-width {
  width: 100%;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

/* Header */
header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hero Section (Index) */
.hero {
  background-color: var(--primary);
  color: var(--white);
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1.5rem;
}
.hero p {
  color: #cbd5e1;
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto;
}

/* Blog Grid (Index) */
.blog-section {
  padding: 4rem 0;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
}
.post-card {
  background: var(--white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.post-image {
  height: 240px;
  width: 100%;
  object-fit: cover;
}
.post-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.post-meta {
  font-size: 0.875rem;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}
.post-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.post-title a:hover {
  color: #2563eb;
}
.post-summary {
  color: var(--secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.read-more {
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.read-more:hover {
  gap: 0.5rem;
}

/* ===========================
   Post Detail Page (Exact Match)
   =========================== */

/* Post Hero */
.post-hero {
  height: 60vh;
  min-height: 400px;
  position: relative;
  background-color: var(--primary);
  width: 100%;
}

.post-hero-bg {
  position: absolute;
  inset: 0;
}

.post-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  mix-blend-mode: overlay;
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--primary) 0%, transparent 100%);
  opacity: 0.3;
}

.post-hero-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 4rem;
  z-index: 10;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.back-link:hover {
  color: var(--white);
}

.post-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.75rem); /* Responsive: text-3xl to 6xl */
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 900px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-meta-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-weight: 500;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.meta-dot {
  width: 6px;
  height: 6px;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

/* Two Column Layout */
.content-layout {
  padding: 4rem 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .content-layout {
    grid-template-columns: 8fr 4fr; /* lg:col-span-8 / lg:col-span-4 */
  }
}

/* Article Column */
.article-column {
  /* Prose styling */
}

.article-lead {
  font-size: 1.25rem;
  color: #475569;
  font-style: italic;
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

.article-body {
  font-size: 1.125rem;
  color: var(--text-dark);
  line-height: 1.8;
}

.article-body p {
  margin-bottom: 1.5rem;
}

.article-body ol {
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.article-body a {
  text-decoration: none;
  position: relative;
  color: var(--primary);
}

.article-body a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.article-body a:hover::after {
  width: 100%;
}

.share-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.share-label {
  color: var(--secondary);
  font-weight: 500;
}

/* Sidebar Column */
.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-card {
  border-radius: 1rem;
  padding: 2rem;
}

/* Contact Card */
.contact-card {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 6rem;
}

.contact-card h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.contact-card p {
  color: #dbeafe; /* blue-100 */
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Practice Areas */
.practice-areas {
  background-color: #f8fafc; /* slate-50 */
  border: 1px solid var(--border);
}

.practice-areas h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.practice-areas ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.practice-areas a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--secondary);
  font-size: 0.875rem;
}

.practice-areas a:hover {
  color: var(--primary);
}

.practice-areas a svg {
  opacity: 0;
  transition: opacity 0.2s;
}

.practice-areas a:hover svg {
  opacity: 1;
}

/* Footer */
footer {
  background: var(--primary);
  color: #94a3b8;
  padding: 2rem 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer h3 {
  color: var(--white);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}
.footer-links li {
  list-style: none;
  margin-bottom: 0.75rem;
}
.footer-links a:hover {
  color: var(--white);
}
.footer-bottom {
  text-align: center;
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }
  .hero {
    padding: 4rem 0;
  }
  .post-hero {
    height: auto;
    min-height: 50vh;
  }
  .post-hero-content {
    padding-top: 4rem;
    padding-bottom: 2rem;
  }
}
