/*
Theme Name: Pro Counsel v9
Theme URI: https://example.com/pro-counsel-v9
Author: Your Name
Author URI: https://example.com
Description: A clean, professional law firm theme with practice areas, attorney profiles, insights blog, consultation CTAs, and animated section graphics.
Version: 9.0.10
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: counsel-pro
Tags: light, law-firm, attorney, legal, professional, custom-menu, custom-logo, featured-images, theme-options
*/

/* =============================================================
   TYPOGRAPHY — matches 500law.com font stack
   ────────────────────────────────────────────────────────────
   Base / UI: Reddit Sans (variable woff2, self-hosted in /fonts/).
   No external font requests. System font fallbacks ensure text
   renders correctly even before the woff2 loads.

   Headings / Display: Palatino Linotype → Book Antiqua → Palatino
   → Georgia → Times New Roman → Times → serif.
   All system fonts — zero download cost.
   ============================================================= */

@font-face {
  font-family: 'Reddit Sans';
  font-style:  normal;
  font-weight: 200 900;            /* variable font: covers all weights */
  font-display: swap;
  src: url('fonts/reddit-sans.woff2') format('woff2');
}

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

:root {
  --blue: #2c5b78;
  --blue-dark: #1e4a64;
  --blue-light: #3d7a9e;
  --blue-pale: #edf3f7;
  --black: #0a0a0a;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --gray: #888888;
  --gray-light: #d8d8d8;
  --gray-bg: #f5f6f8;
  --white: #ffffff;
  --border: #e2e4e8;
  /* Base sans-serif: Reddit Sans with system fallbacks */
  --font: 'Reddit Sans', 'Inter', 'Segoe UI', system-ui, sans-serif;
  /* Serif display: Palatino stack — all system fonts, no download */
  --font-serif: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, 'Times New Roman', Times, serif;
  --section-pad: 100px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

/*
 * Headings use the Palatino serif stack — matching 500law.com's
 * "Palatino Linotype", "Book Antiqua", Palatino, Georgia... declaration.
 * These are all system fonts: no external download required.
 */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif) !important;
  font-weight: 700;
  line-height: 1.15;
  color: var(--black);
}

body,
button,
input,
select,
textarea,
.main-navigation a,
.btn-primary,
.btn-outline,
.btn-text {
  font-family: var(--font) !important;
}

a { text-decoration: none; color: var(--blue); transition: color var(--transition); }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  position: absolute; height: 1px; width: 1px; overflow: hidden;
}

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-block;
  padding: 16px 38px;
  background: var(--blue);
  color: var(--white) !important;
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  border: 2px solid var(--blue);
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(44,91,120,0.25);
}

.btn-outline {
  display: inline-block;
  padding: 14px 36px;
  border: 2px solid var(--blue);
  color: var(--blue) !important;
  background: transparent;
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-outline:hover {
  background: var(--blue);
  color: var(--white) !important;
}

.btn-text {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--blue);
}
.btn-text:hover { color: var(--blue-dark); }
.btn-text::after { content: ' →'; }

/* ─── HEADER ─── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.site-branding { display: flex; align-items: center; gap: 14px; }
.site-branding .custom-logo-link img { max-height: 50px; width: auto; }

.site-title {
  font-weight: 800;
  font-size: 22px;
}
.site-title a { color: var(--black); }
.site-title a:hover { color: var(--blue); }

.header-right { display: flex; align-items: center; gap: 24px; }

.header-phone {
  font-size: 14px;
  font-weight: 700;
  color: var(--black) !important;
}
.header-phone:hover { color: var(--blue) !important; }

.header-cta { padding: 11px 26px; font-size: 12px; }

/* ─── NAVIGATION ─── */
.main-navigation ul { display: flex; align-items: center; gap: 2px; }
.main-navigation li { position: relative; }

.main-navigation a {
  display: block;
  padding: 10px 16px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.15px;
  color: var(--blue);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a { color: var(--blue-dark); }

.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  min-width: 260px;
  padding: 8px 0;
  box-shadow: 0 12px 36px rgba(0,0,0,0.1);
  border-radius: 4px;
}

.main-navigation li:hover > .sub-menu { display: block; }

.main-navigation .sub-menu a {
  padding: 10px 24px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0.1px;
  font-weight: 700;
  color: var(--blue);
}
.main-navigation .sub-menu a:hover { color: var(--blue); background: var(--blue-pale); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 8px;
  border-radius: 4px;
}

