/* ----------------------------------------------------------------
   Fantini-style Header for Rotor Italia
   Adapted from fantinisilvano.com header design
   Overrides Canvas theme header styles
----------------------------------------------------------------- */

/* Epilogue font via Google Fonts CSS API */
@import url("https://fonts.googleapis.com/css2?family=Epilogue:wght@300;400;500;600;700&display=swap");

/* ---- Reset Canvas header styles ---- */
#header,
#header.transparent-header,
#header.floating-header,
#header.full-header,
#header.sticky-header {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  z-index: 299 !important;
  background-color: #fff !important;
  transition: all 0.4s ease-in-out !important;
  transform: translateY(0) scaleX(1);
  opacity: 1;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  font-family: "Epilogue", sans-serif;
}

#header.header-hidden {
  transform: translateY(-100%) scaleX(0.95) !important;
  opacity: 0 !important;
}

@media (min-width: 992px) {
  #header,
  #header.transparent-header,
  #header.floating-header,
  #header.full-header,
  #header.sticky-header {
    inset: 30px 60px auto 60px !important;
    border-radius: 20px !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08) !important;
  }
}

@media (min-width: 1200px) {
  #header,
  #header.transparent-header,
  #header.floating-header,
  #header.full-header,
  #header.sticky-header {
    inset: 40px 80px auto 80px !important;
  }
}

/* ---- Hide Canvas theme header internals ---- */
#header #header-wrap,
#header .header-wrap-clone {
  position: absolute !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ---- Header inner (Fantini structure) ---- */
#header .header-inner {
  padding: 12px 20px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (min-width: 992px) {
  #header .header-inner {
    padding: 15px 30px;
  }
}

/* ---- Logo ---- */
#header .header-logo a {
  display: block;
}

#header .header-logo img {
  display: block;
  max-width: 160px;
  height: auto;
}

@media (min-width: 992px) {
  #header .header-logo img {
    max-width: 200px;
  }
}

/* ---- Desktop navigation ---- */
#header .header-nav {
  display: none;
}

@media (min-width: 992px) {
  #header .header-nav {
    display: flex;
    align-items: center;
  }
}

#header .header-nav .nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#header .header-nav .nav-menu li {
  margin: 0;
  line-height: 100%;
}

#header .header-nav .nav-menu li a {
  font-family: "Epilogue", sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1B1B1B !important;
  text-decoration: none !important;
  text-transform: none;
  letter-spacing: 0.3px;
  transition: color 0.25s ease-in-out;
  padding: 0;
  line-height: 1;
}

#header .header-nav .nav-menu li a:hover,
#header .header-nav .nav-menu li a.active {
  color: #D23731 !important;
}

/* ---- Hamburger ---- */
#header .hamburger-ct {
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  position: relative;
  z-index: 2;
}

@media (min-width: 992px) {
  #header .hamburger-ct {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
  }
}

#header .hamburger-ct .close-icon {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  transition: all 0.25s ease-in-out;
}

#header .hamburger-ct .hamburger-icon {
  visibility: visible;
  opacity: 1;
  transition: all 0.25s ease-in-out;
}

#header .hamburger-ct.open .hamburger-icon {
  visibility: hidden;
  opacity: 0;
}

#header .hamburger-ct.open .close-icon {
  visibility: visible;
  opacity: 1;
}

/* ---- Mobile navigation overlay ---- */
#nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 298;
  background-color: #fff;
  padding-top: 70px;
  transform: translateX(-100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease-in-out;
  font-family: "Epilogue", sans-serif;
}

#nav-mobile.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

@media (min-width: 992px) {
  #nav-mobile {
    display: none !important;
  }
}

#nav-mobile .nav-inner {
  padding: 20px 30px;
  height: 100%;
  overflow-y: auto;
}

#nav-mobile .nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

#nav-mobile .nav-menu li {
  border-bottom: 1px solid #ECECEC;
}

#nav-mobile .nav-menu li:last-child {
  border-bottom: none;
}

#nav-mobile .nav-menu li a {
  display: block;
  padding: 18px 0;
  font-family: "Epilogue", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  color: #1B1B1B !important;
  text-decoration: none !important;
  transition: color 0.25s ease-in-out;
}

#nav-mobile .nav-menu li a:hover,
#nav-mobile .nav-menu li a.active {
  color: #D23731 !important;
}

/* ---- Content spacing for fixed header ---- */
/* Product pages have #page-title as first content after header */
#page-title {
  margin-top: 100px !important;
}

@media (min-width: 992px) {
  #page-title {
    margin-top: 140px !important;
  }
}

/* Homepage: hero slider already fills viewport via min-vh-100, no extra spacing needed */

/* ---- Hero slider height adjustment for floating header ---- */
/* Mobile: header at top:0, ~55px tall */
#slider.min-vh-60 {
  min-height: calc(60vh - 60px) !important;
}

/* Tablet ≥768px: header at top:0, ~55px tall */
@media (min-width: 768px) {
  #slider.min-vh-md-100 {
    min-height: calc(100vh - 60px) !important;
  }
}

/* Desktop ≥992px: header at top:30px + ~55px = 85px from top */
@media (min-width: 992px) {
  #slider.min-vh-md-100 {
    min-height: calc(100vh - 90px) !important;
  }
}

/* Large desktop ≥1200px: header at top:40px + ~55px = 95px from top */
@media (min-width: 1200px) {
  #slider.min-vh-md-100 {
    margin-top: 100px !important;
    min-height: calc(100vh - 100px) !important;
  }
}
