/* =====================================================================
   NZSAE – CORE SITE CSS (CLEAN REBUILD)
   Colours: Blue #00538C | Coral #F56F6C
   Font: Barlow
   ===================================================================== */

/* =========================
   1) FONT + GLOBAL TYPE
   ========================= */
@font-face {
  font-family: "Barlow";
  src:
    url("/resources/Fonts/Barlow/Barlow-Regular.woff2") format("woff2"),
    url("/resources/Fonts/Barlow/Barlow-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root{
  --nzsae-blue:#00538C;
  --nzsae-coral:#F56F6C;
  --nzsae-text:#222222;
  --nzsae-line:rgba(0,0,0,.10);
  --nzsae-soft:#F6F9FC;
}

/* Global defaults */
body, input, textarea, button, select, table, th, td {
  font-family: "Barlow", sans-serif !important;
  font-size: 16px;
  color: var(--nzsae-text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Barlow", sans-serif !important;
  color: var(--nzsae-blue);
  text-transform: none !important;
}

a { color: var(--nzsae-blue); text-decoration: none; }
a:hover { color: var(--nzsae-coral); }

img { max-width: 100%; height: auto; display: block; }

/* Mobile headings */
@media (max-width: 600px) {
  h1 { font-size: 36px !important; line-height: 1.25; }
  h2 { font-size: 30px !important; line-height: 1.3; }
  h3 { font-size: 20px !important; line-height: 1.35; }
}

/* =========================
   2) BUTTONS (GLOBAL)
   ========================= */
.stylizedButton,
input[type="submit"],
input[type="button"],
input[type="button"].registerButton,
input.registerButton {
  background-color: var(--nzsae-blue) !important;
  color: #ffffff !important;
  font-family: "Barlow", sans-serif !important;
  font-size: 16px !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 10px 16px !important;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.stylizedButton:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="button"].registerButton:hover,
input.registerButton:hover {
  background-color: var(--nzsae-coral) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.12);
}

/* NZSAE special buttons (your custom HTML buttons) */
a.nzsae-btn,
a.nzsae-btn-blue {
  position: relative;
  display: inline-block;
  overflow: hidden;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: "Barlow", sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  z-index: 1;
  transition: color .3s ease, border-color .3s ease;
}

a.nzsae-btn {
  border: 1px solid var(--nzsae-blue);
  color: var(--nzsae-blue) !important;
  background: #ffffff;
}

a.nzsae-btn-blue {
  border: 1px solid var(--nzsae-blue);
  color: #ffffff !important;
  background: var(--nzsae-blue);
}

a.nzsae-btn::before,
a.nzsae-btn-blue::before{
  content:"";
  position:absolute;
  inset:0;
  background: var(--nzsae-coral);
  transform: translateX(-100%);
  transition: transform .35s ease;
  z-index:0;
}

a.nzsae-btn span,
a.nzsae-btn-blue span { position: relative; z-index: 2; }

a.nzsae-btn:hover::before,
a.nzsae-btn-blue:hover::before { transform: translateX(0); }

a.nzsae-btn:hover { color:#ffffff !important; border-color: var(--nzsae-coral); }
a.nzsae-btn-blue:hover { color:#ffffff !important; border-color: var(--nzsae-coral); }


/* =========================
   4) MOBILE MENU (KILL ORANGE)
   ========================= */
@media screen and (max-width: 900px){
  /* Top mobile bar */
  .mobilePanel,
  .mobilePanelButton,
  .mobilePanelButton.active,
  .mobilePanelButton.buttonMenu.active,
  .mobilePanelButton.buttonLogin.active{
    background-color: var(--nzsae-blue) !important;
    color:#ffffff !important;
    border:none !important;
  }

  /* The slide-out menu area */
  .mobilePanel .menuInner{ background:#ffffff !important; max-height:70vh; overflow-y:auto; }

  /* First level items */
  .mobilePanel .firstLevel > li > .item > a{
    display:block;
    background:#ffffff !important;
    color:#333 !important;
    padding: 14px 20px !important;
    border-bottom: 1px solid rgba(0,0,0,.08);
    text-decoration:none;
  }

  .mobilePanel .firstLevel > li.sel > .item > a,
  .mobilePanel .firstLevel > li > .item > a:hover{
    background:#f5f5f5 !important;
    color: var(--nzsae-blue) !important;
  }

  /* Section headings (parents with submenus) */
  .mobilePanel .firstLevel > li.dir > .item > a{
    text-transform: uppercase;
    letter-spacing: .03em;
    font-weight: 800;
    background:#f3f3f3 !important;
    color:#333 !important;
    cursor: default;
    pointer-events:none; /* keeps parent not clickable */
    padding: 12px 20px !important;
  }

  .mobilePanel .secondLevel{ background:#fafafa !important; }

  .mobilePanel .secondLevel > li > .item > a{
    display:block;
    background:transparent !important;
    color:#333 !important;
    padding: 12px 36px !important;
    border-bottom: 1px solid rgba(0,0,0,.06);
    font-size: .95em;
    text-decoration:none;
  }

  .mobilePanel .secondLevel > li > .item > a:hover{
    background:#f0f0f0 !important;
    color: var(--nzsae-blue) !important;
  }

  .mobilePanel a, .mobilePanel li, .mobilePanel .item{ background-image:none !important; }
}

/* =========================
   5) LOGIN BUTTON (MY NZSAE LOGIN)
   ========================= */
.WaGadgetLoginForm .loginLink,
.loginLink{
  background: var(--nzsae-blue) !important;
  padding: 10px 18px !important;
  border-radius: 10px !important;
  font-weight: 800 !important;
  display:inline-block !important;
  text-decoration:none !important;
  box-shadow: 0 6px 14px rgba(0,0,0,.16) !important;
  white-space: nowrap !important;
  font-size: 0 !important; /* hide original text */
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease !important;
}

.WaGadgetLoginForm .loginLink::after,
.loginLink::after{
  content: "My NZSAE Login";
  font-size: 12px !important;
  letter-spacing: .7px !important;
  color:#ffffff !important;
  font-family:"Barlow", sans-serif !important;
  font-weight:800 !important;
}

.WaGadgetLoginForm .loginLink:hover,
.loginLink:hover{
  background: var(--nzsae-coral) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 22px rgba(0,0,0,.22) !important;
}

/* =========================
   6) BLOG
   ========================= */
.WaGadgetRecentBlogPosts .gadgetStyleBody .title a{
  font-size: 20px;
  font-weight: 800;
}

.WaGadgetRecentBlogPosts .gadgetStyleBody .date{
  font-size: 14px;
  color:#777777;
}

.WaGadgetRecentBlogPosts .gadgetStyleBody .author{ display:none; }

.blogPostBody, .blogPostBody *{
  font-family: "Barlow", sans-serif !important;
  font-size: 18px !important;
  line-height: 1.65;
}

/* =========================
   7) FORMS (GENERAL)
   ========================= */
.sectionContainer .fieldLabel span{
  font-weight: 700;
  font-size: 16px;
}

input[type="text"], input[type="email"], input[type="tel"], textarea, select{
  font-family: "Barlow", sans-serif !important;
  font-size: 16px !important;
  padding: 8px 10px !important;
  border-radius: 10px;
}

/* Membership level options spacing */
.fieldBody .groupBodyVertical .fieldItem{
  padding: 18px 0;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.fieldBody .groupBodyVertical .fieldItem:last-child{
  border-bottom: none;
  margin-bottom: 0;
}

/* =========================
   8) REMOVE RIGHT SIDEBAR
   ========================= */
#id_RightBarContainer, #id_RightBar, .sidebarRight, .WaPlaceHolderRightBar,
.zoneSidebarRight, .zoneSidebarRight *, .sidebarButtonContainer, .sidebarButton{
  display:none !important;
  width:0 !important;
  visibility:hidden !important;
}

.zoneContent, .zoneInner, .contentContainer, .contentColumn{
  max-width:100% !important;
  width:100% !important;
  float:none !important;
  margin-right:0 !important;
}

.mLayout.layoutMain .zoneMain{ padding-right:0 !important; }

/* =========================
   9) MEMBER PROFILE PHOTO (16:9)
   ========================= */
.WaGadgetMemberProfile .memberPhoto,
.WaGadgetMemberPublicProfile .memberPhoto{
  width: 320px !important;
  aspect-ratio: 16 / 9;
  overflow:hidden;
}

.WaGadgetMemberProfile img[src*="UserPicture.ashx"],
.WaGadgetMemberPublicProfile img[src*="UserPicture.ashx"]{
  width:100% !important;
  height:100% !important;
  object-fit: cover;
  border-radius: 10px;
  display:block;
}

@media (max-width: 600px){
  .WaGadgetMemberProfile .memberPhoto,
  .WaGadgetMemberPublicProfile .memberPhoto{
    width: 220px !important;
  }
}
/* =========================================================
   NZSAE – EVENTS PREVIEW CONTROL (reliable)
   Uses JS-added classes:
   - html.nzsae-events-list  (the /events list page)
   - html.nzsae-event-detail (single event page /event-xxxxxxx)
   ========================================================= */
/* Show first TWO paragraphs on list & gadget */
.gadgetEventEditableArea > *{
  display:none !important;
}

.gadgetEventEditableArea > p:nth-of-type(1),
.gadgetEventEditableArea > p:nth-of-type(2){
  display:block !important;
  margin:0 0 .6em 0 !important;
  line-height:1.6 !important;
}

/* Clamp the second paragraph slightly */
.gadgetEventEditableArea > p:nth-of-type(2){
  max-height:3.2em !important; /* ~2 lines */
  overflow:hidden !important;
}


/* Optional fade on list page (looks intentional) */
html.nzsae-events-list .boxBodyContentContainer,
html.nzsae-events-list .boxBodyContentContainer.fixedHeight{
  position:relative !important;
}

html.nzsae-events-list .boxBodyContentContainer::after,
html.nzsae-events-list .boxBodyContentContainer.fixedHeight::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height:2.0em;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events:none;
}

/* ---------- DETAIL PAGE: ALWAYS show full description ---------- */
html.nzsae-event-detail .gadgetEventEditableArea,
html.nzsae-event-detail .gadgetEventEditableArea *{
  display:revert !important;
  max-height:none !important;
  height:auto !important;
  overflow:visible !important;
}

/* Ensure bullets behave on detail page */
html.nzsae-event-detail .gadgetEventEditableArea li{
  display:list-item !important;
}

/* Prevent any WA "fixedHeight" from clamping the detail page */
html.nzsae-event-detail .boxBodyContentContainer.fixedHeight{
  max-height:none !important;
  height:auto !important;
  overflow:visible !important;
}
html.nzsae-event-detail .boxBodyContentContainer.fixedHeight::after{
  content:none !important;
}

/* =========================================================
   EVENTS LIST – CARD STYLE (works on /events system page)
   ========================================================= */

ul.boxesList > li.boxesListItem{
  background:#ffffff !important;
  border:1px solid rgba(0,0,0,.10) !important;
  border-left:6px solid #00538C !important;
  border-radius:14px !important;
  padding:20px !important;
  margin:0 0 24px 0 !important;
  box-shadow:0 10px 22px rgba(0,0,0,.06) !important;

  /* “flash bits” */
  transition: transform .15s ease, box-shadow .15s ease;
}

/* Hover lift */
@media (hover:hover){
  ul.boxesList > li.boxesListItem:hover{
    transform: translateY(-2px);
    box-shadow:0 14px 28px rgba(0,0,0,.10) !important;
  }
}

/* Remove inner theme “box” chrome so our card is the card */
ul.boxesList > li.boxesListItem .boxOuterContainer,
ul.boxesList > li.boxesListItem .boxContainer{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}

/* Title spacing */
ul.boxesList > li.boxesListItem .boxHeaderTitle{
  margin:0 0 10px !important;
}

/* Date/location panel */
ul.boxesList > li.boxesListItem .boxInfoContainer{
  background:#f4f8fc !important;
  border-radius:12px !important;
  padding:14px !important;
  margin:10px 0 12px !important;
}


/* Make rotating banner/header background white */
.WaPlaceHolderHeader1 {
  background-color: #ffffff !important;
}

/* Remove dark camera skin background */
.camera_wrap,
.camera_wrap .camera_fakehover,
.camera_overlayer {
  background: transparent !important;
}

/* =========================================================
   NZSAE — FIXED HEADER (LOGO + MENU + LOGIN) — FINAL
   Requirements:
   - WA Horizontal Menu gadget: "Stick to the top" = OFF
   - Remove any other sticky/fixed attempts elsewhere in your CSS
   Paste at VERY BOTTOM
   ========================================================= */

/* 0) Kill WA sticky clone if it still appears for any reason */
#id_wEp88O5 .stickyMenu,
#id_wEp88O5 .stickyMenu.active{
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: auto !important;
  box-shadow: none !important;
  border: 0 !important;
  background: transparent !important;
}

/* 1) Fix the ENTIRE header so logo + menu + login stay together */
#id_Header{
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 100000 !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.10) !important;
}

/* 2) Make sure dropdowns aren’t clipped by header containers */
#id_Header,
#id_Header .WaLayoutContainerFirst,
#id_Header .WaLayoutContainerLast,
#id_Header .WaLayoutTable,
#id_Header .WaLayoutRow,
#id_Header .WaLayoutItem,
#id_Header .placeHolderContainer,
#id_Header .WaGadgetMenuHorizontal,
#id_Header .menuInner{
  overflow: visible !important;
}

/* 3) Remove the menu gadget’s inline top margin so it aligns neatly */
#id_wEp88O5{ margin-top: 0 !important; }

/* 4) (Optional) Slightly tighten header vertical padding so it doesn’t feel huge */
#id_Header .WaLayoutContainerFirst{
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

/* 5) Push page content down so it doesn’t sit underneath the fixed header
      IMPORTANT: Adjust these two numbers if you still see overlap */
@media (min-width: 901px){
  body{ padding-top: 120px !important; }
}
@media (max-width: 900px){
  body{ padding-top: 90px !important; }
}

/* 6) Mobile: don’t use fixed header (WA mobile panel behaves better without it) */
@media (max-width: 900px){
  #id_Header{
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    box-shadow: none !important;
    border-bottom: 0 !important;
  }
  body{ padding-top: 0 !important; }
}
/* =========================================================
   NZSAE — DESKTOP MENU: make parent items (with dropdowns) NOT clickable
   Keeps hover dropdown working.
   ========================================================= */