.menu-toggle span {
  width: 26px;
  height: 2px;
  background: var(--black);
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, #ffffff 0%, #ffffff 50%, #edf6fb 100%);
  padding-top: 80px;
}

.hero > .container {
  width: 100%;
}

.hero-layout {
  display: block;
  position: relative;
  z-index: 3;
  min-height: calc(88vh - 80px);
  padding: clamp(74px, 9vw, 116px) 0 clamp(56px, 7vw, 86px);
}

.hero-photo-panel {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  width: auto;
  height: 100%;
  min-height: 0;
  transform: none;
  margin-left: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: var(--blue-pale);
  z-index: 1;
  isolation: isolate;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  min-height: inherit;
  opacity: 0.74;
  filter: saturate(0.78) contrast(0.92) brightness(1.08);
}

.hero-photo-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 32%, rgba(255,255,255,0.72) 48%, rgba(255,255,255,0.30) 68%, rgba(237,246,251,0.18) 100%),
    linear-gradient(180deg, rgba(255,255,255,0.90) 0%, rgba(255,255,255,0.06) 20%, rgba(255,255,255,0.04) 74%, rgba(255,255,255,0.80) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-photo-panel::after {
  content: '';
  position: absolute;
  inset: -18%;
  background:
    repeating-linear-gradient(45deg, transparent 0 122px, rgba(255,255,255,0.82) 124px 128px, rgba(44,91,120,0.42) 129px 132px, transparent 134px 245px),
    repeating-linear-gradient(-45deg, transparent 0 132px, rgba(255,255,255,0.78) 134px 138px, rgba(44,91,120,0.36) 139px 142px, transparent 144px 262px);
  opacity: 0.48;
  z-index: 3;
  pointer-events: none;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px; height: 100%;
  background: var(--blue);
  z-index: 4;
}

.hero-content {
  position: relative;
  z-index: 5;
  max-width: min(640px, 58vw);
  padding: clamp(16px, 2vw, 28px) 0 clamp(20px, 3vw, 34px) 0;
}

.hero-tagline {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--blue);
  padding: 8px 16px;
  background: var(--blue-pale);
  border-radius: 3px;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(38px, 5.5vw, 66px);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 28px;
  color: var(--black);
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--blue);
}

.hero-description {
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.58;
  color: #2f3437;
  margin-bottom: 40px;
  max-width: 640px;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-badges {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.hero-badges .badge-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gray);
  font-weight: 700;
}

.hero-badges img { height: 56px; width: auto; }

/* ─── SECTION SHARED ─── */
.section { padding: var(--section-pad) 0; }
.section-white { background: var(--white); }
.section-gray { background: var(--gray-bg); }

.section-header { margin-bottom: 60px; }

.section-header h2 {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--blue);
}

.section-header .accent-line { display: none; }

.section-header .accent-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}

.section-header .accent-dots span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--blue);
  opacity: 0.35;
}

.section-header .accent-dots span:nth-child(2) {
  width: 9px;
  height: 9px;
  opacity: 0.65;
}

.section-header .accent-dots span:nth-child(3) {
  width: 11px;
  height: 11px;
  opacity: 1;
}

.section-header .accent-dots span:nth-child(4) {
  width: 9px;
  height: 9px;
  opacity: 0.65;
}

.section-header .accent-dots span:nth-child(5) {
  opacity: 0.35;
}

.section-header p {
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.4vw, 21px);
  line-height: 1.55;
  max-width: 640px;
}

.section-header.center { text-align: center; }
.section-header.center .accent-line { display: none; }
.section-header.center p { margin: 0 auto; }

.insights-header {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.insights-header .btn-text {
  position: absolute;
  right: 0;
  bottom: 18px;
}

.insights-header h2 {
  margin-bottom: 0;
}

/* ─── PRACTICE AREAS ─── */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.practice-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.practice-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(44,91,120,0.1);
}

/* ── Practice card graphic banner: single radiating circle mark ── */
.practice-card-graphic {
  width: 100%;
  height: 62px;
  background:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,0.18), transparent 24%),
    linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 58%, var(--blue-light) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.practice-monogram {
  width: 58px;
  height: 58px;
  overflow: visible;
  transition: transform 0.32s ease;
}

