/* ==========================================================================
   Papaloukas Law Office — Joomla 6 template
   Design: deep navy + warm gold on warm off-white, serif display / sans body
   ========================================================================== */

:root {
  --navy-950: #0d1a30;
  --navy-900: #13233f;
  --navy-800: #1c3054;
  --navy-700: #2a4372;
  --gold-600: #a9812f;
  --gold-500: #c39a45;
  --gold-300: #e6cd93;
  --cream-50: #faf8f4;
  --cream-100: #f3efe6;
  --ink-900: #1b1b1a;
  --ink-700: #3f3d38;
  --ink-500: #6b6860;
  --line: #e4ddcd;
  --white: #ffffff;

  --font-display: "Playfair Display", "Georgia", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --max-width: 1180px;
  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(13, 26, 48, 0.08);
  --shadow-md: 0 8px 28px rgba(13, 26, 48, 0.12);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream-50);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-800); text-decoration: none; }
a:hover { color: var(--gold-600); }
ul { margin: 0; padding: 0; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--navy-950);
  line-height: 1.25;
  margin: 0 0 0.6em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-950);
  color: var(--white);
  padding: 10px 18px;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--navy-950);
  letter-spacing: 0.01em;
}
.brand__tag {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-weight: 600;
  white-space: nowrap;
}
.brand:hover .brand__mark, .brand:hover .brand__tag { color: inherit; }

/* Main nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 44px;
  height: 40px;
  cursor: pointer;
}
.nav-toggle__line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-950);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mainnav ul {
  list-style: none;
  display: flex;
  gap: 6px;
}
.mainnav li { position: relative; }
.mainnav a {
  display: block;
  padding: 10px 16px;
  color: var(--navy-900);
  font-weight: 600;
  font-size: 0.97rem;
  border-radius: var(--radius);
}
.mainnav a:hover,
.mainnav a:focus {
  background: var(--cream-100);
  color: var(--navy-950);
}
.mainnav .current > a {
  color: var(--gold-600);
}
.mainnav .parent > a::after { content: "▾"; font-size: 0.65em; margin-left: 5px; opacity: .7; }
.mainnav ul ul {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 220px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
  padding: 6px;
  flex-direction: column;
}
.mainnav li:hover > ul,
.mainnav li:focus-within > ul { display: flex; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(230,205,147,0.05) 0 1px, transparent 1px 90px);
  pointer-events: none;
}
.hero__inner {
  padding: 88px 24px 76px;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-300);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 22px;
}
.hero__eyebrow::before {
  content: "";
  width: 34px; height: 1px;
  background: var(--gold-500);
}
.hero h1 {
  color: var(--white);
  max-width: 15ch;
  margin-bottom: 0.4em;
}
.hero__lede {
  color: #cfd7e6;
  max-width: 56ch;
  font-size: 1.1rem;
}
.hero__actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--gold {
  background: var(--gold-500);
  color: var(--navy-950);
}
.btn--gold:hover { background: var(--gold-300); color: var(--navy-950); }
.btn--ghost {
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}
.btn--ghost:hover { border-color: var(--white); color: var(--white); background: rgba(255,255,255,0.08); }

/* Simple hero used on inner pages (no image, shorter) */
.page-hero {
  background: var(--navy-950);
  color: var(--white);
  padding: 46px 24px;
}
.page-hero h1 { color: var(--white); margin: 0; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  border-bottom: 1px solid var(--line);
  background: var(--cream-100);
}
.breadcrumbs .container { padding-top: 12px; padding-bottom: 12px; }
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-500);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ink-500); }
.breadcrumbs a { color: var(--ink-500); }
.breadcrumbs a:hover { color: var(--gold-600); }

/* ---------- Layout ---------- */
.page-body { padding: 56px 0 72px; }
.layout {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 44px;
}
.layout--with-sidebar { grid-template-columns: minmax(0,1fr) 300px; }

.content-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow-sm);
}
.content-panel :where(h2, h3):first-child { margin-top: 0; }
.content-panel h2 { border-bottom: 2px solid var(--gold-300); padding-bottom: 0.3em; }

/* Practice-area style bullet lists inside articles get a card treatment when
   authored as a definition-style list (optional progressive enhancement) */
.content-panel article :where(ul, ol) { padding-left: 1.25em; }
.content-panel article li { margin-bottom: 0.4em; }
.content-panel article strong { color: var(--navy-900); }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 22px; }
.side-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.side-card h3 {
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.side-card--contact { background: var(--navy-950); color: #dfe4ee; border: none; }
.side-card--contact h3 { color: var(--white); border-color: rgba(255,255,255,0.18); }
.side-card--contact a { color: var(--gold-300); }
.side-card--contact a:hover { color: var(--white); }

/* ---------- Feature / practice-area grid (module position: features) ---- */
.feature-grid {
  padding: 60px 0;
}
.feature-grid__head { max-width: 60ch; margin: 0 0 32px; }
.feature-grid .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  border-top: 3px solid var(--gold-500);
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.35em; }
.feature-card p { color: var(--ink-700); font-size: 0.95rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: #b9c0d1;
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid h4 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.site-footer a { color: #b9c0d1; }
.site-footer a:hover { color: var(--gold-300); }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom {
  padding: 20px 0 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #8b93a8;
}
.footer-bottom a { color: #8b93a8; }
.footer-bottom a:hover { color: var(--gold-300); }

/* ---------- Utility: Joomla system messages ---------- */
.system-messages { list-style: none; margin: 20px 0; padding: 0; }
.system-messages .alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 10px;
  border: 1px solid var(--line);
  background: var(--cream-100);
}
.system-messages .alert-error { border-color: #d98c8c; background: #fbecec; color: #7a1f1f; }
.system-messages .alert-success { border-color: #9fcf9f; background: #edf8ed; color: #235a23; }
.system-messages .alert-warning { border-color: var(--gold-500); background: #fbf3e0; color: #6b4e14; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .layout--with-sidebar { grid-template-columns: minmax(0,1fr); }
  .content-panel { padding: 30px 26px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .mainnav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .mainnav.is-open { max-height: 70vh; overflow-y: auto; }
  .mainnav ul { flex-direction: column; padding: 10px; gap: 2px; }
  .mainnav ul ul { position: static; box-shadow: none; display: none; padding-left: 14px; }
  .mainnav li.is-open > ul { display: flex; }
  .mainnav .parent > a::after { float: right; }
  .hero__inner { padding: 56px 20px; }
}

@media print {
  .site-header, .site-footer, .breadcrumbs, .nav-toggle, .hero__actions { display: none; }
  body { background: #fff; }
  .content-panel { border: none; box-shadow: none; padding: 0; }
}