@media (min-width: 901px){

  /* Target ONLY parents that have submenus (WA marks these as li.dir) */
  #id_wEp88O5 .WaGadgetMenuHorizontal .menuInner ul.firstLevel > li.dir > .item > a,
  #id_wEp88O5 .menuInner ul.firstLevel > li.dir > .item > a{
    pointer-events: none !important;
    cursor: default !important;
  }

}
/* Slideshow gadget: remove the white padding WA injects */
#id_z5lTx5S .gadgetStyleBody{
  padding: 0 !important;
}

/* =========================================================
   MOBILE MENU FIX — WA SAFE
   Ensures mobile menu opens BELOW fixed header
   ========================================================= */

@media (max-width: 900px){

  /* Adjust this once if needed */
  :root{ --nzsae-mobile-header-h: 90px; }

  /* Force WA mobile menu to be positioned */
  .mobilePanel{
    position: fixed !important;
    top: var(--nzsae-mobile-header-h) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 99999 !important;
    display: block !important;
  }

  /* Ensure inner menu scrolls correctly */
  .mobilePanel .menuInner{
    max-height: calc(100vh - var(--nzsae-mobile-header-h)) !important;
    overflow-y: auto !important;
  }

}
/* Fix random â€¢ / stray symbols before registration types (WA event page) */
.registrationInfoContainer .registrationInfo{
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Remove any injected bullets/icons/symbols */
.registrationInfoContainer .registrationInfo li::before,
.registrationInfoContainer .registrationInfo li::after,
.registrationInfoContainer .registrationInfo li label::before,
.registrationInfoContainer .registrationInfo li label::after,
.registrationInfoContainer .registrationInfo li strong::before,
.registrationInfoContainer .registrationInfo li strong::after,
.registrationInfoContainer .registrationInfo .regTypeLiValueSpan::before,
.registrationInfoContainer .registrationInfo .regTypeLiValueSpan::after{
  content: "" !important;
  display: none !important;
}
/* =========================================================
   PARTNER / MEMBER PROFILE: "Organisation Logo" image fix
   Stops the logo being stretched (blurry) and centres it nicely.
   ========================================================= */

/* Target WA "picture" custom field containers (like Organisation Logo) */
.fieldContainer.pictureViewContainer .fieldBody{
  /* Prevent a giant empty box */
  max-width: 520px;
}

/* Make the logo area look intentional (optional but tidy) */
.fieldContainer.pictureViewContainer .fieldBody > div[id*="ImageContainer"]{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
  max-width: 520px;
}

/* Critical bit: do NOT stretch logos; keep them crisp */
.fieldContainer.pictureViewContainer img[src*="UserPicture.ashx"]{
  width: auto !important;
  max-width: 100% !important;
  max-height: 130px !important;   /* adjust up/down to taste */
  height: auto !important;
  object-fit: contain !important;
  display: block;
}
