/* =========================================================
   ETHOS — Consolidated Stylesheet (EN)
   Unifies legacy style.css + ethos-navi + ethos-layout +
   shared/local link-hover + Google Translate fixes.

   Highlights:
   - Nav hover/active: WHITE (no orange bleed from content styles)
   - Unicode ☰ hamburger; transparent by default; maroon only when OPEN
   - .topnav + .topnav1 both supported (legacy-safe)
   - Single canonical mobile block for nav
   ========================================================= */


/* =========================
   0) Variables
   ========================= */
:root {
  --ethos-maroon: maroon;
  --ethos-hover: #f88017;
  --shadow: 10px 10px 5px rgba(0,0,0,0.35);

  /* Hamburger variables (moved up from later block) */
  --nav-row-h: 48px;                  /* top bar height */
  --icon-size: 26px;                  /* ☰ size */
  --icon-pad-x: 16px;                 /* left/right padding of the button */
  --icon-glyph-w: 24px;               /* approx width of ☰ at current font-size */
  --icon-closed-bg: beige;            /* closed: match the bar */
  --icon-closed-color: var(--ethos-maroon);
  --icon-open-bg: var(--ethos-maroon);/* hover & open: maroon */
  --icon-open-color: #fff;            /* ☰ turns white */
}


/* =========================
   1) Resets & Base
   ========================= */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
  color: #111;
}

p, li { font-size: 18px; line-height: 1.8; }

/* keep UI icons inline; block only in content areas */
.entry-content img,
.ethos-content img,
figure img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--ethos-maroon);
  letter-spacing: .01em;
  line-height: 1.35;
  margin: .6em 0 .4em;
}
h1 { font-size: 28px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; }
h5 { font-size: 17px; }
h6 { font-size: 16px; }

/* Baseline links (menus handled in nav section) */
a { color: var(--ethos-maroon); text-decoration: none; }


/* =========================
   2) Header / Branding
   ========================= */
.header {
  background-color: #ffe7cd;
  color: var(--ethos-maroon);
  margin: 5px 15px 0 0;
  padding: 5px;
  border: 2px solid var(--ethos-maroon);
  border-radius: 5px;
  box-shadow: var(--shadow);
}
.container { position: relative; }
.link { position: absolute; inset: 0; z-index: 1; }


/* =========================
   3) Navigation (Unified)
   Supports .topnav and .topnav1 (legacy)
   ========================= */

/* 3.1 Base Bar */
.topnav, .topnav1 {
  overflow: hidden;
  background-color: beige;
}

/* 3.2 Links — unified font face/weight/size */
/* === MENU LABEL WEIGHT (single source of truth)
   Change only here to make all topnav items heavier/lighter.
   600 = semibold (recommended), 700 = bold, 500 = medium.
   Avoid <strong>/<b> in the menu HTML—keep weight in CSS. */
.topnav a, .topnav1 a {
  float: left;
  display: block;
  color: var(--ethos-maroon);
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 600;              /* For semi-bold set to 600 */
}

/* 3.3 Active: maroon background + white text */
.topnav a.active,
.topnav1 a.active {
  background-color: var(--ethos-maroon);
  color: #fff !important;
  font-weight: bold;
}

/* 3.4 Hover: maroon background + white text */
.topnav a:hover,
.topnav1 a:hover {
  background-color: var(--ethos-maroon);
  color: #fff !important;
}

/* 3.5 Hamburger (Unicode ☰) — hidden on desktop
   Default/hover are TRANSPARENT; only filled when menu is OPEN  */
.topnav a.icon, .topnav1 a.icon {
  display: none;
  color: var(--ethos-maroon);
  background: transparent;        /* <-- no beige/maroon block on desktop */
  font-size: var(--icon-size);
  line-height: 1;
  padding: 10px 14px;             /* comfy tap target without chunky box */
  align-items: center;            /* align when flex-applied below */
}

/* Keep hover/focus subtle when closed */
.topnav a.icon:hover, .topnav1 a.icon:hover,
.topnav a.icon:focus, .topnav1 a.icon:focus {
  background: transparent;
  color: var(--ethos-maroon);
}

