/* Veritas Villages - portable site stylesheet
   Colors and fonts follow the original site theme.
   Headings used Adobe's "Broadacre Light" on Squarespace; Poppins Light is the stand-in. */
:root {
  --black: hsl(188.71, 72.09%, 16.86%);
  --dark: hsl(196.11, 72.97%, 29.02%);
  --light: hsl(43.64, 33.33%, 93.53%);
  --accent: hsl(96.36, 29.73%, 43.53%);
  --accent-dark: hsl(96.36, 29.73%, 34%);
  --white: #fff;
  --maxw: 1400px;
  --head-font: "Poppins", system-ui, sans-serif;
  --body-font: "Poppins", system-ui, sans-serif;
  --ui-font: "Instrument Sans", "Poppins", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--black);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--dark); }
a:hover { color: var(--accent-dark); }
h1, h2, h3, h4, h5, h6 { font-family: var(--head-font); font-weight: 300; line-height: 1.2; margin: 0 0 .6em; color: inherit; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 4vw; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 200; }
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 78px; }
.logo img { height: 56px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; align-items: center; }
.main-nav a, .sub-toggle {
  font-family: var(--ui-font); font-size: .95rem; font-weight: 500; color: var(--black); text-decoration: none;
  padding: .6rem .9rem; display: block; background: none; border: 0; cursor: pointer; border-radius: 6px;
}
.main-nav a:hover, .sub-toggle:hover, .main-nav [aria-current="page"], .has-sub.is-current > .sub-toggle { color: var(--accent-dark); }
.has-sub { position: relative; }
.sub-toggle::after { content: ""; display: inline-block; margin-left: .4rem; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.main-nav .sub { position: absolute; top: 100%; left: 0; min-width: 280px; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .14); border-radius: 8px; padding: .5rem; display: none; flex-direction: column; align-items: stretch; }
.main-nav .has-sub:hover > .sub, .main-nav .has-sub:focus-within > .sub, .main-nav .has-sub.open > .sub { display: flex; }
.main-nav .sub { width: max-content; max-width: 90vw; }
.main-nav .sub a { padding: .55rem .8rem; font-weight: 400; white-space: nowrap; }
.main-nav > ul > .has-sub:last-child > .sub { left: auto; right: 0; }
.nav-toggle { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--black); margin: 5px 0; transition: .2s; }

