/* Structural styles shared by every public organization website.
   Visual identity (colors, fonts, spacing, button style) comes from
   CSS custom properties set per-theme in ThemeRenderer::css(). Theme-
   specific structural variations (e.g. the Bootstrap theme's dark
   navbar) are scoped under body.theme-{base_theme}. */

:root {
    --primary: #1c3d5a;
    --secondary: #a9762f;
    --bg: #ffffff;
    --text: #232323;
    --heading-font: Georgia, serif;
    --body-font: Arial, sans-serif;
    --radius: 4px;
    --spacing: 48px;
    --content-width: 1080px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.08);
    --shadow-hover: 0 10px 24px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--body-font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--heading-font); color: var(--text); line-height: 1.2; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }

.site-container { max-width: var(--content-width); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid rgba(0,0,0,.08); padding: 18px 0; }
.site-header .site-container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-header.layout-centered .site-container { flex-direction: column; text-align: center; }
.site-header.layout-split .site-container { justify-content: space-between; }
.site-logo { font-family: var(--heading-font); font-size: 22px; font-weight: bold; color: var(--text); text-decoration: none; }
.site-tagline { font-size: 13px; color: #777; margin-top: 2px; }

/* Nav */
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav.layout-horizontal-centered ul { justify-content: center; }
.site-nav li { position: relative; }
.site-nav a { display: block; padding: 8px 12px; text-decoration: none; color: var(--text); font-size: 14px; border-radius: var(--radius); transition: background-color .15s ease, color .15s ease; }
.site-nav a:hover { background: rgba(0,0,0,.06); }
.site-nav .submenu { display: none; position: absolute; left: 0; top: 100%; background: var(--bg); border: 1px solid rgba(0,0,0,.1); border-radius: var(--radius); min-width: 190px; box-shadow: var(--shadow-hover); z-index: 10; overflow: hidden; }
.site-nav li:hover .submenu { display: block; }
.site-nav .submenu a { padding: 10px 14px; border-radius: 0; }

/* Bootstrap-theme dark navbar, matching getbootstrap.com's carousel example header */
body.theme-bootstrap .site-header { background: #212529; border-bottom-color: #212529; padding: 12px 0; }
body.theme-bootstrap .site-logo { color: #fff; }
body.theme-bootstrap .site-tagline { color: #adb5bd; }
body.theme-bootstrap .site-nav a { color: #fff; }
body.theme-bootstrap .site-nav a:hover { background: rgba(255,255,255,.12); }
body.theme-bootstrap .site-nav .submenu { background: #212529; border-color: #343a40; }
body.theme-bootstrap .site-nav .submenu a { color: #fff; }

/* Material theme -- modeled on MDBootstrap's standard landing-page
   template (mdbootstrap.com/snippets/standard/mdbootstrap/2515521):
   dark colored navbar, a full-bleed hero with a heavy dark mask and
   centered white text behind outline-light pill buttons, a light
   "hover-overlay" brightening effect on card images, elevated shadowed
   cards, and a light footer with circular social buttons. */
body.theme-mdbootstrap .site-header { background: var(--primary); border-bottom: none; box-shadow: 0 2px 6px rgba(0,0,0,.25); padding: 14px 0; }
body.theme-mdbootstrap .site-logo { color: #fff; letter-spacing: .02em; }
body.theme-mdbootstrap .site-tagline { color: rgba(255,255,255,.75); }
body.theme-mdbootstrap .site-nav a { color: #fff; text-transform: uppercase; font-size: 13px; letter-spacing: .03em; font-weight: 500; }
body.theme-mdbootstrap .site-nav a:hover { background: rgba(255,255,255,.15); }
body.theme-mdbootstrap .site-nav .submenu { background: #fff; }
body.theme-mdbootstrap .site-nav .submenu a { color: var(--text); text-transform: none; }

body.theme-mdbootstrap h1, body.theme-mdbootstrap h2, body.theme-mdbootstrap h3 { font-weight: 500; }

/* Hero: full-bleed image, heavy dark mask, centered white text, big
   outline-light pill buttons -- straight from the reference's #intro. */
body.theme-mdbootstrap .section-hero {
    position: relative; min-height: 70vh; display: flex; align-items: center;
    color: #fff; text-align: center;
}
body.theme-mdbootstrap .section-hero::before {
    content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.8);
}
body.theme-mdbootstrap .section-hero .hero-inner { position: relative; z-index: 1; width: 100%; }
body.theme-mdbootstrap .hero-inner h1 { color: #fff; font-weight: 300; }
body.theme-mdbootstrap .hero-sub { color: rgba(255,255,255,.85); }
body.theme-mdbootstrap .section-hero .btn-primary {
    background: transparent; border: 2px solid #fff; color: #fff !important;
    border-radius: 999px; box-shadow: none; text-transform: uppercase; letter-spacing: .03em; font-size: 13px;
}
body.theme-mdbootstrap .section-hero .btn-primary:hover { background: #fff; color: var(--primary) !important; }

/* Cards: elevated shadow + the reference's "hover-overlay" image brighten. */
body.theme-mdbootstrap .btn-primary {
    text-transform: uppercase; font-size: 13px; letter-spacing: .03em; font-weight: 500;
    box-shadow: 0 3px 6px rgba(0,0,0,.16), 0 3px 6px rgba(0,0,0,.23);
}
body.theme-mdbootstrap .btn-primary:hover { box-shadow: 0 10px 20px rgba(0,0,0,.19), 0 6px 6px rgba(0,0,0,.23); }
body.theme-mdbootstrap .event-card, body.theme-mdbootstrap .class-card,
body.theme-mdbootstrap .article-card, body.theme-mdbootstrap .person-card {
    border: none; box-shadow: 0 2px 5px rgba(0,0,0,.12), 0 2px 10px rgba(0,0,0,.10); overflow: hidden;
}
body.theme-mdbootstrap .event-card:hover, body.theme-mdbootstrap .class-card:hover,
body.theme-mdbootstrap .article-card:hover, body.theme-mdbootstrap .person-card:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,.15), 0 10px 10px rgba(0,0,0,.10);
}
body.theme-mdbootstrap .article-card img, body.theme-mdbootstrap .person-card img,
body.theme-mdbootstrap .gallery-grid img { transition: filter .2s ease; }
body.theme-mdbootstrap .article-card:hover img, body.theme-mdbootstrap .person-card:hover img,
body.theme-mdbootstrap .gallery-grid img:hover { filter: brightness(1.12); }
body.theme-mdbootstrap .shabbat-item, body.theme-mdbootstrap .gallery-grid img { box-shadow: 0 2px 5px rgba(0,0,0,.12), 0 2px 10px rgba(0,0,0,.10); border: none; }

/* Footer: light background with circular social buttons, matching the
   reference's bg-light footer (not a dark footer like the Bootstrap theme). */
body.theme-mdbootstrap .site-footer { background: #f5f5f5; border-top: none; }
body.theme-mdbootstrap .site-social a {
    border-radius: 999px; width: 40px; height: 40px; padding: 0; line-height: 40px;
    background: var(--primary); color: #fff; border-color: var(--primary); font-size: 0;
}
body.theme-mdbootstrap .site-social a::first-letter { font-size: 13px; }
body.theme-mdbootstrap .site-social a:hover { opacity: .85; background: var(--primary); color: #fff; }

/* Sections */
.section { padding: var(--spacing) 0; }
.section-inner { max-width: var(--content-width); margin: 0 auto; padding: 0 20px; }
.section:nth-child(even) { background: rgba(0,0,0,.02); }

.section-hero { background-size: cover; background-position: center; padding: calc(var(--spacing) * 1.6) 0; text-align: center; color: var(--text); }
.hero-inner h1 { font-size: 38px; margin: 0 0 14px; letter-spacing: -.01em; }
.hero-sub { font-size: 17px; color: #666; max-width: 560px; margin: 0 auto 24px; }

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff !important;
    padding: 12px 26px;
    text-decoration: none;
    font-weight: bold;
    border-radius: var(--radius);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn-primary:hover { opacity: .92; transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-primary:active { transform: translateY(0); }
body.btn-pill .btn-primary { border-radius: 999px; }
body.btn-square .btn-primary { border-radius: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-top: 22px; }
.event-card, .class-card, .article-card, .person-card {
    background: var(--bg);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.event-card:hover, .class-card:hover, .article-card:hover, .person-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.event-card .event-date { color: var(--secondary); font-weight: bold; font-size: 13px; margin-bottom: 6px; }
.article-card img, .person-card img { border-radius: var(--radius); margin-bottom: 10px; aspect-ratio: 4/3; object-fit: cover; }
.meta { color: #777; font-size: 13px; margin: 4px 0; }
.empty-note { color: #888; font-size: 14px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 18px; }
.gallery-grid img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.gallery-grid img:hover { transform: scale(1.03); box-shadow: var(--shadow-hover); }

.shabbat-box { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 18px; }
.shabbat-item { background: var(--bg); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius); padding: 16px 20px; min-width: 160px; box-shadow: var(--shadow); }
.shabbat-item .label { display: block; font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: .06em; }
.shabbat-item .value { display: block; font-size: 19px; font-weight: bold; margin-top: 5px; }

.rich-text p { margin: 0 0 14px; }
.contact-details p { margin: 6px 0; }

.site-footer { border-top: 1px solid rgba(0,0,0,.08); padding: 32px 0; font-size: 13px; color: #777; text-align: center; }
.site-social { margin-bottom: 12px; display: flex; justify-content: center; gap: 10px; }
.site-social a {
    display: inline-block; padding: 8px 18px; border-radius: var(--radius); border: 1px solid var(--primary);
    color: var(--primary); text-decoration: none; font-size: 12.5px; font-weight: bold; transition: background-color .15s ease, color .15s ease;
}
.site-social a:hover { background: var(--primary); color: #fff; }
body.theme-bootstrap .site-footer { background: #212529; color: #adb5bd; border-top-color: #212529; }
body.theme-bootstrap .site-footer a { color: #fff; }
body.theme-bootstrap .site-social a { border-color: #fff; color: #fff; }
body.theme-bootstrap .site-social a:hover { background: #fff; color: #212529; }

form.public-form label { display: block; font-size: 13px; font-weight: bold; margin: 12px 0 4px; }
form.public-form input, form.public-form textarea, form.public-form select {
    width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: var(--radius); font-size: 14px; font-family: var(--body-font);
    transition: border-color .15s ease, box-shadow .15s ease;
}
form.public-form input:focus, form.public-form textarea:focus, form.public-form select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
form.public-form button { margin-top: 18px; border: none; cursor: pointer; }

/* ------------------------------------------------------------------ */
/* Carousel section (Bootstrap-carousel-style multi-slide hero)        */
/* ------------------------------------------------------------------ */
.site-carousel { position: relative; overflow: hidden; background: #000; }
.carousel-track { display: flex; transition: transform .6s ease; }
.carousel-slide {
    min-width: 100%; min-height: 62vh; max-height: 620px;
    background-size: cover; background-position: center; background-color: #343a40;
    display: flex; align-items: center; position: relative;
}
.carousel-slide::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.carousel-caption { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; padding: 0 24px; text-align: center; color: #fff; }
.carousel-caption h2 { color: #fff; font-size: 34px; margin: 0 0 12px; }
.carousel-caption p { font-size: 17px; margin: 0 0 20px; color: rgba(255,255,255,.9); }
.carousel-prev, .carousel-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.25); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%;
    font-size: 18px; cursor: pointer; transition: background-color .15s ease;
}
.carousel-prev:hover, .carousel-next:hover { background: rgba(0,0,0,.5); }
.carousel-prev { left: 16px; } .carousel-next { right: 16px; }
.carousel-indicators { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.carousel-indicators button {
    width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.35);
    cursor: pointer; padding: 0;
}
.carousel-indicators button.active { background: #fff; }
@media (max-width: 700px) {
    .carousel-slide { min-height: 46vh; }
    .carousel-caption h2 { font-size: 24px; }
    .carousel-prev, .carousel-next { width: 36px; height: 36px; font-size: 14px; }
}

/* Hamburger toggle for the site nav -- hidden on desktop, shown and
   wired up (site.js) only at narrow widths. Theme-agnostic: uses the
   same --text/--primary variables every theme already sets. */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    margin-left: auto;
    background: none;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .18s ease, opacity .18s ease;
}
body.theme-bootstrap .nav-toggle, body.theme-mdbootstrap .nav-toggle { border-color: rgba(255,255,255,.4); }
body.theme-bootstrap .nav-toggle span, body.theme-mdbootstrap .nav-toggle span { background: #fff; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 700px) {
    /* Regardless of the desktop header layout choice (centered/split/etc),
       mobile always gets the compact "logo left, hamburger right" pattern. */
    .site-header .site-container { flex-direction: row; flex-wrap: wrap; justify-content: space-between; text-align: left; }
    .nav-toggle { display: flex; }

    .site-nav { flex-basis: 100%; order: 3; max-height: 0; overflow: hidden; transition: max-height .2s ease; }
    .site-nav.open { max-height: 80vh; overflow-y: auto; }
    .site-nav ul { flex-direction: column; padding-top: 8px; }
    .site-nav a { padding: 11px 4px; border-top: 1px solid rgba(0,0,0,.06); }
    body.theme-bootstrap .site-nav a, body.theme-mdbootstrap .site-nav a { border-top-color: rgba(255,255,255,.12); }
    /* Submenus normally only reveal on :hover, which doesn't exist on
       touch -- on mobile, show them inline unconditionally instead so
       dropdown items are actually reachable. */
    .site-nav .submenu { display: block; position: static; box-shadow: none; border: none; padding-left: 12px; }
}