/* Filled state only when menu is OPEN; rounded to match parent */
.topnav.responsive a.icon, .topnav1.responsive a.icon {
  background: var(--icon-open-bg) !important;
  color: var(--icon-open-color) !important;
  position: absolute; right: 0; top: 0;
  border-top-right-radius: inherit;
  border-bottom-right-radius: inherit;
}

/* Prevent inner children from inheriting orange, if any */
.ethos-submenu a.icon:hover *,
.ethos-submenu a.icon:focus *,
.ethos-submenu a.icon:active *,
.topnav.responsive a.icon *,
.topnav1.responsive a.icon * { color: #fff !important; }

/* 3.6 Card wrapper with shadow (nav container) */
#box {
  background: #fff;
  border: 1px solid #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 0 auto 15px;
  padding: 0;
  display: block;
  text-align: center;
  overflow: hidden;               /* clip children to rounded corners */
}

/* Beige nav inside the card (single source of truth) */
#box > .topnav,
#box > .topnav1 {
  background-color: beige;
  border: 1px solid var(--ethos-maroon);
  border-radius: inherit;         /* same 12px curve as #box */
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Neutralize extra spacing from submenu class, if any */
#box > .topnav.ethos-submenu,
#box > .topnav1.ethos-submenu { margin: 0; padding: 0; }

/* 3.7 Extra space above nav menu (requested) */
nav, #ethos-menu { margin-top: 10px; }

/* 3.8 Mobile behavior (single canonical block) */
@media (max-width: 600px) {
  /* collapsed: show only Home + hamburger */
  .topnav .menu-link,  .topnav1 .menu-link  { display: none; }
  .topnav .menu-link.home, .topnav1 .menu-link.home { display: block; }

  .topnav a.icon, .topnav1 a.icon { display: block; float: right; display: flex; }

  /* expanded/open state */
  .topnav.responsive, .topnav1.responsive { position: relative; }
  .topnav.responsive a.icon, .topnav1.responsive a.icon {
    position: absolute; right: 0; top: 0;
  }
  .topnav.responsive .menu-link,
  .topnav1.responsive .menu-link {
    display: block; float: none; text-align: left;
  }
}

/* 3.9 Fallback for pages not yet using .menu-link classes */
@media (max-width: 600px) {
  .topnav:not(.has-menu-classes) a:not(:first-child),
  .topnav1:not(.has-menu-classes) a:not(:first-child) { display: none; }

  .topnav.responsive:not(.has-menu-classes) a,
  .topnav1.responsive:not(.has-menu-classes) a {
    float: none; display: block; text-align: left;
  }
}


/* =========================
   4) Grid / Columns (float layout)
   ========================= */
.row::after,
.col-9::after,
.entry-content::after { content: ""; display: block; clear: both; }

[class*="col-"] { float: left; padding: 15px; }
.col-1 {width: 8.33%;} .col-2 {width: 16.66%;} .col-3 {width: 25%;}
.col-4 {width: 33.33%;} .col-5 {width: 41.66%;} .col-6 {width: 50%;}
.col-7 {width: 58.33%;} .col-8 {width: 66.66%;} .col-9 {width: 75%;}
.col-10 {width: 83.33%;} .col-11 {width: 91.66%;} .col-12 {width: 100%;}

@media (max-width: 768px) { [class*="col-"] { width: 100%; } }


/* =========================
   5) Slideshow bits
   ========================= */
