/* Mandir of Madison theme: a clean rebuild of the original Weebly "Unite" look
   (white canvas, uppercase Josefin Sans menu, bold Montserrat headings, purple & teal accents, saffron from the logo). */

@font-face { font-family: "Montserrat"; src: url(/fonts/montserrat-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url(/fonts/montserrat-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url(/fonts/josefin-sans-light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url(/fonts/josefin-sans-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url(/fonts/josefin-sans-bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lora"; src: url(/fonts/lora-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lora"; src: url(/fonts/lora-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #1d1d1f;
  --text: #33333a;
  --muted: #6b6b72;
  --line: #e7e4df;
  --bg: #ffffff;
  --bg-soft: #faf8f5;
  --accent: #5a4bb8;        /* temple purple (from the site's highlight colour #6555c2, darkened for readability) */
  --accent-soft: #f2f0fb;
  --accent-2: #1f8a6c;      /* teal (from #4cc9a4, darkened for readability) */
  --saffron: #d9822b;       /* from the logo */
  --radius: 6px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 84px;
  --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-ui: "Josefin Sans", "Helvetica Neue", Arial, sans-serif;
  --font-quote: "Lora", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.75 var(--font-body); letter-spacing: .01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); transition: color .15s, text-decoration-color .15s; overflow-wrap: anywhere; }
a:hover { color: var(--saffron); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; background: #000; color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  /* no backdrop-filter here: it would trap the fixed-position mobile menu inside the header */
  position: sticky; top: 0; z-index: 50; background: #fff;
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 2px 18px rgba(0,0,0,.05); }
.header-inner { max-width: 1366px; margin: 0 auto; padding: 0 var(--gutter); min-height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.logo { flex: none; display: block; line-height: 0; }
.logo img { height: 56px; width: auto; }
.site-nav { margin-left: auto; }
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }
.site-nav .menu { display: flex; align-items: center; gap: 4px; }
.site-nav .menu > li { position: relative; }
.site-nav a {
  display: block; color: var(--ink); text-decoration: none;
  font: 400 13px/1 var(--font-ui); text-transform: uppercase; letter-spacing: .12em;
  padding: 12px 14px; border-radius: 4px;
}
.site-nav .menu > li > a { padding-top: 14px; }
.site-nav a:hover, .site-nav li.active > a { color: var(--accent); }
.site-nav .menu > li.active > a { box-shadow: inset 0 -2px 0 var(--saffron); border-radius: 0; }
.sub-toggle { display: none; }
.site-nav .sub {
  position: absolute; top: 100%; left: 0; min-width: 230px; padding: 8px 0; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.08);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s ease;
}
.site-nav li.has-sub:hover > .sub, .site-nav li.has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub a { padding: 11px 20px; font-size: 12px; }
.site-nav .sub li.active > a { background: var(--accent-soft); }
.site-nav li.has-sub > a::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); opacity: .6; }
.site-nav .sub li.has-sub > a::after { display: none; }

.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); content: ""; transition: transform .2s, top .2s, opacity .2s; }
.nav-toggle span { top: 21px; } .nav-toggle span::before { top: -7px; left: 0; } .nav-toggle span::after { top: 7px; left: 0; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1020px) {
  :root { --header-h: 68px; }
  .logo img { height: 44px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: #fff; overflow-y: auto; padding: 12px var(--gutter) 40px;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all .2s ease; border-top: 1px solid var(--line);
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .nav-open { overflow: hidden; }
  .site-nav .menu { display: block; }
  .site-nav .menu > li { border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; }
  .site-nav .menu > li > a { flex: 1; padding: 18px 4px; font-size: 15px; }
  .site-nav .menu > li.active > a { box-shadow: none; color: var(--accent); }
  .site-nav li.has-sub > a::after { display: none; }
  .sub-toggle { display: block; width: 48px; height: 48px; border: 0; background: none; cursor: pointer; position: relative; }
  .sub-toggle::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translate(-50%, -70%) rotate(45deg); transition: transform .2s; }
  .sub-toggle[aria-expanded="true"]::before { transform: translate(-50%, -30%) rotate(-135deg); }
  .site-nav .sub { position: static; flex-basis: 100%; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 10px 14px; display: none; min-width: 0; }
  .site-nav .sub.open { display: block; }
  .site-nav .sub a { font-size: 14px; padding: 12px 4px; }
  .site-nav .sub li.active > a { background: none; color: var(--accent); }
}

/* ---------- hero (home page temple photo) ---------- */
.hero { max-width: 1366px; margin: 0 auto; padding: 8px var(--gutter) 0; }
.hero img { display: block; width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius); }