.practice-monogram .pm-core {
  fill: #ffffff;
}

.practice-monogram .pm-pulse {
  fill: none;
  stroke: rgba(255,255,255,0.72);
  stroke-width: 2;
  transform-origin: 60px 36px;
  animation: practicePulse 2.8s ease-out infinite;
}

.practice-monogram .pm-pulse-2 {
  animation-delay: 0.9s;
  stroke: rgba(255,255,255,0.46);
}

.practice-monogram .pm-pulse-3 {
  animation-delay: 1.8s;
  stroke: rgba(255,255,255,0.30);
}

@keyframes practicePulse {
  0% {
    transform: scale(0.72);
    opacity: 0.82;
  }
  72%, 100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

.practice-card:hover .practice-monogram {
  transform: translateY(-2px) scale(1.03);
}

/* Sheen sweep on hover */
.practice-card-graphic::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.6s ease;
}

.practice-card:hover .practice-card-graphic::after {
  left: 160%;
}

.practice-card .card-body-inner {
  padding: 28px 28px 32px;
}

.practice-card h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 16px;
}

.practice-card ul {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transform: translateY(-8px);
  transition: max-height 0.38s ease, opacity 0.22s ease, transform 0.32s ease, margin-bottom 0.32s ease;
}

.practice-card:hover ul,
.practice-card:focus-within ul {
  max-height: 360px;
  opacity: 1;
  margin-bottom: 24px;
  transform: translateY(0);
}

.practice-card ul li {
  color: var(--ink-soft);
  font-size: 14px;
  padding: 4px 0 4px 16px;
  position: relative;
  line-height: 1.5;
}

.practice-card ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 12px;
  width: 6px; height: 2px;
  background: var(--blue);
  border-radius: 1px;
}

/* ─── TEAM — animated attorney cards ─── */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.team-item {
  flex: 0 1 220px;
  max-width: 240px;
  min-height: 198px;
  text-align: center;
  cursor: pointer;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.team-item-static {
  cursor: default;
}

.team-item:hover {
  border-color: var(--blue);
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(44,91,120,0.12);
}

.team-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
}

.team-card-static {
  cursor: default;
}

/* Animated graphic header area on each attorney card */
.team-card-graphic {
  width: 100%;
  height: 100px;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 50%, var(--blue-light) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Concentric animated rings */
.team-card-graphic .tcg-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-card-graphic .tcg-rings span {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
}

.team-card-graphic .tcg-rings span:nth-child(1) {
  width: 60px; height: 60px;
  animation: tcgPulse 2s ease-in-out infinite;
}
.team-card-graphic .tcg-rings span:nth-child(2) {
  width: 90px; height: 90px;
  animation: tcgPulse 2s ease-in-out 0.4s infinite;
}
.team-card-graphic .tcg-rings span:nth-child(3) {
  width: 120px; height: 120px;
  animation: tcgPulse 2s ease-in-out 0.8s infinite;
}
.team-card-graphic .tcg-rings span:nth-child(4) {
  width: 150px; height: 150px;
  animation: tcgPulse 2s ease-in-out 1.2s infinite;
}

@keyframes tcgPulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.06); }
}

/* Centre silhouette icon */
.team-card-graphic .tcg-silhouette {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.team-card-graphic .tcg-silhouette svg {
  width: 24px;
  height: 24px;
  fill: rgba(255,255,255,0.85);
}

.team-item:hover .tcg-silhouette {
  transform: scale(1.12);
  background: rgba(255,255,255,0.25);
}

/* Animated dot in bottom-left of graphic */
.team-card-graphic .tcg-dot {
  position: absolute;
  bottom: 10px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  animation: tcgDotBlink 2.4s ease-in-out infinite;
}

@keyframes tcgDotBlink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Card body text area */
.team-card-body {
  padding: 18px 16px 22px;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.team-item h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--black);
  transition: color 0.25s;
}

.team-item:hover h4 { color: var(--blue); }

.team-item .team-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--blue);
  font-weight: 600;
}

.team-item:nth-last-child(-n+3) {
  flex-basis: 240px;
}

/* Legacy ring/dot selectors kept for JS compatibility */
.team-graphic { display: none; }
.team-graphic .ring { display: none; }
.team-graphic .dot { display: none; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* ─── INSIGHTS ───
   Uniform editorial cards. Images sit in a fixed, contained media
   bay so every card height is even and no photo is cropped.
─── */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  align-items: stretch;
}

