/* ============================================================
   GETNOMIK LEGAL — Master Stylesheet
   assets/css/style.css
   ============================================================ */

/* ---- Google Fonts ----------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ---- CSS Variables ---------------------------------------- */
:root {
  --navy:        #1a3a5c;
  --navy-dark:   #0f2240;
  --navy-light:  #2a5080;
  --gold:        #c8a84b;
  --gold-light:  #e8c97a;
  --gold-pale:   #f7f0dd;
  --white:       #ffffff;
  --off-white:   #f8f7f3;
  --gray-50:     #f9fafb;
  --gray-100:    #f3f4f6;
  --gray-200:    #e5e7eb;
  --gray-300:    #d1d5db;
  --gray-400:    #9ca3af;
  --gray-500:    #6b7280;
  --gray-600:    #4b5563;
  --gray-700:    #374151;
  --gray-800:    #1f2937;
  --red:         #dc2626;
  --red-light:   #fee2e2;
  --green:       #16a34a;
  --green-light: #dcfce7;
  --amber:       #d97706;
  --amber-light: #fef3c7;
  --teal:        #0d9488;
  --teal-light:  #ccfbf1;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;

  --radius:      6px;
  --radius-lg:   12px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.14);
  --transition:  0.2s ease;

  --sidebar-width: 256px;
  --topbar-height: 60px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-ui);
  color: var(--gray-800);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--navy-dark);
}

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */

.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--gray-100);
}

/* ---- Sidebar ---------------------------------------------- */
.admin-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--navy-dark);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-link { display: block; text-decoration: none; }

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 2px;
}

.brand-sub {
  display: block;
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar-nav { padding: 16px 0 40px; flex: 1; }

.nav-section { margin-bottom: 8px; }

.nav-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 20px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.72);
  font-size: 13.5px;
  font-family: var(--font-ui);
  font-weight: 400;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.nav-item:hover {
  color: var(--white);
  background: rgba(255,255,255,.06);
}

.nav-item.active {
  color: var(--gold-light);
  background: rgba(200,168,75,.10);
  border-left-color: var(--gold);
}

.nav-icon { font-size: 15px; width: 18px; text-align: center; }

