/* ============================================================
   EriLaws – Modern Law Consulting Office Stylesheet
   Design System: Navy · Gold · Ivory
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --navy:        #0f1d3a;
  --navy-light:  #1a2f5e;
  --navy-dark:   #091226;
  --gold:        #c9a84c;
  --gold-light:  #e0c272;
  --gold-pale:   #f9f3e3;
  --ivory:       #fafaf7;
  --gray-100:    #f4f4f2;
  --gray-200:    #e8e8e4;
  --gray-400:    #9a9a94;
  --gray-600:    #5a5a54;
  --gray-800:    #2c2c28;
  --white:       #ffffff;
  --danger:      #c0392b;
  --success:     #1e7e34;

  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:   0 12px 32px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.08);
  --shadow-gold: 0 4px 16px rgba(201,168,76,.25);

  --transition:  0.2s ease;

  --header-h:    72px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--ivory);
  color: var(--gray-800);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--navy);
  line-height: 1.25;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 600; }
h4 { font-size: 1.15rem; font-weight: 600; }
p  { margin-bottom: 1rem; }

/* ── Layout Container ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Navigation ────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  height: var(--header-h);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.navbar-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--white) !important;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.navbar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--navy);
  flex-shrink: 0;
}

.navbar-brand span { color: var(--gold); }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
}

.navbar-nav a {
  display: block;
  padding: .5rem .9rem;
  color: rgba(255,255,255,.82);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .02em;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--gold);
  background: rgba(255,255,255,.06);
}

.navbar-nav .nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,.15);
  margin-inline: .5rem;
}

/* ── Admin dropdown submenu ─────────────────────────────────────────── */
.nav-has-submenu { position: relative; }
.nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  padding: .35rem 0;
  margin-top: .25rem;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
  list-style: none;
  z-index: 50;
}
.nav-has-submenu:hover > .nav-submenu,
.nav-has-submenu:focus-within > .nav-submenu {
  display: block;
}
.nav-submenu li { display: block; }
.nav-submenu a {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .5rem 1rem;
  color: rgba(255,255,255,.82);
  font-size: .85rem;
  font-weight: 500;
  border-radius: 0;
  white-space: nowrap;
}
.nav-submenu a:hover,
.nav-submenu a.active {
  color: var(--gold);
  background: rgba(255,255,255,.06);
}
.nav-submenu .nav-icon { width: 1.1rem; text-align: center; font-size: .95rem; }

.btn-nav-login {
  background: var(--gold) !important;
  color: var(--navy) !important;
  font-weight: 600 !important;
  padding: .45rem 1.1rem !important;
  border-radius: var(--radius-sm) !important;
}
.btn-nav-login:hover {
  background: var(--gold-light) !important;
  color: var(--navy) !important;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
  position: relative;
  background-image: url('/images/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  padding: 7rem 1.5rem 6rem;
  overflow: hidden;
  text-align: left;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(9, 18, 38, 0.97) 0%,
    rgba(9, 18, 38, 0.85) 35%,
    rgba(9, 18, 38, 0.45) 65%,
    rgba(9, 18, 38, 0.25) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 580px;
  margin-inline: 0;
}

.hero-badge {
  display: inline-block;
  padding: .3rem 1rem;
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.35);
  color: var(--gold);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.25rem;
}

.hero h1 .accent { color: var(--gold); }

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 2.5rem;
  max-width: 560px;
  margin-inline: 0;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: var(--shadow-gold);
  color: var(--navy);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.45);
}
.btn-outline:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--white);
  color: var(--white);
}

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

.btn-sm {
  padding: .45rem 1rem;
  font-size: .825rem;
}

.btn-lg {
  padding: .9rem 2rem;
  font-size: 1rem;
}

/* ── Section ───────────────────────────────────────────────── */
.section {
  padding: 5rem 0;
}
.section-sm {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header .section-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .5rem;
}
.section-header h2 {
  margin-bottom: .75rem;
}
.section-header p {
  color: var(--gray-600);
  max-width: 520px;
  margin-inline: auto;
  font-size: .975rem;
}

/* ── Practice Area Cards (Home) ────────────────────────────── */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.practice-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}
.practice-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
  color: inherit;
}

.practice-card .card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--gold-pale);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.practice-card h3 {
  font-size: 1.1rem;
  margin-bottom: .5rem;
  color: var(--navy);
}
.practice-card p {
  font-size: .875rem;
  color: var(--gray-600);
  margin: 0;
  line-height: 1.5;
}

