:root {
  --color-bg: #ffffff;
  --color-text: #222222;
  --color-text-muted: #555555;
  --color-heading: #111111;
  --color-accent: #5DBA1A;
  --color-accent-hover: #4da316;
  --color-header-bg: #1a1a1a;
  --color-header-text: #ffffff;
  --color-footer-bg: #000000;
  --color-footer-text: #ffffff;
  --color-border: #e0e0e0;
  --color-surface: #f7f7f7;
  --font-body: Verdana, Geneva, sans-serif;
  --max-width: 1100px;
  --header-height: 80px;
  --transition: 0.2s ease;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.5;
  padding-top: var(--header-height);
}

/* ── Skip link ── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  z-index: 200;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* ── Focus ── */

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* ── Typography ── */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-family: var(--font-body);
  line-height: 1.25;
  margin-bottom: 0.75em;
}

h1 { font-size: 2.25rem; font-weight: 700; }
h2 { font-size: 1.75rem; font-weight: 600; margin-top: 1rem; }
h3 { font-size: 1.35rem; font-weight: 600; margin-top: 0.75rem; }

.section h2:first-child,
.section h3:first-child {
  margin-top: 0;
}

p { margin-bottom: 1.25em; }

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

a:hover { color: var(--color-accent-hover); }

ul, ol {
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

li { margin-bottom: 0.4em; }

/* ── Layout ── */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 1rem 0;
}

.section.home-intro {
  padding-top: 1rem;
}

.section + .section {
  border-top: 1px solid var(--color-border);
}

/* ── Header ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-header-bg);
  color: var(--color-header-text);
  z-index: 100;
  display: flex;
  align-items: center;
  overflow: visible;
}

.header-inner {
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* ── Hamburger ── */

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  z-index: 110;
  min-width: 44px;
  min-height: 44px;
  color: var(--color-header-text);
  font-family: inherit;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-header-text);
  transition: transform var(--transition), opacity var(--transition);
  border-radius: 1px;
}

.hamburger-text {
  display: none;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Logo ── */

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

/* ── Header phone ── */

.header-phone {
  color: var(--color-header-text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
  white-space: nowrap;
  min-height: 44px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  margin-right: 0.5rem;
}

.header-phone:hover {
  color: var(--color-accent);
}

.phone-icon {
  display: none;
}

/* ── Desktop nav ── */

.desktop-nav {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    justify-content: center;
    margin: 0 0.75rem;
    min-width: 0;
    overflow: visible;
  }

  .desktop-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0;
  }

  .desktop-nav-list > li {
    position: relative;
    margin: 0;
  }

  .desktop-nav-list > li > a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.4rem;
    color: var(--color-header-text);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--transition);
    min-height: 44px;
  }

  .desktop-nav-list > li > a:hover {
    color: var(--color-accent);
  }

  .desktop-nav-list > li > a.active {
    background: #cc0000;
    color: #fff;
    border-radius: 3px;
  }

  .desktop-nav-list > li > a.active:hover {
    background: #aa0000;
    color: #fff;
  }

  .desktop-nav-list > li.has-dropdown > a::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 5px;
    transition: transform var(--transition);
  }

  .desktop-nav-list > li.has-dropdown:hover > a::after {
    transform: rotate(180deg);
  }

  /* Dropdown */
  .dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-header-bg);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 240px;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 120;
  }

  .has-dropdown:hover > .dropdown,
  .has-dropdown:focus-within > .dropdown {
    opacity: 1;
    visibility: visible;
  }

  .dropdown li {
    margin: 0;
  }

  .dropdown a {
    display: block;
    padding: 0.55rem 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.82rem;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
  }

  .dropdown a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-accent);
  }

  /* Two-column dropdowns for long lists */
  .has-dropdown:nth-child(3) > .dropdown,
  .has-dropdown:nth-child(4) > .dropdown {
    columns: 2;
    min-width: 460px;
  }

  .has-dropdown:nth-child(3) > .dropdown li,
  .has-dropdown:nth-child(4) > .dropdown li {
    break-inside: avoid;
  }
}