/* ---------- content blocks ---------- */
.page-content { min-height: 40vh; }
.block { max-width: var(--wrap); margin: 0 auto; padding: clamp(36px, 6vw, 64px) var(--gutter); }
.block + .block { border-top: 1px solid var(--line); }
.page-content > .block:nth-of-type(even) { position: relative; }
.page-content > .block:nth-of-type(even)::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); background: var(--bg-soft); z-index: -1; }
.page-content { position: relative; z-index: 0; overflow-x: clip; }

h1, h2, h3, h4 { color: var(--ink); font-family: var(--font-body); font-weight: 700; line-height: 1.25; letter-spacing: .01em; margin: 0 0 .7em; }
h2 { font-size: clamp(22px, 2.4vw, 28px); margin-top: 1.4em; }
h2::after { content: ""; display: block; width: 40px; height: 3px; margin-top: 12px; background: var(--saffron); border-radius: 2px; }
h2.center::after { margin-left: auto; margin-right: auto; }
h2.right::after { margin-left: auto; }
.block > h2:first-child, .col > h2:first-child, .callout > h2:first-child, .col > figure:first-child + h2 { margin-top: 0; }
h3 { font-size: 19px; margin-top: 1.4em; }
h4 { font-size: 16px; text-transform: uppercase; letter-spacing: .08em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }
blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--saffron); font: italic 20px/1.6 var(--font-quote); color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
strong { color: var(--ink); font-weight: 700; }
.center { text-align: center; } .right { text-align: right; }

.accent, .accent strong { color: var(--accent); }
.accent-2, .accent-2 strong { color: var(--accent-2); }
.muted, .muted strong { color: var(--muted); }

/* columns: Weebly's multi-column layouts as a responsive grid */
.cols { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); align-items: start; margin: 0 0 1.5em; }
.cols-1 { --n: 1; } .cols-2 { --n: 2; } .cols-3 { --n: 3; } .cols-4 { --n: 4; }
.col > :last-child { margin-bottom: 0; }
.col .cols { gap: 20px; }
@media (max-width: 860px) {
  .cols, .cols[style] { grid-template-columns: minmax(0, 1fr) !important; }
  .col .cols { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 420px) { .col .cols { grid-template-columns: minmax(0, 1fr) !important; } }

/* images */
figure.img { margin: 0 0 1.4em; }
figure.img img { display: block; border-radius: var(--radius); }
figure.img.center { text-align: center; } figure.img.center img { margin: 0 auto; }
figure.img.right img { margin-left: auto; }
figure.img a { display: inline-block; line-height: 0; }
figure.img a img { transition: opacity .2s; } figure.img a:hover img { opacity: .88; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; text-align: center; }

/* buttons */
p.buttons { margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 10px; }
p.buttons.center { justify-content: center; } p.buttons.right { justify-content: flex-end; }
.button, a.button {
  display: inline-block; padding: 14px 28px 12px; min-width: 150px; text-align: center; text-decoration: none;
  font: 700 13px/1 var(--font-ui); text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 3px; transition: all .15s;
}
.button:hover { background: var(--ink); color: #fff; }
.button.primary { background: var(--saffron); border-color: var(--saffron); color: #fff; }
.button.primary:hover { background: #bf6d1d; border-color: #bf6d1d; color: #fff; }

/* callout box (was a coloured "platform element" on Weebly) */
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); margin: 0 0 1.5em; text-align: center; }
.callout h2 { font-size: clamp(26px, 4vw, 40px); }
.callout h2::after { margin-left: auto; margin-right: auto; }

/* embeds: maps, PDFs, PayPal */
.embed { margin: 0 0 1.5em; }
.embed iframe { display: block; width: 100%; border: 1px solid var(--line) !important; border-radius: var(--radius); }
.embed.center { text-align: center; }
.mom-map iframe { height: 400px; }
.mom-pdf iframe { height: 640px; }
.mom-pdf-link { margin-top: 10px; font-size: 15px; }
.mom-pdf-link a::before { content: "📄 "; }
@media (max-width: 767px) { .mom-pdf iframe { height: 440px; } .mom-map iframe { height: 320px; } }

/* slideshow */
.mom-slideshow { position: relative; margin: 0 0 1.5em; line-height: 0; text-align: center; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.mom-slideshow > img { display: none; width: 100%; max-height: 520px; object-fit: contain; margin: 0 auto; }
.mom-slideshow > img.active, .mom-slideshow:not([data-mom-ready]) > img:first-of-type { display: block; animation: mom-fade .8s ease; }
@keyframes mom-fade { from { opacity: 0; } to { opacity: 1; } }
.mom-ss-prev, .mom-ss-next {
  position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.85); color: var(--ink); font: 28px/1 sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,.15);
  opacity: 0; transition: opacity .2s;
}
.mom-ss-prev { left: 10px; } .mom-ss-next { right: 10px; }
.mom-slideshow:hover .mom-ss-prev, .mom-slideshow:hover .mom-ss-next, .mom-ss-prev:focus-visible, .mom-ss-next:focus-visible { opacity: 1; }
@media (hover: none) { .mom-ss-prev, .mom-ss-next { opacity: .9; } }
.mom-ss-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.mom-ss-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 2px rgba(0,0,0,.4); }
.mom-ss-dots span.on { background: #fff; }

/* photo gallery */
.mom-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 0 0 1.5em; line-height: 0; }
.mom-gallery > a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--bg-soft); }
.mom-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.mom-gallery a:hover img { transform: scale(1.04); }
@media (max-width: 480px) { .mom-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; } }