.prev:hover, .next:hover { background-color: rgba(0,0,0,0.8); }
.text { color: #f2f2f2; font-size: 15px; padding: 8px 12px; position: absolute; bottom: 8px; width: 100%; text-align: center; }
.numbertext { color: #f2f2f2; font-size: 12px; padding: 8px 12px; position: absolute; top: 0; }
.dot { cursor: pointer; height: 10px; width: 10px; margin: 0 2px; background: #bbb; border-radius: 50%; display: inline-block; transition: background-color .6s ease; }
.active, .dot:hover { background: #717171; }
.fade { -webkit-animation-name: fade; -webkit-animation-duration: 1.5s; animation-name: fade; animation-duration: 1.5s; }
@-webkit-keyframes fade { from {opacity:.4} to {opacity:1} }
@keyframes fade        { from {opacity:.4} to {opacity:1} }


/* =========================
   6) Content Link Hover (orange)
   IMPORTANT: Scoped to CONTENT ONLY — nav excluded
   ========================= */
.ethos-content a, a.ethos-content {
  color: inherit !important;
  text-decoration: none;
  transition: color .25s ease;
}
.ethos-content a:hover, a.ethos-content:hover,
.ethos-content a:hover *, a.ethos-content:hover * {
  color: var(--ethos-hover) !important;
}

/* Keyboard focus styling (content + controls) */
.ethos-content a:focus-visible,
a.toggle-btn:focus-visible,
button.toggle-btn:focus-visible {
  outline: 2px dashed var(--ethos-hover);
  outline-offset: 2px;
}

/* footer links orange on hover (new unified footer uses .ethos-footer) */
.ethos-footer a:hover { color: var(--ethos-hover) !important; }


/* =========================
   7) Read-more controls
   ========================= */
button.toggle-btn,
a.toggle-btn.ethos-content {
  font-weight: 600; cursor: pointer; border: 0; background: none;
  color: var(--ethos-maroon) !important; transition: color .25s ease;
}
button.toggle-btn:hover, button.toggle-btn:focus-visible,
a.toggle-btn.ethos-content:hover, a.toggle-btn.ethos-content:focus-visible {
  color: var(--ethos-hover) !important;
}
button.toggle-btn:hover *, button.toggle-btn:focus-visible *,
a.toggle-btn.ethos-content:hover *, a.toggle-btn.ethos-content:focus-visible * {
  color: var(--ethos-hover) !important;
}


/* =========================
   8) Index program cards (center + hover)
   ========================= */
#grid-container {
  display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; margin-bottom: 20px;
}
#grid-container > * { margin-bottom: 20px; }
.grid-child1 {
  width: 320px; background: beige; border: 3px solid var(--ethos-maroon);
  border-radius: 20px; box-shadow: var(--shadow); margin: 0 auto;
}
.boxCHOICE, .boxCHOICE1 {
  width: 300px; background: #ffe7cd; color: var(--ethos-maroon);
  border: 3px solid var(--ethos-maroon); border-radius: 20px; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.boxCHOICE { min-height: 50px; font-size: 18px; line-height: 1; }
.boxCHOICE1 { min-height: 80px; font-size: 30px; }
.boxCHOICE:hover a, .boxCHOICE1:hover a,
.boxCHOICE:hover a *, .boxCHOICE1:hover a * { color: var(--ethos-hover) !important; }


/* =========================
   9) Mobile typography tweaks
   ========================= */
@media (max-width: 480px) {
  h1 { font-size: 22px; line-height: 1.3; }
  h2 { font-size: 20px; }

  /* Create contrast between heading and strong emphasis */
  h4 { font-weight: 600; }                   /* lighter base */
  h4 strong { font-weight: 800 !important; } /* heavier emphasis */
}


/* =========================================================
   GT Note Styling
   Subtle helper text under the translate dropdown
   ========================================================= */
.gt-note {
  font-size: 14px;
  line-height: 1.4;
  color: #555;                /* soft gray, not distracting */
  text-align: center;
  margin: 8px auto 12px;
  max-width: 750px;           /* same width as dropdown */
  padding: 4px 8px;
  background: #f9f9f9;        /* very light background */
  border: 1px solid #ddd;     /* subtle border */
  border-radius: 8px;
}


/* =========================
   10) Google Translate — Unified Centered Layout
   (with index-only row variant)
   ========================= */

/* General wrapper to center widget block + breathing room */
.translate-box {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  margin: 1px auto 12px !important; /* was 8px */
}

/* Google’s container */
#google_translate_element .goog-te-gadget,
#google_translate_element .goog-te-gadget-simple {
  display: inline-flex !important;
  flex-direction: column !important;   /* credit under dropdown on mobile */
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  text-align: center !important;
  font-size: 0 !important;             /* hides orphan "Powered by" text node */
  white-space: normal !important;
  max-width: 100% !important;
}

/* Dropdown */
#google_translate_element .goog-te-combo {
  order: 1 !important;
  margin: 0 auto !important;
  width: 100% !important;              /* full width on phones */
  max-width: 520px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  padding: .5rem .75rem !important;
  border-radius: 12px !important;
  box-sizing: border-box !important;
}

/* Credit line */
#google_translate_element .goog-te-gadget > span,
#google_translate_element .goog-te-gadget-simple span,
#google_translate_element .goog-logo-link {
  order: 2 !important;
  display: block !important;
  float: none !important;
  position: static !important;
  margin: 4px auto 0 !important;
  text-align: center !important;
  font-size: 11px !important;          /* restore font size */
  white-space: normal !important;
}

/* Add back the “Powered by” label before the link */
#google_translate_element .goog-te-gadget > span::before { content: "Powered by "; }

/* Logo link tidy */
#google_translate_element .goog-logo-link {
  display: inline-flex !important;
  align-items: center !important;
}
#google_translate_element .goog-logo-link img {
  height: 1em !important;
  width: auto !important;
  margin: 0 !important;
  vertical-align: -0.15em !important;
}

