/* ==========================================================================
   ISLAND PROPERTY GROUP - MAIN NAVIGATION STYLES
   
   Standalone CSS for the navigation system
   - Styles the new ipg-header component
   - Overrides existing burger/mobile menu styles in main.css
   
   Load AFTER footers.css in functions.php:
   wp_enqueue_style('ipg-navigation', get_template_directory_uri() . '/css/ipg-navigation.css?t=' . $ver, array('mcg-footers'));
   ========================================================================== */

/* ==========================================================
   IPG TOP BAR - Desktop Only
   ========================================================== */

.ipg-top-bar {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: #fff;
  padding-left: clamp(40px, calc(40px + (100 - 40) * ((100vw - 1001px) / (1920 - 1001))), 100px);
  padding-right: clamp(20px, calc(20px + (80 - 20) * ((100vw - 1001px) / (1920 - 1001))), 80px);
  text-align: center;
  border-bottom: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.ipg-top-bar-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  max-width: 100%;
  margin: 0 auto;
}

.ipg-top-nav {
  width: 100%;
}

.ipg-top-list {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.ipg-top-list > li {
  position: relative;
  margin-bottom: 0 !important;
}

.ipg-top-list > li > a {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #133c60;
  padding: 5px 20px;
  text-decoration: none;
  transition: color 0.3s ease, background 0.3s ease;
}

.ipg-top-list > li > a:hover {
  color: #8ecae6;
  background: none;
  text-decoration: none;
}

.ipg-top-list > li.current-menu-item > a,
.ipg-top-list > li.current_page_item > a {
  color: #8ecae6;
  background: none;
}

/* Top bar dropdowns */
.ipg-top-list > li > .sub-menu {
  position: absolute;
  left: 0;
  top: 100%;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  background-color: #fff;
  background-image: url('https://islandproperty.wpengine.com/wp-content/uploads/2026/03/IPG-Chart-Footer-1.svg');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  border: 1px solid #e5e5e5;
  min-width: 220px;
  padding: 8px 0;
  z-index: 100;
  list-style: none;
  margin: 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.ipg-top-list > li:hover > .sub-menu {
  visibility: visible;
  opacity: 1;
}

.ipg-top-list .sub-menu li {
  display: block;
  margin: 0;
}

.ipg-top-list .sub-menu li a {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #133c60;
  padding: 10px 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.3s ease;
}

.ipg-top-list .sub-menu li a:hover {
  color: #8ecae6;
  background: none;
  text-decoration: none;
}

/* Hide on scroll - uses existing .stick class from init.js */
body.stick .ipg-top-bar {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Hide top bar on mobile (1000px and below) */
@media (max-width: 1200px) {
  .ipg-top-bar {
    display: none !important;
  }
}

/* ==========================================================================
   HEADER WRAPPER & BAR - SVG Background
   ========================================================================== */
.ipg-nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 998;
}

/* Desktop: push down for top bar */
@media (min-width: 1201px) {
  .ipg-nav-wrapper {
    top: 29px;
  }
}

.ipg-header {
  position: relative;
  padding: 15px 0;
  width: 100%;
  background-color: #133c60;
  background-image: url('https://islandproperty.wpengine.com/wp-content/uploads/2026/03/IPG-Chart-Footer-1.svg');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
  -webkit-transition: padding 0.3s ease, box-shadow 0.3s ease;
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}

/* SVG background commented out — may restore later
.ipg-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/wp-content/uploads/2026/02/abstract-leaves-website-20.svg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 1;
  z-index: 1;
  pointer-events: none;
}
*/

body.stick .ipg-header {
  top: 0;
}

/* Row container */
.ipg-nav-row {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Fluid padding: 40px at 1001px, scales to 100px at 1920px */
  padding-left: clamp(40px, calc(40px + (100 - 40) * ((100vw - 1001px) / (1920 - 1001))), 100px);
  padding-right: clamp(30px, calc(30px + (90 - 30) * ((100vw - 1001px) / (1920 - 1001))), 90px);
}

/* Fixed padding above 1920px */
@media (min-width: 1920px) {
  .ipg-nav-row {
    padding-left: 100px;
    padding-right: 100px;
  }
}

/* Fixed padding at breakpoint */
@media (max-width: 880px) {
  .ipg-nav-row {
    padding-left: 30px;
    padding-right: 30px;
  }
}

@media (max-width: 767px) {
  .ipg-nav-row {
    padding-left: 20px;
    padding-right: 20px;
  }
}


/* ==========================================================================
   LOGO
   ========================================================================== */
.ipg-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.ipg-logo:hover {
  text-decoration: none;
}

.ipg-logo svg {
  width: clamp(215px, 15vw + 80px, 300px) !important;
  max-width: none !important;
  height: auto;
}

/* ==========================================================================
   DESKTOP NAVIGATION - White Text on Navy
   Visible above 1000px only
   ========================================================================== */
.ipg-desktop-nav {
  flex: 1;
  text-align: right;
  margin-right: 0px; /* Space for YOUR CONCIERGE button */
  margin-left: 10px;
}

.ipg-nav-list {
  font-size: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ipg-nav-list > li {
  display: inline-block;
  margin: 0 clamp(8px, .75vw, 20px);
  position: relative;
}

.ipg-nav-list > li > a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(8px, 1.1vw, 12px);
  color: #fff;
  text-transform: uppercase;
  display: inline-block;
  line-height: 1.5;
  letter-spacing: 1.7px;
  padding: 10px 0;
  position: relative;
  -webkit-transition: color 0.3s ease;
  transition: color 0.3s ease;
}

.ipg-nav-list > li > a:hover {
  color: #8ecae6;
  text-decoration: none;
}

.ipg-nav-list > li.current-menu-item > a,
.ipg-nav-list > li.current_page_item > a {
  color: #8ecae6;
}

.ipg-nav-list > li.current-menu-item > a::after,
.ipg-nav-list > li.current_page_item > a::after {
  width: 100%;
  background: #8ecae6;
}

/* Dropdown menus */
.ipg-nav-list > li.menu-item-has-children > .sub-menu {
  position: absolute;
  left: -15px;
  top: 100%;
  visibility: hidden;
  opacity: 0;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  background-color: rgba(19, 60, 96, 0.97);
  background-image: url('https://islandproperty.wpengine.com/wp-content/uploads/2026/03/IPG-Chart-Footer-1.svg');
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  min-width: 200px;
  padding: 10px 0;
  z-index: 100;
  list-style: none;
  margin: 0;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.ipg-nav-list > li.menu-item-has-children:hover > .sub-menu {
  visibility: visible;
  opacity: 1;
}

.ipg-nav-list .sub-menu li {
  display: block;
  margin: 0;
}

.ipg-nav-list .sub-menu li a {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  display: block;
  line-height: 1.5;
  letter-spacing: 1.5px;
  padding: 10px 20px;
  white-space: nowrap;
  -webkit-transition: background 0.3s ease;
  transition: background 0.3s ease;
}

.ipg-nav-list .sub-menu li a:hover {
  color: #8ecae6;
}

/* ==========================================================================
   HEADER YOUR CONCIERGE BUTTON
   ========================================================================== */
.ipg-header-btn {
  font-family: var(--font-body);
  font-size: clamp(9px, 1.2vw, 13px);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  border: none;
  background: none;
  padding: 10px 0;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  flex-shrink: 0;
  text-decoration: none;
}

.ipg-header-btn:hover {
  color: #8ecae6;
  text-decoration: none;
}

/* ==========================================================================
   HEADER PHONE ICON
   ========================================================================== */
.ipg-header-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 40px;
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
  margin-left: 0px;
}

.ipg-header-phone:hover {
  color: #8ecae6;
  text-decoration: none;
}

.ipg-header-phone svg {
  width: 21px;
  height: 21px;
}

/* Hide phone icon on mobile — mobile menu has Schedule a Call */
@media (max-width: 1200px) {
  .ipg-header-phone {
    display: none !important;
  }
}

/* ==========================================================================
   HEADER WHATSAPP ICON
   ========================================================================== */
.ipg-header-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 40px;
  text-decoration: none;
  transition: opacity 0.3s ease;
  margin-left: 0px;
}

.ipg-header-whatsapp img {
  width: 21px;
  height: 21px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.ipg-header-whatsapp:hover img {
  filter: brightness(0) invert(1) drop-shadow(0 0 1px rgba(142, 202, 230, 0.5));
  opacity: 0.8;
}

/* Hide WhatsApp icon on mobile — mobile menu has its own */
@media (max-width: 1200px) {
  .ipg-header-whatsapp {
    display: none !important;
  }
}

/* ==========================================================================
   BODY PADDING - Account for fixed two-tier header
   ========================================================================== */
body {
  padding-top: 165px;
}

@media (max-width: 1200px) {
  body {
    padding-top: 85px !important;
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 30px !important;
  }
}


/* ==========================================================================
   HIDE DESKTOP NAV & BUTTON AT 1000px AND BELOW
   ========================================================================== */
@media (max-width: 1200px) {
  .ipg-desktop-nav {
    display: none !important;
  }

  .ipg-header-btn {
    display: none !important;
  }
}

/* ==========================================================================
   HAMBURGER ICON OVERRIDES
   The burger already exists in footer-1.php and is styled in main.css
   These overrides reposition it to work with our new header
   ========================================================================== */

/* Hide burger above 1000px — visible on mobile */
.burger {
  display: none;
}

/* Show and reposition burger at 1000px and below */
@media (max-width: 1200px) {
  .burger {
    display: block !important;
    position: fixed !important;
    top: 22px !important;
    right: 25px !important;
    z-index: 1001 !important;
    padding: 10px 8px !important;
    transition: all 0.3s ease;
  }
  
  /* Burger lines — white on navy */
  .burger .burger-icon,
  .burger .burger-icon::before,
  .burger .burger-icon::after {
    background-color: #fff !important;
    width: 35px !important;
    height: 3px !important;
  }
  
  .burger .burger-icon {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
  }
  
  .burger .burger-icon::before {
    top: -10px !important;
  }
  
  .burger .burger-icon::after {
    top: 10px !important;
  }
  
  /* X animation when active */
  .burger.is-active .burger-icon::before {
    transform: translateY(10px) rotate(45deg) !important;
  }
  
  .burger.is-active .burger-icon::after {
    transform: translateY(-10px) rotate(-45deg) !important;
  }
    .burger.is-active .burger-icon {
    background-color: transparent !important;
  }
}

@media (max-width: 767px) {
  .burger {
    top: 22px !important;
    right: 15px !important;
  }
  
  .burger .burger-icon,
  .burger .burger-icon::before,
  .burger .burger-icon::after {
    width: 30px !important;
    height: 2px !important;
  }
  
  .burger .burger-icon::before {
    top: -9px !important;
  }
  
  .burger .burger-icon::after {
    top: 9px !important;
  }
  
  .burger.is-active .burger-icon::before {
    transform: translateY(9px) rotate(45deg) !important;
  }
  
  .burger.is-active .burger-icon::after {
    transform: translateY(-9px) rotate(-45deg) !important;
  }
    .burger.is-active .burger-icon {
    background-color: transparent !important;
  }
}

/* ==========================================================================
   MOBILE MENU CONTAINER OVERRIDES
   Navy background, white text, centered layout
   ========================================================================== */
.mobile_menu_container {
  background-color: rgba(19, 60, 96, 0.92) !important;
  background-image: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 80px 40px 40px !important;
  text-align: left !important;
}

/* Center the nav container */
.mobile_menu_container nav.mobile_nav {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: auto;
  text-align: center;
  margin-bottom: 0;
}

/* Center the menu list */
.mobile_menu_container .level_a,
.mobile_menu_container nav.mobile_nav > ul {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Center each list item */
.mobile_menu_container li {
  text-align: center;
  width: 100%;
  margin-bottom: clamp(2px, 0.5vw, 6px);
}

/* Enlarged links - centered, white on navy */
.mobile_menu_container a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.3;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  padding: clamp(2px, 0.5vw, 6px) 0;
  display: inline-block;
  position: relative;
  text-align: center;
  -webkit-transition: color 0.3s ease;
  transition: color 0.3s ease;
}

.mobile_menu_container a:hover {
  color: #fff;
  text-decoration: none;
}

/* Underline hover effect - matches desktop nav */
.mobile_menu_container a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s ease;
}

.mobile_menu_container a:hover::after {
  width: 100%;
}

/* Accent underline for active page */
.mobile_menu_container li.current-menu-item a::after,
.mobile_menu_container li.current_page_item a::after {
  width: 100%;
  background: #d9e8f0;
}

.mobile_menu_container li.current-menu-item a,
.mobile_menu_container li.current_page_item a {
  color: #d9e8f0;
}

/* Sub-menus in mobile - indented to show hierarchy */
.mobile_menu_container .sub-menu {
  display: block;
  text-align: left;
  padding-left: 20px;
  margin: 0;
}

.mobile_menu_container .sub-menu > li {
  padding-left: 0;
}

.mobile_menu_container .sub-menu a {
  font-size: 15px;
  letter-spacing: 2.5px;
  padding: clamp(2px, 0.5vh, 6px) 0;
  opacity: 1;
  color: #fff;
}

/* Divider between top nav and main nav in mobile menu */
.mobile-nav-divider {
  width: 60px;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  margin: clamp(5px, 1vh, 10px) 0 clamp(8px, 1.5vh, 20px) 0;
}

/* Top nav items in mobile - slightly smaller than main nav */
.mobile_menu_container .mobile-top-nav {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.mobile_menu_container .mobile-top-nav > li {
  text-align: center;
  width: 100%;
  margin-bottom: clamp(2px, 0.5vh, 6px);
}

.mobile_menu_container .mobile-top-nav > li > a {
  font-size: clamp(17px, 2vw, 22px) !important;
  letter-spacing: 2.5px !important;
  font-weight: 400 !important;
  color: #fff !important;
  opacity: 1;
}

.mobile_menu_container .mobile-top-nav > li > a:hover {
  opacity: 1;
}

/* Hide top nav sub-menus in mobile — too deep */
.mobile_menu_container .mobile-top-nav .sub-menu {
  display: none !important;
}

/* Reorder: main nav first, eyelash second */
.mobile_menu_container .mobile-top-nav {
  order: 3;
}
.mobile_menu_container .mobile-nav-divider {
  order: 2;
}
.mobile_menu_container nav.mobile_nav > ul:not(.mobile-top-nav) {
  order: 1;
}
.mobile_menu_container .custom-menu-datalink {
  order: 4;
}
.mobile_menu_container .mobile-menu-contact {
  order: 5;
}

/* Hide PROPERTIES parent link in mobile — sub-items are enough */
@media (max-width: 1200px) {
  .mobile_menu_container nav.mobile_nav > ul:not(.mobile-top-nav) > li.menu-item-has-children > a {
    display: none;
  }
}

/* YOUR CONCIERGE link in mobile menu - matches nav links */
.mobile_menu_container .custom-menu-datalink {
  display: block !important;
  text-align: center !important;
  margin: 0 !important;
}

.mobile_menu_container .custom-menu-datalink a,
.mobile_menu_container .custom-menu-datalink a.test-link {
  font-family: var(--font-body) !important;
  font-size: clamp(17px, 2vw, 22px) !important;
  font-weight: 400 !important;
  letter-spacing: 2.5px !important;
  line-height: 1.3 !important;
  color: #fff !important;
  text-transform: uppercase !important;
  border: none !important;
  background: none !important;
  padding: clamp(2px, 0.5vh, 6px) 0 !important;
  display: inline-block !important;
  position: relative !important;
  -webkit-transition: color 0.3s ease !important;
  transition: color 0.3s ease !important;
}

.mobile_menu_container .custom-menu-datalink a::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: width 0.3s ease;
}

.mobile_menu_container .custom-menu-datalink a:hover {
  color: #fff !important;
  background: none !important;
}

.mobile_menu_container .custom-menu-datalink a:hover::after {
  width: 100%;
}
/* Mobile Menu - Contact Links */
.mobile-menu-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  margin-top: 0;
}

