/* Bryant & Whitford - Static Site
   Matched to original: white header, blue #2991D6 accent, #444 headings
   With hero slider, scroll animations, testimonial carousel */

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

:root {
  --primary: #2991D6;
  --primary-hover: rgba(41, 145, 214, 0.8);
  --heading: #444444;
  --text: #626262;
  --text-light: #767676;
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --bg-html: #FCFCFC;
  --border: #e3e3e3;
  --footer-bg: #545454;
  --action-bar: #2C2C2C;
  --font: 'Roboto', sans-serif;
}

html { scroll-behavior: smooth; background: var(--bg-html); }

/* ── Skip to Content (Accessibility) ── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 1000;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  transition: top .2s;
}
.skip-to-content:focus {
  top: 0;
  color: #fff;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4, h5, h6 { color: var(--heading); line-height: 1.3; font-weight: 700; }
h1 { font-size: 2rem; margin-bottom: .75rem; }
h2 { font-size: 1.75rem; margin-bottom: .75rem; }
h3 { font-size: 1.4rem; margin-bottom: .5rem; }
h4 { font-size: 1.15rem; margin-bottom: .5rem; }
h5 { font-size: 1rem; margin-bottom: .5rem; }

p { margin-bottom: 1rem; }
ul, ol { margin: 0 0 1rem 1.5rem; }
li { margin-bottom: .35rem; }

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

/* ── Header (white, sticky) ── */
.site-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
  border-bottom: 1px solid var(--border);
  border-top: 3px solid var(--primary);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
  height: 72px;
}

.logo img { height: 44px; width: auto; }

/* Nav */
.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a {
  color: #444444;
  font-size: .95rem;
  font-weight: 500;
  padding: 24px 16px;
  transition: color .2s;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a::after { content: ' \25BE'; font-size: .7em; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-radius: 0 0 4px 4px;
  border: 1px solid var(--border);
  z-index: 200;
}
.dropdown-menu a { display: block; padding: 12px 20px; color: #444; }
.dropdown-menu a:hover { background: var(--bg-alt); color: var(--primary); }
.nav-dropdown:hover .dropdown-menu { display: block; }

/* Mobile hamburger */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #444; margin: 5px 0; transition: .3s; }

/* ── Hero Slider ── */
.hero-slider {
  position: relative;
  height: 520px;
  overflow: hidden;
}

.slides { position: relative; height: 100%; }

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease, transform 8s ease-out;
  transform: scale(1.08);
}

.slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,1,25,.65), rgba(0,1,25,.45));
}

.slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  z-index: 2;
}

