/* Phase 1 — Critical hero styles for homepage (index-2024.php). Loaded before style-2024.css. */
.background-first-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.page-home .background-first-line.background-loaded {
  background: url(/images/home/bg-header-v3.webp) center center no-repeat;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  -webkit-animation: fadein 0.5s ease-in alternate 1;
  -moz-animation: fadein 0.5s ease-in alternate 1;
  animation: fadein 0.5s ease-in alternate 1;
}

.page-home .headline.first-line .main-block-header-left {
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.page-home .headline.first-line .main-block-header-left.fade-in {
  opacity: 1;
}

.page-home .headline.first-line > .container.no-padding > .col-md-6.no-padding {
  position: relative;
  z-index: 1;
}

@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media screen and (min-width: 769px) {
  .page-home .headline.first-line {
    padding-top: 60px;
  }
}

/* Phase 2 — Mobile: critical above-the-fold hero (mirrors style-2024.css while full CSS loads async) */
@media (max-width: 768px) {
  /* Homepage mobile header overlays the hero — block async body { padding-top: 60px } from style-2024.css */
  body.page-home {
    padding-top: 0 !important;
  }

  .page-home img.responsive {
    height: auto;
  }

  .no-responsive {
    display: none;
  }

  .page-home .headline.first-line {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 535px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 0 !important;
    padding-bottom: 36px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  .page-home .headline.first-line > .container.no-padding {
    position: relative;
    width: 100%;
    min-height: 535px;
    padding-left: 0;
    padding-right: 0;
  }

  .page-home .headline.first-line .background-first-line {
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    min-height: 535px !important;
  }

  .page-home .headline.first-line .main-block-header-left {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
    margin-top: 0;
    display: block;
    height: auto;
  }

  .page-home .headline.first-line .home-hero-content {
    padding-top: 0;
  }

  .page-home .headline.first-line .main-block-header-left > div,
  .page-home .headline.first-line .main-block-header-left > div > div {
    text-align: center !important;
  }

  .page-home .headline.first-line .main-title-klasic {
    font-family: "Open Sans", sans-serif;
    font-weight: 700;
    font-size: 30px !important;
    line-height: 42px !important;
    letter-spacing: 0;
    text-align: center !important;
    width: 329px;
    max-width: 329px;
    margin: 32px auto 0;
    padding: 0;
    box-sizing: border-box;
    color: #fff;
  }

  .page-home .headline.first-line .sub-title-klasic-responsive-1 {
    display: none !important;
  }

  .page-home .headline.first-line .sub-title-klasic-responsive {
    display: block !important;
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 30px;
    letter-spacing: 0;
    text-align: center;
    width: 321px;
    max-width: 321px;
    margin: 25px auto 0 !important;
    padding: 0;
    box-sizing: border-box;
    color: #fff;
  }

  .page-home .headline.first-line .home-subline-logo {
    margin-top: 17px;
    margin-bottom: 43px;
    font-size: 16px;
    padding: 0 60px;
    line-height: 20px;
    font-weight: 400;
    text-align: center;
    max-width: none;
    color: #fff;
  }

  .page-home .headline.first-line .home-subline-logo .responsive-svg {
    display: none;
  }

  .page-home .headline.first-line .hero-input-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 321px;
    height: auto;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 32px auto 0;
    gap: 17px;
    box-shadow: none;
    border: none;
  }

  .page-home .headline.first-line .hero-input-bar:hover {
    border-color: transparent;
    box-shadow: none;
  }

  .page-home .headline.first-line .hero-input-bar .input-wrapper {
    width: 100%;
    height: 54px;
    padding: 0 20px;
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 0 6px 16px rgba(62, 80, 89, 0.3);
    display: flex;
    align-items: center;
    min-width: 0;
  }

  .page-home .headline.first-line .hero-input-bar .input-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
  }

  .page-home .headline.first-line .hero-input-bar .input-home-new {
    border: none;
    background: transparent;
    min-width: 0;
    width: 100%;
    height: 54px;
    line-height: 54px;
    font-family: "Open Sans", sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #26a5aa;
    outline: none;
    box-shadow: none !important;
  }

  .page-home .headline.first-line .hero-input-bar .input-home-new::placeholder {
    color: #26a5aa;
    opacity: 0.7;
  }

  .page-home .headline.first-line .hero-input-bar .btn-get-started {
    width: 100%;
    height: 54px;
    margin-top: 0;
    padding: 0 24px;
    background: #ffa20c;
    border-radius: 40px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(62, 80, 89, 0.3);
    flex-shrink: 0;
  }

  .page-home .headline.first-line .hero-input-bar .btn-get-started span {
    font-family: "Open Sans", sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 22px;
    color: #ffffff;
    white-space: nowrap;
  }

  .page-home .headline.first-line .hero-input-bar .btn-get-started svg {
    width: 24px;
    height: 25px;
    flex-shrink: 0;
    overflow: visible;
  }

  /*
   * Touch targets via invisible ::after hit areas — must NOT change navbar height
   * (min-height/padding on these controls broke slicknav layout on mobile).
   */
  .page-home #btn-inscription-header::after {
    display: block;
    width: 48px;
    height: 48px;
  }

  .page-home .slicknav_btn {
    position: relative;
  }

  .page-home .slicknav_btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
  }

  /* Phase 2b — mobile critical header (mirrors header-2025.css while full CSS loads async) */
  :root {
    --header-scroll-offset: 84px;
  }

  .headline.header {
    position: absolute !important;
    z-index: 1000;
    height: 60px !important;
    width: 100% !important;
    top: 0;
    left: 0;
    display: block !important;
    background-color: #08090B;
    box-shadow: 0 4px 12px 0 rgba(62, 80, 89, 0.2);
  }

  .headline.header .container {
    background-color: transparent !important;
    width: 100%;
    max-width: 1360px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .headline.header .header-blur {
    height: 60px;
  }

  .headline.header .row {
    margin-right: 0;
    margin-left: 0;
  }

  .headline.header .logo-container-home {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 0 15px !important;
    height: 60px !important;
    min-height: 60px !important;
  }

  .headline.header #navigation {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    margin-left: 0 !important;
    height: 100% !important;
    position: static;
  }

  .headline.header .logo-container-home a[class^="logo-"] {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    text-indent: -10000px;
    overflow: hidden;
  }

  .headline.header #navigation a.logo {
    position: relative;
    top: 0;
    display: inline-block;
    width: 153px;
    height: 32px;
    background: url(/images/logo-header.png) no-repeat;
  }

  .headline.header #navigation a.logo.logo-de {
    width: 153px;
    height: 32px;
    background: url(/images/logo-header-de.png) no-repeat;
    background-size: contain;
  }

  .headline.header .logo-container-home a[class^="logo-"] img {
    width: 120px !important;
    height: 25px !important;
  }

  .headline.header .navigation.nav-bar.topnav {
    display: none !important;
  }

  #mobile-nav {
    display: none !important;
  }

  .headline.header .logo-container-home > .col-md-3,
  .headline.header .logo-container-home > .cartouche-information-container {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .headline.header .col-md-3 .cartouche-information {
    display: none !important;
  }

  .headline.header ul[style*="float:right"],
  .headline.header ul[style*="margin-top"] {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin-top: 10px !important;
    float: none !important;
    list-style: none !important;
    padding: 0 !important;
    height: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .headline.header ul[style*="float:right"] li,
  .headline.header ul[style*="margin-top"] li {
    list-style: none !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .headline.header .language-dropdown {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    position: relative;
    cursor: pointer;
  }

  .language-dropdown .language-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #C4C9D2;
    padding: 4px 0;
  }

  .language-dropdown .language-code {
    font-family: "Open Sans", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.02em;
  }

  .headline.header .language-icon {
    width: 22px !important;
    height: 22px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .headline.header .language-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  .headline.header .mobile-menu-toggle-wrapper,
  .mobile-menu-toggle-wrapper {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
  }

  #mobile-menu-toggle,
  .mobile-hamburger-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .mobile-hamburger-btn {
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 24px !important;
    height: 18px !important;
    gap: 4px !important;
    margin: 0 !important;
    min-width: 24px !important;
    min-height: 18px !important;
  }

  .mobile-hamburger-btn span {
    display: block !important;
    width: 100% !important;
    height: 2px !important;
    background-color: #C4C9D2 !important;
    border-radius: 2px !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .headline.header .header-login-item {
    display: none !important;
  }

  .headline.header .header-actions,
  .headline.header .header-actions-list {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    float: none !important;
    list-style: none;
  }

  .headline.header .cartouche-information {
    display: none !important;
  }
}