.nav-logout { color: rgba(255,100,100,.7); margin-top: 8px; }
.nav-logout:hover { color: #ff8080; background: rgba(255,0,0,.06); }

/* ---- Admin Main ------------------------------------------- */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-topbar {
  height: var(--topbar-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.sidebar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.sidebar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-600);
  border-radius: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-user { text-align: right; }
.user-name { display: block; font-size: 13.5px; font-weight: 600; color: var(--gray-800); }
.user-role {
  display: block;
  font-size: 11px;
  color: var(--gray-500);
  text-transform: capitalize;
}

.admin-content {
  flex: 1;
  padding: 28px 32px;
  max-width: 1400px;
  width: 100%;
}

/* ---- Page Header ------------------------------------------ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy-dark);
}

.header-actions { display: flex; gap: 8px; align-items: center; }

/* ---- Stats Grid ------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--navy);
  transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); }

.stat-blue  { border-left-color: var(--navy); }
.stat-green { border-left-color: var(--green); }
.stat-amber { border-left-color: var(--amber); }
.stat-navy  { border-left-color: #6366f1; }
.stat-gold  { border-left-color: var(--gold); }
.stat-teal  { border-left-color: var(--teal); }

.stat-icon { font-size: 22px; }
.stat-value { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--navy-dark); line-height: 1; }
.stat-label { font-size: 12px; font-weight: 500; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }

/* ---- Dashboard Grid --------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  margin-bottom: 28px;
}

.dashboard-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-pale);
}

.card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
}

/* Type breakdown */
.type-breakdown { display: flex; flex-direction: column; gap: 10px; }
.type-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.type-count { font-weight: 700; min-width: 28px; text-align: right; color: var(--navy); }
.type-bar { flex: 1; height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.type-bar-fill { height: 100%; background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 100%); border-radius: 3px; transition: width 0.6s ease; }

/* ---- Quick Actions ---------------------------------------- */
.quick-actions h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 12px;
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.qa-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  transition: all var(--transition);
}
.qa-card:hover { border-color: var(--gold); background: var(--gold-pale); color: var(--navy-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.qa-icon { font-size: 26px; }

/* ---- Filter Bar ------------------------------------------- */
.filter-bar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-input {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: var(--font-ui);
  color: var(--gray-800);
  background: var(--gray-50);
  transition: border-color var(--transition);
  height: 38px;
}
.filter-input:focus { outline: none; border-color: var(--navy); background: var(--white); }
.filter-wide { flex: 1; min-width: 200px; }

.filter-select {
  padding: 8px 32px 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: var(--font-ui);
  background: var(--gray-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  height: 38px;
  color: var(--gray-800);
  cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--navy); }

.results-info {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 10px;
}

/* ---- Admin Table ------------------------------------------ */
.table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table thead tr {
  background: var(--navy-dark);
  color: var(--white);
}

.admin-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.admin-table tbody tr:hover { background: var(--gray-50); }
.admin-table tbody tr:last-child td { border-bottom: none; }

.table-link { color: var(--navy); font-weight: 500; }
.table-link:hover { color: var(--gold); }
.sub-text { font-size: 11.5px; color: var(--gray-400); margin-top: 2px; }
.text-muted { color: var(--gray-500); }
.small { font-size: 12px; }
.text-center { text-align: center; }

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.status-draft     { background: var(--gray-100);   color: var(--gray-600); }
.status-review    { background: var(--amber-light); color: var(--amber); }
.status-published { background: var(--green-light); color: var(--green); }
.status-archived  { background: var(--gray-200);   color: var(--gray-500); }

/* Type Badges */
.badge-type {
  display: inline-block;
  padding: 3px 8px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}

/* Action Buttons */
.actions { white-space: nowrap; }
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  font-size: 14px;
  border: none;
  cursor: pointer;
  background: var(--gray-100);
  color: var(--gray-600);
  text-decoration: none;
  transition: all var(--transition);
  margin-right: 3px;
}
.btn-action:hover { background: var(--gray-200); color: var(--gray-800); }
.btn-delete:hover { background: var(--red-light); color: var(--red); }

/* ---- Forms ------------------------------------------------ */
.form-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.form-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-pale);
}

.form-group {
  margin-bottom: 18px;
}

.form-group:last-child { margin-bottom: 0; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="search"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font-ui);
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,92,.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.body-editor { font-family: var(--font-ui); min-height: 300px; font-size: 14px; }
.input-mono  { font-family: monospace; font-size: 13px; background: var(--gray-50); }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.required { color: var(--red); }

.field-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--navy);
}

.form-actions { margin-top: 8px; }

.seo-counter {
  font-size: 11px;
  color: var(--gray-400);
  text-align: right;
  margin-top: 3px;
}

.preview-img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 10px;
}

.ai-card { border-top: 3px solid #6366f1; }
.ai-card .form-card-title { color: #4338ca; }

/* SEO Fields */
.current-image { margin-bottom: 12px; }

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-family: var(--font-ui);
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  height: 38px;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover { background: var(--navy-dark); color: var(--white); border-color: var(--navy-dark); }

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--navy); color: var(--white); }

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: var(--gray-300);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
  border-color: var(--gold);
  font-weight: 700;
}
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); }

.btn-block { width: 100%; }

.btn-sm { height: 32px; padding: 6px 12px; font-size: 12px; }