/* Desktop: keep dropdown + credit on one line (stronger override) */
@media (min-width: 768px) {
  #google_translate_element .goog-te-gadget {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 0 !important; /* hide stray text nodes */
  }

  #google_translate_element .goog-te-gadget > span,
  #google_translate_element .goog-logo-link,
  #google_translate_element .goog-te-gadget-simple span {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;  /* <-- prevents wrapping on desktop */
    margin: 0 !important;
    float: none !important;
    position: static !important;
    order: 0 !important;
    flex-basis: auto !important;
  }
}

/* ===== Index-only row variant ===== */
.translate-row{ display:flex !important; justify-content:center !important; width:100% !important; text-align:center !important; }
.translate-row #google_translate_element{ display:flex !important; justify-content:center !important; width:100% !important; }

.translate-row #google_translate_element .goog-te-gadget,
.translate-row #google_translate_element .goog-te-gadget-simple{
  display:inline-flex !important;
  flex-direction:row !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  justify-content:center !important;
  gap:.5rem !important;
  font-size:0 !important;              /* hide stray text nodes */
  white-space:nowrap !important;       /* keep credit on one line */
}

.translate-row #google_translate_element .goog-te-combo{ margin:0 !important; width:auto !important; }

.translate-row #google_translate_element .goog-te-gadget > span,
.translate-row #google_translate_element .goog-logo-link{
  display:inline-flex !important;
  align-items:center !important;
  margin-top:0 !important;
  float:none !important;
  white-space:nowrap !important;
  text-align:center !important;
}

/* Index-only: stack on small screens so it's not crowded */
@media (max-width: 640px){
  .translate-row #google_translate_element .goog-te-gadget{
    flex-direction: column !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .translate-row #google_translate_element .goog-te-combo{
    width: 100% !important; max-width: 520px !important;
  }
  .translate-row #google_translate_element .goog-te-gadget > span,
  .translate-row #google_translate_element .goog-logo-link{
    white-space: normal !important; margin-top: 2px !important;
  }
}


/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
/* ===== END OF THE CONSOLIDATED RESHUFFLE BY ELI - 9-1-2025 ===== */
/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* =========================================================
   Hamburger — FINAL (Unicode ☰, ENG & JP)
   - Maroon on hover & when open
   - No vertical shift (closed ↔ open)
   - Clean rounded outer corner (icon itself has no radius)
   - Single source of truth: do not duplicate .icon rules elsewhere
   ========================================================= */

/* Nav clips children to its rounded corners (outer curve comes from #box/.topnav) */
#box > .topnav,
#box > .topnav1 {
  position: relative;
  overflow: hidden;
  min-height: var(--nav-row-h);
}

