/*
Theme Name: Haytham Essa Law Firm
Theme URI: https://example.com
Author: Custom Build
Description: Custom WordPress theme for Haytham Essa Law Firm — Corporate Law Firm in Egypt | Business Lawyers & Legal Advisors. A premium navy-and-gold identity built around an "Articles of Practice" concept referencing Egyptian legal-code citation style, with refined editorial typography and a fine double-rule motif.
Version: 2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: haytham-essa-law
*/

/* =========================================================
   0. DESIGN TOKENS
========================================================= */
:root{
  --nile-teal: #1B3A6B;
  --nile-teal-deep: #0B1F3D;
  --limestone: #F6F3EA;
  --limestone-soft: #FBF9F4;
  --brass: #C9A227;
  --brass-bright: #E3C158;
  --ink: #16181C;
  --sand: #DED2AE;
  --wine: #7A2331;
  --white: #FFFFFF;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --container: 1180px;
  --radius-sm: 3px;
  --radius: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(11,31,61,.04), 0 12px 28px -14px rgba(11,31,61,.16);
  --shadow-card-hover: 0 4px 10px rgba(11,31,61,.06), 0 30px 50px -18px rgba(11,31,61,.24);
}

/* =========================================================
   1. RESET & BASE
========================================================= */
.scroll-progress{
  position: fixed; top:0; left:0; height:3px; width:0%;
  background: linear-gradient(90deg, var(--brass), var(--brass-bright));
  z-index: 9999;
}
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; scroll-padding-top: 100px; }
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--limestone-soft);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4{ font-family: var(--font-display); margin:0 0 .5em; line-height:1.15; color: var(--nile-teal-deep); font-weight:600; }
p{ margin:0 0 1em; }
.container{ max-width: var(--container); margin:0 auto; padding:0 24px; }
:focus-visible{ outline: 3px solid var(--brass); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior:auto !important; }
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brass);
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom: 14px;
}
.eyebrow::before{
  content:"";
  width: 26px; height:1px;
  background: var(--brass);
  display:inline-block;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing:.03em;
  padding: 15px 32px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor:pointer;
  transition: all .25s cubic-bezier(.2,.8,.2,1);
}
.btn-primary{ background: var(--brass); color: var(--nile-teal-deep); font-weight:600; position:relative; overflow:hidden; box-shadow: 0 10px 24px -8px rgba(201,162,39,.55); }
.btn-primary:hover{ background: var(--brass-bright); transform: translateY(-2px); box-shadow: 0 16px 30px -8px rgba(201,162,39,.65); }
.btn-primary::before{
  content:""; position:absolute; top:0; left:-75%; width:40%; height:100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg);
}
.btn-primary:hover::before{ animation: hel-shimmer .85s ease; }
@keyframes hel-shimmer{ from{ left:-75%; } to{ left:130%; } }
.btn{ transition: all .25s cubic-bezier(.2,.8,.2,1); }
.btn-outline{ border-color: rgba(255,255,255,.35); color: var(--limestone); }
.btn-outline:hover{ border-color: var(--brass); color: var(--brass-bright); background: rgba(255,255,255,.04); }
.btn-dark{ background: var(--nile-teal); color:var(--limestone); }
.btn-dark:hover{ background: var(--nile-teal-deep); transform: translateY(-2px); }

/* Fine double-rule motif — a nod to letterhead and legal-document framing,
   used at section seams instead of a heavier decorative pattern. */
.lattice-divider{
  height: 28px;
  display:flex; align-items:center; justify-content:center; gap:6px;
}
.lattice-divider::before, .lattice-divider::after{
  content:""; width:64px; height:1px; background: linear-gradient(90deg, transparent, var(--brass), transparent);
}
.lattice-divider::before{ margin-inline-end:2px; }


