/* Minimal navbar tweaks (Bootstrap handles most styling) */
.navbar-brand { font-weight: 700; }
.navbar-nav .nav-link { font-weight: 600; }

/* Page content spacing */
.page { margin: 24px auto; padding: 0 16px; }

/* Global typography */
:root {
  --font-body: 'Lato', sans-serif;
  --font-headline: 'Cormorant Garamond', serif;
}

body, input, textarea, select, button {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: #222;
}

/* Make all paragraph text justified across the site for consistent layout */
p { text-align: justify; text-justify: inter-word; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 500;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  color: inherit;
}

/* Utility headline sizes (optional, you can customize) */
h1 { font-size: 5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

.navbar {
    height: 160px;
}

.text-accent {
    color: #1B3A4B;
}

.fs-alt {
    font-size: 24px !important;
}

.modal-header {
    border-bottom: none;
}

.modal-footer {
    border-top: none;
}

button.btn {
    background-color: #1B3A4B;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 0px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    font-family: var(--font-headline);
    font-variant: small-caps;
    font-variant-caps: small-caps;
    -webkit-font-feature-settings: "smcp" 1, "c2sc" 1;
    font-feature-settings: "smcp" 1, "c2sc" 1;
    text-transform: none;
}

button.btn:hover {
    transform: scale(1.05);
    background-color: #1B3A4B;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    font-family: var(--font-headline);

}

/* Center logo styling and transition when navbar is toggled 'scrolled' */
.brand-logo { color: #015cab; transition: color 300ms ease; }
.brand-logo {
  /* make the logo container match the navbar height so the svg can size to it */
  height: 100%;
  display: flex;
  align-items: center;
}
.brand-logo svg { transition: transform 300ms ease; max-height: calc(100% - 20px); width: auto; }
.navbar.scrolled {
    background-color: #fff !important;
    transition: background-color 300ms ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.navbar.scrolled .brand-logo { color: #015cab; }
.navbar.scrolled .nav-link { color: #222 !important; }
.navbar.scrolled .navbar-toggler-icon { filter: invert(1); }

/* Shrink the navbar logo between 1200px and 1500px so it sits better before collapse */
@media (min-width: 1300px) and (max-width: 1500px) {
  .brand-logo svg {
    max-height: calc(60% - 20px);
  }
}


/* Treat widths between 1200px and 1299.98px as collapsed navbar (custom breakpoint)
   This forces the navbar to behave like the small-screen collapsed layout so the
   toggler appears and the menu sits under it. */
@media (min-width: 1200px) and (max-width: 1299.98px) {
  .navbar { height: 120px; }
  .template-homepage .page { margin-top: calc(100vh - 120px); }

  /* Show toggler and hide expanded nav by default */
  .navbar .navbar-toggler { display: block; margin-left: auto; }
  .navbar .navbar-collapse { display: none !important; }

  /* When the collapse is shown, display as a shrink-to-fit dropdown similar to small screens */
  .navbar .navbar-collapse.show {
    background: #fff;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    z-index: 1050;
    position: absolute;
    top: 100%;
    right: 0.75rem;
    left: auto;
    display: inline-block;
    min-width: 140px;
    max-width: calc(100% - 2rem);
    border-radius: 8px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  .navbar .navbar-collapse .navbar-nav {
    flex-direction: column;
    align-items: flex-end;
  }

}
/* Default: when the navbar is NOT scrolled, show a white (inverted) toggler so it
   contrasts against the transparent/hero background. When scrolled, show the
   regular (black) toggler. */
.navbar:not(.scrolled) .navbar-toggler-icon {
  filter: none;
  transition: filter 200ms ease;
}

/* On pages other than the homepage, underline the active nav item with a
   thick grey bar to indicate the current section. The active class is added
   server-side via the {% nav_active %} template tag. */
body:not(.template-homepage) .nav-link.nav-link-active {
  position: relative;
}
body:not(.template-homepage) .nav-link.nav-link-active::after {
  content: "";
  display: block;
  height: 6px; /* thick underline */
  background: #343434;
  margin-top: 8px;
  width: 100%;
}

/* Homepage defaults: transparent navbar and white links/logo */
.template-homepage .navbar { background: none !important; }
.template-homepage .navbar.scrolled { background: #fff !important; }
.template-homepage .brand-logo { color: #fff; }
.template-homepage .nav-link { color: #fff !important; }

/* Home page */
#detach-button-host {
  display: none;
}

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    margin-left: 0;
  overflow: hidden;
  z-index: 0; /* base stacking for hero; video itself is placed behind */
    /* rounded bottom-right corner to give the hero a distinctive shape */
    border-bottom-right-radius: 3rem;
}

/* Hero stats overlay (bottom-right) */
.hero-stats {
  position: absolute;
  left: 1rem;
  bottom: 3rem;
  text-align: left;
  z-index: 20;
  /* ensure the hero stats never overflow the viewport */
  right: 1rem;
  max-width: calc(100vw - 2rem);
  box-sizing: border-box;
}
.hero-stats-text {
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  font-weight: 400;
  margin: 0;
  font-variant: small-caps;
  line-height: 3rem;
  /* allow the text to respect the container width and break if necessary */
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.hero-stats .count {
  display: inline-block;
  font-weight: 700;
}

/* Layout: keep the two parts on one line above 1200px, stack below */
.hero-stats { display: flex; align-items: center; gap: 0.75rem; }
.hero-stats-text { white-space: nowrap; }
.hero-stats-sub { display: inline; }

@media (max-width: 1199.98px) {
  .hero-stats { flex-direction: column; align-items: flex-start; }
  .hero-stats-text{ line-height: 4rem;}
  .hero-stats-sub { display: block; }
}

@media (max-width: 767.98px) {
  .hero-stats-text{ font-size: 10vw !important; line-height: 4rem;}
}

@media (min-width: 1200px) {
  .hero-stats-text {
    line-height: 5.5rem;
  }
  /* Make the large numeric part responsive so it scales with viewport and never forces overflow */
  .hero-stats-text { font-size: clamp(3.5rem, 9vw, 5.75vw) !important; }
  
}

.hero-video-wrapper .hero-video,
.hero-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* ensure the video itself respects the wrapper's corner radius */
    border-bottom-right-radius: 3rem;
  z-index: -1; /* keep the video behind overlay text */
}

@media (max-width: 576px) {
  /* slightly smaller radius on very small screens */
  .hero-video-wrapper,
  .hero-video-wrapper .hero-video,
  .hero-video-wrapper video {
    border-bottom-right-radius: 1.5rem;
  }
}

/* Push homepage content below the fixed hero so it is not covered */
.template-homepage .page { margin-top: calc(100vh - 160px); }
.philosophy-inner { display: flex; gap: 16px; align-items: center; }
.philosophy-image img { max-width: 320px; height: auto; display: block; }
.philosophy {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.philosophy .philosophy-inner {
  margin: 0 auto;
}

@media (max-width: 768px) {
  .philosophy { padding-left: 1rem; padding-right: 1rem; }
  .philosophy .philosophy-inner { max-width: 100%; }
}
.videos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

/* About page */
.beliefs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.team-member img { max-width: 100%; height: auto; display: block; }

/* About page: full-screen background image behind content */
.about-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center center;
  z-index: -2; /* behind everything */
  filter: brightness(0.85);
}

.page-title-absolute {
  position: absolute;
  top: calc(160px); /* below navbar */
  left: 0;
  z-index: 20;
  font-size: 5rem;
  color: #1B3A4B;
  background-color: #fff;
  margin: 0;
  padding-left: 2rem;
  padding-top: 2rem;
  padding: 0.5rem 2rem 0.5rem 2rem;
  border-bottom-right-radius: 3rem;
}

.about-intro {
  border-bottom-left-radius: 3rem;
  border-top-right-radius: 3rem;
}

.about-approach {
  border-top-left-radius: 3rem;
}

@media (max-width: 768px) {
  .page-title-absolute { top: calc(90px + 0.75rem); font-size: 2rem; }
}

/* Team member styles: photo rounded at top, name acts as a toggle for bio */
.team-member {
  border-top-left-radius: 3rem;
  border-top-right-radius: 3rem;
  background: #fff;
}
.team-member .member-photo img { display:block; width:100%; height:auto; border-top-left-radius: 3rem; border-top-right-radius: 3rem; }
.team-member .member-name {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.8rem;
  color: #1B3A4B;
  background-color: #fff;
  border: #343434 1px solid;
  border-top-left-radius: 2rem;
  border-top-right-radius: 2rem;
}
.team-member .member-name:hover {
  transform: scale(1.05);
  color: #1B3A4B;
  background-color: #fff;
  border: #343434 1px solid;
}
.team-member .member-name[aria-expanded="true"] {
  border-bottom: none;
}
.team-member .bio { padding: 0 1rem 1rem 1rem; }
.team-member .bio.show, .team-member .bio.collapsing { border: #343434 1px solid; border-top: none; border-bottom-left-radius: 2rem; border-bottom-right-radius: 2rem; }
.team-member .member-name[aria-expanded="true"] { font-weight: 700; }
.member-name::after {
  content: "\25BC"; /* down caret */
  float: right;
  transition: transform 200ms ease;
}
.member-name[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

/* Services layout */
.service { padding: 2rem 0; }
.service .service-image { flex-shrink: 0; }
.service .service-image img { display: block; width: 100%; height: auto; }
.service .service-content { min-width: 0; }

/* Services */
.services .service { margin-bottom: 24px; }
.service img { max-width: 100%; height: auto; display: block; }

/* Make services section span more horizontal real-estate (full-bleed effect)
   while keeping rows centered for readable line lengths */
.services {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
.services .row {
  max-width: 1600px; /* content width inside the full-bleed area */
  margin: 0 auto;
}

/* Login sections */
.login-sections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.login-link { margin-bottom: 8px; }

.login-section .section-image { margin-bottom: 8px; position: relative;}
.login-section .section-image img {max-width: 85vw;}
.login-section h2 { margin-top: 0.5rem; }
.login-link .link-title { color: #1B3A4B; font-weight: 700; }

/* Interactive behavior: sections are arranged horizontally and clicking one
   expands it while pushing siblings left/right */
.login-sections {
  display: flex;
  gap: 16px;
  align-items: stretch;
}
.login-section {
  flex: 1 1 0;
  min-width: 0;
  transition: transform 400ms cubic-bezier(.2,.9,.2,1), opacity 400ms ease, width 400ms ease;
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.login-section .section-image { cursor: pointer; display: block; }
.login-section .links { display: none; margin-top: 1rem; z-index: 12;}
.login-section { position: relative; }
.section-title {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: #1B3A4B;
  color: #fff;
  z-index: 30;
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  font-family: var(--font-headline);
  font-weight: 700;
  font-variant: small-caps;
  text-transform: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.login-sections.expanded { position: relative; min-height: 60vh; }
.login-sections.expanded { overflow: visible; }
.login-sections.expanded .login-section { opacity: 0.6; transform: scale(0.92); }
.login-sections.expanded .login-section.selected { opacity: 1; transform: none; }
.login-sections.expanded .login-section.selected .links { display: none; }
.login-section.to-left, .login-section.to-right { box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.login-section.selected { z-index: 10; background: transparent; padding: 0; border-radius: 8px; position: absolute; left: 0; top: 0; width: 34%; pointer-events: none; }
.login-section.selected .section-image,
.login-section.selected .section-close { pointer-events: auto; }

/* Details panel that shows the links for the selected section and occupies the
   horizontal space freed up when the selected section moves to the left. */
.login-details-panel {
  display: none;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: calc(65% - 16px);
  padding: 1.5rem;
  background: none;
  z-index: 25;
  overflow: auto;
  border-left: 1px solid rgba(0,0,0,0.06);
}
.login-sections.expanded .login-details-panel { display: block; }
.login-details-panel .link-title { display: block; margin-bottom: 0.75rem; }
.login-section .section-close { position: absolute; top: 8px; right: 8px; }

/* For viewports below 1200px we want the login sections to stack vertically
   and always show their links (no interactive expansion). This includes small
   tablets and narrow desktops. */
@media (max-width: 1199.98px) {
  .login-sections { flex-direction: column; }
  /* Neutralize transforms from the desktop interactive behavior */
  .login-section.to-left, .login-section.to-right { transform: none; opacity: 1; }
  .login-section.selected { padding: 0; position: static; width: auto; }
  .login-details-panel { position: static; width: 100%; border-left: none; display: none; }
  /* Links are hidden by default; shown when a section has .expanded */
  .login-section .links { display: none; margin-top: 1rem; z-index: 12; }
  .login-section.expanded .links { display: block; }
  .login-section { position: static; }
  .login-sections.expanded { position: static; min-height: auto; }
}


/* Footer styles */
.site-footer {
border-top: 1px solid #eee;
background: #1B3A4B;
}
.site-footer .footer-logo img {
max-height: 90px;
color: #fff;
width: auto;
display: block;
}
.footer-disclosure {
font-weight: 300;
color: #fff
}
.site-footer .footer-nav a {
  color: #6c757d; /* fallback muted */
}
.site-footer .footer-nav .footer-link {
  display: inline-block;
  background: #fff;
  color: #1B3A4B; /* accent */
  font-size: 1.5rem;
  font-family: var(--font-headline);
  font-weight: 500;
  padding: 0.6rem 0.9rem;
  text-decoration: none;
  text-align: left;
}
.site-footer .footer-nav .footer-link:hover {
  background: #f6f6f6;
  color: #1B3A4B;
  text-decoration: none;
}

/* Small Screen Breakpoint styles */
@media (max-width: 768px) {
  .services { padding-left: 1rem; padding-right: 1rem; }
  .services .row { max-width: 100%; }

  .navbar {
    height: 90px;
  }

  /* Adjust the homepage content offset to match the smaller navbar */
  .template-homepage .page { margin-top: calc(100vh - 90px); }

  .brand-logo {
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    order: -1; /* place before other items */
    margin-right: auto;
  }



    .site-footer .footer-logo img { max-height: 48px; }
    .site-footer .footer-nav ul { justify-content: flex-start; }
    .site-footer .footer-nav .footer-link {
      min-width: 0;
      width: 100%;
      text-align: center;
  }
}

@media (max-width: 1300px) {
    /* Ensure the toggler sits on the right in narrow layouts */
  .navbar .navbar-toggler { margin-left: auto; }

  /* When collapsed, align nav items to the right */
  .navbar .navbar-collapse .navbar-nav {
    align-items: flex-end;
  }

  /* Scale the centered logo down so it fits the smaller navbar - keep it relative to available navbar space */
  .brand-logo svg { max-height: calc(100% - 12px); width: auto; }
  /* NOTE: larger-breakpoint logo sizing moved to top-level area so it is not nested inside
    the small-screen media query (nested media queries are ignored in plain CSS). */

  /* On small screens, move the logo into the normal flow and left-align it */
  .navbar .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

    /* Make the collapsed navbar (small screens) shrink-to-fit and sit under the toggler
    so it doesn't open full-width. Keep a white background for readability. */
  .navbar .navbar-collapse.show {
    background: #fff;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    z-index: 1050; /* above other content */
    position: absolute;
    top: 100%;
    right: 0.75rem;
    left: auto;
    display: inline-block !important; /* shrink to fit its children */
    min-width: 140px;
    max-width: calc(100% - 2rem);
    border-radius: 8px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  /* Stack items and right-align them so the container is only as wide as the links */
  .navbar .navbar-collapse.collapsing {
    background: #fff;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    z-index: 1050; /* above other content */
    position: absolute;
    top: 100%;
    right: 0.75rem;
    left: auto;
    display: inline-block !important; /* shrink to fit its children */
    min-width: 140px;
    max-width: calc(100% - 2rem);
    border-radius: 8px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;

  }

  /* Stack items and right-align them so the container is only as wide as the links */
  .navbar .navbar-collapse .navbar-nav {
    flex-direction: column;
    align-items: flex-end;
  }

  .navbar .navbar-collapse .nav-link {
    color: #222 !important;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    white-space: nowrap; /* keep links from wrapping and expanding the width */
  }

}

