/* =========================================================
   10thRegion / Astra / Elementor
   Clean consolidated CSS
   Notes:
   - Keeps existing working loop/grid behavior untouched
   - Leaves Meadowview grey header layer alone
   - Adds targeted mobile BLUE header height reduction
   - Keeps existing sticky header behavior hooks
   ========================================================= */


/* =========================================================
   HEADER / LOGO HELPERS
   ========================================================= */

/* Ensure the Meadowview link behaves cleanly in flex row */
.meadowview-header-link{
  display: flex;
  align-items: center;
  height: 100%;
}

/* Meadowview image sizing (grey layer) */
.meadowview-header-link img{
  height: 40px;
  width: auto;
  display: block;
}

/* Reduce logo wrapper vertical footprint */
.ast-site-identity{
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 0 !important;
}

/* Make the logo image behave like a block */
.ast-site-identity img.custom-logo{
  display: block;
}

/* Footer logo */
.footer-logo img{
  width: 150px;
  height: auto;
  display: block;
}


/* =========================================================
   MOBILE BLUE HEADER — REDUCE HEIGHT
   Search + logo + hamburger row only
   Leaves grey Meadowview layer untouched
   ========================================================= */
@media (max-width: 920px){

  /* Tighten the actual Astra mobile header row/container */
  .ast-mobile-header-wrap .ast-builder-grid-row-container,
  .ast-mobile-header-wrap .ast-builder-grid-row{
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
  }

  /* Tighten blue-row builder items */
  .ast-mobile-header-wrap .site-header-focus-item,
  .ast-mobile-header-wrap .ast-builder-layout-element{
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    min-height: 0 !important;
  }

  /* Tighten the logo block in the blue row */
  .ast-mobile-header-wrap .ast-site-identity{
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 0 !important;
  }

  /* Slightly reduce the logo in the blue row */
  .ast-mobile-header-wrap .ast-site-identity img.custom-logo{
    display: block;
    max-height: 32px !important;
    width: auto !important;
  }

  /* Tighten search + hamburger wrappers */
  .ast-mobile-header-wrap .menu-toggle,
  .ast-mobile-header-wrap .ast-header-search,
  .ast-mobile-header-wrap .site-header-focus-item{
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}


/* =========================================================
   SPORT LABELS
   ========================================================= */

.pnpc-sport-label{
  font-size: 12px;
  font-weight: 700;
  color: #1B439C;
}

.pnpc-sport-label a{
  color: #1B439C;
  font-weight: 700;
  text-decoration: none;
}

.pnpc-sport-label a:hover{
  color: #A8BADF;
}


/* =========================================================
   ASTRA MEGA MENU ONLY FOR SCHOOLS
   Replace #menu-item-1234 with the real Schools menu item ID
   ========================================================= */

/* Default: ensure normal dropdowns behave like dropdowns */
.ast-primary-header .main-header-menu > .menu-item > .sub-menu{
  width: auto;
  min-width: 240px;
  max-width: 360px;
  display: block;
}

/* Ensure default dropdown list items stay vertical */
.ast-primary-header .main-header-menu > .menu-item > .sub-menu > li{
  display: block;
  width: 100%;
  float: none;
  white-space: nowrap;
}

/* Schools mega menu explicitly allowed */
.ast-primary-header .main-header-menu > #menu-item-1234 > .sub-menu{
  width: 100%;
  max-width: none;
}

/* Remove broad mega styles from everything except Schools */
.ast-primary-header .main-header-menu > .menu-item:not(#menu-item-1234) .ast-mega-menu,
.ast-primary-header .main-header-menu > .menu-item:not(#menu-item-1234).ast-mega-menu,
.ast-primary-header .main-header-menu > .menu-item:not(#menu-item-1234) > .sub-menu{
  column-count: initial;
  column-gap: initial;
}


/* =========================================================
   SUBMENU COLORS
   ========================================================= */

.ast-primary-header-bar .main-header-menu .sub-menu a{
  color: #1B439C;
}

.ast-primary-header-bar .main-header-menu .sub-menu a:hover{
  color: #A8BADF;
}

.ast-desktop .ast-builder-menu .sub-menu .menu-item.current-menu-item > a,
.ast-desktop .ast-builder-menu .sub-menu .menu-item.current-menu-ancestor > a{
  color: #A8BADF !important;
}

/* Astra header dropdown item padding */
.ast-desktop .main-header-menu.submenu-with-border .sub-menu a,
.ast-desktop .main-header-menu .sub-menu a{
  padding-left: 25px !important;
  padding-right: 25px !important;
}


/* =========================================================
   STICKY HEADER
   Existing behavior hooks
   ========================================================= */

#masthead{
  position: sticky;
  top: 0;
  z-index: 9999;
  transition: transform .3s ease;
}

#masthead.header-hidden{
  transform: translateY(-100%);
}


