/* ==========================================================================
   Immobiliare Pozzati - Mediterranean Header Override
   Applied to all Houzez pages (homepage templates load their own CSS)
   ========================================================================== */

/* --- Font (Inter variable) --- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
}

/* --- Variables --- */
.ip-header-wrap {
  --ip-primary: #B71C2C;
  --ip-primary-dark: #8E1522;
  --ip-bg: #FDF6EF;
  --ip-text: #2C2C2C;
  --ip-text-light: #5A5A5A;
  --ip-white: #FFFFFF;
  --ip-border: #E0D5CA;
  --ip-shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --ip-shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --ip-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ip-header-h: 72px;
  --ip-transition: .25s ease;
}

/* --- Header Container --- */
.ip-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--ip-white);
  box-shadow: var(--ip-shadow-sm);
  height: var(--ip-header-h);
  transition: box-shadow var(--ip-transition);
}
.ip-site-header.scrolled {
  box-shadow: var(--ip-shadow-md);
}

.ip-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--ip-header-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Content offset for fixed header --- */
#main-wrap {
  padding-top: var(--ip-header-h, 72px);
}

/* --- Logo --- */
.ip-logo img {
  height: 28px;
  width: auto;
  display: block;
}

/* --- Mobile Hamburger --- */
.ip-menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px 0;
  z-index: 110;
  cursor: pointer;
  border: none;
  background: none;
}
.ip-menu-toggle span {
  display: block;
  height: 2.5px;
  background: var(--ip-text);
  border-radius: 2px;
  transition: all .3s ease;
}

/* --- Desktop Nav (hidden on mobile) --- */
.ip-main-nav {
  display: none;
}
.ip-nav-list {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ip-nav-list li {
  list-style: none;
}
.ip-nav-list a {
  display: block;
  padding: 8px 10px;
  font-family: var(--ip-font);
  font-weight: 600;
  font-size: .85rem;
  color: var(--ip-text);
  text-decoration: none;
  border-radius: 6px;
  transition: all var(--ip-transition);
  white-space: nowrap;
}
.ip-nav-list a:hover,
.ip-nav-list .current-menu-item a,
.ip-nav-list .current_page_item a {
  color: var(--ip-primary);
  background: var(--ip-bg);
}

/* --- Language Switch (hidden on mobile) --- */
.ip-lang-switch {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: var(--ip-font);
  font-size: .85rem;
  font-weight: 600;
}
.ip-lang-active {
  color: var(--ip-primary);
}
.ip-lang-link {
  color: var(--ip-text-light);
  text-decoration: none;
  transition: color var(--ip-transition);
}
.ip-lang-link:hover {
  color: var(--ip-primary);
}

/* --- Focus Indicators --- */
.ip-header-wrap :focus-visible {
  outline: 3px solid var(--ip-primary);
  outline-offset: 2px;
}
.ip-header-wrap :focus:not(:focus-visible) {
  outline: none;
}

/* ==========================================================================
   TABLET+ (768px)
   ========================================================================== */
@media (min-width: 768px) {
  .ip-header-inner {
    padding: 0 32px;
  }
}

/* ========== MOBILE TOUCH FIXES (< 1024px) ========== */
@media (max-width: 1023px) {
  .ip-menu-toggle { width: 44px; min-height: 44px; padding: 10px 8px; align-items: center; justify-content: center; }
  .ip-menu-toggle span { width: 28px; }
}

/* ==========================================================================
   DESKTOP (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
  .ip-menu-toggle {
    display: none;
  }
  .ip-main-nav {
    display: block;
    flex-grow: 1;
  }
  .ip-nav-list {
    justify-content: flex-end;
  }
  .ip-lang-switch {
    display: flex;
    margin-left: 16px;
  }
}

/* ==========================================================================
   HEADER SCROLL JS
   ========================================================================== */
/* Small inline script adds .scrolled class on scroll */
