/* ============================================================
   Immobilien4you — Premium Header Stylesheet
   i4y-header.css
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Variables
   ------------------------------------------------------------ */
:root {
  --i4y-navy: #0e1b2e;
  --i4y-navy-light: #1a2d47;
  --i4y-gold: #c9a96e;
  --i4y-gold-light: #d4b87e;
  --i4y-gold-dark: #b08e50;
  --i4y-white: #ffffff;
  --i4y-blue: #4a9eff;
  --i4y-header-height: 110px;
}

/* ------------------------------------------------------------
   2. Scoped Reset & Body Offset
   ------------------------------------------------------------ */
.i4y-header *,
.i4y-header *::before,
.i4y-header *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  padding-top: var(--i4y-header-height);
}

body.i4y-header-transparent {
  padding-top: 0;
}

/* ------------------------------------------------------------
   3. Header Container
   ------------------------------------------------------------ */
.i4y-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ------------------------------------------------------------
   4. Top Bar
   ------------------------------------------------------------ */
.i4y-topbar {
  background: rgba(14, 27, 46, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
}

.i4y-topbar__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.i4y-topbar a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.25s ease;
}

.i4y-topbar a:hover {
  color: var(--i4y-gold);
}

.i4y-topbar__sep {
  color: rgba(255, 255, 255, 0.15);
  margin: 0 8px;
}

.i4y-lang__item--active {
  color: var(--i4y-gold) !important;
}

/* Scrolled state: hide topbar */
.i4y-header.scrolled .i4y-topbar {
  display: none;
}

/* ------------------------------------------------------------
   5. Main Navigation Bar
   ------------------------------------------------------------ */
