/* =========================================================
   TituLaw — Custom CSS
   (Tailwind v4 CDN handles utilities; this file handles
    components, animations, and anything Tailwind can't do)
   ========================================================= */

/* ─── Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Open Sans", ui-sans-serif, system-ui, sans-serif;
  color: #333333;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Raleway", ui-sans-serif, system-ui, sans-serif;
}

/* ─── Header Scroll State ───────────────────────────────── */
#main-header {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
#main-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ─── Logo ──────────────────────────────────────────────── */
.logo-text {
  font-family: "Raleway", sans-serif;
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 1.25rem;
}

/* ─── Desktop Dropdown Nav ──────────────────────────────── */
.nav-dropdown { position: relative; }

.nav-dropdown > button {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #e2e2e2;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Open Sans", sans-serif;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-dropdown > button:hover { color: #fff; }

.nav-dropdown > button .chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.nav-dropdown:hover > button .chevron,
.nav-dropdown:focus-within > button .chevron {
  transform: rotate(180deg);
}

.nav-dropdown { position: relative; display: flex; align-items: center; height: 100%; }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 220px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  z-index: 200;
  overflow: hidden;
  padding: 6px 0;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#desktop-nav .dropdown-menu a {
  display: block;
  padding: 10px 18px;
  color: #444;
  font-size: 0.8125rem;
  font-family: "Open Sans", sans-serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
#desktop-nav .dropdown-menu a:hover {
  background: rgba(154,27,30,0.08);
  color: #9a1b1e;
}

/* ─── Desktop Nav Links ─────────────────────────────────── */
#desktop-nav a {
  color: #e2e2e2;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
#desktop-nav a:hover { color: #fff; }
#desktop-nav a.active-nav {
  color: #fff;
  border-bottom: 2px solid #9a1b1e;
}

/* ─── Active Nav ─────────────────────────────────────────── */
.active-nav {
  color: #fff !important;
  border-bottom: 2px solid #9a1b1e;
}

/* ─── CTA Button ─────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #9a1b1e;
  color: #fff;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 22px;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn-primary:hover {
  background: #7a1418;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 22px;
  border: 2px solid rgba(255,255,255,0.6);
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
}

/* ─── Mobile Nav ─────────────────────────────────────────── */
#mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 300;
}

#mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(320px, 85vw);
  background: #23282d;
  z-index: 400;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
#mobile-nav.open { transform: translateX(0); }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #34394d;
  border-bottom: 3px solid #9a1b1e;
  flex-shrink: 0;
}

.mobile-nav-body { padding: 8px 0; flex: 1; }

.mobile-nav-item > a,
.mobile-nav-item > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  color: #c8cad4;
  font-size: 0.9rem;
  font-family: "Open Sans", sans-serif;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav-item > a:hover,
.mobile-nav-item > button:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.mobile-sub {
  display: none;
  background: rgba(0,0,0,0.2);
  border-left: 3px solid #9a1b1e;
  margin: 0 0 0 20px;
}
.mobile-sub.open { display: block; }

.mobile-sub a {
  display: block;
  padding: 9px 16px;
  color: #a0a4b4;
  font-size: 0.8125rem;
  font-family: "Open Sans", sans-serif;
  text-decoration: none;
  transition: color 0.15s;
}
.mobile-sub a:hover { color: #fff; }

.mobile-nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 8px 20px;
}

.mobile-nav-footer {
  padding: 16px 20px;
  background: #34394d;
  flex-shrink: 0;
}

/* Hamburger icon */
.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  transition: transform 0.25s, opacity 0.25s;
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Fallback background while the YouTube iframe loads */
  background-color: #23282d;
  background-image: linear-gradient(135deg, #34394d 0%, #23282d 100%);
  background-size: cover;
  background-position: center;
  padding-top: 80px; /* navbar height */
}

/* ─── Hero background video (YouTube) ────────────────────── */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Cover the hero with a 16:9 iframe — whichever dimension is larger wins */
  width: 100vw;
  height: 56.25vw;       /* 16:9 of viewport width */
  min-height: 100%;
  min-width: 177.78vh;   /* 16:9 of viewport height (when very tall) */
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(35, 40, 45, 0.85) 0%,
    rgba(35, 40, 45, 0.62) 55%,
    rgba(52, 57, 77, 0.42) 100%
  );
  pointer-events: none;
}

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

/* ─── Affiliations / Trust Logos ───────────────────────────── */
.affiliations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  max-width: 100%;
  align-items: center;
  justify-items: center;
}

.affiliation-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  padding: 12px;
}

.affiliation-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.affiliation-logo:hover img {
  filter: brightness(1.1);
  transform: scale(1.08);
}

/* ─── Hero Icon Buttons (Service shortcuts) ──────────────── */
.hero-icon-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
  max-w-sm;
}

.hero-icon-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: "Raleway", sans-serif;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.hero-icon-btn:hover {
  background: rgba(154, 27, 30, 0.8);
  border-color: #9a1b1e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(154, 27, 30, 0.4);
}

.hero-icon-btn svg {
  flex-shrink: 0;
  stroke: currentColor;
}

