/* === PREMIUM LEGAL DESIGN SYSTEM 2.0 - REPAIRED === */

:root {
  /* Palette - Deep Navy & Elegant Gold */
  --c-primary: #0f172a;      /* Slate 900 */
  --c-primary-light: #1e293b; /* Slate 800 */
  --c-accent: #d97706;       /* Amber 600 */
  --c-accent-hover: #b45309;
  --c-bg: #ffffff;
  --c-bg-alt: #f8fafc;       /* Slate 50 */
  --c-text: #334155;         /* Slate 700 */
  --c-text-light: #64748b;   /* Slate 500 */
  --c-white: #ffffff;
  --c-border: #e2e8f0;

  /* Typography */
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing & Layout */
  --container-width: 1200px;
  --header-height: 80px;
  --radius: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* --- RESET & BASE --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background-color: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
ul, ol { list-style: none; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--c-primary);
  line-height: 1.2;
  font-weight: 700;
}
.display-1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.display-2 { font-size: clamp(2rem, 4vw, 3rem); }
.display-3 { font-size: 1.75rem; }
.text-lead { font-size: 1.15rem; color: var(--c-text-light); margin-bottom: 1.5rem; }

/* --- UTILITIES (BACKWARD COMPATIBILITY) --- */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.w-full { width: 100%; }
.hidden { display: none; }
.text-white { color: var(--c-white) !important; }

/* --- LAYOUT --- */
.container { width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.bg-light { background-color: var(--c-bg-alt); }
.bg-dark { background-color: var(--c-primary); color: var(--c-white); }

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

/* --- COMPONENTS --- */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.8rem; border-radius: 50px; font-weight: 600; cursor: pointer;
  font-size: 1rem; letter-spacing: 0.02em;
}
.btn-primary {
  background-color: var(--c-accent); color: var(--c-white) !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}
.btn-primary:hover { background-color: var(--c-accent-hover); transform: translateY(-1px); }
.btn-outline {
  border: 2px solid var(--c-border); color: var(--c-primary); background: transparent;
}
.btn-outline:hover { border-color: var(--c-primary); background: var(--c-primary); color: var(--c-white); }

/* Header (Legacy Compatibility) */
.header, .site-header {
  height: var(--header-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center;
}
.header-inner, .container.flex {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.brand { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--c-primary); }
.nav-desktop, .nav-menu div { display: none; gap: 2rem; align-items: center; }
.nav-desktop a, .nav-menu a { font-weight: 500; font-size: 0.95rem; color: var(--c-primary-light); }
.nav-desktop a:hover, .nav-menu a:hover { color: var(--c-accent); }
@media(min-width: 900px) { 
  .nav-desktop, .nav-menu div { display: flex; } 
  .mobile-toggle, .mobile-menu-btn { display: none; } 
}

/* Hero (Legacy Compatibility) */
.hero {
  position: relative;
  padding: 8rem 0 6rem;
  background-color: var(--c-primary);
  color: var(--c-white);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.25;
}
.hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--c-primary) 0%, transparent 100%);
}
.hero-content {
  position: relative; z-index: 10;
  max-width: 800px; margin: 0 auto;
}

/* Cards */
.card {
  background: var(--c-white);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-accent);
}
.icon-box {
  width: 3.5rem; height: 3.5rem; background: #fffbeb; color: var(--c-accent);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  border-radius: 10px; margin-bottom: 1.5rem;
}

/* --- ARTICLE SPECIFIC --- */

.article-hero {
  position: relative;
  padding: 8rem 0 4rem;
  background-color: var(--c-primary);
  color: var(--c-white);
  overflow: hidden;
}
.article-hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.25;
}
.article-hero-content {
  position: relative; z-index: 10;
  max-width: 800px; margin: 0 auto; text-align: center;
}
.meta-tag {
  display: inline-block; background: var(--c-accent); color: white;
  padding: 0.25rem 0.75rem; border-radius: 99px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.article-layout {
  display: grid; grid-template-columns: 1fr; gap: 3rem;
}
@media(min-width: 1024px) {
  .article-layout { grid-template-columns: 2.5fr 1fr; align-items: start; }
}

/* Prose (Content) */
.prose { color: var(--c-text); font-size: 1.125rem; }
.prose h2, .prose h3 { color: var(--c-primary); margin-top: 2.5rem; margin-bottom: 1rem; }
.prose h2 { font-size: 1.8rem; border-bottom: 2px solid var(--c-border); padding-bottom: 0.5rem; }
.prose h3 { font-size: 1.4rem; }
.prose p { margin-bottom: 1.5rem; line-height: 1.8; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote {
  border-left: 4px solid var(--c-accent);
  background: #fffbeb;
  padding: 1.5rem;
  font-style: italic;
  color: var(--c-primary);
  border-radius: 0 8px 8px 0;
  margin: 2rem 0;
}
.prose strong { color: var(--c-primary); font-weight: 700; }

/* Sidebar */
.sidebar-sticky { position: sticky; top: 100px; display: flex; flex-col; gap: 2rem; }
.sidebar-widget { background: var(--c-bg-alt); padding: 2rem; border-radius: var(--radius); border: 1px solid var(--c-border); }
.sidebar-title { font-size: 1.1rem; margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--c-border); }
.sidebar-menu a {
  display: flex; justify-content: space-between; padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 0.95rem; font-weight: 500;
}
.sidebar-menu a:last-child { border: none; }
.sidebar-menu a:hover { color: var(--c-accent); transform: translateX(5px); }

/* Footer */
.site-footer, .footer { background: var(--c-primary); color: var(--c-text-light); padding: 4rem 0 2rem; }
.site-footer h4, .footer h4 { color: var(--c-white); margin-bottom: 1.5rem; }
.site-footer a:hover, .footer a:hover { color: var(--c-accent); }

/* Blog Cards Enhancement */
.blog-card {
  border-radius: 1rem;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid var(--c-border);
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
  border-color: var(--c-accent);
}
.blog-card-img-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
}
.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img {
  transform: scale(1.05);
}
.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.blog-tag-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.95);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-primary);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 10;
}