.slide-heading {
  color: #fff;
  font-size: 2.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: .75rem;
  max-width: 800px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.slide-sub {
  color: rgba(255,255,255,.9);
  font-size: 1.15rem;
  font-weight: 300;
  max-width: 600px;
  margin-bottom: 1.5rem;
}

/* Slide animations */
.slide .animate-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.slide.active .animate-up {
  opacity: 1;
  transform: translateY(0);
}
.slide.active .delay-1 { transition-delay: .3s; }
.slide.active .delay-2 { transition-delay: .6s; }

/* Arrow controls */
.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 2px solid rgba(255,255,255,.4);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background .3s, border-color .3s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}
.hero-slider:hover .slide-arrow { opacity: 1; }
.slide-arrow:hover { background: rgba(255,255,255,.3); border-color: #fff; }
.slide-prev { left: 24px; }
.slide-next { right: 24px; }

/* Dots */
.slide-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}
.slide-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  background: transparent;
  cursor: pointer;
  transition: background .3s, border-color .3s;
}
.slide-dots .dot.active {
  background: #fff;
  border-color: #fff;
}
.slide-dots .dot:hover { border-color: #fff; }

/* ── Page Header / Subheader ── */
.page-header {
  background: linear-gradient(rgba(0,1,25,.75), rgba(0,1,25,.75)), url('../images/subheader.jpg') center/cover;
  padding: 70px 0;
  text-align: center;
  color: #fff;
}
.page-header h1 { color: #fff; font-size: 2.2rem; margin-bottom: .25rem; }
.page-header p { color: rgba(255,255,255,.7); font-size: 1.05rem; margin: 0; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  border-radius: 4px;
  transition: background .2s, transform .1s;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--primary-hover); color: #fff; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,.7);
  color: #fff;
}
.btn-outline:hover { background: #fff; color: var(--heading); border-color: #fff; }

/* ── Sections ── */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { margin-bottom: .5rem; }
.section-header p { color: var(--text-light); max-width: 600px; margin: 0 auto; }

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.features-grid .reveal:nth-child(2) { transition-delay: .15s; }
.features-grid .reveal:nth-child(3) { transition-delay: .3s; }
.icon-boxes .reveal:nth-child(2) { transition-delay: .15s; }
.icon-boxes .reveal:nth-child(3) { transition-delay: .3s; }

/* ── Divider ── */
.divider {
  width: 60px;
  height: 3px;
  background: var(--primary);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

/* ── Welcome (Home) ── */
.welcome { text-align: center; }
.welcome h5 { text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; color: var(--primary); margin-bottom: .25rem; }
.welcome h2 { margin-bottom: .5rem; }
.welcome p { max-width: 800px; margin: 0 auto 1rem; }

/* ── Feature boxes ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.feature-box {
  text-align: center;
  padding: 32px 24px;
  border-radius: 6px;
  transition: box-shadow .3s, transform .3s;
}
.feature-box:hover { box-shadow: 0 8px 30px rgba(0,0,0,.08); transform: translateY(-4px); }
.feature-box img { width: 48px; height: 48px; margin: 0 auto 16px; }
.feature-box h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.feature-box p { font-size: .95rem; color: var(--text); }

/* ── Testimonial Slider ── */
.testimonial-slider {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  min-height: 200px;
}

.testimonial-track { position: relative; }

.testimonial {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity .5s ease, transform .5s ease;
  padding: 32px;
  background: #fff;
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  pointer-events: none;
}

.testimonial.active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.testimonial p {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1rem;
}

.testimonial footer {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: .9rem;
}

.testimonial footer strong {
  color: var(--heading);
  font-weight: 600;
}

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.testimonial-dots .tdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: background .3s, border-color .3s;
}

.testimonial-dots .tdot.active {
  background: var(--primary);
  border-color: var(--primary);
}

/* ── Icon boxes (3 col) ── */
.icon-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.icon-box { padding: 24px 0; }
.icon-box h4 { margin-bottom: .5rem; }
.icon-box p { font-size: .95rem; }
.icon-box .icon-symbol {
  width: 48px; height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 16px;
  transition: transform .3s;
}
.icon-box:hover .icon-symbol { transform: scale(1.1); }

/* ── Image Cards ── */
.card-link { text-decoration: none; color: inherit; display: block; }
.image-card {
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: box-shadow .3s, transform .3s;
}
.image-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.12); transform: translateY(-4px); }
.image-card img { width: 100%; height: 220px; object-fit: cover; transition: transform .4s; }
.image-card:hover img { transform: scale(1.05); }
.image-card-body { padding: 20px 24px; }
.image-card-body h3 { font-size: 1.1rem; margin-bottom: .5rem; color: var(--heading); }
.read-more { color: var(--primary); font-size: .9rem; font-weight: 500; }

/* ── Content page layout ── */
.content-section { padding: 48px 0; }
.content-with-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 48px;
}
.content-with-image.reverse { direction: rtl; }
.content-with-image.reverse > * { direction: ltr; }
.content-text h2, .content-text h3 { margin-bottom: .75rem; }
.content-image img { border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.1); }

/* ── Checklist ── */
.checklist { list-style: none; margin-left: 0; }
.checklist li { padding-left: 1.5rem; position: relative; margin-bottom: .75rem; }
.checklist li::before { content: '\2713'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* ── Stage cards (estate planning) ── */
.stage-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.stage-card:last-child { border-bottom: none; }
.stage-card.reverse { direction: rtl; }
.stage-card.reverse > * { direction: ltr; }
.stage-card img { border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.1); width: 100%; }

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #2C2C2C 40%, #1a2a3a 70%, #2C2C2C 100%);
  background-attachment: fixed;
  color: #fff;
  text-align: center;
  padding: 56px 24px;
  position: relative;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(41,145,214,.12) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner h2 { color: #fff; margin-bottom: .5rem; font-size: 2rem; }
.cta-banner p { color: rgba(255,255,255,.7); margin-bottom: 1.5rem; font-size: 1.1rem; }

/* ── Contact page ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
.contact-info h3 { margin-bottom: 1rem; }
.contact-info p { margin-bottom: .75rem; }
.contact-info a { color: var(--primary); }

.contact-form label {
  display: block;
  font-weight: 500;
  margin-bottom: .25rem;
  color: var(--heading);
  font-size: .9rem;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font);
  font-size: .95rem;
  margin-bottom: 16px;
  transition: border-color .2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.contact-form textarea { min-height: 140px; resize: vertical; }

/* ── Documents list ── */
.documents-list { list-style: none; margin: 0; }
.documents-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.documents-list li:last-child { border-bottom: none; }
.documents-list a { font-weight: 500; }
.documents-list .file-type {
  font-size: .8rem;
  color: var(--text-light);
  margin-left: 8px;
  text-transform: uppercase;
}

/* ── Footer ── */
.site-footer {
  background: var(--footer-bg);
  padding: 40px 0 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}
.footer-col h4 { font-size: .95rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; color: #fff; }
.footer-col p { font-size: .9rem; color: #ccc; }
.footer-col a {
  color: #ccc;
  font-size: .9rem;
  display: inline-block;
  margin-bottom: .5rem;
  transition: color .3s;
  position: relative;
}
.footer-col a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width .3s ease;
}
.footer-col a:hover { color: #fff; }
.footer-col a:hover::after { width: 100%; }

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .85rem;
  color: #a8a8a8;
}

/* ── Mobile ── */
@media (max-width: 900px) {
  .content-with-image,
  .stage-card,
  .contact-grid,
  .footer-grid { grid-template-columns: 1fr; }

  .content-with-image.reverse,
  .stage-card.reverse { direction: ltr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    border-top: 1px solid var(--border);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 24px; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: var(--bg-alt);
  }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }

  .hero-slider { height: 380px; }
  .slide-heading { font-size: 1.8rem; letter-spacing: 1px; }
  .slide-sub { font-size: 1rem; }
  .slide-arrow { width: 40px; height: 40px; font-size: 1rem; }
  .slide-prev { left: 12px; }
  .slide-next { right: 12px; }

  .page-header { padding: 48px 0; }
  .page-header h1 { font-size: 1.8rem; }
  .section { padding: 40px 0; }
  .header-inner { padding: 0 16px; }
  .container { padding: 0 16px; }
}

/* ── Back to Top Button ── */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s, visibility .3s, transform .3s, background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--heading);
}

