/* Mega menu (#pnm in .header-nav-wrap) — 3-level hierarchy per the SBT style guide.
   L1 column header (dark blue #075783 + short yellow underline), L2 section
   subheading (uppercase gray), L3 links. The chevron is the theme's ::after, so
   the underline uses ::before. Author: PryVit / 2026 */

/* ---- Layout: 4 columns, shorter items pack together (masonry-like) ---- */
@media (min-width: 992px) {
    #pnm {
        display: block;
        column-count: 4;
        column-gap: 36px;
        column-fill: auto;      /* fill columns sequentially (not balanced) so all 4 are used */
        height: 920px;          /* must fit the tallest card (Projects); bump if that column grows */
    }
    #pnm > li {
        display: inline-block;
        width: 100%;
        margin: 0 0 24px;
        vertical-align: top;
        break-inside: avoid;
        -webkit-column-break-inside: avoid;
        page-break-inside: avoid;
        /* each top-level group is a card (matches the design example) */
        background: #fff;
        border: 1px solid #e6e6e6;
        border-radius: 0;
        padding: 18px 22px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    }
    /* don't clip a column that slightly exceeds the fixed height */
    .header-nav.nav-open { overflow: visible; }
}

/* ---- Full-width, distinguished menu background ---- */
@media (min-width: 992px) {
    .header-nav,
    .header-nav.nav-open,
    div.header-nav-wrap:hover .header-nav {
        position: relative;
        width: 100vw;                       /* overrides .nav-open { width:100% } */
        /* canonical full-bleed: stretch the background edge-to-edge */
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        background: #f6f7f8;                           /* light panel so the white cards stand out */
        box-shadow: 0 14px 30px rgba(0, 0, 0, .16);   /* lift it off the page */
        border-bottom: 1px solid #e2e2e2;             /* clear bottom edge */
    }
    .header-nav .nav-primary {
        max-width: 1300px;           /* keep the content centered at container width */
        margin-left: auto;
        margin-right: auto;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* the menu opens on hover (no .nav-open class) — let the shadow/columns show */
    div.header-nav-wrap:hover .header-nav,
    .header-nav.nav-open { overflow: visible; }
}

/* ---- L1: column headers ---- */
/* align all menu links to the card's inner padding (theme adds 16px sides) */
#pnm > li > a,
#pnm > li .sub-menu a { padding-left: 0; padding-right: 0; }

#pnm > li > a {
    color: #075783;
    font-weight: 700;
    font-size: 17px;
    position: relative;
    display: inline-block;
    padding-bottom: 12px;
    margin-bottom: 4px;
}
#pnm > li > a:hover { color: #095572; }
#pnm > li > a::after { color: #075783; }          /* recolour the theme chevron */
#pnm > li > a::before {                            /* short yellow underline */
    content: "";
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 28px;
    height: 3px;
    background: #fdc741;
}

/* ---- L2 WITH children: category parents ---- same size/case as the plain
   links, distinguished by COLOUR (brand blue) instead of uppercase/gray ---- */
#pnm > li > .sub-menu > li.menu-item-has-children > a {
    text-transform: none;
    font-size: 14px;
    font-weight: 700;
    color: #222222;   /* black, bold — second level */
    padding-top: 14px;
    padding-bottom: 2px;
}
#pnm > li > .sub-menu > li.menu-item-has-children > a:hover { color: #54a1b1; }
#pnm > li > .sub-menu > li.menu-item-has-children > a::after { content: none; } /* no chevron on category items */
/* first item in a column doesn't need top spacing (it follows the L1 header) */
#pnm > li > .sub-menu > li:first-child > a { padding-top: 0; }

/* ---- L3: links — indent + a left rule so they read as children of the category ---- */
#pnm > li > .sub-menu > li.menu-item-has-children > .sub-menu {
    padding-left: 14px;
    margin-left: 1px;
    border-left: 2px solid #e6e6e6;
}
#pnm > li > .sub-menu .sub-menu > li > a {
    color: #515151;
    font-size: 14px;
    font-weight: 400;
}
#pnm > li > .sub-menu .sub-menu > li > a:hover { color: #54a1b1; }

/* ---- L2 WITHOUT children: same colour as L2 categories (level-based colour) ---- */
#pnm > li > .sub-menu > li:not(.menu-item-has-children) > a { color: #222222; font-size: 14px; font-weight: 700; }
#pnm > li > .sub-menu > li:not(.menu-item-has-children) > a:hover { color: #54a1b1; }

/* ---- Donate banner injected into the mega menu (first column) ---- */
@media (min-width: 992px) {
    #pnm > li.sbt-menu-donate {
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
    }
    #pnm > li.sbt-menu-donate .sbt-donate-block { margin: 0; }
}

/* ===== Single event page banner — full screen width (full-bleed) ===== */
#tribe-events-pg-template {
    padding-top: 0 !important;   /* remove TEC's top gap above the banner */
}
#tribe-events-pg-template .page-banner {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 50px;         /* spacing after the banner block */
}
#tribe-events-pg-template .page-banner .event-date {
    margin-top: 12px;
    font-size: 18px;
    color: #075783;
    font-weight: 600;
}

