/* =========================================================================
   Top Lawyers in Dubai — Article Page Styles
   Clean, premium editorial design. Single accent colour, generous whitespace,
   readable typography, minimal decoration.
   ========================================================================= */

:root {
  --color-bg: #ffffff;
  --color-text: #1e2430;
  --color-text-muted: #5b6472;
  --color-border: #e4e7ec;
  --color-surface: #f8f9fb;
  --color-accent: #9c6b1f;
  --color-accent-dark: #7a5217;
  --color-accent-tint: #f6efe1;
  --color-link: #7a5217;
  --color-focus: #1a56db;
  --font-serif: Georgia, 'Times New Roman', Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-content-width: 760px;
  --max-page-width: 1280px;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 17px;
}

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

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 0; top: -60px;
  background: var(--color-accent);
  color: #fff;
  padding: 12px 20px;
  z-index: 1000;
  transition: top 0.2s ease;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

/* ---------------------------------------------------------------------
   Reading progress bar
   --------------------------------------------------------------------- */
.progress-bar-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 900;
  background: transparent;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  transition: width 0.1s ease-out;
}

/* ---------------------------------------------------------------------
   Header / Nav
   --------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(6px);
  z-index: 500;
}
.site-header-inner {
  max-width: var(--max-page-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-logo {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--color-accent); }

.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  width: 42px; height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.hamburger, .hamburger::before, .hamburger::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger::before { position: absolute; top: -6px; }
.hamburger::after { position: absolute; top: 6px; }
.mobile-nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.mobile-nav-toggle[aria-expanded="true"] .hamburger::before { transform: translateY(6px) rotate(45deg); }
.mobile-nav-toggle[aria-expanded="true"] .hamburger::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------- */
.layout {
  max-width: var(--max-page-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  padding: 0 24px;
}
.article-column { min-width: 0; padding-top: 32px; }

.toc-sidebar {
  border-left: 1px solid var(--color-border);
  padding: 32px 0 32px 24px;
}
.toc-sidebar-inner { position: sticky; top: 88px; max-height: calc(100vh - 120px); overflow-y: auto; }

/* ---------------------------------------------------------------------
   Article header
   --------------------------------------------------------------------- */
.article-header { max-width: var(--max-content-width); margin: 0 auto 24px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0 0 12px;
}
.article-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.4vw, 2.65rem);
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.byline {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  margin: 0;
}
.author-name { color: var(--color-text); font-weight: 600; }

.js-placeholder {
  background: var(--color-accent-tint);
  color: var(--color-accent-dark);
  padding: 1px 6px;
  border-radius: 4px;
  font-style: italic;
  font-size: 0.94em;
}

/* ---------------------------------------------------------------------
   Image placeholders
   --------------------------------------------------------------------- */
.featured-image-placeholder,
.image-placeholder {
  max-width: var(--max-content-width);
  margin: 0 auto 32px;
}
.placeholder-box {
  background: var(--color-surface);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--color-text-muted);
}
.image-placeholder .placeholder-box { aspect-ratio: 4 / 3; max-width: 420px; margin: 0 auto; }
.placeholder-icon { font-size: 2rem; opacity: 0.6; }
.placeholder-label { font-size: 0.85rem; font-weight: 600; }
figcaption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* ---------------------------------------------------------------------
   Callout boxes
   --------------------------------------------------------------------- */
.callout {
  max-width: var(--max-content-width);
  margin: 0 auto 32px;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  border-left-width: 5px;
  background: var(--color-surface);
}
.callout p { margin: 0; }
.callout p + p { margin-top: 10px; }
.callout-note { border-left-color: var(--color-accent); }

/* ---------------------------------------------------------------------
   Table of contents (inline, top of article)
   --------------------------------------------------------------------- */