.insight-card {
  background: var(--white);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 430px;
}

.insight-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(44,91,120,0.08);
}

.insight-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 210px;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, rgba(44,91,120,0.08), rgba(255,255,255,0.9)),
    var(--blue-pale);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 16px;
}

.insight-thumb-img {
  width: 100%;
  height: 100% !important;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform 0.5s ease;
}

.insight-card:hover .insight-thumb-img {
  transform: scale(1.03);
}

.insight-media-placeholder {
  font-family: var(--font-serif);
  color: var(--blue);
  font-size: 24px;
  letter-spacing: 0.04em;
}

/* ── Card body ── */
.insight-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 28px 28px;
}

/* Legacy selector kept for any other templates that use .card-body directly */
.insight-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 28px 28px;
}

.card-meta {
  font-size: 11px;
  color: var(--gray);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

.card-meta span { color: var(--blue); }

.insight-card h4 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
  min-height: 46px;
}

.insight-card h4 a { color: var(--black); }
.insight-card h4 a:hover { color: var(--blue); }

.insight-excerpt {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 16px;
  flex: 1;
}

.insight-card .btn-text {
  margin-top: auto;
}

/* ─── CLIENT TESTIMONIALS ─── */
.testimonials-section {
  position: relative;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 30px 30px 28px;
  box-shadow: 0 14px 40px rgba(30,74,100,0.06);
  min-height: 250px;
  display: flex;
  flex-direction: column;
}

.testimonial-stars {
  color: #d7a13b;
  letter-spacing: 4px;
  font-size: 15px;
  margin-bottom: 18px;
}

.testimonial-card blockquote {
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.42;
  color: var(--black);
  flex: 1;
}

.testimonial-card figcaption {
  margin-top: 22px;
  font-family: var(--font);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--blue);
  font-weight: 800;
}

/* ─── CTA / BOTTOM BANNER ─── */
.cta-section {
  padding: 90px 0;
  background: var(--blue);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Large decorative circles — background graphics */
.cta-section::before {
  content: '';
  position: absolute;
  top: -40%; right: -8%;
  width: 560px; height: 560px;
  border: 2px solid rgba(255,255,255,0.07);
  border-radius: 50%;
  pointer-events: none;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -6%;
  width: 420px; height: 420px;
  border: 2px solid rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}

/* Animated floating SVG graphics behind content */
.cta-graphics {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.cta-graphics .cg-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  animation: cgFloat 8s ease-in-out infinite;
}

.cta-graphics .cg-dot:nth-child(1) { width: 14px; height: 14px; top: 15%; left: 8%;  animation-delay: 0s; }
.cta-graphics .cg-dot:nth-child(2) { width: 8px;  height: 8px;  top: 70%; left: 18%; animation-delay: 1.5s; }
.cta-graphics .cg-dot:nth-child(3) { width: 20px; height: 20px; top: 30%; right: 14%; animation-delay: 0.8s; }
.cta-graphics .cg-dot:nth-child(4) { width: 10px; height: 10px; top: 75%; right: 22%; animation-delay: 2.2s; }
.cta-graphics .cg-dot:nth-child(5) { width: 6px;  height: 6px;  top: 50%; left: 45%; animation-delay: 3s; }

.cta-graphics .cg-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  animation: cgExpand 6s ease-out infinite;
}

.cta-graphics .cg-ring:nth-child(6)  { width: 120px; height: 120px; top: 10%; left: 5%;  animation-delay: 0s; }
.cta-graphics .cg-ring:nth-child(7)  { width: 80px;  height: 80px;  bottom: 10%; right: 8%; animation-delay: 2s; }
.cta-graphics .cg-ring:nth-child(8)  { width: 60px;  height: 60px;  top: 55%; left: 55%; animation-delay: 4s; }

.cta-graphics .cg-line {
  position: absolute;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  animation: cgSlide 10s linear infinite;
}

.cta-graphics .cg-line:nth-child(9)  { width: 120px; height: 1px; top: 22%; left: -20%; animation-delay: 0s; }
.cta-graphics .cg-line:nth-child(10) { width: 80px;  height: 1px; bottom: 28%; right: -10%; animation-delay: 3s; }

