/* Map container sizing */
.map-load {
  width: 100%;
  min-height: 380px;
}

#map {
  width: 100%;
  height: 380px;
}

/* Map text marker styling */
.map-label {
  padding: 5px 8px;
  border-radius: 3px;
  color: #fff;
  background: rgba(0,0,0,0.55);
  font-size: 14px;
  line-height: 1.2;
  position: relative;
  transform: translateY(25px);
  white-space: nowrap;
}

/* Honeypot: visually hidden */
/* Honeypot: hidden from users, still in DOM for bots */
.pf-honeypot {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

#example1 tr.shown + tr > td {
  padding: 0 !important;
}

#example1 tr.shown + tr > td iframe,
#example1 tr.shown + tr > td .dv-frame {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: clamp(320px, 70vh, 900px) !important;
  margin: 0 !important;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
}

.footer .f-sec2 ul li {
  white-space: nowrap;
}

.footer .f-sec2 ul li a {
  display: inline-block;
}


/* ================================================================
   Navigation fixes - downward reveal version
   Desktop mega-menu: uncover from top to bottom without scaling
   the text, images or shadow. Preserve original hover and click.
   The bottom/side clipping allowances preserve the menu shadow.
   ================================================================ */
@media screen and (min-width: 992px) {
    .navbar .navbar-nav .dropdown > .dropdown-menu.megamenu {
        -webkit-transform: none;
        transform: none;
        opacity: 1;
        visibility: hidden;
        pointer-events: none;
        -webkit-clip-path: inset(0 -35px 100% -35px);
        clip-path: inset(0 -35px 100% -35px);
        transition: clip-path .28s ease-in-out,
                    visibility 0s linear .28s;
    }

    .navbar .navbar-nav .dropdown:hover > .dropdown-menu.megamenu,
    .navbar .navbar-nav .dropdown.show > .dropdown-menu.megamenu,
    .navbar .navbar-nav .dropdown > .dropdown-menu.megamenu.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        -webkit-clip-path: inset(0 -35px -35px -35px);
        clip-path: inset(0 -35px -35px -35px);
        transition: clip-path .28s ease-in-out,
                    visibility 0s;
    }
}

/* Accessibility: use an immediate reveal when reduced motion is requested. */
@media (prefers-reduced-motion: reduce) {
    .navbar .navbar-nav .dropdown > .dropdown-menu.megamenu {
        transition: none;
    }
}

#close_side_menu {
    pointer-events: auto;
}

/* ================================================================
   Homepage hero heading
   Original desktop heading: 70px, original small-screen: 52px.
   Responsive maximum of 62px; gradually reduces on narrower screens.
   ================================================================ */
.homer-banner .banner-description h1 {
    font-size: clamp(46px, 4.4vw, 62px);
}

/* ================================================================
   Mega-menu usability under browser zoom / short viewport heights
   Keep the dropdown within the visible viewport and allow internal
   scrolling so Featured Story's Read button is always reachable.
   Also replaces the theme's fixed 500px limit at tablet widths.
   ================================================================ */
@media screen and (min-width: 768px) {
    .navbar .navbar-nav .dropdown > .dropdown-menu.flexable-megamenu {
        max-height: calc(100vh - 140px); /* fallback */
        max-height: calc(100dvh - 140px);
        overflow-y: auto;
        overscroll-behavior-y: contain;
        scrollbar-width: thin;
    }
}

/* Prevent the 120%-wide menu from projecting outside a narrower
   desktop viewport, including when browser zoom reduces CSS width. */
@media screen and (min-width: 768px) and (max-width: 1399.98px) {
    .navbar .navbar-nav .dropdown > .dropdown-menu.megamenu,
    .header-area.fixednavbar nav .dropdown-menu.megamenu {
        left: 0;
        width: 100%;
    }
}


/* ================================================================
   Theft of Cattle mega-menu: keep long links clear of the dashed
   divider at narrow desktop widths / high browser zoom.
   The first .col-lg-3 is the links column; its adjacent .col-lg-6
   is the Featured Story carousel. Other mega-menus are unaffected.
   ================================================================ */
@media screen and (min-width: 768px) and (max-width: 1399.98px) {
    .navbar .dropdown-menu.flexable-megamenu
    .row > .col-lg-3.mengmenu_border:first-child {
        flex: 0 0 36%;
        max-width: 36%;
        min-width: 0;
        padding-right: 30px;
    }

    .navbar .dropdown-menu.flexable-megamenu
    .row > .col-lg-3.mengmenu_border:first-child + .col-lg-6 {
        flex: 0 0 64%;
        max-width: 64%;
        min-width: 0;
    }
}

/* ================================================================
   Theft of Cattle: independently scroll the entire Featured Story
   column (heading + Owl carousel + description + Read button).
   Leave the left-hand links stationary, and keep their dashed divider.
   :has() identifies this specific mega-menu without editing each HTML.
   Other dropdown menus retain their existing scrolling behaviour.
   ================================================================ */
@media screen and (min-width: 768px) {
    /* Undo the earlier whole-dropdown scrolling for Theft of Cattle. */
    .navbar .navbar-nav .dropdown >
    .dropdown-menu.flexable-megamenu:has(.featured-megamenu-carousel) {
        max-height: none;
        overflow: visible;
    }

    /* Apply scrolling to the complete Featured Story column instead.
       176px allows for the navigation/header and menu padding. */
    .navbar .dropdown-menu.flexable-megamenu:has(.featured-megamenu-carousel)
    .row > .col-lg-6:has(.featured-megamenu-carousel) {
        max-height: calc(100vh - 176px); /* fallback */
        max-height: calc(100dvh - 176px);
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior-y: contain;
        scrollbar-width: thin;
        scrollbar-gutter: stable;
        padding-bottom: 16px;
    }
}

/* On exceptionally short viewports there may not be enough room for
   both columns. Fall back to whole-dropdown scrolling to keep all
   links, carousel and Read button reachable. */
@media screen and (min-width: 768px) and (max-height: 450px) {
    .navbar .navbar-nav .dropdown >
    .dropdown-menu.flexable-megamenu:has(.featured-megamenu-carousel) {
        max-height: calc(100dvh - 115px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .navbar .dropdown-menu.flexable-megamenu:has(.featured-megamenu-carousel)
    .row > .col-lg-6:has(.featured-megamenu-carousel) {
        max-height: none;
        overflow: visible;
    }
}