/* WhatsApp icon in mobile menu */
.mobile_menu_container .mobile-menu-phone img {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px;
  flex-shrink: 0;
  display: inline-block !important;
  filter: brightness(0) invert(1);
}

.mobile_menu_container .mobile-menu-phone,
.mobile_menu_container .mobile-menu-tour {
  font-family: var(--font-body);
  font-size: clamp(17px, 2vw, 22px) !important;
  font-weight: 400 !important;
  letter-spacing: 2.5px !important;
  color: #fff !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 0 !important;
  text-transform: uppercase !important;
}

.mobile-menu-phone svg {
  stroke: #fff;
}

.mobile-menu-phone:hover,
.mobile-menu-tour:hover {
  color: #fff;
}

.mobile-menu-tour {
  color: #fff;
}

.mobile-menu-tour:hover {
  color: #fff;
}

/* ==========================================================================
   HEADER RESPONSIVE ADJUSTMENTS
   ========================================================================== */

/* Tablet (768px - 1000px) */
@media (max-width: 1200px) and (min-width: 768px) {
  .ipg-header {
    padding: 20px 0;
  }
  
  .ipg-logo svg {
    width: 220px;
  }

  .mobile_menu_container .sub-menu a {
    font-size: 15px !important;
  }
  
}

/* Small mobile (767px and below) */
@media (max-width: 767px) {
  .ipg-header {
    padding: 18px 0;
  }
  
  .ipg-logo svg {
    width: 180px;
  }
  
  .mobile_menu_container {
    padding: 50px 20px !important;
  }
  
  .mobile_menu_container a {
    font-size: clamp(17px, 2vw, 22px) !important;
    letter-spacing: 2.5px !important;
    padding: clamp(2px, 0.5vw, 6px) 0 !important;
  }
  
  .mobile_menu_container .sub-menu a {
    font-size: 15px !important;
    padding: clamp(2px, 0.5vw, 6px) 0 !important;
  }
  
  .mobile_menu_container .custom-menu-datalink {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  
  .mobile_menu_container .custom-menu-datalink a,
  .mobile_menu_container .custom-menu-datalink a.test-link {
    font-size: clamp(17px, 2vw, 22px) !important;
    letter-spacing: 2.5px !important;
    padding: clamp(2px, 0.5vw, 6px) 0 !important;
  }
}

/* Extra small mobile (480px and below) */
@media (max-width: 480px) {
  .ipg-header {
    padding: 15px 0;
  }
  
  .ipg-logo svg {
    width: 160px;
  }
  
  .mobile_menu_container a {
    font-size: clamp(17px, 2vw, 22px) !important;
    letter-spacing: 2.5px !important;
    padding: clamp(2px, 0.5vw, 6px) 0 !important;
  }
  
  .mobile_menu_container .sub-menu a {
    font-size: clamp(17px, 2vw, 22px) !important;
  }
  
  .mobile_menu_container .custom-menu-datalink {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  
  .mobile_menu_container .custom-menu-datalink a,
  .mobile_menu_container .custom-menu-datalink a.test-link {
    font-size: clamp(17px, 2vw, 22px) !important;
    letter-spacing: 2.5px !important;
    padding: clamp(2px, 0.5vw, 6px) 0 !important;
  }
}


/* ==========================================================================
   LARGE DESKTOP ADJUSTMENTS (1400px+)
   ========================================================================== */
@media (min-width: 1400px) {
  .ipg-nav-list > li {
    margin: 0 clamp(10px, .75vw, 20px);
  }
  
  .ipg-nav-list > li > a {
    font-size: 12px;
    letter-spacing: 2.5px;
  }
  
  .ipg-logo svg {
    width: 300px;
  }
}


/* ==========================================================================
   OPTIONAL: HEADER SCROLL STATE
   Add class 'scrolled' via JavaScript when page scrolls
   ========================================================================== */
.ipg-header.scrolled {
  padding: 15px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.ipg-header.scrolled .ipg-logo svg {
  width: 160px;
}

@media (max-width: 767px) {
  .ipg-header.scrolled {
    padding: 12px 0;
  }
  
  .ipg-header.scrolled .ipg-logo svg {
    width: 130px;
  }
}


/* ==========================================================================
   SCROLL STATE - body.stick OVERRIDES
   The theme adds .stick class to body on scroll
   These override the default header styles that get applied
   ========================================================================== */

/* CRITICAL: Override the generic body.stick header rule from style.css */
body.stick header,
body.stick header.ipg-header,
body.stick .ipg-nav-wrapper header {
  padding: 15px 0 !important;
  background: none !important;
  background-color: rgba(19, 60, 96, 0.95) !important;
  background-image: url('https://islandproperty.wpengine.com/wp-content/uploads/2026/03/IPG-Chart-Footer-1.svg') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Hide the OLD header element (the one without .ipg-header class) */
#main > header:not(.ipg-header) {
  display: none !important;
}

/* Override the old header styles when body has .stick class */
body.stick .ipg-header {
  padding: 15px 0 !important;
  /* Keep navy background */
  background-image: url('https://islandproperty.wpengine.com/wp-content/uploads/2026/03/IPG-Chart-Footer-1.svg') !important;
  background-color: rgba(19, 60, 96, 0.95) !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Slightly smaller logo on scroll */
body.stick .ipg-logo svg {
  width: clamp(190px, 13vw + 80px, 230px) !important;
  transition: width 0.3s ease;
}

body.stick .ipg-header-btn {
  font-size: clamp(9px, 1.2vw, 13px);
  padding: 10px 0;
  transition: all 0.3s ease;
}

/* Hide the OLD header element if it exists - prevent double header */
body.stick header:not(.ipg-header) {
  display: none !important;
}

/* Also neutralize any styles being applied to generic header */
body.stick .ipg-nav-wrapper header.ipg-header {
  background: rgba(19, 60, 96, 0.95) !important;
  background-image: url('https://islandproperty.wpengine.com/wp-content/uploads/2026/03/IPG-Chart-Footer-1.svg') !important;
  background-size: cover !important;
  background-position: center center !important;
}

body.stick .ipg-nav-wrapper {
  top: 0;
}

/* Adjust body padding on scroll */
body.stick {
  padding-top: 80px;
}

@media (max-width: 1200px) {
  body.stick {
    padding-top: 70px !important;
  }
  
  body.stick .ipg-header {
    padding: 12px 0 !important;
  }
  
  body.stick .ipg-logo svg {
    width: 170px !important;
  }
  
  body.stick .burger {
    top: 12px !important;
    right: 20px !important;
    transform: scale(0.85);
    transition: all 0.3s ease;
  }
}

@media (max-width: 767px) {
  body.stick {
    padding-top: 60px !important;
  }
  
  body.stick .ipg-header {
    padding: 10px 0 !important;
  }
  
  body.stick .ipg-logo svg {
    width: 150px !important;
  }
  
  body.stick .burger {
    top: 14px !important;
    right: 12px !important;
    transform: scale(0.8);
  }
}

/* ==========================================================================
   BANNER - Pull up under fixed header
   ========================================================================== */
.top_image {
  margin-top: -95px !important;
}
  
.top_image.banner-logo-center {
  height: clamp(60vh, 40vw + 20vh, 90vh) !important;
}

@media (max-width: 1200px) {
  .top_image {
    margin-top: -85px !important;
  }
}

@media (max-width: 768px) {
  .top_image {
    margin-top: -75px !important;
  }

  .top_image.banner-logo-center {
    margin: 0 !important;
  }
}

/* ==========================================================================
   TAXONOMY-DRIVEN NAV — Scrollable Dropdowns & Chevrons
   Added: March 26, 2026
   ========================================================================== */

/* Dropdown chevron indicator */
.ipg-nav-chevron {
  display: inline-block;
  margin-left: 0px;
  vertical-align: middle;
  transition: transform 0.3s ease;
  opacity: 1;
  stroke: #fff;
  stroke-width: 2;
}

.ipg-nav-list > li.menu-item-has-children:hover .ipg-nav-chevron {
  transform: rotate(180deg);
  stroke: #8ecae6;
}

/* Scrollable dropdowns — max 15 visible items */
.ipg-dropdown-scroll {
  max-height: 585px;  /* ~15 items × 39px (13px × 1.5 line-height + 20px padding) */
  overflow-y: auto;
  scrollbar-width: thin;                    /* Firefox */
  scrollbar-color: rgba(255,255,255,0.2) transparent;
}

/* Webkit scrollbar (Chrome, Safari, Edge) */
.ipg-dropdown-scroll::-webkit-scrollbar {
  width: 4px;
}

.ipg-dropdown-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.ipg-dropdown-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.ipg-dropdown-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* YOUR CONCIERGE — no dropdown, no chevron, matches nav link style */
.ipg-nav-concierge > a {
  cursor: pointer;
}

/* ==========================================================================
   MOBILE ACCORDION — Taxonomy-driven slideout sub-items
   Added: March 26, 2026
   ========================================================================== */

/* Main nav list in mobile */
.mobile_menu_container .mobile-main-nav {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* Accordion parent items */
.mobile-accordion {
  width: 100%;
  margin-bottom: clamp(2px, 0.5vh, 6px);
}

.mobile-accordion__toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #fff !important;
  padding: clamp(2px, 0.5vh, 6px) 0;
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  text-align: left;
  line-height: 1.3;
}

.mobile-accordion__toggle:hover {
  color: #fff;
}

/* Chevron rotation */
.mobile-accordion__icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.mobile-accordion.is-open .mobile-accordion__icon {
  transform: rotate(180deg);
}

/* Collapsible panel */
.mobile-accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  list-style: none;
  margin: 0;
  padding: 0 0 0 20px;
}

.mobile-accordion__panel li {
  margin-bottom: clamp(2px, 0.5vh, 6px);
}

.mobile-accordion__panel li a {
  font-family: var(--font-body);
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75) !important;
  padding: clamp(2px, 0.5vh, 6px) 0 !important;
  display: inline-block;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mobile-accordion__panel li a:hover {
  color: #fff !important;
}

/* Reorder: main nav first, divider second, eyelash third */
.mobile_menu_container .mobile-main-nav {
  order: 1;
}

.mobile_menu_container .mobile-nav-divider {
  order: 2;
}

.mobile_menu_container .mobile-nav-divider.mobile-nav-divider--lower {
  order: 4;
}

.mobile_menu_container .mobile-top-nav {
  order: 3;
}

.mobile_menu_container .custom-menu-datalink {
  order: 5;
}

.mobile_menu_container .mobile-menu-contact {
  order: 6;
}
.ipg-nav-list > li.menu-item-has-children.is-click-open > .sub-menu {
  visibility: visible;
  opacity: 1;
}