/* ---- Alerts ----------------------------------------------- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  border-left: 4px solid;
}
.alert-success {
  background: var(--green-light);
  color: #14532d;
  border-left-color: var(--green);
}
.alert-error {
  background: var(--red-light);
  color: #7f1d1d;
  border-left-color: var(--red);
}
.error-list { padding-left: 16px; }
.error-list li { margin-bottom: 4px; }

/* ---- Pagination ------------------------------------------- */
.pagination { margin-top: 20px; }
.pagination ul { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
.pagination li a {
  display: block;
  padding: 7px 13px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.pagination li a:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination li.active a { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* ---- Login Page ------------------------------------------- */
.login-page {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1e4a6e 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container { width: 100%; max-width: 420px; padding: 24px; }

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-text {
  display: block;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--navy-dark);
  letter-spacing: 3px;
}

.logo-sub {
  display: block;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.login-form .form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14.5px;
}

/* ---- Newsletter Builder ----------------------------------- */
.newsletter-items-list { margin-bottom: 20px; }

.nl-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.nl-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}

.nl-drag { cursor: grab; color: var(--gray-400); font-size: 16px; }
.nl-item-title { flex: 1; font-size: 13.5px; font-weight: 500; }
.nl-remove { background: none; border: none; cursor: pointer; color: var(--red); font-size: 16px; }

.nl-item-meta {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nl-item-meta select { width: 200px; }
.nl-item-meta textarea { font-size: 13px; min-height: 50px; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 8px; font-family: var(--font-ui); }

.add-content-section { border-top: 1px solid var(--gray-200); padding-top: 16px; }
.add-content-section h4 { font-size: 13.5px; font-weight: 600; color: var(--navy); margin-bottom: 10px; }

.content-search-box { position: relative; }
.content-results { max-height: 300px; overflow-y: auto; border: 1px solid var(--gray-200); border-radius: var(--radius); margin-top: 8px; }

.content-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.content-result-item:hover { background: var(--gray-50); }
.content-result-item:last-child { border-bottom: none; }
.result-type {
  font-size: 10px;
  background: var(--navy);
  color: var(--white);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.btn-add-item {
  margin-left: auto;
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-add-item:hover { background: var(--gold); color: var(--navy-dark); }
.already-added { opacity: 0.5; }
.already-label { margin-left: auto; font-size: 11px; color: var(--green); font-weight: 600; }

/* ============================================================
   PUBLIC / FRONTEND LAYOUT
   ============================================================ */

.site-header {
  background: var(--navy-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo .logo-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 2px;
}

.site-logo .logo-tagline {
  display: block;
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: -2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: rgba(255,255,255,.78);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.site-nav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.site-nav a.active { color: var(--gold-light); background: rgba(200,168,75,.12); }

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 0 14px;
  height: 36px;
  gap: 8px;
  transition: all var(--transition);
}
.header-search:focus-within { background: rgba(255,255,255,.16); border-color: var(--gold); }
.header-search input {
  background: none;
  border: none;
  color: var(--white);
  font-size: 13.5px;
  width: 180px;
  font-family: var(--font-ui);
}
.header-search input::placeholder { color: rgba(255,255,255,.45); }
.header-search input:focus { outline: none; }
.header-search button { background: none; border: none; color: rgba(255,255,255,.6); cursor: pointer; font-size: 14px; }

.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.65);
  padding: 48px 0 24px;
  margin-top: 64px;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.footer-brand p { font-size: 13px; line-height: 1.7; max-width: 280px; }

.footer-col h4 { font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,.65); font-size: 13px; transition: color var(--transition); }
.footer-col a:hover { color: var(--gold-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.10);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

/* ---- Public Container ------------------------------------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Hero Section ----------------------------------------- */
.hero-section {
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 60px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(200,168,75,.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  background: rgba(200,168,75,.18);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(200,168,75,.25);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 900;
  color: var(--white);
  line-height: 1.18;
  margin-bottom: 16px;
}

.hero-title .highlight { color: var(--gold-light); }

.hero-excerpt {
  color: rgba(255,255,255,.72);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.75;
  margin-bottom: 28px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,.6);
}

.practice-chip {
  background: rgba(200,168,75,.15);
  color: var(--gold-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid rgba(200,168,75,.2);
}

.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-sidebar-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  transition: all var(--transition);
}
.hero-sidebar-card:hover { background: rgba(255,255,255,.10); border-color: rgba(200,168,75,.3); }

.sidebar-card-type {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.sidebar-card-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.35;
}

/* ---- Section Titles --------------------------------------- */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--navy-dark);
  position: relative;
  padding-bottom: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 48px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.section-link { font-size: 13.5px; color: var(--gold); font-weight: 600; }

/* ---- Content Cards ---------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.content-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.content-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--gray-100);
  position: relative;
}

.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.content-card:hover .card-image img { transform: scale(1.04); }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.45);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.card-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--navy);
  color: var(--white);
}

.card-practice {
  font-size: 11px;
  color: var(--gray-500);
}

.card-date { font-size: 11px; color: var(--gray-400); margin-left: auto; }

.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1.3;
  margin-bottom: 10px;
  transition: color var(--transition);
}
.content-card:hover .card-title { color: var(--navy); }

.card-summary {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}

.card-court { font-size: 11.5px; color: var(--gold); font-weight: 600; font-style: italic; }

.card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag-chip {
  font-size: 10.5px;
  padding: 2px 8px;
  background: var(--gray-100);
  color: var(--gray-600);
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}
.tag-chip:hover { background: var(--gold-pale); color: var(--navy); border-color: var(--gold); }

/* ---- Article Detail Page ---------------------------------- */
.article-layout {
  max-width: 1240px;
  margin: 48px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

.article-main {}

.article-header { margin-bottom: 28px; }

.article-type-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.article-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 900;
  color: var(--navy-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
}

.article-meta span { font-size: 13px; color: var(--gray-500); }
.article-meta strong { color: var(--gray-700); }

.article-featured-image {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  max-height: 400px;
  object-fit: cover;
}

.article-body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--gray-700);
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--navy-dark);
  margin: 32px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--gold);
}

.article-body h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  margin: 24px 0 10px;
}