/* Subtle diagonal texture used behind the "Why This Firm" dark section */
.lattice-bg{
  position:relative;
}
.lattice-bg::before{
  content:"";
  position:absolute; inset:0;
  background-image:
    linear-gradient(45deg, rgba(201,162,39,.06) 25%, transparent 25%, transparent 75%, rgba(201,162,39,.06) 75%),
    linear-gradient(45deg, rgba(201,162,39,.06) 25%, transparent 25%, transparent 75%, rgba(201,162,39,.06) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  pointer-events:none;
}

/* =========================================================
   2. HEADER
========================================================= */
.site-header{
  position: sticky; top:0; z-index: 500;
  background: rgba(11,31,61,.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201,162,39,.2);
}
.site-header .container{
  display:flex; align-items:center; justify-content:space-between;
  height: 84px;
}
.brand{
  display:flex; flex-direction:column; color: var(--limestone);
}
.brand-mark{
  font-family: var(--font-display);
  font-size: 22px; font-weight:600; color:var(--limestone);
  letter-spacing:.01em;
}
.brand-sub{
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing:.1em; text-transform:uppercase; color: var(--brass);
}
.main-nav ul{ display:flex; gap:34px; align-items:center; }
.main-nav a{
  color: var(--limestone); font-size: 14.5px; letter-spacing:.02em;
  position:relative; padding: 6px 0;
}
.main-nav a::after{
  content:""; position:absolute; left:0; bottom:0; width:0; height:1px;
  background: var(--brass); transition: width .25s ease;
}
.main-nav a:hover::after, .main-nav a.current::after{ width:100%; }
.header-actions{ display:flex; align-items:center; gap:20px; }
.header-phone{ color: var(--limestone); font-family: var(--font-mono); font-size:14px; }
.nav-toggle{ display:none; background:none; border:none; color:var(--limestone); font-size:26px; cursor:pointer; }

@media (max-width: 900px){
  .main-nav{
    position:fixed; inset: 84px 0 0 0; background: var(--nile-teal-deep);
    transform: translateY(-110%); transition: transform .3s ease; overflow-y:auto;
  }
  .main-nav.open{ transform: translateY(0); }
  .main-nav ul{ flex-direction:column; padding: 40px 24px; gap:22px; }
  .header-phone{ display:none; }
  .nav-toggle{ display:block; }
}

/* =========================================================
   3. HERO
========================================================= */
.hero{
  background: linear-gradient(135deg, var(--nile-teal-deep) 0%, var(--nile-teal) 100%);
  color: var(--limestone);
  padding: 110px 0 90px;
  position:relative;
  overflow:hidden;
}
.hero::after{
  content:"";
  position:absolute; right:-120px; top:-120px; width:420px; height:420px;
  border: 1px solid rgba(201,162,39,.25);
  border-radius:50%;
  animation: hel-drift 13s ease-in-out infinite;
}
.hero::before{
  content:"";
  position:absolute; right:-40px; top:-40px; width:280px; height:280px;
  border: 1px solid rgba(201,162,39,.18);
  border-radius:50%;
  animation: hel-drift 9s ease-in-out infinite reverse;
}
@keyframes hel-drift{
  0%,100%{ transform: translate(0,0); }
  50%{ transform: translate(-12px, 12px); }
}
.hero-grid > div:first-child .eyebrow{ animation: hel-rise .7s ease both; }
.hero-grid > div:first-child h1{ animation: hel-rise .7s ease .12s both; }
.hero-grid > div:first-child .hero-lede{ animation: hel-rise .7s ease .24s both; }
.hero-grid > div:first-child .hero-actions{ animation: hel-rise .7s ease .36s both; }
.hero-seal{ animation: hel-rise .8s ease .3s both; }
@keyframes hel-rise{
  from{ opacity:0; transform: translateY(22px); }
  to{ opacity:1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce){
  .hero::after, .hero::before{ animation:none; }
}
.hero-grid{
  display:grid; grid-template-columns: 1.15fr .85fr; gap:60px; align-items:end; position:relative; z-index:2;
}
.hero h1{
  color: var(--limestone);
  font-size: clamp(38px, 5vw, 62px);
  font-weight:600;
  letter-spacing: -0.01em;
}
.hero h1 em{
  color: var(--brass-bright);
  font-style:normal;
  position:relative;
  display:inline-block;
}
.hero h1 em::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-6px; height:1px;
  background: linear-gradient(90deg, var(--brass-bright), transparent);
}
.hero-lede{ max-width: 560px; font-size:18px; color: rgba(246,243,234,.85); }
.hero-actions{ display:flex; gap:16px; margin-top:34px; flex-wrap:wrap; }
.hero-seal{
  justify-self:end;
  display:flex; flex-direction:column; align-items:center; gap:16px;
  color: var(--limestone);
}
.seal{
  width: 172px; height:172px; border-radius:50%;
  background: radial-gradient(circle at 35% 30%, rgba(227,193,88,.12), transparent 70%);
  border: 1.5px solid var(--brass);
  display:flex; align-items:center; justify-content:center; text-align:center;
  position:relative;
  font-family: var(--font-mono); font-size:11px; letter-spacing:.08em; color:var(--brass-bright);
  animation: seal-pulse 4.5s ease-in-out infinite;
}
.seal::before{
  content:""; position:absolute; inset:9px; border:1px solid rgba(201,162,39,.45); border-radius:50%;
}
.seal::after{
  content:""; position:absolute; inset:-7px; border:1px solid rgba(201,162,39,.18); border-radius:50%;
}
.seal-mono{ font-family: var(--font-display); font-size:32px; color: var(--limestone); letter-spacing:.02em; }
@keyframes seal-pulse{
  0%,100%{ box-shadow: 0 0 0 0 rgba(201,162,39,.0); }
  50%{ box-shadow: 0 0 0 10px rgba(201,162,39,.06); }
}
.hero-stats{ display:flex; gap:34px; margin-top:64px; position:relative; z-index:2; flex-wrap:wrap; }
.hero-stat{ position:relative; padding-inline-start:18px; }
.hero-stat::before{ content:""; position:absolute; left:0; top:3px; bottom:3px; width:2px; background: linear-gradient(180deg, var(--brass), transparent); }
.hero-stat b{ display:block; font-family:var(--font-display); font-size:30px; color:var(--brass-bright); }
.hero-stat span{ font-family:var(--font-mono); font-size:12px; letter-spacing:.06em; text-transform:uppercase; color: rgba(246,243,234,.7); }

@media (max-width: 900px){
  .hero-grid{ grid-template-columns:1fr; }
  .hero-seal{ justify-self:start; }
}

/* =========================================================
   4. SECTION SHELL
========================================================= */
.section{ padding: 96px 0; }
.section-alt{ background: var(--limestone); }
.section-dark{ background: linear-gradient(135deg, var(--nile-teal-deep) 0%, var(--nile-teal) 130%); color: var(--limestone); }
.section-dark h2, .section-dark h3{ color: var(--limestone); }
.section-head{ max-width: 680px; margin-bottom: 56px; }
.section-head h2{ font-size: clamp(28px, 3.4vw, 40px); }

/* =========================================================
   5. ARTICLES OF PRACTICE (practice areas as legal articles)
========================================================= */
.articles-list{ counter-reset: article-counter; }
.article-row{
  counter-increment: article-counter;
  display:grid;
  grid-template-columns: 110px 1fr 140px;
  align-items:center;
  gap: 28px;
  padding: 30px 24px;
  margin: 0 -24px;
  border-top: 1px solid rgba(11,31,61,.12);
  border-radius: var(--radius-sm);
  border-inline-start: 3px solid transparent;
  transition: background .25s ease, border-color .25s ease, padding .25s ease;
}
.article-row:last-child{ border-bottom: 1px solid rgba(11,31,61,.12); }
.article-row:hover{ background: rgba(201,162,39,.07); border-inline-start-color: var(--brass); padding-inline-start:30px; }
.article-num{
  font-family: var(--font-mono); color: var(--brass); font-size:13px; letter-spacing:.05em;
}
.article-num small{ display:block; color: var(--sand); font-size:11px; margin-top:4px; }
.article-title{ font-family: var(--font-display); font-size: 21px; color: var(--nile-teal-deep); margin:0 0 6px; }
.article-desc{ margin:0; color:#4a4a44; font-size:15px; }
.article-arrow{ justify-self:end; font-family:var(--font-mono); color: var(--brass); font-size:14px; }

@media (max-width: 720px){
  .article-row{ grid-template-columns: 1fr; gap:10px; }
  .article-arrow{ justify-self:start; }
}

/* =========================================================
   6. WHY US / STATS
========================================================= */
.stats-grid{
  display:grid; grid-template-columns: repeat(4,1fr); gap:1px;
  background: rgba(201,162,39,.25);
  border: 1px solid rgba(201,162,39,.25);
}
.stat-card{ background: rgba(27,58,107,.35); border-radius: var(--radius); padding: 40px 28px; backdrop-filter: blur(2px); }
.stat-card b{ font-family: var(--font-display); font-size:38px; color:var(--brass-bright); display:block; }
.stat-card span{ font-family:var(--font-mono); font-size:12px; text-transform:uppercase; letter-spacing:.05em; color: rgba(246,243,234,.75); }
@media (max-width: 800px){ .stats-grid{ grid-template-columns: repeat(2,1fr); } }

/* =========================================================
   7. TEAM
========================================================= */
.team-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:36px; }
.team-card{ background: var(--white); border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow-card); transition: box-shadow .3s ease, transform .3s ease; }
.team-card:hover{ box-shadow: var(--shadow-card-hover); transform: translateY(-4px); }
.team-photo{ aspect-ratio: 4/5; background: linear-gradient(160deg, var(--sand), var(--limestone)); display:flex; align-items:center; justify-content:center; color: var(--nile-teal); font-family:var(--font-mono); font-size:12px; letter-spacing:.06em; text-transform:uppercase; }
.team-body{ padding: 22px 24px 28px; }
.team-body h3{ font-size:19px; margin-bottom:2px; }
.team-role{ font-family: var(--font-mono); font-size:12px; color: var(--brass); text-transform:uppercase; letter-spacing:.05em; display:block; margin-bottom:12px; }
.team-body p{ font-size:14.5px; color:#4a4a44; }
@media (max-width: 900px){ .team-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .team-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   8. TESTIMONIALS
========================================================= */
.testi-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap:30px; }
.testi-card{ background: rgba(255,255,255,.04); border:1px solid rgba(201,162,39,.25); border-radius: var(--radius); padding: 36px; }
.testi-card p{ font-family: var(--font-display); font-size:19px; font-style:italic; color: var(--limestone); margin-bottom:18px; }
.testi-name{ font-family: var(--font-mono); font-size:12.5px; color: var(--brass-bright); text-transform:uppercase; letter-spacing:.04em; }
@media (max-width: 800px){ .testi-grid{ grid-template-columns:1fr; } }

/* =========================================================
   9. APPOINTMENT / CONTACT (Article XI)
========================================================= */
.appointment{ position:relative; }
.appointment-grid{ display:grid; grid-template-columns: .9fr 1.1fr; gap:60px; }
.appointment-info h2{ font-size: clamp(28px,3.4vw,40px); }
.appointment-points{ margin-top:28px; }
.appointment-points li{ display:flex; gap:12px; margin-bottom:14px; font-size:15px; }
.appointment-points li::before{ content:"§"; color: var(--brass); font-family:var(--font-mono); font-weight:700; }
.appointment-direct{ margin-top:34px; padding-top:28px; border-top:1px solid rgba(11,31,61,.15); font-size:14.5px; }
.appointment-direct a{ color: var(--nile-teal); font-weight:600; text-decoration:underline; }

.appt-form{ background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 38px; }
.appt-form .form-row{ display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.appt-form label{ display:block; font-family:var(--font-mono); font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; color:#556; margin-bottom:6px; }
.appt-form input, .appt-form select, .appt-form textarea{
  width:100%; padding:13px 14px; border:1px solid #d8d2c2; border-radius:var(--radius-sm);
  font-family: var(--font-body); font-size:15px; background: var(--limestone-soft); color: var(--ink);
  margin-bottom:18px;
}
.appt-form input:focus, .appt-form select:focus, .appt-form textarea:focus{ outline:none; border-color: var(--brass); background:var(--white); }
.appt-form textarea{ resize:vertical; min-height:100px; }
.appt-form .btn{ width:100%; }
.form-note{ font-size:12.5px; color:#7a7568; margin-top:14px; text-align:center; }
.form-success{ background: rgba(201,162,39,.12); border:1px solid var(--brass); padding:16px 20px; margin-bottom:20px; font-size:14.5px; }
.form-honeypot{ position:absolute; left:-9999px; }

@media (max-width: 900px){
  .appointment-grid{ grid-template-columns:1fr; }
  .appt-form .form-row{ grid-template-columns:1fr; }
}

/* =========================================================
   10. INSIGHTS / BLOG
========================================================= */
.insights-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:32px; }
.insight-card{ background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 26px; transition: box-shadow .3s ease, transform .3s ease; }
.insight-card:hover{ box-shadow: var(--shadow-card-hover); transform: translateY(-4px); }
.insight-date{ font-family:var(--font-mono); font-size:11.5px; color:var(--brass); text-transform:uppercase; letter-spacing:.05em; }
.insight-card h3{ font-size:19px; margin: 10px 0; }
.insight-card p{ font-size:14.5px; color:#4a4a44; }
@media (max-width: 900px){ .insights-grid{ grid-template-columns:1fr; } }

/* Generic page/single content */
.page-hero{ background: var(--nile-teal-deep); color: var(--limestone); padding: 70px 0 60px; }
.page-hero h1{ color: var(--limestone); font-size: clamp(30px,4vw,46px); }
.entry-content{ max-width: 760px; }
.entry-content h2{ margin-top:1.4em; }
.entry-content img{ margin: 24px 0; }
.entry-content blockquote{ border-left: 3px solid var(--brass); padding-left:20px; font-style:italic; color:#444; }

/* =========================================================
   11. FOOTER (seal / stamp block)
========================================================= */
.site-footer{ background: var(--nile-teal-deep); color: rgba(246,243,234,.8); padding: 70px 0 30px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap:40px; margin-bottom:50px; }
.footer-brand .brand-mark{ margin-bottom:10px; }
.footer-brand p{ font-size:14px; max-width:280px; }
.footer-col h4{ font-family:var(--font-mono); font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--brass); margin-bottom:16px; }
.footer-col ul li{ margin-bottom:10px; font-size:14.5px; }
.footer-col a:hover{ color: var(--brass-bright); }
.footer-bottom{ display:flex; justify-content:space-between; align-items:center; padding-top:26px; border-top:1px solid rgba(201,162,39,.2); font-size:13px; flex-wrap:wrap; gap:12px; }
.footer-social{ display:flex; gap:16px; }
@media (max-width: 900px){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .footer-grid{ grid-template-columns: 1fr; } }

/* Reveal-on-scroll (progressive enhancement, respects reduced motion) */
.reveal{ opacity:0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity:1; transform:none; }

/* Staggered reveal delays for list/grid children */
.stagger > .reveal:nth-child(1){ transition-delay: .03s; }
.stagger > .reveal:nth-child(2){ transition-delay: .10s; }
.stagger > .reveal:nth-child(3){ transition-delay: .17s; }
.stagger > .reveal:nth-child(4){ transition-delay: .24s; }
.stagger > .reveal:nth-child(5){ transition-delay: .31s; }
.stagger > .reveal:nth-child(6){ transition-delay: .38s; }
.stagger > .reveal:nth-child(7){ transition-delay: .45s; }
.stagger > .reveal:nth-child(8){ transition-delay: .52s; }
.stagger > .reveal:nth-child(9){ transition-delay: .59s; }

/* =========================================================
   12. TRUST / CREDIBILITY MARQUEE
========================================================= */
.trust-strip{
  background: var(--limestone);
  padding: 26px 0;
  overflow: hidden;
  border-top: 1px solid rgba(11,31,61,.1);
  border-bottom: 1px solid rgba(11,31,61,.1);
}
.trust-track{
  display:flex; align-items:center; gap:64px; width:max-content;
  animation: hel-marquee 28s linear infinite;
}
.trust-strip:hover .trust-track{ animation-play-state: paused; }
.trust-item{
  font-family: var(--font-mono); font-size:13px; letter-spacing:.06em; text-transform:uppercase;
  color:#6b6a5f; white-space:nowrap; display:flex; align-items:center; gap:10px;
}
.trust-item::before{ content:"\00a7"; color: var(--brass); font-weight:700; }
@keyframes hel-marquee{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce){ .trust-track{ animation:none; } }

/* =========================================================
   13. INDUSTRIES / SECTORS
========================================================= */
.industries-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:28px; }
.industry-card{
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-card); padding:32px 28px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), box-shadow .3s ease;
}
.industry-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }
.industry-mono{
  width:52px; height:52px; border-radius:50%; border:2px solid var(--brass);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-size:13px; color: var(--nile-teal-deep); font-weight:600;
  margin-bottom:18px; transition: background .25s ease, color .25s ease;
}
.industry-card:hover .industry-mono{ background: var(--brass); color: var(--white); }
.industry-card h3{ font-size:18px; margin-bottom:6px; }
.industry-card p{ font-size:14px; color:#4a4a44; margin:0; }
@media (max-width: 900px){ .industries-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px){ .industries-grid{ grid-template-columns: 1fr; } }

/* =========================================================
   14. PROCESS TIMELINE ("How We Work")
========================================================= */
.process-timeline{ position:relative; padding-left:66px; max-width:720px; }
.process-timeline::before{
  content:""; position:absolute; left:19px; top:6px; bottom:6px; width:2px;
  background: rgba(201,162,39,.22);
}
.process-timeline::after{
  content:""; position:absolute; left:19px; top:6px; width:2px; height:0;
  background: var(--brass); transition: height 1.5s ease .1s;
}
.process-timeline.is-visible::after{ height: calc(100% - 12px); }
.process-step{ position:relative; padding-bottom:46px; }
.process-step:last-child{ padding-bottom:0; }
.process-num{
  position:absolute; left:-66px; top:0; width:40px; height:40px; border-radius:50%;
  background: var(--nile-teal-deep); color: var(--brass-bright); border:2px solid var(--brass);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-size:13px; z-index:2;
}
.process-step h3{ font-size:19px; margin-bottom:6px; }
.process-step p{ font-size:14.5px; color:#4a4a44; margin:0; }
@media (max-width: 600px){ .process-timeline{ padding-left:56px; } .process-num{ left:-56px; width:34px; height:34px; font-size:11.5px; } }

/* =========================================================
   15. TESTIMONIAL SLIDER
========================================================= */
.testi-slider{ position:relative; max-width:760px; margin:0 auto; }
.testi-viewport{ overflow:hidden; }
.testi-track{ display:flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.testi-slide{ min-width:100%; padding: 4px; }
.testi-controls{ display:flex; align-items:center; justify-content:center; gap:22px; margin-top:28px; }
.testi-arrow{
  width:42px; height:42px; border-radius:50%; border:1px solid rgba(201,162,39,.4);
  background:transparent; color: var(--brass-bright); font-size:16px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition: all .2s ease;
}
.testi-arrow:hover{ background: var(--brass); color: var(--nile-teal-deep); }
.testi-dots{ display:flex; gap:9px; }
.testi-dots button{
  width:9px; height:9px; border-radius:50%; border:1px solid var(--brass); background:transparent;
  padding:0; cursor:pointer; transition: background .2s ease;
}
.testi-dots button.active{ background: var(--brass-bright); }

/* =========================================================
   16. FLOATING ACTIONS (WhatsApp + back to top)
========================================================= */
.float-actions{ position:fixed; right:22px; bottom:22px; display:flex; flex-direction:column; gap:14px; z-index:400; }
.float-btn{
  width:52px; height:52px; border-radius:50%; border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 10px 26px rgba(11,31,61,.28);
}
.whatsapp-btn{ background:#25D366; color:#fff; position:relative; }
.whatsapp-btn::after{
  content:""; position:absolute; inset:-6px; border-radius:50%; border:2px solid #25D366;
  opacity:.55; animation: hel-pulse-ring 2.4s ease-out infinite;
}
@keyframes hel-pulse-ring{ 0%{ transform:scale(.88); opacity:.55; } 100%{ transform:scale(1.5); opacity:0; } }
.to-top-btn{
  background: var(--nile-teal-deep); color: var(--brass-bright); border:1px solid var(--brass);
  opacity:0; pointer-events:none; transform: translateY(10px); transition: all .3s ease;
  font-size:18px;
}
.to-top-btn.show{ opacity:1; pointer-events:auto; transform:none; }
@media (prefers-reduced-motion: reduce){ .whatsapp-btn::after{ animation:none; } }

/* =========================================================
   17. LANGUAGE SWITCHER
========================================================= */
.lang-switch{
  display:flex; align-items:center; gap:2px;
  border:1px solid rgba(201,162,39,.4); border-radius:20px; padding:3px;
  font-family: var(--font-mono); font-size:11.5px;
}
.lang-switch a{
  padding:5px 11px; border-radius:16px; color: rgba(246,243,234,.65); letter-spacing:.04em;
  transition: all .2s ease;
}
.lang-switch a.active{ background: var(--brass); color: var(--nile-teal-deep); font-weight:600; }
.lang-switch a:not(.active):hover{ color: var(--limestone); }

/* =========================================================
   18. BOOK-CONSULTATION SIDE TAB
========================================================= */
.book-tab{
  position: fixed; left:0; top:50%; transform: translateY(-50%) rotate(-90deg) translateX(-50%);
  transform-origin: left center;
  background: var(--brass); color: var(--nile-teal-deep);
  font-family: var(--font-mono); font-size:13px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  border:none; cursor:pointer; padding:13px 22px; border-radius:8px 8px 0 0;
  box-shadow: 0 -6px 20px rgba(11,31,61,.2);
  z-index: 390;
  display:flex; align-items:center; gap:8px;
  transition: padding .2s ease, background .2s ease;
}
.book-tab:hover{ background: var(--brass-bright); padding-bottom:17px; }
@media (max-width: 700px){ .book-tab{ display:none; } }

/* =========================================================
   19. APPOINTMENT MODAL
========================================================= */
.hel-modal{
  position: fixed; inset:0; z-index: 800;
  display:flex; align-items:center; justify-content:center;
  visibility:hidden; opacity:0; transition: opacity .25s ease, visibility .25s ease;
  padding: 24px;
}
.hel-modal.is-open{ visibility:visible; opacity:1; }
.hel-modal-backdrop{ position:absolute; inset:0; background: rgba(5,13,26,.6); backdrop-filter: blur(2px); }
.hel-modal-panel{
  position:relative; background: var(--limestone-soft); max-width: 640px; width:100%;
  max-height: 88vh; overflow-y:auto; padding: 44px 40px 36px;
  border-top: 3px solid var(--brass); border-radius: var(--radius);
  transform: translateY(18px) scale(.98); transition: transform .3s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.4);
}
.hel-modal.is-open .hel-modal-panel{ transform: translateY(0) scale(1); }
.hel-modal-panel h3{ font-size:26px; margin-bottom:6px; }
.hel-modal-sub{ color:#5a5a50; font-size:14.5px; margin-bottom:22px; }
.hel-modal-close{
  position:absolute; top:16px; right:18px; width:34px; height:34px; border-radius:50%;
  border:1px solid rgba(11,31,61,.2); background:transparent; font-size:20px; line-height:1;
  cursor:pointer; color: var(--nile-teal-deep); display:flex; align-items:center; justify-content:center;
  transition: all .2s ease;
}
.hel-modal-close:hover{ background: var(--nile-teal-deep); color: var(--limestone); border-color: var(--nile-teal-deep); }
body.hel-modal-open{ overflow:hidden; }
@media (max-width: 600px){ .hel-modal-panel{ padding:36px 22px 28px; } }

/* =========================================================
   20. COOKIE NOTICE
========================================================= */
.cookie-banner{
  position: fixed; left:24px; right:24px; bottom:24px; z-index: 700;
  max-width: 640px; margin: 0 auto;
  background: var(--nile-teal-deep); color: var(--limestone);
  border: 1px solid rgba(201,162,39,.35); border-radius: var(--radius);
  padding: 20px 24px;
  display:flex; align-items:center; gap:20px; flex-wrap:wrap;
  transform: translateY(140%); transition: transform .5s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.cookie-banner.is-visible{ transform: translateY(0); }
.cookie-banner p{ margin:0; font-size:13.5px; flex:1; min-width:220px; color: rgba(246,243,234,.85); }
.cookie-banner a{ color: var(--brass-bright); text-decoration:underline; }
.cookie-banner-actions{ display:flex; gap:10px; }
.cookie-btn{
  font-family: var(--font-mono); font-size:12.5px; padding:10px 18px; border-radius: var(--radius-pill); cursor:pointer; border:1px solid transparent;
}
.cookie-accept{ background: var(--brass); color: var(--nile-teal-deep); font-weight:600; }
.cookie-accept:hover{ background: var(--brass-bright); }
.cookie-dismiss{ background:transparent; border-color: rgba(246,243,234,.3); color: var(--limestone); }
.cookie-dismiss:hover{ border-color: var(--brass); color: var(--brass-bright); }
@media (max-width: 560px){ .cookie-banner{ left:12px; right:12px; bottom:12px; padding:18px; } }



/* Full-width builder canvas page template */
.builder-canvas{ width:100%; }
.builder-canvas > .container{ max-width:none; padding:0; }

/* Anchor-jump fix: sticky header + progress bar would otherwise cover the
   top of the section when visitors click "Book Appointment" / "Read more"
   links that jump to #appointment, #practice, or #team. */
#appointment, #practice, #team{ scroll-margin-top: 100px; }

/* =========================================================
   21. FRONT-END QUICK-EDIT (visible to logged-in editors only)
========================================================= */
.hel-quick-edit{
  position:absolute; top:10px; right:10px; z-index:5;
  width:30px; height:30px; border-radius:50%;
  background: var(--nile-teal-deep); color: var(--brass-bright);
  display:flex; align-items:center; justify-content:center;
  font-size:14px; text-decoration:none; opacity:0; transition: opacity .2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.hel-edit-hoverable{ position:relative; }
.hel-edit-hoverable:hover .hel-quick-edit,
.hel-quick-edit:focus{ opacity:1; }
.hel-admin-bar-note{
  background: var(--brass); color: var(--nile-teal-deep);
  font-family: var(--font-mono); font-size:12.5px; text-align:center;
  padding:9px 16px;
}
.hel-admin-bar-note a{ text-decoration:underline; font-weight:600; }

/* =========================================================
   22. BREADCRUMBS
========================================================= */
.breadcrumbs{ margin-bottom:18px; }
.breadcrumbs ol{ display:flex; flex-wrap:wrap; gap:8px; list-style:none; padding:0; margin:0; }
.breadcrumbs li{ display:flex; align-items:center; gap:8px; font-family: var(--font-mono); font-size:12.5px; letter-spacing:.03em; }
.breadcrumbs li:not(:last-child)::after{ content:"/"; color: rgba(246,243,234,.35); margin-inline-start:8px; }
.breadcrumbs a{ color: rgba(246,243,234,.7); }
.breadcrumbs a:hover{ color: var(--brass-bright); }
.breadcrumbs span[aria-current]{ color: var(--brass-bright); }
.page-hero .breadcrumbs li:not(:last-child)::after{ color: rgba(11,31,61,.25); }

/* =========================================================
   23. PRE-FOOTER CTA BANNER
========================================================= */
.cta-banner{
  background: linear-gradient(135deg, var(--nile-teal-deep) 0%, var(--nile-teal) 130%);
  color: var(--limestone); padding: 64px 0;
}
.cta-banner-inner{
  display:flex; align-items:center; justify-content:space-between; gap:32px; flex-wrap:wrap;
}
.cta-banner h2{ color: var(--limestone); font-size: clamp(24px, 3vw, 32px); margin-bottom:8px; }
.cta-banner p{ margin:0; color: rgba(246,243,234,.8); max-width:480px; }
.cta-banner .btn{ flex-shrink:0; }

/* =========================================================
   24. ATTORNEY PROFILE PAGE (single-team_member.php)
========================================================= */
.attorney-hero{ display:grid; grid-template-columns: 280px 1fr; gap:48px; align-items:start; }
.attorney-portrait{
  aspect-ratio: 4/5; background: linear-gradient(160deg, var(--sand), var(--limestone));
  display:flex; align-items:center; justify-content:center; color: var(--nile-teal);
  font-family:var(--font-mono); font-size:12px; letter-spacing:.06em; text-transform:uppercase;
  border: 1px solid rgba(11,31,61,.1);
}
.attorney-name{ font-size: clamp(28px, 3.4vw, 38px); margin-bottom:6px; }
.attorney-role{
  font-family: var(--font-mono); font-size:13px; color: var(--brass); text-transform:uppercase;
  letter-spacing:.06em; display:block; margin-bottom:20px;
}
.attorney-cta{ margin-top:26px; display:flex; gap:14px; flex-wrap:wrap; }
.attorney-bio{ font-size:16.5px; color:#3c3c36; max-width:640px; }
@media (max-width: 720px){ .attorney-hero{ grid-template-columns:1fr; } .attorney-portrait{ max-width:220px; } }

/* =========================================================
   25. PRACTICE AREA DETAIL PAGE (single-practice_area.php)
========================================================= */
.practice-detail-grid{ display:grid; grid-template-columns: 1fr 320px; gap:56px; align-items:start; }
.practice-sidebar{
  position: sticky; top: 110px;
  background: var(--limestone); border-radius: var(--radius);
  padding: 32px 28px;
}
.practice-sidebar h3{ font-size:19px; margin-bottom:10px; }
.practice-sidebar p{ font-size:14.5px; color:#4a4a44; margin-bottom:20px; }
.practice-sidebar .btn{ width:100%; margin-bottom:12px; }
.related-list{ margin-top:18px; padding-top:18px; border-top:1px solid rgba(11,31,61,.12); }
.related-list a{
  display:block; padding:9px 0; font-size:14px; color: var(--nile-teal-deep);
  border-bottom:1px solid rgba(11,31,61,.08);
}
.related-list a:last-child{ border-bottom:none; }
.related-list a:hover{ color: var(--brass); }
@media (max-width: 900px){
  .practice-detail-grid{ grid-template-columns:1fr; }
  .practice-sidebar{ position:static; }
}

/* Team card is now a full-card link to the attorney's profile page */
.team-card a{ color:inherit; text-decoration:none; }
.team-card a:hover .team-body h3{ color: var(--brass); }