@media (min-width: 1280px) {
  .desktop-nav-list > li > a {
    font-size: 0.82rem;
    padding: 0.5rem 0.55rem;
  }
}

/* ── Mobile header layout (hamburger visible, desktop nav hidden) ── */

@media (max-width: 1023px) {
  :root {
    --header-height: 90px;
  }

  .site-header {
    height: var(--header-height);
  }

  .header-inner {
    padding: 0;
    height: 100%;
  }

  .hamburger {
    display: flex;
    background: #cc0000;
    height: 100%;
    padding: 0 1.25rem;
    gap: 0.6rem;
    flex: 1;
  }

  .hamburger-icon {
    gap: 7px;
  }

  .hamburger-line {
    width: 34px;
    height: 4px;
  }

  .hamburger-text {
    display: block;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.03em;
  }

  .logo-link {
    position: relative;
    left: auto;
    transform: none;
    height: 100%;
    background: transparent;
    padding: 0 0.75rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  .logo {
    height: 56px;
  }

  .header-phone {
    background: var(--color-accent);
    height: 100%;
    padding: 0 0.75rem;
    font-size: clamp(1.1rem, 3.5vw, 1.6rem);
    font-weight: 900;
    color: #fff;
    margin-right: 0;
    gap: 0.4rem;
    flex: 1;
    justify-content: center;
    overflow: hidden;
  }

  .phone-icon {
    display: block;
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
  }

  .header-phone:hover {
    color: #fff;
    background: var(--color-accent-hover);
  }
}

/* ── Desktop header layout (hamburger hidden) ── */

@media (min-width: 1024px) {
  .hamburger {
    display: none;
  }

  .logo-link {
    position: static;
    transform: none;
  }
}

/* ── Nav drawer (mobile only) ── */

.nav-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 380px;
  background: var(--color-header-bg);
  color: var(--color-header-text);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 99;
  overflow-y: auto;
  padding: 1rem 0;
}

.nav-drawer[aria-hidden="false"] {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .nav-drawer,
  .nav-overlay {
    display: none !important;
  }
}

.nav-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 98;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list a,
.nav-group-toggle {
  display: block;
  padding: 0.85rem 1.5rem;
  color: var(--color-header-text);
  text-decoration: none;
  font-size: 1rem;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition);
  min-height: 44px;
}

.nav-list a:hover,
.nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-accent);
}

.nav-list a.active,
.nav-sub-list a.active {
  background: #cc0000;
  color: #fff;
}

.nav-group-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-group-toggle::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 300;
  transition: transform var(--transition);
}

.nav-group-toggle[aria-expanded="true"]::after {
  content: "\2212";
}

.nav-sub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  background: rgba(0, 0, 0, 0.25);
}

.nav-sub-list.open {
  display: block;
}

.nav-sub-list a {
  padding-left: 2.5rem;
  font-size: 0.9rem;
}

/* ── Slider ── */

.slider {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: #000;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
  will-change: transform;
}

.slide {
  min-width: 100%;
  height: 100%;
  display: block;
  text-decoration: none;
  line-height: 0;
}

.slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
  border-radius: 3px;
  transition: background var(--transition);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.slider-prev { left: 0.75rem; }
.slider-next { right: 0.75rem; }

.slider-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition);
}

.slider-dot.active {
  background: #fff;
}

@media (max-width: 1024px) {
  .slider {
    height: 240px;
  }
}

@media (max-width: 768px) {
  .slider {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .slider {
    height: 140px;
  }
}

/* ── Buttons ── */

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  transition: background var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  min-height: 44px;
}

.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ── Hero ── */

.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-intro {
  max-width: 720px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  color: var(--color-text-muted);
}

/* ── Page header ── */

.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0.5rem;
}

.page-header .subtitle {
  color: var(--color-text-muted);
  font-size: 1.15rem;
  margin-bottom: 0;
}

/* ── Service list (grid of links) ── */

