/* ── TFL Standalone Site Styles ── */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Pontano Sans', sans-serif; color: #222; background: #fff; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }

/* Base typography — no Squarespace CSS to inherit, so define everything here */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.25; color: #1c2b4a; }
p { margin-bottom: .75em; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: .35em; }
strong { font-weight: 700; }
em { font-style: italic; }
code { font-family: monospace; background: #eef2ff; padding: 2px 6px; border-radius: 3px; font-size: .88em; }

/* Links — solid color, no underline by default */
a { color: #1c4fa0; text-decoration: none; }
a:hover { color: #0e2f60; text-decoration: underline; }

/* ── Header ── */
#tfl-header {
  position: sticky; top: 0; z-index: 1000;
  background: #1c2b4a;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.tfl-header-inner {
  max-width: 1300px; margin: 0 auto;
  padding: 0 28px;
  display: flex; align-items: center; gap: 12px;
  height: 58px;
  /* No overflow:hidden — burger must stay visible on the right */
}
.tfl-logo a {
  font-size: .95rem; font-weight: 700; letter-spacing: .04em;
  color: #fff; text-decoration: none; white-space: nowrap;
}
.tfl-logo a:hover { color: #c9d8ff; }

#tfl-nav {
  display: flex; align-items: center; gap: 2px;
  flex-wrap: nowrap; /* Hard single-row */
  overflow: hidden; flex: 1;
  justify-content: flex-end;
}
#tfl-nav a {
  color: #c0cfe8; text-decoration: none;
  font-size: .83rem; letter-spacing: .04em;
  padding: 7px 11px; border-radius: 4px;
  white-space: nowrap; flex-shrink: 0;
  transition: background .15s, color .15s;
}
#tfl-nav a:hover, #tfl-nav a.active {
  background: rgba(255,255,255,.12); color: #fff;
}
#tfl-burger {
  /* Hidden by default; shown at 920px breakpoint */
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; background: none; border: none;
  flex-shrink: 0; margin-left: auto; order: 3;
}
#tfl-burger span {
  display: block; width: 23px; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform .22s, opacity .22s;
}
#tfl-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#tfl-burger.open span:nth-child(2) { opacity: 0; }
#tfl-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Footer ── */
#tfl-footer {
  background: #1c2b4a; color: #c8d4ea;
  padding: 52px 32px 36px; text-align: center; margin-top: 80px;
}
.tfl-footer-inner { max-width: 1100px; margin: 0 auto; }
.tfl-footer-logo { font-size: 1rem; font-weight: 700; color: #fff; letter-spacing:.04em; margin-bottom: 18px; }
.tfl-footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 24px; }
.tfl-footer-nav a { color: #a8bedf; text-decoration: none; font-size: .88rem; transition: color .15s; }
.tfl-footer-nav a:hover { color: #fff; }
.tfl-footer-hr { border: none; border-top: 1px solid #2e4070; max-width: 500px; margin: 0 auto 20px; }
.tfl-footer-tagline { font-size: .8rem; color: #6a84ad; line-height: 1.7; }

/* ── Page wrapper ── */
.tfl-page { max-width: 1100px; margin: 0 auto; padding: 48px 32px 32px; }
.tfl-page-wide { max-width: 1300px; margin: 0 auto; padding: 48px 32px 32px; }

/* ── Hero (home) ── */
.tfl-hero {
  position: relative; width: 100%; min-height: 420px;
  display: flex; align-items: center;
  overflow: hidden; background: #1c2b4a;
}
.tfl-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.45);
}
.tfl-hero-content {
  position: relative; z-index: 1;
  max-width: 760px; padding: 64px 48px;
  color: #fff;
}
.tfl-hero-content h1 { font-size: 2.4rem; font-weight: 700; line-height: 1.2; margin-bottom: 16px; color: #ffffff; text-shadow: 0 2px 12px rgba(0,0,0,.65); }
.tfl-hero-content p { font-size: 1.05rem; opacity: .88; margin-bottom: 28px; }
.tfl-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.tfl-btn {
  display: inline-block; padding: 11px 24px;
  background: #fff !important; color: #1c2b4a !important;
  font-weight: 700; font-size: .9rem; letter-spacing: .04em;
  text-decoration: none !important; border-radius: 4px;
  transition: background .15s, color .15s;
  cursor: pointer;
}
.tfl-btn:hover { background: #c9d8ff !important; color: #0e2060 !important; text-decoration: none !important; }
.tfl-btn-outline {
  background: transparent !important; border: 2px solid rgba(255,255,255,.6); color: #fff !important;
}
.tfl-btn-outline:hover { background: rgba(255,255,255,.12) !important; color: #fff !important; }
/* Dark-background button variant — used inline with style="background:#1c2b4a" */
.tfl-btn[style*="#1c2b4a"] { color: #fff !important; }
.tfl-btn-dark {
  background: #1c2b4a !important; color: #fff !important;
}
.tfl-btn-dark:hover { background: #2d4a8a !important; color: #fff !important; }

/* ── Home stat cards ── */
.tfl-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; margin: 48px 0; }
.tfl-card {
  display: block; /* ensure <a> card fills grid cell */
  background: #f2f6ff; border-radius: 8px;
  padding: 28px 24px; text-align: center;
  border-top: 4px solid #1c2b4a;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none !important;
  color: inherit !important;
}
a.tfl-card:hover {
  box-shadow: 0 6px 20px rgba(28,43,74,.18);
  transform: translateY(-3px);
  text-decoration: none !important;
}
.tfl-card-icon { font-size: 2rem; margin-bottom: 10px; }
.tfl-card h3 { font-size: 1rem; color: #1c2b4a !important; margin-bottom: 8px; }
.tfl-card p { font-size: .88rem; color: #555 !important; }

.tfl-home-section { padding: 48px 0; border-top: 1px solid #e4e8f0; }
.tfl-home-section h2 { font-size: 1.5rem; color: #1c2b4a; margin-bottom: 16px; }
.tfl-home-section p { max-width: 760px; color: #444; font-size: .97rem; }

/* ── Section heading ── */
.tfl-section-head { text-align: center; padding: 0 0 48px; }
.tfl-section-head h1 { font-size: 2rem; color: #1c2b4a; margin-bottom: 12px; }
.tfl-section-head p { max-width: 700px; margin: 0 auto; color: #555; font-size: .97rem; }

/* ── Timeline ── */
.tfl-timeline { position: relative; padding: 20px 0 40px; }

/* Center vertical line */
.tfl-timeline::before {
  content: ''; position: absolute;
  left: 50%; top: 0; bottom: 0; width: 3px;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, #1c2b4a, #4a7cdc, #1c2b4a);
}

/*
  Desktop/tablet — 33% over center, 66% on original side
  Card width = 58% of container.
  Left  card: margin-left 11%  → right edge hits 69% (19% past center = 33% of 58%) ✓
  Right card: margin-left 31%  → left edge  at 31% (19% before center = 33% of 58%) ✓
*/
.tfl-tl-item {
  position: relative;
  width: 100%;
  padding-top: 30px;   /* space above the card for the dot */
  margin-bottom: 52px;
  opacity: 0;
  transition: opacity .65s ease, transform .65s ease;
}
.tfl-tl-item.left  { transform: translateX(-50px); }
.tfl-tl-item.right { transform: translateX(50px); }
.tfl-tl-item.visible { opacity: 1 !important; transform: translateX(0) !important; }

.tfl-tl-item.left  .tfl-tl-card { width: 58%; margin-left: 11%; }
.tfl-tl-item.right .tfl-tl-card { width: 58%; margin-left: 31%; }

.tfl-tl-card {
  background: #fff; border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  overflow: hidden;
}
.tfl-tl-card-head { padding: 18px 24px 16px; }
.tfl-tl-card-head .tfl-tl-date {
  font-size: 1.2rem; font-weight: 700; letter-spacing: .07em;
  color: rgba(255,255,255,.98); text-transform: uppercase; margin-bottom: 8px;
  font-family: 'Georgia', 'Times New Roman', serif;
}
.tfl-tl-card-head h3 {
  font-size: 1.1rem; font-weight: 600; font-style: normal; line-height: 1.35;
  color: rgba(255,255,255,.88); text-shadow: 0 1px 5px rgba(0,0,0,.4);
  font-family: 'Pontano Sans', sans-serif;
}
.tfl-tl-card-body { padding: 18px 24px; }
.tfl-tl-card-body p  { font-size: .88rem; color: #444; line-height: 1.65; margin-bottom: 10px; }
.tfl-tl-card-body ul { padding-left: 18px; margin-bottom: 10px; }
.tfl-tl-card-body ul li { font-size: .85rem; color: #444; margin-bottom: 5px; }
.tfl-tl-img { width: 100%; max-height: 150px; object-fit: cover; }
.tfl-tl-link {
  display: inline-block; margin-top: 10px;
  padding: 7px 16px; background: #1c2b4a; color: #fff !important;
  font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  text-decoration: none; border-radius: 4px; cursor: pointer; border: none;
  transition: background .15s;
}
.tfl-tl-link:hover { background: #2d4a8a; }

/* Dot sits ABOVE each card, on the center line */
.tfl-tl-dot {
  position: absolute; left: 50%; top: 0;
  width: 22px; height: 22px;
  background: #fff; border: 4px solid #1c2b4a;
  border-radius: 50%; z-index: 2;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(28,43,74,.10);
}
.tfl-tl-spacer { display: none; }

/* ── Popover ── */
.tfl-popover-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.65); z-index: 9000;
  align-items: center; justify-content: center;
  padding: 20px;
}
.tfl-popover-backdrop.open { display: flex; }
.tfl-popover {
  background: #fff; border-radius: 10px;
  width: 100%; max-width: 820px; max-height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.tfl-popover-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: #1c2b4a; color: #fff; flex-shrink: 0;
}
.tfl-popover-header h4 { font-size: .95rem; font-weight: 700; flex: 1; }
.tfl-popover-close {
  background: none; border: none; color: #fff;
  font-size: 1.5rem; cursor: pointer; line-height: 1;
  padding: 0 4px; opacity: .8; flex-shrink: 0;
}
.tfl-popover-close:hover { opacity: 1; }
.tfl-popover-body {
  overflow-y: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.tfl-popover-body img { width: 100%; border: 1px solid #e0e0e0; border-radius: 4px; }
.tfl-popover-body p { font-size: .9rem; color: #444; line-height: 1.65; }

/* ── Documents page ── */
.tfl-docs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px; margin-top: 32px;
}
.tfl-doc-card {
  background: #fff; border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.09);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.tfl-doc-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.14); transform: translateY(-2px); }
.tfl-doc-thumb {
  width: 100%; height: 160px; object-fit: cover;
  background: #e8edf5;
}
.tfl-doc-thumb-placeholder {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, #1c2b4a 0%, #2d4a8a 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.5); font-size: 2.5rem;
}
.tfl-doc-info { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.tfl-doc-info h3 { font-size: .9rem; color: #1c2b4a; margin-bottom: 10px; line-height: 1.35; flex: 1; }
.tfl-doc-btn {
  display: inline-block; padding: 8px 16px;
  background: #1c2b4a; color: #fff;
  font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  border-radius: 4px; text-decoration: none; border: none;
  cursor: pointer; text-align: center; align-self: flex-start;
  transition: background .15s;
}
.tfl-doc-btn:hover { background: #2d4a8a; color: #fff; }

/* ── Facility page ── */
.tfl-facility-hero {
  position: relative;
  /* background-image set inline via style attribute */
  background-size: cover; background-position: center;
  color: #fff; padding: 64px 48px;
  border-radius: 10px; margin-bottom: 40px;
  min-height: 50vh; display: flex; flex-direction: column; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
  overflow: hidden;
}
/* ~50% blue overlay so text is readable */
.tfl-facility-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(18,35,72,.54);
  border-radius: 10px;
}
/* All children above the overlay */
.tfl-facility-hero > * { position: relative; z-index: 1; }
.tfl-facility-hero h1 {
  font-size: 2.4rem; font-weight: 700; margin-bottom: 14px;
  color: #ffffff !important; text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.tfl-facility-hero p { max-width: 680px; font-size: 1rem; color: rgba(255,255,255,.9) !important; line-height: 1.65; }

.tfl-accordion { margin-bottom: 12px; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.tfl-accordion-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; cursor: pointer;
  background: #f0f4ff; color: #1c2b4a;
  font-weight: 700; font-size: .95rem;
  user-select: none; gap: 12px;
}
.tfl-accordion-head:hover { background: #e0e8ff; }
.tfl-accordion-icon { font-size: 1.1rem; transition: transform .25s; flex-shrink: 0; }
.tfl-accordion.open .tfl-accordion-icon { transform: rotate(45deg); }
.tfl-accordion-body { display: none; padding: 20px 22px; background: #fff; font-size: .92rem; color: #444; line-height: 1.7; }
.tfl-accordion.open .tfl-accordion-body { display: block; }
.tfl-accordion-body p + p { margin-top: 12px; }
.tfl-accordion-body ul { padding-left: 20px; margin-top: 8px; }
.tfl-accordion-body ul li { margin-bottom: 6px; }
.tfl-accordion-body .tfl-doc-btn { margin-top: 16px; }

.tfl-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 16px; margin: 24px 0; }
.tfl-stat-box { background: #f0f4ff; border-radius: 8px; padding: 20px; text-align: center; border-left: 4px solid #1c2b4a; }
.tfl-stat-box .tfl-stat-num { font-size: 1.8rem; font-weight: 700; color: #1c2b4a; }
.tfl-stat-box .tfl-stat-label { font-size: .8rem; color: #666; margin-top: 4px; }

/* ── Community page ── */
.tfl-video-wrap {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  border-radius: 8px; background: #000; margin-bottom: 24px;
}
.tfl-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.tfl-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 16px; margin-top: 24px; }
.tfl-link-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; background: #f2f6ff; border-radius: 8px;
  text-decoration: none; color: #1c2b4a;
  border: 1px solid #dce6f7;
  transition: background .15s, box-shadow .15s;
}
.tfl-link-card:hover { background: #e0e9ff; box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.tfl-link-card-icon { font-size: 1.6rem; flex-shrink: 0; }
.tfl-link-card-text strong { display: block; font-size: .9rem; }
.tfl-link-card-text span { font-size: .8rem; color: #666; }

/* ── Contact page ── */
.tfl-contact-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.tfl-contact-info h2 { font-size: 1.4rem; color: #1c2b4a; margin-bottom: 16px; }
.tfl-contact-info p { color: #555; font-size: .93rem; line-height: 1.7; margin-bottom: 20px; }
.tfl-contact-item { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.tfl-contact-item-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.tfl-contact-item-text { font-size: .88rem; color: #555; }

.tfl-form-card { background: #f8faff; border-radius: 10px; padding: 32px; box-shadow: 0 2px 16px rgba(0,0,0,.07); }
.tfl-form-card h3 { font-size: 1.1rem; color: #1c2b4a; margin-bottom: 22px; }
.tfl-field { margin-bottom: 18px; }
.tfl-field label { display: block; font-size: .82rem; font-weight: 700; color: #444; margin-bottom: 6px; letter-spacing: .03em; }
.tfl-field input, .tfl-field textarea, .tfl-field select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #ccd4e8; border-radius: 6px;
  font-family: inherit; font-size: .9rem; color: #222;
  background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.tfl-field input:focus, .tfl-field textarea:focus { border-color: #1c4fa0; box-shadow: 0 0 0 3px rgba(28,79,160,.1); }
.tfl-field textarea { min-height: 130px; resize: vertical; }
.tfl-submit-btn {
  width: 100%; padding: 12px; border: none; border-radius: 6px;
  background: #1c2b4a; color: #fff; font-family: inherit;
  font-size: .95rem; font-weight: 700; letter-spacing: .04em;
  cursor: pointer; transition: background .15s;
}
.tfl-submit-btn:hover { background: #2d4a8a; }
.tfl-form-msg { display: none; margin-top: 14px; padding: 12px 16px; border-radius: 6px; font-size: .88rem; }
.tfl-form-msg.success { background: #eafaf0; color: #1a6e3c; border: 1px solid #b2e5c8; display: block; }
.tfl-form-msg.error { background: #fef0f0; color: #9b2020; border: 1px solid #f5c0c0; display: block; }

/* ── Facility photo hero ── */

/* ── Responsive ── */
/* Tablet: tighten timeline overlap slightly */
@media (max-width: 900px) {
  .tfl-cards { grid-template-columns: 1fr 1fr; }
  .tfl-contact-wrap { grid-template-columns: 1fr; }
  /* Timeline stays 33/66 on tablet — no change needed */
}

@media (max-width: 920px) {
  /* ── Switch to hamburger early enough to prevent wrapping ── */
  .tfl-header-inner { padding: 0 16px; }
  #tfl-nav {
    /* Drop-down from header, absolutely positioned so it doesn't push layout */
    display: none;
    position: absolute; top: 58px; left: 0; right: 0;
    background: #1c2b4a;
    flex-direction: column; align-items: stretch;
    padding: 8px 0 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    gap: 0; z-index: 999;
  }
  #tfl-nav.open { display: flex; }
  #tfl-nav a {
    padding: 12px 24px; border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
    font-size: .92rem;
  }
  /* Burger: always on the far right of the header */
  #tfl-burger { display: flex; margin-left: auto; }

  .tfl-hero-content { padding: 40px 24px; }
  .tfl-hero-content h1 { font-size: 1.6rem; }
  .tfl-page, .tfl-page-wide { padding: 32px 16px 24px; }
  .tfl-cards { grid-template-columns: 1fr; }
  .tfl-docs-grid { grid-template-columns: 1fr; }
  .tfl-section-head h1 { font-size: 1.5rem; }
  .tfl-stat-grid { grid-template-columns: 1fr 1fr; }
  #tfl-footer { padding: 40px 16px 28px; margin-top: 48px; }
  .tfl-facility-hero { padding: 40px 24px; }
  .tfl-form-card { padding: 22px 16px; }
  /* Timeline mobile: center line stays at 50%, dot above card, cards full width */
  .tfl-timeline::before { left: 50%; transform: translateX(-50%); }
  .tfl-tl-dot { left: 50%; transform: translateX(-50%); top: 0; }
  .tfl-tl-item.left,
  .tfl-tl-item.right {
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
  }
  .tfl-tl-item.left .tfl-tl-card,
  .tfl-tl-item.right .tfl-tl-card {
    width: 100%;
    margin: 0;
  }
}