/* ── Featured Articles Grid ────────────────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.article-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--gray-100);
}
.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.article-card:hover .article-card-image img {
  transform: scale(1.03);
}

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

.article-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.article-meta .badge {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 100px;
  background: var(--gold-pale);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,.3);
}
.article-meta .date {
  font-size: .78rem;
  color: var(--gray-400);
}

.article-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: .5rem;
  line-height: 1.35;
}
.article-card-body h3 a {
  color: var(--navy);
}
.article-card-body h3 a:hover { color: var(--gold); }

.article-card-body p {
  font-size: .875rem;
  color: var(--gray-600);
  flex: 1;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
  margin-top: auto;
}
.article-card-footer .author {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.article-card-footer .author::before {
  content: '';
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gray-200);
  display: inline-block;
}

/* ── Service List Page ─────────────────────────────────────── */
.page-header {
  background: var(--navy);
  padding: 3.5rem 1.5rem;
  color: var(--white);
}
.page-header .container { max-width: 1200px; margin-inline: auto; }
.page-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 1rem;
  list-style: none;
}
.page-header .breadcrumb a { color: var(--gold); }
.page-header .breadcrumb li + li::before { content: '›'; margin-right: .5rem; }
.page-header h1 { color: var(--white); font-size: 2rem; }
.page-header .accent-line {
  width: 48px;
  height: 3px;
  background: var(--gold);
  margin-top: 1rem;
  border-radius: 2px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.service-card-cover {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}
.service-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
  transition: transform .4s ease;
}
.service-card:hover .service-card-cover img { transform: scale(1.04); }

.service-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.service-card-body h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.service-card-body h3 a { color: var(--navy); }
.service-card-body h3 a:hover { color: var(--gold); }
.service-card-body p {
  font-size: .875rem;
  color: var(--gray-600);
  flex: 1;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.service-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  padding-top: .9rem;
  margin-top: auto;
}

/* ── Content / Document Page ───────────────────────────────── */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.content-main article {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  padding: 3rem;
}

.content-main article h1,
.content-main article h2,
.content-main article h3,
.content-main article h4 {
  color: var(--navy);
  margin-top: 1.75rem;
  margin-bottom: .75rem;
}
.content-main article h1:first-child { margin-top: 0; }

.content-main article p { color: var(--gray-600); line-height: 1.8; }

.content-main article img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
  max-width: 100%;
}

.content-main article ul,
.content-main article ol {
  margin: 1rem 0 1rem 1.5rem;
  color: var(--gray-600);
}
.content-main article li { margin-bottom: .35rem; }

.content-main article blockquote {
  border-left: 4px solid var(--gold);
  background: var(--gold-pale);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--gray-600);
}

.content-main article pre {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  overflow-x: auto;
  font-size: .875rem;
  margin: 1rem 0;
}

.content-main article a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(201,168,76,.4);
}

/* Content sidebar */
.content-sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); }

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-card h4 {
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--gray-200);
}
.sidebar-meta-item {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin-bottom: .9rem;
}
.sidebar-meta-item .label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-400);
}
.sidebar-meta-item .value {
  font-size: .875rem;
  color: var(--gray-800);
}

/* ── Login Page ────────────────────────────────────────────── */
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy-light) 100%);
  min-height: calc(100vh - var(--header-h));
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

.auth-card-header {
  background: var(--navy);
  padding: 2rem 2rem 1.75rem;
  text-align: center;
}
.auth-card-header .logo {
  width: 52px;
  height: 52px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--navy);
  margin: 0 auto 1rem;
}
.auth-card-header h2 {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: .25rem;
}
.auth-card-header p {
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  margin: 0;
}

.auth-card-body { padding: 2rem; }

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .825rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: .4rem;
}
.form-control {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: .9rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}

.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 1.25rem;
}
.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
}
.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--success);
}

/* ── Upload Page ───────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--white);
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--gold);
  background: var(--gold-pale);
}
.upload-zone .upload-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  margin-bottom: 1rem;
}
.upload-zone h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.upload-zone p  { color: var(--gray-400); font-size: .875rem; margin: 0; }

.upload-progress {
  display: none;
  margin-top: 1.5rem;
}
.progress-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: .5rem;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 100px;
  transition: width .3s ease;
}

/* ── Gallery ───────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition);
}
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,29,58,.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  padding: 1rem;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay p {
  color: var(--white);
  font-size: .78rem;
  text-align: center;
  word-break: break-all;
  margin: 0 0 .75rem;
}

/* ── Admin / Editor Page ───────────────────────────────────── */
.admin-layout {
  display: block;
  min-height: calc(100vh - var(--header-h));
}

.admin-sidebar {
  background: var(--navy);
  padding: 2rem 0;
  position: relative;
  overflow: hidden;
}
.admin-sidebar .sidebar-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 0 1.5rem .75rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: .75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity .15s ease;
}
.admin-layout.sidebar-collapsed .admin-sidebar .sidebar-title { opacity: 0; }

.sidebar-toggle {
  position: absolute;
  top: .9rem;
  right: .65rem;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 6px;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background var(--transition), color var(--transition), transform .25s ease;
  z-index: 2;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.16); color: var(--white); }
.admin-layout.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }

.admin-nav a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1.5rem;
  color: rgba(255,255,255,.7);
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.admin-nav a:hover,
.admin-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,.07);
}
.admin-nav a .nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.admin-nav a .nav-label { transition: opacity .15s ease; }
.admin-layout.sidebar-collapsed .admin-nav a {
  padding: .7rem 0;
  justify-content: center;
}
.admin-layout.sidebar-collapsed .admin-nav a .nav-label { display: none; }