/* lightbox */
.mom-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(12,12,14,.94); display: none; align-items: center; justify-content: center; }
.mom-lightbox.open { display: flex; }
.mom-lightbox figure { margin: 0; text-align: center; }
.mom-lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: 4px; }
.mom-lightbox figcaption { color: #ddd; padding-top: 10px; }
.mom-lightbox button { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; font: 48px/1 sans-serif; padding: 12px 18px; opacity: .8; }
.mom-lightbox button:hover { opacity: 1; }
.mom-lb-close { top: 8px; right: 8px; font-size: 40px !important; }
.mom-lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.mom-lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.mom-lb-count { position: absolute; top: 18px; left: 20px; color: #bbb; font: 14px var(--font-ui); letter-spacing: .1em; }
.mom-lb-single .mom-lb-prev, .mom-lb-single .mom-lb-next, .mom-lb-single .mom-lb-count { display: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 48px var(--gutter) 24px; }
.footer-inner h3 { font: 700 13px/1.2 var(--font-ui); text-transform: uppercase; letter-spacing: .14em; color: var(--ink); margin: 0 0 12px; }
.footer-inner .cols { margin: 0; }
.footer-inner a { color: var(--ink); }
.footer-bottom { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter) 28px; border-top: 1px solid var(--line); font-size: 13px; }
@media (max-width: 860px) { .footer-inner .cols { gap: 24px; } }

@media print {
  .site-header, .site-footer, .mom-ss-prev, .mom-ss-next { display: none !important; }
  .page-content > .block:nth-of-type(even)::before { display: none; }
}

/* ---------- photo effects (editor: "Photo effects" menu). The class may sit on the <img> or on its <figure>; the photo itself gets the effect. ---------- */
.page-content img.fx-rounded, .page-content .fx-rounded > img { border-radius: 16px; }
.page-content img.fx-circle, .page-content .fx-circle > img { border-radius: 50%; aspect-ratio: 1 / 1; object-fit: cover; }
.page-content img.fx-shadow, .page-content .fx-shadow > img { box-shadow: 0 10px 30px rgba(29, 29, 31, .18); }
.page-content img.fx-frame, .page-content .fx-frame > img { background: #fff; padding: 8px; border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(29, 29, 31, .10); }
.page-content img.fx-zoom, .page-content .fx-zoom > img { transition: transform .45s ease; }
.page-content img.fx-zoom:hover, .page-content .fx-zoom > img:hover { transform: scale(1.05); }
.page-content img.fx-kenburns, .page-content .fx-kenburns > img { animation: mom-kenburns 12s ease-in-out infinite alternate; }
.page-content img.fx-glow, .page-content .fx-glow > img { animation: mom-glow 3s ease-in-out infinite; }
.page-content img.fx-glow.fx-kenburns, .page-content .fx-glow.fx-kenburns > img { animation: mom-glow 3s ease-in-out infinite, mom-kenburns 12s ease-in-out infinite alternate; }
.mom-js .fx-fadein:not(.fx-in) { opacity: 0; transform: translateY(24px); }
.fx-fadein { transition: opacity .9s ease, transform .9s ease; }
body.mom-editing .fx-fadein { opacity: 1; transform: none; }
.mom-slideshow.fx-ss-zoom > img.active { animation: mom-fade .8s ease, mom-kenburns 9s ease-out forwards; }
@keyframes mom-kenburns { from { transform: scale(1); } to { transform: scale(1.05); } }
@keyframes mom-glow { 0%, 100% { box-shadow: 0 0 0 rgba(217, 130, 43, 0); } 50% { box-shadow: 0 0 26px 6px rgba(217, 130, 43, .55); } }
@media (prefers-reduced-motion: reduce) { .mom-js .fx-fadein:not(.fx-in) { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