.toc {
  max-width: var(--max-content-width);
  margin: 0 auto 40px;
  padding: 22px 26px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
}
.toc-heading {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0 0 12px;
}
.toc-list, .toc-sublist {
  margin: 0;
  padding-left: 20px;
}
.toc-sublist { margin-top: 6px; padding-left: 22px; font-size: 0.93em; }
.toc-list li, .toc-sublist li { margin-bottom: 6px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.toc-sidebar a.active {
  color: var(--color-accent-dark);
  font-weight: 700;
}

/* ---------------------------------------------------------------------
   Article body typography
   --------------------------------------------------------------------- */
.article-content {
  max-width: var(--max-content-width);
  margin: 0 auto;
}
.article-content h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  line-height: 1.3;
  margin: 52px 0 18px;
  padding-top: 8px;
  border-top: 1px solid var(--color-border);
  scroll-margin-top: 90px;
}
.article-content h2:first-child { border-top: none; margin-top: 0; }
.article-content h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  line-height: 1.35;
  margin: 40px 0 14px;
  scroll-margin-top: 90px;
}
.article-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 30px 0 10px;
  scroll-margin-top: 90px;
  color: var(--color-text);
}
.article-content p {
  margin: 0 0 18px;
  color: var(--color-text);
}
.article-content ul,
.article-content ol {
  margin: 0 0 20px;
  padding-left: 1.4em;
}
.article-content li { margin-bottom: 8px; }
.article-content strong { font-weight: 700; }

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 0.92rem;
}
caption {
  text-align: left;
  font-weight: 700;
  padding: 12px 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  caption-side: top;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
thead th {
  background: var(--color-accent-tint);
  font-weight: 700;
  color: var(--color-accent-dark);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--color-surface); }

/* ---------------------------------------------------------------------
   CTA buttons (inline "Book / Schedule / Request a Legal Consultation")
   --------------------------------------------------------------------- */
.cta-inline { text-align: center; margin: 28px 0; }
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent);
  color: #fff;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, transform 0.15s ease;
}
.cta-button:hover { background: var(--color-accent-dark); color: #fff; transform: translateY(-1px); }

/* ---------------------------------------------------------------------
   CTA section / Author / Related / Share
   --------------------------------------------------------------------- */
.cta-section, .author-section, .related-articles, .share-section {
  max-width: var(--max-content-width);
  margin: 0 auto 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}
.cta-section h2, .author-section h2, .related-articles h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0 0 14px;
}

.author-card { display: flex; gap: 18px; align-items: flex-start; }
.author-avatar-placeholder {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: var(--color-text-muted);
}
.author-bio p { margin: 0; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: var(--color-text); }
.related-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  font-weight: 700;
}
.related-card-title { font-weight: 600; font-style: italic; }

.share-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text);
  min-height: 44px;
}
.share-btn:hover { border-color: var(--color-accent); color: var(--color-accent-dark); }
.share-btn.copied { background: var(--color-accent-tint); border-color: var(--color-accent); }

/* ---------------------------------------------------------------------
   Back to top
   --------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 400;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-accent-dark); }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 60px;
  background: var(--color-surface);
}
.site-footer-inner {
  max-width: var(--max-page-width);
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.footer-logo { font-family: var(--font-serif); font-weight: 700; font-size: 1.1rem; margin: 0 0 10px; }
.footer-col h3 { font-size: 0.95rem; margin: 0 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--color-text-muted); text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-col p { color: var(--color-text-muted); font-size: 0.92rem; margin: 0 0 8px; }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  max-width: var(--max-page-width);
  margin: 0 auto;
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc-sidebar { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-nav {
    position: fixed;
    top: 65px; left: 0; right: 0; bottom: 0;
    background: #fff;
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    overflow-y: auto;
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a {
    display: block;
    padding: 14px 8px;
    border-bottom: 1px solid var(--color-border);
    min-height: 44px;
  }
  .mobile-nav-toggle { display: inline-flex; }
  .site-footer-inner { grid-template-columns: 1fr; }
  .table-wrap { border-radius: 0; margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); border-left: none; border-right: none; }
  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

/* ---------------------------------------------------------------------
   Print styles
   --------------------------------------------------------------------- */
@media print {
  .site-header, .toc-sidebar, .back-to-top, .progress-bar-wrap,
  .share-section, .cta-section, .skip-link, .mobile-nav-toggle, .toc {
    display: none !important;
  }
  .layout { display: block; }
  .article-content { max-width: 100%; }
  a { color: #000; text-decoration: underline; }
  .cta-button { display: none; }
}