@keyframes cgFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes cgExpand {
  0%   { transform: scale(0.85); opacity: 0.4; }
  50%  { transform: scale(1.1); opacity: 0.15; }
  100% { transform: scale(0.85); opacity: 0.4; }
}

@keyframes cgSlide {
  0%   { transform: translateX(0); opacity: 0.5; }
  50%  { transform: translateX(60px); opacity: 0.2; }
  100% { transform: translateX(0); opacity: 0.5; }
}

.cta-content {
  position: relative;
  z-index: 2;
}

/* CTA heading — display serif for distinction, animated pen-stroke underline */
.cta-heading {
  position: relative;
  display: inline-block;
  font-size: clamp(34px, 4.5vw, 60px);
  font-weight: 700;                   /* Palatino looks stronger at 700 than 800 */
  margin-bottom: 20px;
  color: var(--white);
  /* Palatino serif italics are distinctly classical — matches 500law.com heading tone */
  font-family: var(--font-serif);
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

/* The text itself — non-italic inner span keeps optical balance */
.cta-heading .cta-heading-text {
  display: inline;
  font-style: italic;
}

/* Pen-stroke underline: drawn via CSS clip-path on scroll enter */
.cta-heading .cta-heading-line {
  display: block;
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.7);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* JS adds .cta-line-in when heading enters viewport */
.cta-heading.cta-line-in .cta-heading-line {
  transform: scaleX(1);
}

/* Hover: heading letters breathe apart slightly */
.cta-section:hover .cta-heading {
  letter-spacing: 0em;
  transition: letter-spacing 0.5s ease;
}

/* Fallback for legacy selector */
.cta-section h2 {
  font-size: clamp(34px, 4.5vw, 60px);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--white);
  font-style: italic;
  font-family: var(--font-serif);
}

.cta-section p {
  font-size: 19px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 36px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn-primary {
  background: var(--white);
  color: var(--blue) !important;
  border-color: var(--white);
}

.cta-section .btn-primary:hover {
  background: transparent;
  border-color: var(--white);
  color: var(--white) !important;
}

/* ─── FOOTER INTERACTIVE SVG LOGO — SUBTLE BLACK FOUNTAIN PEN ─── */

/* Wrapper link */
.footer-svg-logo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  text-decoration: none;
  outline-offset: 4px;
}

/* SVG mark container */
.footer-svg-logo .flm-mark {
  flex-shrink: 0;
  overflow: visible;
  transition: transform 0.35s ease;
}

.footer-svg-logo .flm-badge {
  fill: rgba(255,255,255,0.12);
  stroke: rgba(255,255,255,0.75);
  stroke-width: 1.4;
}

.footer-svg-logo .flm-pen-motion {
  animation: penWiggle 0.58s ease-in-out infinite;
  transform-box: view-box;
  transform-origin: 22px 31px;
  will-change: transform;
}

@keyframes penWiggle {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  20%      { transform: translate(1.4px, -0.8px) rotate(5deg); }
  40%      { transform: translate(-1px, 0.9px) rotate(-5.5deg); }
  60%      { transform: translate(1.1px, 0.5px) rotate(4.5deg); }
  80%      { transform: translate(-1.3px, -0.7px) rotate(-4.5deg); }
}

.footer-svg-logo .flm-cap,
.footer-svg-logo .flm-barrel,
.footer-svg-logo .flm-band,
.footer-svg-logo .flm-nib {
  fill: #050505;
}

.footer-svg-logo .flm-clip,
.footer-svg-logo .flm-slit {
  stroke: #ffffff;
  stroke-width: 1.3;
  stroke-linecap: round;
  fill: none;
}

.footer-svg-logo .flm-logo-text {
  font-family: "Times New Roman", Times, serif;
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -1.15px;
  dominant-baseline: alphabetic;
}

.footer-svg-logo .flm-logo-fill {
  fill: #ffffff;
  opacity: 1;
}

.footer-svg-logo:hover .flm-mark {
  transform: translateY(-2px);
}

.footer-svg-logo:hover .flm-pen-motion {
  animation-duration: 0.42s;
}

.footer-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(220px, 1fr);
  gap: 40px;
  align-items: start;
}

.footer-follow-heading {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 2.8px;
  color: #ffffff;
  font-weight: 800;
  margin-bottom: 20px;
}

