/*
 * Feather · holiday site layer
 * Loaded after style.css. Presents the Holiday Info plugin: font, tokens, header, page headers,
 * section bands, footer. Component styles (calendar, tables, badges, cards) live in the plugin.
 * See ../../CHANGELOG.md.
 */

/* ---------- Font: Anek Bangla (self-hosted, SIL OFL). Width axis 75-100, weight 300-800 ---------- */
@font-face {
  font-family: "Anek Bangla";
  src: url("../fonts/anek-bangla-bengali-2.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1, U+11DF0-11DF1;
}
@font-face {
  font-family: "Anek Bangla";
  src: url("../fonts/anek-bangla-latin-2.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens (same names as the plugin, so the two always agree) ---------- */
:root {
  --hi-font: "Anek Bangla", system-ui, -apple-system, "Segoe UI", "Noto Sans Bengali", "Nirmala UI", sans-serif;
  --hi-text: #1e2522;
  --hi-muted: #5b6560;
  --hi-bg: #fff;
  --hi-surface: #f3f6f4;
  --hi-border: #dae1dd;
  --hi-accent: #006a4e;
  --hi-accent-ink: #004d38;
  --hi-public: #c8202b;
  --hi-public-wash: #fdf0f0;
  --hi-optional: #2556a3;
  --hi-bank: #6b3a9c;
  --hi-special: #00695c;
  --hi-working: #3f4a45;
  --hi-pending: #8a5a00;
  --hi-pending-bg: #fff4dc;
  --hi-pending-border: #e9c46a;
  --hi-weekend: #f1f4f2;
  --hi-radius: 5px;
  --hi-footer: #f7f9f8;
  --site-w: 1120px;
  --gutter: 20px;
  --header-h: 64px;
}

/* ---------- Base ---------- */
html { scroll-padding-top: 5rem; }

body.hi-site {
  /* Also set here so the plugin's `--hi-font: inherit` default on :root cannot win when its CSS loads later (e.g. Sources page). */
  --hi-font: "Anek Bangla", system-ui, -apple-system, "Segoe UI", "Noto Sans Bengali", "Nirmala UI", sans-serif;
  font-family: var(--hi-font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--hi-text);
  background: #fff;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.hi-site a { color: var(--hi-accent); text-underline-offset: 3px; }
.hi-site a:hover, .hi-site a:focus { color: var(--hi-accent-ink); }
/* Share buttons (Facebook, X, Pinterest): white label. The rule above would turn them green. (No display rule here: style.css hides Messenger and, on tiny screens, X and Pinterest.) */
.hi-site .social-share-buttons a { color: #fff; }
.hi-site .social-share-buttons a:hover, .hi-site .social-share-buttons a:focus { color: #fff; }
.hi-site :focus-visible { outline: 3px solid var(--hi-accent); outline-offset: 2px; border-radius: 4px; }
/* Text fields: no outline or glow when selected, but the edge still changes (accent border + 1px inset line) so keyboard focus stays visible (WCAG 2.4.7).
   Checkboxes and radios keep the standard focus ring above. */
.hi-site input:not([type="checkbox"]):not([type="radio"]):focus,
.hi-site input:not([type="checkbox"]):not([type="radio"]):focus-visible,
.hi-site select:focus, .hi-site select:focus-visible,
.hi-site textarea:focus, .hi-site textarea:focus-visible { outline: 0; border-color: var(--hi-accent); box-shadow: inset 0 0 0 1px var(--hi-accent); }
.hi-site h1, .hi-site h2, .hi-site h3, .hi-site h4 { font-family: inherit; font-weight: 700; font-stretch: 88%; line-height: 1.2; color: var(--hi-text); }
.hi-site ::selection { background: #cfe8dd; }
.hi-site button, .hi-site input, .hi-site select, .hi-site textarea { font-family: inherit; }

body.hi-site.hi-default { background: #f5f5f5; }

/* Scroll progress bar: a thin green line over the header */
.hi-site .progress-container { position: fixed; top: 0; left: 0; width: 100%; height: 3px; background: transparent; z-index: 1000; }
.hi-site .progress-bar { height: 3px; width: 0; background: var(--hi-accent); }

/* ---------- Header ---------- */
.hi-site .site-header {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--hi-border);
  box-shadow: none;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 900;
  backdrop-filter: saturate(1.4) blur(8px);
}
.admin-bar.hi-site .site-header { top: 32px; }
.hi-site .site-header .wrap {
  position: static;
  max-width: var(--site-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0 .25rem;
}
/* Genesis's clear-fix pseudo-elements become empty flex items here and push the logo 4px right */
.hi-site .site-header .wrap::before, .hi-site .site-header .wrap::after { display: none; }
.hi-site .title-area { float: none; display: flex; align-items: center; min-height: var(--header-h); padding: 0; margin: 0 auto 0 0; flex: 0 0 auto; }
.hi-site .site-title { margin: 0; font-size: 1.375rem; font-weight: 800; font-stretch: 78%; line-height: 1; letter-spacing: -.005em; }
.hi-site .site-title a { display: inline-flex; align-items: center; gap: .6rem; color: var(--hi-accent-ink); text-decoration: none; min-height: 44px; }
.hi-site .site-title a:hover { color: var(--hi-accent); }
/* Logo from Appearance > Customize > Site Identity: the image sits beside the site name (no logo set: just the site name) */
.hi-site.wp-custom-logo .title-area { display: flex; align-items: center; gap: .6rem; width: auto; max-width: none !important; padding: 0; }
.hi-site.wp-custom-logo .custom-logo-link { display: block; flex: none; width: 32px; height: 32px; aspect-ratio: auto !important; }
.hi-site.wp-custom-logo .title-area img.custom-logo { display: block; width: 32px !important; height: 32px !important; max-width: none; border-radius: 5px; background-color: #006a4e; /* the logo PNG has round transparent corners; this green fills them so the 5px corner is what you see */ }
.hi-site.wp-custom-logo .site-title { position: static !important; clip: auto; width: auto; height: auto; overflow: visible; }

/* Search button and mobile menu button */
.hi-site .header-search-icon { order: 1; margin: 0; }
.hi-site .search-toggle,
.hi-site .menu-toggle {
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--hi-text);
  cursor: pointer;
}
.hi-site .search-toggle:hover, .hi-site .menu-toggle:hover { background: var(--hi-surface); color: var(--hi-accent-ink); }
.hi-site .menu-toggle { order: 2; float: none; font-size: 0; }
.hi-site .menu-toggle::before { float: none; top: 0; font-size: 1.5rem; margin: 0; }

/* Search drawer */
.hi-site .full-width-search {
  left: 0;
  right: 0;
  top: calc(100% + 1px); /* starts right under the header's 1px bottom border, which stays visible */
  width: 100%;
  padding: 1.5rem 0 1.75rem;
  background: #fff;
  border-bottom: 1px solid var(--hi-border);
  box-shadow: 0 14px 28px -18px rgba(18, 35, 29, .35);
}
.hi-site .full-width-search .wrap { max-width: var(--site-w); padding: 0 var(--gutter); min-height: 0; display: block; }
.hi-site .full-width-search .search-form { max-width: 640px; margin: 0 auto; gap: .5rem; display: flex; align-items: center; justify-content: center; }
.hi-site .full-width-search .search-form label { flex: 1 1 auto; margin: 0; }
.hi-site .full-width-search .search-field { display: block; width: 100%; text-align: left; padding: 0 .85rem; font-size: 1rem; line-height: 1.2; border: 1px solid var(--hi-border); border-radius: 5px; height: 44px; min-height: 0; box-shadow: none; }
.hi-site .full-width-search .search-field:focus, .hi-site .full-width-search .search-field:focus-visible { outline: 0; box-shadow: inset 0 0 0 1px var(--hi-accent); border-color: var(--hi-accent); }
.hi-site .full-width-search .search-submit { flex: 0 0 auto; background: var(--hi-accent); border-radius: 5px; height: 44px; min-height: 0; min-width: 7.5rem; margin: 0; padding: 0 1.75rem; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 600; font-size: .9375rem; line-height: 1; }
.hi-site .full-width-search .search-submit:hover { background: var(--hi-accent-ink); }
.search-overlay { display: none; position: fixed; inset: 0; background: transparent; z-index: 890; }
.search-overlay.active { display: block; }

/* Primary navigation: a dropdown panel on phones (under 768px), a row from 768px. style.css has no other nav breakpoint: its old 960px block (nav forced open, hamburger hidden) used to leave a 270px header at 960-1023px. */
.hi-site .nav-primary { order: 5; flex: 0 0 100%; float: none; width: 100%; padding: 0; margin: 0; }
.hi-site .nav-primary .genesis-nav-menu { margin: 0; padding: 0; list-style: none; line-height: 1.3; }
.hi-site .genesis-nav-menu .menu-item { display: block; border-top: 1px solid var(--hi-border); }
.hi-site .genesis-nav-menu .menu-item:last-child { padding-bottom: 0; }
.hi-site .genesis-nav-menu a { display: flex; align-items: center; min-height: 48px; padding: .6rem .25rem; color: var(--hi-text); font-size: 1.0625rem; font-weight: 600; text-decoration: none; }
.hi-site .genesis-nav-menu a:hover, .hi-site .genesis-nav-menu a:focus { color: var(--hi-accent); background: transparent; }
.hi-site .genesis-nav-menu .current-menu-item > a,
.hi-site .genesis-nav-menu .current-menu-ancestor > a { color: var(--hi-accent); }
.hi-site .genesis-responsive-menu.show-menu { padding-bottom: .75rem; }

@media (min-width: 768px) {
  .hi-site .site-header .wrap { flex-wrap: nowrap; gap: 0 .5rem; }
  .hi-site .nav-primary { order: 2; flex: 0 0 auto; width: auto; margin: 0; display: block !important; }
  .hi-site .nav-primary .genesis-nav-menu { display: flex; align-items: center; gap: .25rem; }
  .hi-site .genesis-nav-menu .menu-item { border: 0; }
  .hi-site .genesis-nav-menu a { min-height: 40px; padding: .4rem .9rem; border-radius: 999px; font-size: .96875rem; }
  .hi-site .genesis-nav-menu a:hover, .hi-site .genesis-nav-menu a:focus { background: transparent; color: var(--hi-accent); }
  .hi-site .genesis-nav-menu .current-menu-item > a,
  .hi-site .genesis-nav-menu .current-menu-ancestor > a { background: transparent; color: var(--hi-accent); }
  .hi-site .header-search-icon { order: 3; margin-left: .25rem; }
  .hi-site .menu-toggle { display: none !important; }
}

/* ---------- Page layout (holiday look; default posts and plain pages keep the theme's card layout, see .hi-default) ---------- */
.hi-site:not(.hi-default) .site-inner { max-width: var(--site-w); margin: 0 auto; padding: clamp(1rem, .75rem + 1vw, 1.5rem) var(--gutter) 0; }
.hi-site .content, .hi-site.full-width-content .content { float: none; width: 100%; margin: 0; }
.hi-site:not(.hi-default) .entry { background: transparent; box-shadow: none; border-radius: 0; padding: 0; margin: 0; }
.hi-site:not(.hi-default) .entry-header { padding: 0 0 1.25rem; text-align: left; }
.hi-site:not(.hi-default) .entry-title {
  margin: 0;
  font-size: clamp(1.625rem, 1.1rem + 1.9vw, 2.5rem);
  font-weight: 800;
  font-stretch: 78%;
  line-height: 1.05;
  letter-spacing: -.012em;
  text-wrap: balance;
}
.hi-site:not(.hi-default) .entry-lede { margin: clamp(1rem, .75rem + 1vw, 1.5rem) 0 0; max-width: none; font-size: 1.0625rem; line-height: 1.5; color: var(--hi-muted); }
.hi-site:not(.hi-default) .entry-content { font-size: 1.0625rem; }
.hi-site:not(.hi-default) .entry-content > p { max-width: 68ch; }
.hi-site:not(.hi-default) .entry-content > h2 { margin: 3.25rem 0 1rem; font-size: clamp(1.4375rem, 1.2rem + 1vw, 1.75rem); font-stretch: 85%; }
.hi-site:not(.hi-default) .entry-content > h2:first-child { margin-top: 0; }
.hi-site:not(.hi-default) .entry-content > .wp-block-group > h2:first-child { margin-top: 0; }

/* Single holiday pages (plugin template) in the theme's default entry card, same as a default post */
.hi-site.hi-default .hi-main { max-width: none; margin: 0 0 40px; padding: 25px 40px 40px; background: #fff; box-shadow: 3px 3px rgba(70, 70, 70, 0.05); }
.hi-site.hi-default .hi-holiday__h1 { margin: .5rem 0 0; font-size: 26px; line-height: 1.2; letter-spacing: 0; font-stretch: 88%; }
.hi-site.hi-default .hi-holiday__bn { margin: .25rem 0 1.25rem; font-size: 1.125rem; }
@media (max-width: 639px) { .hi-site.hi-default .hi-main { padding: 20px 20px 30px; } }
/* Holiday pages: the same space above the white card (under the header) and below it (above the footer) */
.hi-site.hi-default:has(.hi-main) { --hi-page-gap: clamp(1rem, .4rem + 4.2vw, 3.75rem); }
.hi-site.hi-default:has(.hi-main) .site-inner { padding-top: var(--hi-page-gap); }
.hi-site.hi-default:has(.hi-main) .hi-main { margin-bottom: 0; }
.hi-site.hi-default:has(.hi-main) .site-footer { margin-top: var(--hi-page-gap); }

/* Full-bleed tinted band (a core Group block with the class "hi-band") */
.hi-site .hi-band {
  position: relative;
  margin: 3.5rem 0 0;
  padding: 2.5rem 0 2.75rem;
  background: var(--hi-surface);
  box-shadow: 0 0 0 100vmax var(--hi-surface);
  clip-path: inset(0 -100vmax);
}
.hi-site .hi-band + h2, .hi-site .hi-band + .wp-block-group { margin-top: 3.5rem; }
/* Components that follow another block get section spacing */
.hi-site .entry-content > .wp-block-holiday-info-upcoming { margin-top: 3rem; }
.hi-site .entry-content > h2 + .hi-block { margin-top: 0; }

/* Links inside plugin components (chips, cards, lists): no underline, resting or on hover (hover is a colour change only).
   Beats the parent rule `.entry-content a:not(.button)`. Plain prose links keep their underline. */
.hi-site .entry-content [data-hi-component] a,
.hi-site .entry-content [data-hi-component] a:hover,
.hi-site .entry-content [data-hi-component] a:focus-visible { text-decoration: none; }

/* Table of contents: colour change on hover, no underline */
.hi-site .table-of-contents a:hover { text-decoration: none; }

/* Draft placeholders ("TODO: ...") read as drafts, never as finished copy */
.hi-site .hi-todo {
  max-width: 68ch;
  margin: 1rem 0;
  padding: .75rem 1rem;
  border: 1px dashed var(--hi-pending-border);
  border-radius: 5px;
  background: var(--hi-pending-bg);
  color: #6b4500;
  font-size: .9375rem;
}

/* Holiday and year pages come from the plugin's own templates: line them up with the other pages */
.hi-site .hi-main { max-width: none; padding: 0; }
.hi-site .hi-holiday__h1 { margin: .5rem 0 0; font-size: clamp(1.625rem, 1.1rem + 1.9vw, 2.5rem); font-weight: 800; font-stretch: 78%; line-height: 1.05; letter-spacing: -.012em; text-wrap: balance; }
.hi-site .hi-holiday__bn { margin: clamp(1rem, .75rem + 1vw, 1.5rem) 0 1.5rem; font-size: 1.375rem; }

/* Breadcrumbs (Yoast / Genesis) */
.hi-site .breadcrumb { margin: 0; padding: 1.25rem 0 0; background: none; box-shadow: none; font-size: .875rem; color: var(--hi-muted); }
.hi-site .breadcrumb a { color: var(--hi-muted); }
.hi-site .breadcrumb a:hover { color: var(--hi-accent); }

/* ---------- Footer ---------- */
.hi-site .site-footer { margin-top: 4.5rem; padding: 0; border: 0; border-top: 1px solid var(--hi-border); background: var(--hi-footer); color: var(--hi-muted); text-align: left; font-size: .9375rem; line-height: 1.6; }
.hi-site .site-footer .wrap { max-width: var(--site-w); margin: 0 auto; padding: 3rem var(--gutter) 2rem; }
.hi-site .site-footer p { margin: 0; }
.hi-site .site-footer a { color: var(--hi-text); text-decoration: none; }
.hi-site .site-footer a:hover, .hi-site .site-footer a:focus { color: var(--hi-accent); text-decoration: none; }
.hi-footer { display: grid; gap: 2rem 3rem; grid-template-columns: 1fr; }
.hi-footer__title { font-size: 1.375rem; font-weight: 800; font-stretch: 78%; line-height: 1.1; color: var(--hi-accent); }
.hi-site .site-footer .hi-footer__title, .hi-site .site-footer .hi-footer__title a { color: var(--hi-accent); }
.hi-footer__text { margin-top: .6rem; max-width: 34ch; color: var(--hi-muted); }
.hi-footer__head { margin-bottom: .6rem; font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hi-accent); }
.hi-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.hi-footer__list a { display: inline-flex; align-items: center; min-height: 32px; }
.hi-footer__legal { grid-column: 1 / -1; text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--hi-border); font-size: .875rem; color: var(--hi-muted); }
.hi-footer__copy { font-weight: 600; color: var(--hi-text); }
.hi-footer__disclaimer { margin: .35rem auto 0 !important; max-width: none; font-size: .8125rem; }
@media (min-width: 720px) {
  .hi-footer { grid-template-columns: 1.5fr 1fr 1fr; }
}

/* ---------- Phones ---------- */
@media (max-width: 639px) {
  :root { --gutter: 16px; }
  .hi-site .hi-band { margin-top: 2.5rem; padding: 1.75rem 0 2rem; }
  .hi-site .entry-content > h2 { margin-top: 2.5rem; }
  .hi-site .site-footer { margin-top: 3rem; }
}

/* ---------- Archive / search heading ----------
   Genesis paints .archive-description dark (#333) with white text, but `.hi-site h1` forces dark text (1.24:1).
   Match the light card look instead. */
.hi-site .archive-description { background: #fff; color: var(--hi-text); border: 1px solid var(--hi-border); border-radius: 5px; box-shadow: none; padding: 1.5rem; }
.hi-site .archive-description .archive-title, .hi-site .archive-description .entry-title { color: var(--hi-text); }
.hi-site .archive-description p a { color: var(--hi-accent); text-decoration: none; }
.hi-site .archive-description p a:hover, .hi-site .archive-description p a:focus { color: var(--hi-accent-ink); }

/* ---------- Mobile, touch and reading refinements ---------- */
/* Body text: Genesis makes .entry-content weight 300, so block pages (home, hub, calendar) read lighter than holiday and year pages. One weight. */
.hi-site .entry-content, .hi-site .comment-content { font-weight: 400; }

/* Links are never underlined (colour change on hover only). Genesis underlines links inside entry content; switch that off too. */
.hi-site a, .hi-site a:hover, .hi-site a:focus,
.hi-site .entry-content a:not(.button), .hi-site .entry-content a:not(.button):hover { text-decoration: none; }
.hi-site .hi-table__name a:hover, .hi-site .hi-up__name a:hover, .hi-site .hi-next__name a:hover, .hi-site .hi-cal__item a:hover, .hi-site .hi-card__name a:hover { color: var(--hi-accent); }

/* The skip link target is focusable only through the link; no ring on the whole page area */
.hi-main:focus, #genesis-content:focus { outline: 0; }

/* Phone menu: the nested .wrap inside the menu must not add the header's side padding again; rows are a little shorter */
@media (max-width: 767px) {
  .hi-site .site-header .nav-primary .wrap { padding: 0; min-height: 0; display: block; }
  .hi-site .genesis-nav-menu a { min-height: 42px; padding: .35rem 0; }
  .hi-site .genesis-responsive-menu.show-menu { padding-bottom: .25rem; }
}

/* Phones: the whole footer is centred */
@media (max-width: 767px) {
  .hi-site .site-footer, .hi-site .hi-footer, .hi-site .hi-footer__title, .hi-site .hi-footer__head { text-align: center; }
  .hi-site .site-footer .hi-footer__text { margin-left: auto; margin-right: auto; text-align: center; }
  .hi-site .hi-footer { gap: 1.25rem; }
  .hi-site .hi-footer__list { justify-items: center; }
  .hi-site .hi-footer__list a { justify-content: center; min-height: 36px; }
}

/* Touch screens: footer links get a 44px target */
@media (pointer: coarse) {
  .hi-site .hi-footer__list a { display: flex; align-items: center; min-height: 36px; }
}
/* ---------- Print ---------- */
@media print {
  .hi-site .site-header, .hi-site .site-footer, .hi-site .progress-container, .hi-site .entry-lede { display: none; }
  .hi-site .hi-band { background: none; box-shadow: none; clip-path: none; padding: 0; }
}