@media (max-width:600px){

  /* Top row link uses the same fixed-height box as the hamburger */
  #box > .topnav .menu-link.home,
  #box > .topnav1 .menu-link.home {
    height: var(--nav-row-h);
    line-height: var(--nav-row-h);   /* centers text without flex baseline quirks */
    padding: 0 var(--icon-pad-x);
    display: block;
  }

  /* Hamburger uses the SAME box in both states (no vertical jump) */
  #box > .topnav a.icon,
  #box > .topnav1 a.icon,
  #box > .topnav.responsive a.icon,
  #box > .topnav1.responsive a.icon {
    position: absolute; right: 0; top: 0;
    height: var(--nav-row-h);
    line-height: var(--nav-row-h);   /* centers ☰ vertically */
    padding: 0 var(--icon-pad-x);
    font-size: var(--icon-size);
    border-radius: 0;                /* no own rounding; parent provides corner */
    text-align: center;
    z-index: 2;
    -webkit-tap-highlight-color: transparent; /* nicer tap feedback on Android */
    user-select: none; touch-action: manipulation;
  }

  /* Colors: closed vs hover/open */
  #box > .topnav a.icon,
  #box > .topnav1 a.icon {
    background: var(--icon-closed-bg);
    color: var(--icon-closed-color);
  }
  #box > .topnav a.icon:hover,
  #box > .topnav1 a.icon:hover,
  #box > .topnav a.icon:focus,
  #box > .topnav1 a.icon:focus,
  #box > .topnav.responsive a.icon,
  #box > .topnav1.responsive a.icon {
    background: var(--icon-open-bg);
    color: var(--icon-open-color);
  }

  /* Keep links clear of the button when open. */
  #box > .topnav.responsive .menu-link,
  #box > .topnav1.responsive .menu-link {
    padding-right: calc(2 * var(--icon-pad-x) + var(--icon-glyph-w)); /* ≈56px at defaults */
  }
}

/* Hide the Google Translate widget when requested */
.gt-hidden { display: none !important; }
.translate-box.gt-hidden,
#gt-wrap.gt-hidden { display: none !important; }


/* =========================================================
   Google Translate Annoyance Killer
   Hides browser-injected bars, balloons, and highlights
   ========================================================= */

/* Kill the top banner and rating balloon */
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-te-banner-frame,
iframe.goog-te-banner-frame {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

/* Prevent GT from pushing content down */
body { top: 0 !important; }

/* Remove the yellow highlight effect */
.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}
/*---------------------------------------------- */
/*---------   Image click-to-enlarge  -----------*/
/*---------------------------------------------- */

/* Optional wrappers for layout spacing (use anywhere you like) */
.ethos-thumb,
.img-container {
  display: inline-block;
  margin: 10px;
  position: relative;
}

/* Zoomable targets (three patterns supported) */
img.ethos-zoom,
.img-container img,
.ethos-thumb img {
  cursor: zoom-in;
  transition: transform .25s ease, box-shadow .25s ease;
  height: auto;
  max-width: 100%;
  touch-action: manipulation;     /* nicer mobile taps */
  -webkit-user-drag: none;
}

/* Optional helper for small thumbs (only when you want it) */
.ethos-thumb--small img { width: 150px; }

/* Enlarged state (centered & capped by CSS custom props) */
img.ethos-zoom.enlarged,
.img-container img.enlarged,
.ethos-thumb img.enlarged {
  position: fixed;
  left: var(--ez-x, 50%);
  top:  var(--ez-y, 50%);
  transform: translate(-50%, -50%) scale(var(--ez-scale, 1));
  transform-origin: center center;
  width: auto !important;             /* ignore thumbnail widths */
  height: auto !important;
  max-width:  var(--ez-maxw, 95vw);
  max-height: var(--ez-maxh, 85vh);
  z-index: 10001;                     /* above overlay */
  cursor: zoom-out;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

/* Dimmed backdrop (auto-created by JS) */
.ethos-zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.ethos-zoom-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  img.ethos-zoom,
  .img-container img,
  .ethos-thumb img,
  .ethos-zoom-overlay {
    transition: none;
  }
}
/* ---- Page image helpers (float + widths) ---- */
.float-right { float: right; margin: 0 0 15px 15px; }
.float-left  { float: left;  margin: 0 15px 15px 0;  }
.w25 { width:25%; } .w30 { width:30%; } .w35 { width:35%; } .w40 { width:40%; } .w50 { width:50%; }

@media (max-width: 768px){
  .float-right, .float-left { float:none; display:block; margin:10px auto; }
  .w25, .w30, .w35, .w40, .w50 { width:100%; max-width:560px; }
}

/* ---- Responsive thumbnail grids ---- */
.ethos-thumbs { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-start; }
.ethos-thumbs.center { justify-content:center; }

/* Two-up grid on phones (images ~46% of viewport width) */
@media (max-width: 640px){
  .ethos-thumbs.grid-2 .ethos-thumb img { width: 46vw; }
  .ethos-thumbs.grid-1 .ethos-thumb img { width: 90vw; }
}