.hero-inner-page {
  min-height: 200px;
  padding-top: 80px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #23282d 0%, #34394d 100%);
  border-bottom: 4px solid #9a1b1e;
}

/* Content wrapper must be full-width so max-w + mx-auto align with the navbar */
.hero-inner-page > div:last-child {
  width: 100%;
}

/* ─── Section Headings ───────────────────────────────────── */
.section-eyebrow {
  font-family: "Raleway", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9a1b1e;
}

.section-title {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: #9a1b1e;
  margin: 12px 0 20px;
}

.section-divider-center {
  width: 48px;
  height: 3px;
  background: #9a1b1e;
  margin: 12px auto 20px;
}

/* ─── Service Cards ──────────────────────────────────────── */
.service-card {
  position: relative;
  overflow: hidden;
  height: 260px;
  text-decoration: none;
  display: block;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.service-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.4s ease;
  z-index: 0;
}
.service-card:hover .service-card-bg { transform: scale(1.05); }

.service-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(23,28,33,0.92) 35%, rgba(23,28,33,0.35) 100%);
  transition: background 0.3s;
  z-index: 1;
}
.service-card:hover .service-card-overlay {
  background: linear-gradient(to top, rgba(154,27,30,0.88) 20%, rgba(23,28,33,0.45) 100%);
}

.service-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.service-card-title {
  font-family: "Raleway", sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.service-card-arrow {
  color: rgba(255,255,255,0.6);
  font-size: 0.8125rem;
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.service-card:hover .service-card-arrow {
  color: #fff;
  transform: translateX(4px);
}

/* Card background gradients (color stand-ins for photos) */
.card-bg-red     { background: linear-gradient(135deg, #6b1215 0%, #9a1b1e 100%); }
.card-bg-navy    { background: linear-gradient(135deg, #23282d 0%, #34394d 100%); }
.card-bg-dark    { background: linear-gradient(135deg, #1a1d24 0%, #2d3245 100%); }
.card-bg-slate   { background: linear-gradient(135deg, #2e3548 0%, #434e66 100%); }
.card-bg-charcoal{ background: linear-gradient(135deg, #2a2a2a 0%, #454545 100%); }
.card-bg-warm    { background: linear-gradient(135deg, #3d2020 0%, #6b2a2a 100%); }
.card-bg-steel   { background: linear-gradient(135deg, #2c3e50 0%, #4a6072 100%); }

/* ─── Value Cards ────────────────────────────────────────── */
.value-card {
  padding: 32px 28px;
  background: #fff;
  border-top: 3px solid #9a1b1e;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}
.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
}

.value-icon {
  width: 48px;
  height: 48px;
  background: rgba(154,27,30,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.value-icon svg { color: #9a1b1e; }

/* ─── Scroll Reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ─── Contact Form ───────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d7d6d6;
  background: #fff;
  font-family: "Open Sans", sans-serif;
  font-size: 0.875rem;
  color: #333;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: #9a1b1e;
  box-shadow: 0 0 0 3px rgba(154,27,30,0.08);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ─── Location Tabs ──────────────────────────────────────── */
.location-tab {
  padding: 10px 20px;
  font-family: "Raleway", sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #747474;
  background: #f0f0f0;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.location-tab.active {
  background: #9a1b1e;
  color: #fff;
}
.location-tab:hover:not(.active) {
  background: #d7d6d6;
  color: #333;
}

.location-panel { display: none; }
.location-panel.active { display: block; }

/* ─── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
}
.breadcrumb a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,0.4); }

/* ─── Trust Badges ───────────────────────────────────────── */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
  padding: 24px 16px;
  background: #f0f0f0;
  border-top: 1px solid #d7d6d6;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #747474;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer-col-title {
  font-family: "Raleway", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9a1b1e;
  margin-bottom: 14px;
}

footer a {
  color: #a0a4b4;
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.2s;
}
footer a:hover { color: #fff; }

.footer-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 28px 0;
}

/* ─── Social Icons ───────────────────────────────────────── */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  color: #a0a4b4;
  transition: background 0.2s, color 0.2s;
}
.social-icon:hover {
  background: #9a1b1e;
  color: #fff;
}

/* ─── Policy Pages ───────────────────────────────────────── */
.prose-titu h2 {
  font-family: "Raleway", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #23282d;
  margin: 32px 0 10px;
  padding-top: 8px;
  border-top: 1px solid #e8e8e8;
}
.prose-titu h2:first-child { border-top: none; margin-top: 0; }
.prose-titu p { margin-bottom: 14px; line-height: 1.75; color: #444; font-size: 0.9375rem; }
.prose-titu ul { margin-bottom: 14px; padding-left: 20px; }
.prose-titu ul li { margin-bottom: 6px; color: #444; font-size: 0.9375rem; }
.prose-titu a { color: #9a1b1e; }

/* ─── 404 Page ───────────────────────────────────────────── */
.error-code {
  font-family: "Raleway", sans-serif;
  font-size: 8rem;
  font-weight: 800;
  color: rgba(154,27,30,0.12);
  line-height: 1;
  user-select: none;
}

/* ─── Utility ────────────────────────────────────────────── */
.text-balance { text-wrap: balance; }

@media (max-width: 1024px) {
  #desktop-nav { display: none; }
}