.service-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5em;
  counter-reset: service-card;
}

.service-list li {
  margin: 0;
  counter-increment: service-card;
}

.service-list a {
  display: flex;
  align-items: center;
  padding: 1.15rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  border: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: box-shadow var(--transition), transform var(--transition), filter var(--transition);
}

.service-list a::after {
  content: "\203A";
  margin-left: auto;
  padding-left: 0.75rem;
  font-size: 1.4rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  transition: transform var(--transition);
}

.service-list a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  filter: brightness(1.1);
}

.service-list a:hover::after {
  transform: translateX(3px);
  color: #fff;
}

.service-list li:nth-child(8n+1) a { background: #2c6e49; }
.service-list li:nth-child(8n+2) a { background: #1a5276; }
.service-list li:nth-child(8n+3) a { background: #7b2d8e; }
.service-list li:nth-child(8n+4) a { background: #c0392b; }
.service-list li:nth-child(8n+5) a { background: #d4820a; }
.service-list li:nth-child(8n+6) a { background: #2874a6; }
.service-list li:nth-child(8n+7) a { background: #1a8a5c; }
.service-list li:nth-child(8n+8) a { background: #6c3483; }

/* ── FAQ ── */

.faq-section {
  margin-top: 3rem;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-heading);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  line-height: 1.4;
  min-height: 44px;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform var(--transition);
}

.faq-question[aria-expanded="true"]::after {
  content: "\2212";
}

.faq-answer {
  display: none;
  padding-bottom: 1.25rem;
  line-height: 1.7;
}

.faq-answer.open {
  display: block;
}

/* ── Contact block ── */

.contact-block {
  background: var(--color-surface);
  padding: 2.5rem;
  border-radius: 6px;
  margin-top: 3rem;
  text-align: center;
}

.contact-block h2 {
  margin-top: 0;
}

.contact-block p {
  margin-bottom: 0.5em;
}

.contact-block a {
  font-weight: 600;
}

/* ── Profile ── */

.profile-header {
  padding: 3rem 0 2rem;
}

.profile-name {
  margin-bottom: 0.25rem;
}

.profile-role {
  color: var(--color-text-muted);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

/* ── Article ── */

.article-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.author-box {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: 6px;
  margin-top: 3rem;
}

/* ── Insights index ── */

.insights-group h2 {
  margin-top: 2.5rem;
}

.insights-list {
  list-style: none;
  padding: 0;
}

.insights-list li {
  margin-bottom: 0.75rem;
}

.insights-list a {
  display: block;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border-radius: 4px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.insights-list a:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ── Barrister card ── */

.barrister-card {
  background: var(--color-surface);
  padding: 2rem;
  border-radius: 6px;
  text-align: center;
  max-width: 400px;
}

.barrister-card h2 {
  margin-top: 0;
}

.barrister-card .role {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

/* ── Breadcrumb ── */

.breadcrumb {
  padding: 1rem 0 0;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}

.breadcrumb li {
  margin: 0;
}

.breadcrumb li + li::before {
  content: "\203A";
  margin: 0 0.5rem;
  color: var(--color-text-muted);
}

.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb span[aria-current] {
  color: var(--color-text);
}

/* ── Footer ── */

.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 2rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-col h3 {
  color: var(--color-footer-text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.5em;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.bsb-logo {
  height: 60px;
  width: auto;
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bsb-link {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.footer-bsb-link:hover {
  color: var(--color-accent);
}

/* ── Responsive ── */

@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }

  .hero h1 { font-size: 1.85rem; }

  .hero-intro { font-size: 1rem; }

  .section { padding: 0.75rem 0; }

  .contact-block { padding: 1.5rem; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .logo {
    height: 44px;
  }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }

  .hamburger-text { font-size: 0.95rem; }
  .hamburger { padding: 0 0.75rem; }

  .header-phone {
    font-size: 0.85rem;
    padding: 0 0.75rem;
  }

  .logo-link { padding: 0 1rem; }
}