/* ── prefers-reduced-motion: all pen animations and transitions off ── */
@media (prefers-reduced-motion: reduce) {
  .footer-svg-logo .flm-pen-motion,
  .footer-svg-logo .flm-logo-fill {
    animation: none;
    transition: none;
  }
  .footer-svg-logo .flm-logo-fill {
    opacity: 1;
  }
  /* CTA heading line — skip animation, show immediately */
  .cta-heading .cta-heading-line {
    transition: none;
    transform: scaleX(1);
  }
}

/* ─── FOOTER ─── */
.site-footer {
  background: #2c5b78;
  color: rgba(255,255,255,0.9);
}

.footer-main { padding: 40px 0 24px; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 48px;
}

.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 24px;
  color: var(--white);
  font-weight: 700;
}

.footer-col p,
.footer-col address {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  line-height: 1.8;
  font-style: normal;
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-col ul li a:hover { color: var(--white); }

/* Social links */
.social-links {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.social-links a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.8);
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}

.social-links a svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.footer-bottom {
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: rgba(255,255,255,0.6); }
.footer-legal a:hover { color: var(--white); }

/* ─── WORDPRESS DEFAULTS ─── */
.wp-block-image img { height: auto; }
.alignleft { float: left; margin-right: 20px; margin-bottom: 10px; }
.alignright { float: right; margin-left: 20px; margin-bottom: 10px; }
.aligncenter { display: block; margin: 0 auto; }
.entry-content p { margin-bottom: 1.5em; color: var(--ink); line-height: 1.8; }
.entry-content h2 { margin: 1.5em 0 0.75em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.5em 2em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { color: var(--ink); margin-bottom: 0.5em; }
.entry-content a { color: var(--blue); text-decoration: underline; }

.page-header-banner {
  padding: 160px 0 60px;
  background: var(--gray-bg);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.page-header-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 5px; height: 100%;
  background: var(--blue);
}

.page-header-banner h1 {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
}

.page-header-banner .breadcrumb {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue);
  margin-bottom: 12px;
  font-weight: 700;
}

.page-header-banner .breadcrumb a { color: var(--blue); }
.page-body { padding: 60px 0 80px; background: var(--white); }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .header-inner { padding: 12px 20px; }
  .header-phone { display: none; }
  .menu-toggle { display: flex; }
  .main-navigation {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    padding: 20px;
    border-top: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  }
  .main-navigation.open { display: block; }
  .main-navigation ul { flex-direction: column; gap: 0; align-items: flex-start; }
  .main-navigation .sub-menu {
    position: static; display: none;
    min-width: 100%; background: transparent;
    border: none; padding-left: 20px; box-shadow: none;
  }
  .main-navigation li.open > .sub-menu { display: block; }

  .hero-layout {
    min-height: auto;
    display: block;
  }
  .hero-photo-panel {
    position: absolute;
    inset: 0 calc(50% - 50vw);
    width: auto;
    height: 100%;
    transform: none;
    margin-left: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .hero-content {
    position: relative;
    z-index: 5;
    max-width: min(610px, 58vw);
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-columns { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero { min-height: 80vh; }
  .hero-layout {
    display: block;
    padding-top: 48px;
  }
  .hero-photo-panel {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: 340px;
    transform: none;
    margin-top: 28px;
    border-radius: 0;
    box-shadow: none;
  }
  .hero-photo-panel::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(10,10,10,0.18));
  }
  .hero-content {
    max-width: 100%;
    margin-left: 0;
    padding: 0;
  }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .hero-buttons .btn-primary, .hero-buttons .btn-outline { text-align: center; }

  .section { padding: 60px 0; }
  .practice-grid { grid-template-columns: 1fr; }
  .team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
  }
  .team-item {
    width: 100%;
    max-width: 430px;
    min-height: 232px;
    margin: 0 auto;
    display: flex;
  }
  .team-card-link,
  .team-card-static {
    width: 100%;
    min-height: 232px;
    display: flex;
    flex-direction: column;
  }
  .team-card-graphic {
    height: 104px;
    flex: 0 0 104px;
  }
  .team-card-body {
    min-height: 128px;
    padding: 18px 16px 20px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .team-item h4 {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .team-item .team-title {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .insights-grid { grid-template-columns: 1fr; }
  .insights-header {
    flex-direction: column;
    gap: 16px;
  }
  .insights-header .btn-text {
    position: static;
  }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 540px) {
  .team-item {
    max-width: 100%;
    min-height: 232px;
  }
}
