/* ===== Site refresh (Step 2): hero, featured events, calendar, menu ===== */

/* Show content immediately instead of fading it in on scroll (avoids blank areas) */
.wow { visibility: visible !important; animation-name: none !important; }

#schedule, .gw-events { scroll-margin-top: 80px; }
.gw-section-title {
    font-family: 'Vollkorn', 'Noto Serif', serif; font-style: italic; color: var(--gw-brown);
    text-align: center; font-size: 30px; margin: 0 0 22px;
}
.gw-btn--light { background: rgba(255,255,255,.92); color: var(--gw-green-dark) !important; border-color: rgba(255,255,255,.92); }
.gw-btn--light:hover, .gw-btn--light:focus { background: #fff; }
.gw-btn.is-disabled { opacity: .35; pointer-events: none; }

/* ---------- Hero slideshow ---------- */
.gw-hero { position: relative; height: min(78vh, 680px); min-height: 440px; overflow: hidden; background: #2b2b2b; color: #fff; }
.gw-hero__slides, .gw-hero__img, .gw-hero__shade { position: absolute; inset: 0; }
.gw-hero__img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; transform: scale(1.04); }
.gw-hero__img.is-on { opacity: 1; animation: gw-zoom 9s ease-out forwards; }
@keyframes gw-zoom { from { transform: scale(1.04); } to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .gw-hero__img.is-on { animation: none; } .gw-hero__img { transition: none; } }
.gw-hero__shade { background: linear-gradient(90deg, rgba(14,38,32,.82) 0%, rgba(14,38,32,.55) 45%, rgba(14,38,32,.1) 80%), linear-gradient(0deg, rgba(0,0,0,.35), rgba(0,0,0,0) 40%); }
.gw-hero__content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; }
.gw-hero__title { font-family: 'Vollkorn', 'Noto Serif', serif; font-style: italic; font-weight: 500; color: #fff; font-size: clamp(32px, 4.6vw, 58px); line-height: 1.12; max-width: 640px; margin: 0 0 16px; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.gw-hero__sub { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; max-width: 560px; color: rgba(255,255,255,.92); margin: 0 0 26px; }
.gw-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gw-hero__actions .gw-btn:first-child { background: #fff; color: var(--gw-green-dark) !important; border-color: #fff; }
.gw-hero__actions .gw-btn--light { background: rgba(255,255,255,.14); color: #fff !important; border-color: rgba(255,255,255,.6); backdrop-filter: blur(2px); }
.gw-hero__actions .gw-btn--light:hover { background: rgba(255,255,255,.26); }
.gw-hero__dots { position: absolute; z-index: 3; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.gw-hero__dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: transparent; padding: 0; cursor: pointer; opacity: .8; }
.gw-hero__dot.is-on { background: #fff; opacity: 1; }

/* ---------- Featured events ---------- */
.gw-events { background: var(--gw-green-tint); padding: 44px 0 40px; }
.gw-events__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; max-width: 1060px; margin: 0 auto; }
.gw-events__grid.is-single { grid-template-columns: 1fr; max-width: 900px; }
.gw-event { display: flex; flex-direction: column; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 14px rgba(0,0,0,.08); text-align: left; }
.gw-events__grid.is-single .gw-event { flex-direction: row; }
.gw-event__img { display: block; background: #f4f4f4; }
.gw-event__img img { display: block; width: 100%; height: 100%; max-height: 360px; object-fit: contain; }
.gw-events__grid.is-single .gw-event__img { flex: 0 0 42%; }
.gw-event__body { padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px; }
.gw-event__when { color: var(--gw-green); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.gw-event__title { font-family: 'Vollkorn', 'Noto Serif', serif; color: var(--gw-brown); font-size: 26px; line-height: 1.2; margin: 0; }
.gw-event__desc { color: var(--gw-text); font-size: 16px; line-height: 1.55; margin: 0; }

/* ---------- Calendar ---------- */
.gw-cal__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 0 auto 16px; max-width: 1170px; }
.gw-cal__nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gw-cal__nav .gw-btn { padding: 7px 12px; }
.gw-cal__month { font-family: 'Vollkorn', 'Noto Serif', serif; color: var(--gw-brown); font-size: 28px; margin: 0; min-width: 210px; text-align: center; }
.gw-cal__today { font-size: 14px; }
.gw-cal__sub { font-size: 14px; color: var(--gw-muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gw-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--gw-line); border-left: 1px solid var(--gw-line); background: #fff; border-radius: 6px; overflow: hidden; }
.gw-cal__dow { background: var(--gw-green); color: #fff; font-size: 13px; font-weight: 700; text-align: center; padding: 8px 4px; border-right: 1px solid rgba(255,255,255,.2); }
.gw-cal__cell { min-height: 118px; border-right: 1px solid var(--gw-line); border-bottom: 1px solid var(--gw-line); padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.gw-cal__cell.is-other { background: #fafafa; }
.gw-cal__cell.is-other .gw-cal__num { color: #bbb; }
.gw-cal__cell.is-past .gw-cal__ev { opacity: .55; }
.gw-cal__cell.is-today { background: #f3faf7; box-shadow: inset 0 0 0 2px var(--gw-green); }
.gw-cal__num { font-size: 13px; font-weight: 700; color: var(--gw-muted); }
.gw-cal__cell.is-today .gw-cal__num { color: #fff; background: var(--gw-green); border-radius: 999px; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.gw-cal__ev { display: block; width: 100%; text-align: left; border: none; border-left: 3px solid var(--gw-green); background: var(--gw-green-tint); border-radius: 4px; padding: 3px 6px; font-size: 12px; line-height: 1.3; color: var(--gw-text); cursor: pointer; }
.gw-cal__ev[hidden] { display: none; }
.gw-cal__ev:hover, .gw-cal__ev:focus { filter: brightness(.96); outline: 2px solid rgba(45,105,92,.35); }
.gw-cal__ev--online { border-left-color: #2a5d8f; background: #eef5fc; }
.gw-cal__ev--both { border-left-color: #5b3f86; background: #f4f0f9; }
.gw-cal__ev.is-cancelled { border-left-color: var(--gw-red); background: #fbeeec; }
.gw-cal__ev.is-cancelled .gw-cal__evtitle { color: var(--gw-muted); }
.gw-cal__evtime { font-weight: 700; margin-right: 3px; }
.gw-cal__evtitle { overflow-wrap: anywhere; }
.gw-cal__evnote { display: block; color: var(--gw-red); font-weight: 700; font-size: 11px; }
.gw-cal__list { display: none; }
.gw-cal__item[hidden] { display: none; }
.gw-cal__dialog { border: none; border-radius: 10px; padding: 0; width: min(620px, 94vw); box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.gw-cal__dialog::backdrop { background: rgba(0,0,0,.45); }
.gw-cal__dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 0; font-weight: 700; color: var(--gw-brown); }
.gw-cal__close { border: none; background: none; font-size: 28px; line-height: 1; color: var(--gw-muted); cursor: pointer; }
.gw-cal__dialog .gw-class { margin: 10px 16px 16px; }
@media (max-width: 767px) {
    .gw-cal__grid { display: none; }
    .gw-cal__list { display: block; max-width: 860px; margin: 0 auto; }
    .gw-cal__month { font-size: 23px; min-width: 0; }
    .gw-cal__bar { justify-content: center; }
}

/* ---------- Menu ---------- */
header nav ul li a[aria-current="page"] { color: var(--gw-green) !important; font-weight: 700; }
header nav ul li.menu-item-has-children > ul { min-width: 220px; z-index: 1000; }
header nav ul li.menu-item-has-children > ul li a { text-align: left; white-space: nowrap; }
@media (min-width: 993px) {
    /* open dropdowns for keyboard users too */
    header nav ul li.menu-item-has-children:focus-within > ul { opacity: 1; visibility: visible; top: 100%; }
}
@media (max-width: 992px) {
    header nav ul li.menu-item-has-children > ul { position: static; opacity: 1; visibility: visible; min-width: 0; box-shadow: none; }
    header nav ul li.menu-item-has-children > ul li a { text-align: center; white-space: normal; }
}

@media (max-width: 600px) {
    .gw-hero { height: 76vh; min-height: 460px; }
    .gw-hero__shade { background: linear-gradient(0deg, rgba(14,38,32,.9) 0%, rgba(14,38,32,.6) 55%, rgba(14,38,32,.25) 100%); }
    .gw-hero__content { justify-content: flex-end; padding-bottom: 54px; }
    .gw-hero__actions { width: 100%; }
    .gw-hero__actions .gw-btn { flex: 1 1 100%; justify-content: center; }
    .gw-events__grid.is-single .gw-event { flex-direction: column; }
    .gw-event__title { font-size: 22px; }
}

/* ---------- Donate popup: PayPal button ---------- */
.gw-donate-online { margin: 30px 20px; padding: 22px 24px; background: var(--gw-green-tint); border-radius: 10px; text-align: center; }
.gw-donate-online h4 { font-family: 'Vollkorn', 'Noto Serif', serif; color: var(--gw-brown); font-size: 24px; margin: 0 0 8px; }
.gw-donate-online p { font-size: 16px; line-height: 1.55; color: var(--gw-text); margin: 0 0 16px; }
.gw-donate-online form { margin: 0; float: none; }
.gw-donate-btn { font-size: 18px; padding: 14px 26px; justify-content: center; width: 100%; max-width: 380px; cursor: pointer; }
.gw-donate-cards { margin-top: 14px; font-size: 30px; color: #6b7c77; display: flex; justify-content: center; gap: 10px; }
@media (max-width: 767px) {
    /* Phones: online donation first, and keep everything inside the screen */
    #donation_modal .popup-content { display: flex; flex-direction: column-reverse; }
    #donation_modal .popup-content > [class*="col-"] { float: none; width: 100%; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
    #donation_modal .popup-content .donation_form > .col-sm-12 { padding-left: 0; padding-right: 0; }
    .gw-donate-online { margin: 18px 12px 6px; padding: 18px 14px; }
}

/* ---------- Tighter spacing between sections (all pages) ---------- */
.block { padding-top: 36px; padding-bottom: 36px; }
.block.remove-gap { padding-top: 0; }
.block.remove-bottom-gap { padding-bottom: 0; }
.decorated-title { padding: 26px 30px; }
.kollel_section_subtitle { margin: -10px auto 22px; }
#staff, #mission { margin-top: -36px; }
.gw-events { padding: 30px 0 32px; }
.gw-lead { margin: 4px auto 18px; }
@media (max-width: 767px) {
    .block { padding-top: 26px; padding-bottom: 26px; }
    .decorated-title { padding: 22px 15px; }
}