/* ── Nav Link Hover Underline (slides from center) ── */
.main-nav > a {
  position: relative;
}
.main-nav > a::after {
  content: '';
  position: absolute;
  bottom: 16px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .3s ease, left .3s ease;
}
.main-nav > a:hover::after,
.main-nav > a.active::after {
  width: 60%;
  left: 20%;
}

/* ── Feature Box Icon Enhancement ── */
.feature-box img {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  padding: 12px;
  background: rgba(41, 145, 214, .08);
  border-radius: 50%;
  transition: background .3s, transform .3s;
}
.feature-box:hover img {
  background: rgba(41, 145, 214, .15);
  transform: scale(1.1);
}

/* ── Testimonial Slide + Scale Transition ── */
.testimonial {
  transform: translateX(40px) scale(.97);
  transition: opacity .5s ease, transform .5s ease;
}
.testimonial.active {
  transform: translateX(0) scale(1);
}

/* ── Hero Slider Loading ── */
.hero-slider {
  background: var(--heading);
}
.hero-slider::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  background: var(--heading);
  opacity: 1;
  transition: opacity .6s ease;
  pointer-events: none;
}
.hero-slider.loaded::after {
  opacity: 0;
}
@keyframes hero-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
.hero-slider:not(.loaded)::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  z-index: 6;
  animation: hero-spin .8s linear infinite;
}

/* ── Utility Classes ── */
.narrow-content { max-width: 900px; }
.text-center { text-align: center; }
.text-muted { color: #666; }
.text-sm { font-size: .9rem; }
.text-xs { font-size: .8rem; }
.heading-accent { color: var(--primary); }
.heading-dark { color: #113751; }

/* ── RRIF Highlight Section ── */
.rrif-highlight { background: #4CAF50; color: #fff; }
.rrif-highlight h3 { color: #fff; }
.rrif-highlight p { color: #fff; }

/* ── Content Image (full width) ── */
.content-image-full { width: 100%; border-radius: 6px; margin: 24px 0; }

/* ── Partner Logo ── */
.partner-logo { max-width: 300px; margin: 16px auto; }

/* ── Embed Frame ── */
.embed-frame { width: 100%; height: 600px; border: none; }
.embed-download { margin-top: 1rem; }

/* ── Contact Posts Heading ── */
.contact-posts-heading { margin-top: 2rem; }

/* ── Form Note ── */
.form-note { font-size: .85rem; color: #888; margin-top: 12px; }

/* ── Two Column Grid ── */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}
@media (max-width: 768px) {
  .two-col-grid { grid-template-columns: 1fr; }
}

/* ── Print Styles ── */
@media print {
  .site-header,
  .site-footer,
  .hero-slider,
  .slide-arrow,
  .slide-dots,
  .testimonial-dots,
  .back-to-top,
  .cta-banner,
  .nav-toggle { display: none !important; }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
    line-height: 1.5;
  }
  .container { max-width: 100%; padding: 0; }
  .section { padding: 24px 0; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; text-decoration: underline; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: .8em; color: #666; }
  .features-grid,
  .icon-boxes { display: block; }
  .feature-box,
  .icon-box { page-break-inside: avoid; margin-bottom: 16px; }
  .image-card { box-shadow: none; border: 1px solid #ccc; }
  .image-card img { max-height: 150px; }
}