.admin-main { padding: 2.5rem; background: var(--gray-100); }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

/* Editor textarea */
.editor-wrapper {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.editor-toolbar {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-100);
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.editor-toolbar button {
  padding: .3rem .6rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  cursor: pointer;
  color: var(--gray-600);
  transition: background var(--transition), color var(--transition);
}
.editor-toolbar button:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.editor-textarea {
  width: 100%;
  min-height: 500px;
  padding: 1.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: .9rem;
  line-height: 1.7;
  border: none;
  outline: none;
  resize: vertical;
  color: var(--gray-800);
}

/* ── About Page ────────────────────────────────────────────── */
.about-hero {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy-light));
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
}
.about-hero h1 { color: var(--white); margin-bottom: 1rem; }
.about-hero p { color: rgba(255,255,255,.75); max-width: 560px; margin-inline: auto; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}
.team-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  text-align: center;
}
.team-card .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-family: var(--font-serif);
  margin: 0 auto 1.25rem;
}
.team-card h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.team-card .role { font-size: .825rem; color: var(--gold); font-weight: 600; margin-bottom: .75rem; }
.team-card p { font-size: .85rem; color: var(--gray-600); margin: 0; }

/* ── Stats Bar ─────────────────────────────────────────────── */
.stats-bar {
  background: var(--navy);
  padding: 3rem 1.5rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  text-align: center;
}
.stat-item .stat-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: .4rem;
}
.stat-item .stat-label {
  font-size: .8rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.65);
  padding: 4rem 1.5rem 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: .75rem;
}
.footer-brand p {
  font-size: .875rem;
  line-height: 1.65;
  margin: 0;
}
.footer h4 {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}
.footer ul { list-style: none; }
.footer ul li { margin-bottom: .6rem; }
.footer ul a {
  color: rgba(255,255,255,.6);
  font-size: .875rem;
  transition: color var(--transition);
}
.footer ul a:hover { color: var(--gold); }
.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .875rem;
  margin-bottom: .6rem;
}
.footer-contact p span:first-child { color: var(--gold); flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: .75rem;
}

/* ── Error Pages ───────────────────────────────────────────── */
.error-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
}
.error-page .error-code {
  font-family: var(--font-serif);
  font-size: 8rem;
  font-weight: 700;
  color: var(--gray-200);
  line-height: 1;
  margin-bottom: .5rem;
}
.error-page h2 { margin-bottom: 1rem; }
.error-page p { color: var(--gray-600); margin-bottom: 2rem; max-width: 420px; }

/* ── SVG Icon System ───────────────────────────────────────── */
/* Convert black SVG stroke to brand colours via CSS filter */
.icon-gold {
  filter: brightness(0) saturate(100%) invert(72%) sepia(47%) saturate(500%)
          hue-rotate(4deg) brightness(90%) contrast(88%);
}
.icon-white {
  filter: brightness(0) invert(1);
}
.icon-navy {
  filter: brightness(0) saturate(100%) invert(9%) sepia(47%) saturate(785%)
          hue-rotate(196deg) brightness(97%) contrast(101%);
}

/* Nav submenu SVG icons */
.nav-svg-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  filter: brightness(0) invert(0.82);
  transition: filter var(--transition);
}
.nav-submenu a:hover .nav-svg-icon,
.nav-submenu a.active .nav-svg-icon {
  filter: brightness(0) saturate(100%) invert(72%) sepia(47%) saturate(500%)
          hue-rotate(4deg) brightness(90%) contrast(88%);
}

/* Practice / category card SVG icon sizing */
.practice-card .card-icon img,
.category-card-icon img {
  display: block;
  width: 26px;
  height: 26px;
}

/* Hero illustration – decorative scales on the right */
.hero-illustration {
  position: absolute;
  right: max(5%, calc((100vw - 1200px) / 2 + 3rem));
  top: 50%;
  transform: translateY(-50%);
  width: min(340px, 28vw);
  pointer-events: none;
  user-select: none;
  opacity: 0.7;
}
@media (max-width: 1000px) { .hero-illustration { display: none; } }

/* ── Utility Classes ───────────────────────────────────────── */
.text-gold  { color: var(--gold); }
.text-navy  { color: var(--navy); }
.text-muted { color: var(--gray-400); }
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.w-100 { width: 100%; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.divider {
  height: 1px;
  background: var(--gray-200);
  margin: 2.5rem 0;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .content-sidebar { position: static; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
}

@media (max-width: 768px) {
  .navbar-nav { display: none; flex-direction: column; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--navy); padding: 1rem; gap: .25rem; box-shadow: var(--shadow-md); }
  .navbar-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .articles-grid, .service-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .hero { padding: 4rem 1.5rem 3.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-main article { padding: 1.5rem; }
  .practice-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .practice-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