.i4y-nav {
  background: rgba(14, 27, 46, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.i4y-header.scrolled .i4y-nav {
  background: rgba(14, 27, 46, 0.98);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.i4y-nav__inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------------------------------------
   5a. Navigation Groups (left & right of logo)
   ------------------------------------------------------------ */
.i4y-nav__group {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 32px;
}

.i4y-nav__group--left {
  justify-content: flex-end;
  padding-right: 40px;
}

.i4y-nav__group--right {
  justify-content: flex-start;
  padding-left: 40px;
}

/* ------------------------------------------------------------
   5b. Logo
   ------------------------------------------------------------ */
.i4y-nav__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.i4y-nav__logo img {
  height: 60px;
  width: auto;
  display: block;
  transition: height 0.3s ease;
}

.i4y-header.scrolled .i4y-nav__logo img {
  height: 44px;
}

/* ------------------------------------------------------------
   5c. Nav Links
   ------------------------------------------------------------ */
.i4y-nav__item {
  position: relative;
}

.i4y-nav__link {
  /* Reset button defaults */
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Styling */
  color: var(--i4y-white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  transition: color 0.25s ease;
}

.i4y-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--i4y-gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.i4y-nav__link:hover::after,
.i4y-nav__item:hover > .i4y-nav__link::after {
  transform: scaleX(1);
}

/* Arrow icon */
.i4y-nav__arrow {
  width: 10px;
  height: 10px;
  stroke: rgba(255, 255, 255, 0.4);
  fill: none;
  stroke-width: 2;
  transition: transform 0.3s ease;
}

.i4y-nav__item:hover > .i4y-nav__link .i4y-nav__arrow {
  transform: rotate(180deg);
}

/* ------------------------------------------------------------
   6. Standard Dropdown
   ------------------------------------------------------------ */
.i4y-drop {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--i4y-navy);
  border: 1px solid rgba(201, 169, 110, 0.15);
  border-radius: 10px;
  padding: 12px 0;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.i4y-nav__item:hover > .i4y-drop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.i4y-drop__link {
  display: block;
  padding: 10px 20px;
  color: var(--i4y-white);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.i4y-drop__link:hover {
  background: rgba(201, 169, 110, 0.08);
  color: var(--i4y-gold);
}

.i4y-drop__link--ext {
  color: rgba(255, 255, 255, 0.6);
}

/* ------------------------------------------------------------
   7. Mega Menu (Immobilien)
   ------------------------------------------------------------ */
.i4y-mega {
  position: absolute;
  top: 100%;
  left: -100px;
  min-width: 680px;
  background: var(--i4y-navy);
  border: 1px solid rgba(201, 169, 110, 0.15);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
}

.i4y-nav__item:hover > .i4y-mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.i4y-mega__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  padding: 28px;
}

/* Category Labels */
.i4y-mega__label {
  color: var(--i4y-gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* Mega Links */
.i4y-mega__link {
  display: block;
  color: var(--i4y-white);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.i4y-mega__link:hover {
  color: var(--i4y-gold);
}

/* Highlight Column */
.i4y-mega__col--highlight {
  background: rgba(201, 169, 110, 0.06);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid rgba(201, 169, 110, 0.12);
  margin: -12px;
}

/* Featured Card */
.i4y-mega__featured {
  background: linear-gradient(135deg, #1a3a5c, var(--i4y-navy));
  border-radius: 8px;
  padding: 14px;
}

.i4y-mega__featured-badge {
  color: var(--i4y-gold);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.i4y-mega__featured-title {
  color: var(--i4y-white);
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
}

.i4y-mega__featured-meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  margin-top: 4px;
}

.i4y-mega__featured-cta {
  color: var(--i4y-gold);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 8px;
  display: inline-block;
  transition: color 0.2s ease;
}

.i4y-mega__featured-cta:hover {
  color: var(--i4y-gold-light);
}

/* ------------------------------------------------------------
   8. Badges
   ------------------------------------------------------------ */
.i4y-badge {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  display: inline-block;
  line-height: 1.4;
}

.i4y-badge--gold {
  background: var(--i4y-gold);
  color: var(--i4y-navy);
}

.i4y-badge--blue {
  background: none;
  color: var(--i4y-blue);
  padding: 0;
}

/* ------------------------------------------------------------
   9. Hamburger (Mobile)
   ------------------------------------------------------------ */
.i4y-nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.i4y-nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--i4y-gold);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger open state */
.i4y-nav__burger.open span:nth-child(1) {
  transform: rotate(45deg) translateY(7px);
}

.i4y-nav__burger.open span:nth-child(2) {
  opacity: 0;
}

.i4y-nav__burger.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-7px);
}

/* ------------------------------------------------------------
   10. Mobile Menu
   ------------------------------------------------------------ */
.i4y-mobile {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--i4y-navy);
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.i4y-mobile[aria-hidden="false"] {
  transform: translateX(0);
}

/* Mobile Sections */
.i4y-mobile__section {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Toggle Buttons */
.i4y-mobile__toggle {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--i4y-white);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  padding: 16px 24px;
  cursor: pointer;
  position: relative;
}

.i4y-mobile__toggle::after {
  content: '+';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--i4y-gold);
  font-size: 18px;
  font-weight: 400;
}

.i4y-mobile__toggle[aria-expanded="true"]::after {
  content: '\2013';
}

/* Sub Links */
.i4y-mobile__sub {
  display: none;
  padding: 0 24px 12px 36px;
}

.i4y-mobile__sub[aria-hidden="false"] {
  display: block;
}

.i4y-mobile__sub a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: color 0.2s ease;
}

.i4y-mobile__sub a:hover {
  color: var(--i4y-gold);
}

.i4y-mobile__sub a:last-child {
  border-bottom: none;
}

/* Direct Mobile Link (no toggle) */
.i4y-mobile__link {
  display: block;
  color: var(--i4y-white);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 24px;
  transition: color 0.2s ease;
}

.i4y-mobile__link:hover {
  color: var(--i4y-gold);
}

/* Phone CTA */
.i4y-mobile__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--i4y-gold), var(--i4y-gold-dark));
  color: var(--i4y-navy);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  padding: 14px 24px;
  margin: 20px 24px;
}

.i4y-mobile__cta svg {
  width: 18px;
  height: 18px;
  fill: var(--i4y-navy);
}

/* ------------------------------------------------------------
   11. Responsive — Mobile (max-width: 1024px)
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .i4y-nav__group {
    display: none !important;
  }

  .i4y-topbar {
    display: none;
  }

  body {
    padding-top: 64px;
  }

  body.i4y-header-transparent {
    padding-top: 0;
  }

  .i4y-nav__inner {
    height: 64px;
    justify-content: space-between;
    padding: 0 20px;
  }

  .i4y-nav__logo img {
    height: 36px;
  }

  .i4y-header.scrolled .i4y-nav__logo img {
    height: 36px;
  }

  .i4y-nav__burger {
    display: flex;
  }
}

/* ------------------------------------------------------------
   12. Responsive — Desktop (min-width: 1025px)
   ------------------------------------------------------------ */
@media (min-width: 1025px) {
  .i4y-mobile {
    display: none !important;
  }

  .i4y-nav__burger {
    display: none !important;
  }
}