/* ===== Single event — info card (organizer / venue / map / add-to-calendar) ===== */
.sbt-event-card{
    background:#fff;
    border:1px solid #e7eaee;
    border-radius:0;
    box-shadow:0 10px 30px rgba(16,42,67,.06);
    overflow:hidden;
    margin:0 0 40px;
    font-family:"Open Sans",sans-serif;
}
.sbt-ec-head{ display:flex; align-items:flex-start; gap:22px; padding:28px 30px; }
.sbt-ec-headmain{ flex:1 1 auto; min-width:0; }
/* date chip */
.sbt-ec-chip{
    flex:0 0 auto; width:84px; text-align:center;
    border:1px solid #e7eaee; border-radius:4px; overflow:hidden;
    box-shadow:0 4px 12px rgba(16,42,67,.05);
}
.sbt-ec-chip__m{ display:block; background:#075783; color:#fdc741; font-weight:700; font-size:13px; letter-spacing:1px; padding:7px 0; }
.sbt-ec-chip__d{ display:block; color:#075783; font-weight:700; font-size:34px; line-height:1.1; padding-top:8px; }
.sbt-ec-chip__y{ display:block; color:#90979f; font-size:13px; padding-bottom:10px; }
/* category tag */
.sbt-ec-tag{
    display:inline-flex; align-items:center; gap:7px;
    background:rgba(7,87,131,.08); color:#075783;
    font-weight:700; font-size:12px; letter-spacing:.6px;
    padding:6px 12px; border-radius:0; margin-bottom:12px;
}
.sbt-ec-title{ font-family:"Lora",serif; color:#075783; font-weight:600; font-size:32px; line-height:1.2; margin:0 0 10px; }
.sbt-ec-when{ display:flex; align-items:center; gap:9px; color:#555555; font-size:16px; margin:0; }
.sbt-ec-when svg{ color:#54a1b1; flex:0 0 auto; }
/* add to calendar */
.sbt-ec-addcal{
    flex:0 0 auto; display:inline-flex; align-items:center; gap:9px;
    background:#fdc741; color:#08384d !important; font-weight:700; font-size:15px; text-decoration:none;
    padding:13px 22px; border-radius:4px; transition:background .15s ease,transform .15s ease;
}
.sbt-ec-addcal:hover{ background:#ffd566; transform:translateY(-1px); text-decoration:none; }
/* body */
.sbt-ec-body{ display:flex; align-items:stretch; border-top:1px solid #eef1f4; }
.sbt-ec-details{ flex:1 1 auto; padding:26px 30px; min-width:0; }
.sbt-ec-row{ display:flex; gap:16px; align-items:flex-start; }
.sbt-ec-ico{ flex:0 0 auto; width:42px; height:42px; border-radius:0; background:#eaf2f7; color:#075783; display:flex; align-items:center; justify-content:center; }
.sbt-ec-rowmain{ min-width:0; }
.sbt-ec-label{ display:block; text-transform:uppercase; letter-spacing:.7px; color:#8a94a0; font-size:12px; font-weight:700; margin-bottom:6px; }
.sbt-ec-value{ color:#444444; font-weight:700; font-size:17px; line-height:1.5; margin-bottom:6px; }
.sbt-ec-link{ display:inline-flex; align-items:center; gap:7px; color:#54a1b1; font-weight:600; font-size:15px; text-decoration:none; word-break:break-word; }
.sbt-ec-link:hover{ color:#075783; text-decoration:none; }
.sbt-ec-sep{ border:0; border-top:1px solid #eef1f4; margin:22px 0; }
.sbt-ec-arrow{ font-weight:700; }
/* map */
.sbt-ec-map{ position:relative; flex:0 0 38%; max-width:38%; min-height:300px; display:block; overflow:hidden; }
.sbt-ec-map__frame{ position:absolute; inset:0; width:100%; height:100%; border:0; display:block; filter:grayscale(.3) saturate(.9) brightness(1.03) contrast(.98); }
.sbt-ec-map::after{ content:""; position:absolute; inset:0; z-index:1; pointer-events:none; background:linear-gradient(135deg, rgba(7,87,131,.16), rgba(7,87,131,0) 52%); }
.sbt-ec-map__btn{
    position:absolute; left:50%; bottom:22px; transform:translateX(-50%); z-index:2;
    display:inline-flex; align-items:center; gap:7px; white-space:nowrap; text-decoration:none;
    background:#075783; color:#fff !important; font-weight:700; font-size:15px;
    padding:12px 22px; border-radius:4px; box-shadow:0 6px 16px rgba(16,42,67,.25);
}
.sbt-ec-map:hover .sbt-ec-map__btn{ background:#08384d; }
/* responsive */
@media (max-width:991px){
    .sbt-ec-head{ flex-wrap:wrap; }
    .sbt-ec-addcal{ order:3; width:100%; justify-content:center; }
    .sbt-ec-body{ flex-direction:column; }
    .sbt-ec-map{ flex-basis:auto; max-width:none; width:100%; min-height:220px; }
}
@media (max-width:575px){
    .sbt-ec-title{ font-size:24px; }
    .sbt-ec-head,.sbt-ec-details{ padding:22px 20px; }
}

/* ===== Single event page: responsive images (featured image + content) ===== */
#tribe-events-pg-template img { max-width: 100%; height: auto; }