/* ---------- sections ---------- */
.sec { position: relative; overflow: hidden; display: flex; }
.sec--white { background: #fff; color: var(--black); }
.sec--light { background: var(--light); color: var(--black); }
.sec--dark { background: var(--dark); color: #fff; }
.sec--black { background: var(--black); color: #fff; }
.sec--bright { background: var(--accent); color: #fff; }
.sec-bg { position: absolute; inset: 0; }
.sec-bg img, .sec-bg video { width: 100%; height: 100%; object-fit: cover; }
.sec-overlay { position: absolute; inset: 0; background: #000; }
.sec--white .sec-overlay { background: #fff; }
.sec--light .sec-overlay { background: var(--light); }
.sec--dark .sec-overlay { background: var(--dark); }
.sec--black .sec-overlay { background: var(--black); }
.sec-inner { position: relative; z-index: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: var(--py, 3rem) 4vw; }
.sec--h-sm { --py: 2.5rem; }
.sec--h-md { --py: 4.5rem; }
.sec--h-lg { --py: 7rem; }
.va-middle { align-items: center; }
.va-bottom { align-items: flex-end; }
.va-top { align-items: flex-start; }
.sec.has-bg.only-bg { min-height: 38vh; }
.sec.has-bg .rte, .sec.has-bg .rte h1, .sec.has-bg .rte h2 { text-shadow: none; }
.hero { min-height: min(78vh, 760px); }
.hero .sec-inner { padding-bottom: 3.5rem; }
.sec--black.hero .btn--primary, .sec--dark.hero .btn--primary { background: #fff; color: var(--black); }

/* ---------- rich text ---------- */
.rte h1 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); }
.rte h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); }
.rte h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.rte h4 { font-size: 1.25rem; font-weight: 400; }
.rte h5, .rte h6 { font-size: 1.05rem; font-weight: 500; }
.rte ul, .rte ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.rte li { margin-bottom: .35em; }
.rte a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sec--dark a, .sec--black a, .sec--bright a { color: #fff; }
.sqsrte-large { font-size: 1.35em; }
.sqsrte-small { font-size: .85em; }
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.ta-left { text-align: left; }
.sqsrte-text-color--accent { color: var(--accent); }
.sqsrte-text-color--darkAccent { color: var(--dark); }
.sqsrte-text-color--lightAccent { color: var(--light); }
.sqsrte-text-color--black { color: var(--black); }
.sqsrte-text-color--white { color: #fff; }
.sec--dark .sqsrte-text-color--darkAccent, .sec--black .sqsrte-text-color--darkAccent { color: #7fc3e6; }

/* ---------- layout from the original grid ---------- */
.fe-single, .fe-row { margin-bottom: 1.6rem; max-width: 100%; }
.fe-row { display: flex; gap: clamp(1rem, 3vw, 3rem); align-items: center; }
.fe-col { min-width: 0; }
.fe-col > * + *, .fe-single > * + * { margin-top: 1rem; }
.img-block { margin: 0; }
.img-block img { width: 100%; }
.img-block figcaption { font-size: .9rem; opacity: .8; margin-top: .4rem; }

/* ---------- buttons ---------- */
.btn-wrap { margin: .4rem 0; }
.btn-wrap--center { text-align: center; }
.btn-wrap--right { text-align: right; }
.btn { display: inline-block; font-family: var(--ui-font); font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; padding: .95rem 1.9rem; border-radius: 4px; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s; cursor: pointer; line-height: 1.2; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--secondary { background: transparent; color: var(--dark); border-color: var(--dark); }
.btn--secondary:hover { background: var(--dark); color: #fff; }
.btn--tertiary { background: transparent; color: var(--dark); padding-left: 0; padding-right: 0; border-bottom-color: currentColor; border-radius: 0; }
.btn--small { padding: .65rem 1.2rem; font-size: .78rem; }
.sec--dark .btn--primary, .sec--black .btn--primary { background: #fff; color: var(--black); }
.sec--dark .btn--primary:hover, .sec--black .btn--primary:hover { background: var(--light); }
.sec--dark .btn--secondary, .sec--black .btn--secondary { color: #fff; border-color: #fff; }

/* ---------- embeds ---------- */
.video-embed, .map-embed { position: relative; width: 100%; border-radius: 6px; overflow: hidden; background: #000; }
.video-embed { aspect-ratio: 16 / 9; }
.map-embed { aspect-ratio: 16 / 7; background: #ddd; }
.video-embed iframe, .video-embed video, .map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.form-embed iframe { display: block; min-height: 600px; }
.rule { border: 0; border-top: 1px solid rgba(0, 0, 0, .2); margin: 1.5rem 0; }

/* ---------- cards, galleries ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.75rem; }
.cards--posts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card { background: #fff; color: var(--black); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 16px rgba(0, 0, 0, .09); display: flex; flex-direction: column; }
.card-media { display: block; background: var(--light); }
.card-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.35rem; font-weight: 400; margin-bottom: .35rem; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { color: var(--accent-dark); }
.card-body .rte p { margin-bottom: .2rem; font-size: .92rem; }
.card-meta { font-size: .82rem; opacity: .7; margin-bottom: .5rem; }
.card .more { font-weight: 600; font-size: .9rem; }
.chip { display: inline-block; font-family: var(--ui-font); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; background: var(--light); color: var(--dark); border-radius: 999px; padding: .2rem .7rem; margin: 0 .4rem .5rem 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.g-item { display: block; overflow: hidden; border-radius: 6px; }
.g-item img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .35s; }
.g-item:hover img { transform: scale(1.05); }
.lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .92); z-index: 500; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; padding: .6rem 1rem; }
.lb-close { top: .5rem; right: .8rem; }
.lb-prev { left: .5rem; top: 50%; }
.lb-next { right: .5rem; top: 50%; }

/* ---------- accordion ---------- */
.accordion { border-top: 1px solid rgba(0, 0, 0, .18); }
.acc { border-bottom: 1px solid rgba(0, 0, 0, .18); }
.acc summary { cursor: pointer; padding: 1rem .2rem; font-size: 1.1rem; font-weight: 400; list-style: none; display: flex; justify-content: space-between; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 1.5rem; line-height: 1; }
.acc[open] summary::after { content: "\2212"; }
.acc .rte { padding: 0 .2rem 1rem; }

/* ---------- pages ---------- */
.narrow { max-width: 880px; }
.page-title { font-size: clamp(2.2rem, 4.5vw, 3.6rem); margin-bottom: .4em; }
.lead { font-size: 1.15rem; opacity: .85; max-width: 46em; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 1.2rem; }
.post { max-width: 820px; }
.post-title { font-size: clamp(2rem, 4vw, 3.2rem); }
.post-meta { opacity: .7; font-size: .95rem; margin-bottom: 2rem; }
.post-body .fe-row { flex-direction: column; margin-left: 0 !important; width: 100% !important; }
.post-body .fe-col { flex: none !important; width: 100%; }
.post-body img { border-radius: 6px; }
.post-body .rte { font-size: 1.05rem; }
.post-tags { margin-top: 2rem; }
.post-tags span { display: inline-block; background: var(--light); border-radius: 999px; padding: .15rem .75rem; margin: 0 .4rem .4rem 0; font-size: .8rem; }
.post-nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(0, 0, 0, .12); }
.post-nav .btn { text-transform: none; letter-spacing: 0; }

/* ---------- updates feed (videos, links, files added from the admin page) ---------- */
.feed-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.feed-filter { display: flex; flex-wrap: wrap; gap: .5rem; }
.feed-filter button { font-family: var(--ui-font); font-size: .82rem; border: 1px solid var(--dark); background: #fff; color: var(--dark); border-radius: 999px; padding: .35rem .95rem; cursor: pointer; }
.feed-filter button.on { background: var(--dark); color: #fff; }
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.75rem; }
.feed--updates { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.feed-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 16px rgba(0, 0, 0, .09); display: flex; flex-direction: column; }
.feed-card .body { padding: 1.1rem 1.3rem 1.4rem; }
.feed-card h3 { font-size: 1.3rem; font-weight: 400; margin-bottom: .25rem; }
.feed-card .meta { font-size: .8rem; opacity: .65; margin-bottom: .6rem; }
.feed-card .desc { font-size: .95rem; margin-bottom: .9rem; white-space: pre-line; }
.feed-card video { width: 100%; display: block; background: #000; aspect-ratio: 16 / 9; }
.feed-card .preview img { width: 100%; max-height: 260px; object-fit: cover; }
.feed-card .icon-tile { display: flex; align-items: center; justify-content: center; height: 120px; background: var(--light); font-family: var(--ui-font); font-weight: 600; font-size: 1.6rem; color: var(--dark); letter-spacing: .06em; }
.feed-empty { padding: 2.5rem; background: var(--light); border-radius: 10px; text-align: center; }

/* ---------- footer ---------- */
.site-footer { background: var(--black); color: #fff; padding: 3.5rem 0 1.5rem; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { font-size: 1.1rem; font-weight: 500; margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: #fff; text-decoration: none; opacity: .9; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.site-footer .btn { opacity: 1; background: #fff; color: var(--black); text-decoration: none; }
.social { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; margin-top: 1.4rem; }
.foot-base { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, .2); font-size: .9rem; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: 0 12px 24px rgba(0, 0, 0, .12); max-height: calc(100vh - 78px); overflow: auto; }
  .nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: .5rem 4vw 1rem; }
  .main-nav .sub { width: auto; max-width: none; position: static; display: none; box-shadow: none; padding: 0 0 0 1rem; min-width: 0; }
  .main-nav .has-sub:hover > .sub, .main-nav .has-sub:focus-within > .sub { display: none; }
  .main-nav .has-sub.open > .sub { display: flex; }
  .main-nav .sub a { white-space: normal; }
  .main-nav > ul > .has-sub > .sub { right: auto; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .fe-single { margin-left: 0 !important; width: 100% !important; }
  .fe-row { flex-direction: column; align-items: stretch; margin-left: 0 !important; width: 100% !important; }
  .fe-col { flex: none !important; width: 100%; }
  .sec--h-lg { --py: 4rem; }
  .sec--h-md { --py: 3rem; }
  .hero { min-height: 70vh; }
  .logo img { height: 46px; }
  .feed { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .sec-bg video { display: none; }
  html { scroll-behavior: auto; }
}
