/**
 * MDPS Nav Override — loaded at priority 999
 * Kills ALL OceanWP nav interference
 */

/* Hide OceanWP's own navigation entirely */
#site-header,
#ocean-header,
.ocean-top-bar,
.ocean-header-style-1,
.ocean-header-style-2,
.ocean-header-style-3,
.ocean-header-style-4,
#searchform-header-replace,
#ocean-mobile-menu-icon,
.oceanwp-mobile-menu-icon,
.mobile-menu,
.current-menu-item > a:not(.mdsn-nav-wrap a) {
  display: none !important;
}

/* Our nav bar — full reset of OceanWP list styles */
html body .mdsn-nav-wrap,
html body .mdsn-nav-wrap nav,
html body .mdsn-nav-wrap ul,
html body .mdsn-nav-wrap ul.mdsn-nav-menu,
html body .mdsn-nav-wrap ul li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  float: none !important;
  clear: none !important;
}

html body .mdsn-nav-wrap {
  background: #e8402a !important;
  width: 100% !important;
}

html body .mdsn-nav-wrap ul,
html body .mdsn-nav-wrap ul.mdsn-nav-menu {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box-direction: normal !important;
  -ms-flex-direction: row !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  background: #e8402a !important;
}

html body .mdsn-nav-wrap ul li {
  display: block !important;
  position: relative !important;
  float: none !important;
}

html body .mdsn-nav-wrap ul li a {
  display: block !important;
  color: #fff !important;
  padding: 13px 17px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  background: transparent !important;
  border: none !important;
  line-height: 1.4 !important;
}

html body .mdsn-nav-wrap ul li a:hover,
html body .mdsn-nav-wrap ul li.current-menu-item > a {
  background: rgba(0,0,0,0.18) !important;
  color: #e8a020 !important;
}

/* Dropdown */
html body .mdsn-nav-wrap ul li ul {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  background: #1a1a2e !important;
  min-width: 220px !important;
  box-shadow: 0 4px 24px rgba(0,0,0,.15) !important;
  z-index: 9999 !important;
  flex-direction: column !important;
  margin-top: 0 !important;
}
/* Desktop: show on hover OR when JS sets .is-open */
html body .mdsn-nav-wrap ul li:hover > ul,
html body .mdsn-nav-wrap ul li.is-open > ul {
  display: flex !important;
}
/* Mobile: show when JS sets .sub-open */
html body .mdsn-nav-wrap ul li.sub-open > ul {
  display: flex !important;
  flex-direction: column !important;
  position: static !important;
  box-shadow: none !important;
}
/* Invisible bridge — stops dropdown closing as mouse
   moves from the link down into the dropdown */
html body .mdsn-nav-wrap ul li > a {
  position: relative !important;
}
html body .mdsn-nav-wrap ul li > a::after {
  content: '';
  display: block;
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 8px;
}
html body .mdsn-nav-wrap ul li ul li {
  width: 100% !important;
}
html body .mdsn-nav-wrap ul li ul li a {
  padding: 10px 16px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  color: rgba(255,255,255,0.85) !important;
}
html body .mdsn-nav-wrap ul li ul li a:hover {
  background: rgba(255,255,255,0.08) !important;
  color: #e8a020 !important;
}


/* =============================================
   GALLERY SECTION — Force 300×300 thumbnails
   Override any OceanWP / theme interference
   ============================================= */

/* ── GALLERY — full width grid, fixed square cells ────────── */

/* Step 1: Break out of any OceanWP entry-content max-width */
html body .gallery-section {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  box-sizing: border-box !important;
}

html body .gallery-section .mdsn-container,
html body .mdsn-page-content .mdsn-container {
  width: 100% !important;
  max-width: 1200px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

/* Step 2: Grid fills container */
html body .gallery-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Step 3: Each cell is a fixed-height square — no aspect-ratio dependency */
html body .gallery-grid .gallery-item {
  position: relative !important;
  width: 100% !important;
  height: 260px !important;
  min-height: 260px !important;
  max-height: 260px !important;
  overflow: hidden !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.10) !important;
  transition: box-shadow .3s, transform .3s !important;
  grid-row: span 1 !important;
  background: #f0f0f0 !important;
  display: block !important;
}

html body .gallery-grid .gallery-item:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,.18) !important;
  transform: translateY(-3px) !important;
}

/* Step 4: Image fills cell completely */
html body .gallery-grid .gallery-item img {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  transition: transform .5s ease !important;
}

html body .gallery-grid .gallery-item:hover img {
  transform: scale(1.07) !important;
}

html body .gallery-grid .gallery-overlay {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
  background: linear-gradient(to top, rgba(26,92,42,.85) 0%, rgba(26,92,42,.3) 60%, transparent 100%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 18px !important;
  opacity: 0 !important;
  transition: opacity .3s ease !important;
}

html body .gallery-grid .gallery-item:hover .gallery-overlay {
  opacity: 1 !important;
}

html body .gallery-grid .gallery-overlay .icon {
  color: #fff !important;
  font-size: 26px !important;
  margin-bottom: 8px !important;
  background: rgba(255,255,255,.2) !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

html body .gallery-grid .gallery-overlay span {
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  text-align: center !important;
  text-shadow: 0 1px 4px rgba(0,0,0,.4) !important;
}

/* Responsive */