/* =========================================================
   CARD LAYOUT: IMAGE FLUSH, CONTENT SAFE
   ========================================================= */

.tr-card{
  overflow: hidden;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
}

.tr-card-media{
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0;
  flex: 0 0 auto;
}

.tr-card-media .elementor-widget-container{
  padding: 0 !important;
  margin: 0 !important;
  line-height: 0;
}

.tr-card-media img{
  display: block;
  width: 100%;
  height: auto;
}

.tr-card-body{
  flex: 0 0 auto;
  padding: 16px;
  min-width: 0;
}


/* =========================================================
   TABLET PORTRAIT — FEATURED GRID STACK
   Locked working behavior
   ========================================================= */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait){
  .pnpc-feature-grid .elementor-grid,
  .pnpc-loop-featured .elementor-grid{
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .pnpc-feature-grid .elementor-grid .e-loop-item,
  .pnpc-loop-featured .elementor-grid .e-loop-item{
    grid-column: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .pnpc-feature-grid .elementor-grid .e-loop-item:first-of-type,
  .pnpc-loop-featured .elementor-grid .e-loop-item:first-of-type{
    grid-column: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


/* =========================================================
   DESKTOP — CENTER SUBMENU / MEGA MENU CONTENT ONLY
   ========================================================= */
@media (min-width: 921px){

  .main-header-menu .sub-menu{
    text-align: center;
  }

  .main-header-menu .sub-menu li{
    text-align: center;
  }

  .main-header-menu .sub-menu a{
    display: inline-block;
  }

}


/* =========================================================
   DESKTOP — INLINE SEARCH
   ========================================================= */
@media (min-width: 921px){

  .astra-search-shortcode.inline{
    display: flex;
    align-items: center;
  }

  .astra-search-shortcode.inline form{
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
  }

  .astra-search-shortcode.inline input{
    width: 180px !important;
    height: 36px !important;
  }

}

/* =========================================
   SINGLE POST — TIGHTEN SPACING AFTER
   IN-CONTENT DATE/SUBHEAD LINES
   ========================================= */

.single-post .elementor-widget-theme-post-content h4,
.single-post .elementor-widget-theme-post-content h5,
.single-post .elementor-widget-theme-post-content h6{
  margin-bottom: 8px !important;
  line-height: 1.25 !important;
}

.single-post .elementor-widget-theme-post-content h4 + p,
.single-post .elementor-widget-theme-post-content h5 + p,
.single-post .elementor-widget-theme-post-content h6 + p{
  margin-top: 0 !important;
}

/* =========================================
   PAGES — MATCH LINK STYLING TO POSTS
   ========================================= */

.page .elementor-widget-theme-post-content a,
.page .elementor-widget-text-editor a,
.page .entry-content a{
  color: #000000 !important;              /* black text */
  text-decoration: underline !important;  /* always underlined */
  text-decoration-color: #1B439C;         /* blue underline */
  text-underline-offset: 2px;
}

.page .elementor-widget-theme-post-content a:hover,
.page .elementor-widget-text-editor a:hover,
.page .entry-content a:hover{
  color: #1B439C !important;              /* blue on hover */
}

/* -------------------------
   ARTICLE MOBILE — wider reading area
   reduce left/right padding
   ------------------------- */
@media (max-width: 767px){

  .single-post .site-content .ast-container,
  .single-post .entry-content,
  .single-post .elementor-location-single,
  .single-post .elementor-location-single .elementor-section,
  .single-post .elementor-location-single .e-con,
  .single-post .elementor-location-single .e-con-inner{
    padding-left: 3px !important;
    padding-right: 3px !important;
  }
}

/* -------------------------
   ARTICLE MOBILE — force body text to 18px
   article template only
   ------------------------- */
@media (max-width: 767px){

  .single-post .elementor-widget-theme-post-content,
  .single-post .elementor-widget-theme-post-content .elementor-widget-container,
  .single-post .elementor-widget-theme-post-content p,
  .single-post .elementor-widget-theme-post-content li{
    font-size: 18px !important;
    line-height: 1.65 !important;
  }
}

/* Footer links always white */
.elementor-location-footer .elementor-widget a{
  color: #ffffff !important;
}

.elementor-location-footer .elementor-widget a:hover{
  color: #ffffff !important;
  opacity: 0.85;
}