.article-body p { margin-bottom: 18px; }

.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.article-body li { margin-bottom: 8px; }

.article-body strong { color: var(--gray-800); }

/* Case Detail Box */
.case-detail-box {
  background: var(--gold-pale);
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 28px 0;
}

.case-detail-box h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.case-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.case-field label { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 3px; }
.case-field span { font-size: 14px; color: var(--gray-800); }

.impact-box {
  background: var(--navy-dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 28px 0;
}

.impact-box h3 { font-size: 16px; color: var(--gold-light); margin-bottom: 14px; }
.impact-box p { font-family: var(--font-body); font-size: 15px; line-height: 1.75; color: rgba(255,255,255,.82); margin-bottom: 10px; }

.relevance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.relevance-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
}
.relevance-card h4 { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.relevance-card p { font-size: 13.5px; color: var(--gray-600); line-height: 1.6; }

/* Article Sidebar */
.article-sidebar {}

.sidebar-widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-pale);
}

.related-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.related-item:last-child { border-bottom: none; }

.related-image {
  width: 64px;
  height: 48px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gray-100);
}

.related-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-dark);
  line-height: 1.35;
}

.tags-widget { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---- Trending Section ------------------------------------- */
.trending-section {
  background: var(--navy-dark);
  padding: 40px 0;
  margin-bottom: 40px;
}

.trending-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trending-list { display: flex; flex-direction: column; gap: 12px; }

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: rgba(255,255,255,.75);
  font-size: 13.5px;
  line-height: 1.4;
  transition: color var(--transition);
}
.trending-item:hover { color: var(--gold-light); }

.trending-num {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: rgba(200,168,75,.25);
  line-height: 1;
  min-width: 28px;
}

/* ---- Filter Section --------------------------------------- */
.content-filters {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-chip:hover, .filter-chip.active {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

/* ---- Newsletter Archive ----------------------------------- */
.newsletter-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
  transition: all var(--transition);
  border-left: 4px solid var(--gold);
}
.newsletter-card:hover { box-shadow: var(--shadow); transform: translateX(4px); }

.nl-icon {
  font-size: 32px;
  background: var(--gold-pale);
  padding: 12px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.nl-info h3 { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--navy-dark); margin-bottom: 6px; }
.nl-info .nl-date { font-size: 12.5px; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
.nl-info p { font-size: 14px; color: var(--gray-600); line-height: 1.6; }

/* ---- Breadcrumb ------------------------------------------- */
.breadcrumb {
  padding: 12px 0;
  font-size: 12.5px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb span { color: var(--gray-800); font-weight: 500; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-sidebar { display: none; }
  .article-layout { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }

  .admin-sidebar {
    transform: translateX(-256px);
    width: 256px;
  }
  .admin-sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,.25);
  }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }

  .admin-content { padding: 16px; }
  .page-header { flex-wrap: wrap; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row-2 { grid-template-columns: 1fr; }

  .header-inner { padding: 0 16px; }
  .site-nav { display: none; }

  .hero-title { font-size: 28px; }
  .cards-grid { grid-template-columns: 1fr; }
  .relevance-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .article-title { font-size: 26px; }
  .filter-row { gap: 8px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-section { padding: 36px 0 48px; }
}
