/* ================================================================
   HFP HEADER — exact match of hfp.at
   CRITICAL: position: STATIC (not absolute!)
   Content starts AFTER the header — no overlap.
   Sticky: WHITE bg, not crimson.
   ================================================================ */

.hfp-header {
    position: static;
    width: 100%;
    height: 130px;
    z-index: 999;
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.hfp-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 100px;
}

@media (max-width: 1400px) { .hfp-header__inner { padding: 0 40px; } }
@media (max-width: 768px) { .hfp-header__inner { padding: 0 20px; } }

/* === LOGO === */
.hfp-header__col-logo { flex: 0 0 auto; }

.hfp-header__logo img {
    height: 130px;
    width: auto;
    max-width: 222px;
    display: block;
    transition: height 0.3s ease;
}

/* === NAV (center) === */
.hfp-header__col-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hfp-header__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.hfp-header__menu > li { position: relative; }

.hfp-header__menu > li > a {
    display: block;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2.1px;
    color: #c71748 !important;
    text-decoration: none;
    padding: 50px 16px;
    transition: opacity 0.3s ease;
}

.hfp-header__menu > li > a:hover { opacity: 0.6; }

/* Dropdown */
.hfp-header__menu li .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #212121;
    list-style: none;
    margin: 0;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.hfp-header__menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hfp-header__menu .sub-menu li a {
    display: block;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #fff !important;
    text-decoration: none;
    padding: 10px 25px;
    transition: color 0.3s ease;
}

.hfp-header__menu .sub-menu li a:hover { color: #c71748 !important; }

/* === RIGHT COLUMN === */
.hfp-header__col-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0;
}

/* Klientenportal button — same base as DE/EN: padding 10px, line-height 22px */
.hfp-header__portal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.16px;
    line-height: 22px;
    color: #c71748;
    background: transparent;
    border: 1px solid rgba(135, 135, 135, 0.25);
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hfp-header__portal-btn svg { stroke: #c71748; width: 14px; height: 14px; }

.hfp-header__portal-btn:hover {
    background: #c71748;
    border-color: #c71748;
    color: #fff;
}
.hfp-header__portal-btn:hover svg { stroke: #fff; }

/* Language buttons — 10px gap from portal, small gap between DE and EN */
.hfp-header__lang {
    display: flex;
    gap: 5px;
    margin-left: 10px;
}

.hfp-header__lang-btn {
    display: inline-block;
    font-family: 'Lato', sans-serif;
    font-size: 15px !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.7px;
    line-height: 22px;
    text-decoration: none;
    padding: 10px !important;
    border: 1px solid rgba(135, 135, 135, 0.25);
    transition: all 0.3s ease;
    min-width: 42px;
    text-align: center;
}

/* DE active: white text on crimson bg */
.hfp-header__lang-btn.active {
    color: #fff !important;
    background: #c71748;
}

/* EN inactive: crimson text on transparent bg */
.hfp-header__lang-btn:not(.active) {
    color: #c71748 !important;
    background: transparent;
}

.hfp-header__lang-btn:hover {
    background: #c71748;
    color: #fff !important;
    border-color: #c71748;
}

/* Burger (mobile only) */
.hfp-header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.hfp-header__burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #c71748;
    transition: all 0.3s ease;
}

/* ================================================================
   STICKY — WHITE background (confirmed on hfp.at)
   Nav colors, buttons etc. stay the SAME — only bg changes.
   ================================================================ */
.hfp-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff !important;
    height: 90px;
    box-shadow: rgba(25, 25, 25, 0.1) 0px 10px 15px 0px;
    animation: hfpSlideDown 0.3s ease-in-out;
    z-index: 999;
}

body.admin-bar .hfp-header.is-sticky { top: 32px; }
@media (max-width: 782px) { body.admin-bar .hfp-header.is-sticky { top: 46px; } }

@keyframes hfpSlideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.hfp-header.is-sticky .hfp-header__logo img { height: 90px; }

.hfp-header.is-sticky .hfp-header__menu > li > a {
    padding-top: 35px;
    padding-bottom: 35px;
}

/* Everything else stays identical in sticky — crimson nav, crimson buttons */

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1199px) {
    .hfp-header__col-nav { display: none; }
    .hfp-header__portal-btn span { display: none; }
    .hfp-header__portal-btn { padding: 8px; border: none; }
    .hfp-header__burger { display: flex; }
    .hfp-header { height: 80px; }
    .hfp-header__logo img { height: 80px; }
    .hfp-header.is-sticky { height: 70px; }
    .hfp-header.is-sticky .hfp-header__logo img { height: 60px; }
}

@media (max-width: 767px) {
    .hfp-header__lang { display: none; }
    .hfp-header { height: 70px; }
    .hfp-header__logo img { height: 70px; }
    .hfp-header.is-sticky { height: 60px; }
    .hfp-header.is-sticky .hfp-header__logo img { height: 50px; }
}

/* ================================================================
   MOBILE MENU — Crimson with geometric pattern (same as portal)
   ================================================================ */
.hfp-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background-color: #212121;
    background-image: url('../img/Sidearea-bg-img.png');
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    z-index: 1001;
    padding: 100px 30px 40px;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}
.hfp-mobile-menu.is-open { right: 0 !important; }

.hfp-mobile-menu__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
    z-index: 1;
}
.hfp-mobile-menu__close:hover { opacity: 0.6; }

.hfp-mobile-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.hfp-mobile-menu__list li a {
    display: block;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff !important;
    text-decoration: none;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hfp-mobile-menu__list li a:hover { color: rgba(255, 255, 255, 0.6) !important; }
.hfp-mobile-menu__list .sub-menu { list-style: none; padding: 0 0 0 20px; margin: 0; }
.hfp-mobile-menu__list .sub-menu a { font-size: 13px; color: rgba(255, 255, 255, 0.7) !important; }

.hfp-mobile-menu__portal {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 24px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ================================================================
   KLIENTENPORTAL PANEL — Crimson geometric pattern bg
   bg-color: #212121 + bg-image: Sidearea-bg-img.png (crimson pattern)
   Width: 33% (min 300px) | slides from right
   ================================================================ */
.hfp-portal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}
.hfp-portal-overlay.is-open {
    opacity: 1 !important;
    visibility: visible !important;
}

.hfp-portal-panel {
    position: fixed;
    top: 0;
    right: -130%;
    width: 33%;
    min-width: 300px;
    height: 100%;
    min-height: 768px;
    background-color: #212121;
    background-image: url('../img/Sidearea-bg-img.png');
    background-size: cover;
    background-position: left center;
    background-repeat: no-repeat;
    z-index: 1060;
    padding: 40px;
    overflow-y: scroll;
    transition: right 1s ease-out;
}
.hfp-portal-panel.is-open {
    right: 0 !important;
}

.hfp-portal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}
.hfp-portal-close:hover { opacity: 0.6; }

/* Portal lang switcher */
.hfp-portal-lang {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
}
.hfp-portal-lang a {
    display: inline-block;
    padding: 10px 15px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.7px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transition: all 0.3s;
}
.hfp-portal-lang a.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.15);
}
.hfp-portal-lang a:not(.active) {
    color: rgba(255, 255, 255, 0.6) !important;
    background: transparent;
}

/* Portal logo */
.hfp-portal-logo { margin-bottom: 30px; }
.hfp-portal-logo img { width: 180px; height: auto; max-width: 100%; }

/* Portal title */
.hfp-portal-title {
    color: #fff !important;
    font-family: 'Lato', sans-serif;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 25px;
}

/* Portal form */
.hfp-portal-form { margin-bottom: 30px; }
.hfp-portal-input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #f5f5f3;
    border: none;
    color: #171717;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    outline: none;
    transition: box-shadow 0.3s;
}
.hfp-portal-input::placeholder { color: #878787; }
.hfp-portal-input:focus { box-shadow: inset 0 0 0 2px #c71748; }

.hfp-portal-submit {
    display: inline-block;
    padding: 14px 32px;
    border: 1px solid #fff;
    background: transparent;
    color: #fff !important;
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}
.hfp-portal-submit:hover {
    background: #fff;
    color: #c71748 !important;
}

/* Portal contact info */
.hfp-portal-contact {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hfp-portal-contact h4 {
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}
.hfp-portal-contact p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 6px;
}
.hfp-portal-contact a {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
}
.hfp-portal-contact a:hover { color: #fff !important; }

.hfp-portal-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-top: 15px;
}

html, body { overflow-x: hidden; }

html.hfp-menu-open,
html.hfp-panel-open,
body.hfp-panel-open,
body.hfp-menu-open { overflow: hidden; }

/* Mobile menu overlay */
.hfp-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}
.hfp-mobile-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ================================================================
   ELEMENTOR CONFLICT HANDLER
   ================================================================ */
.elementor-location-header:not(:empty) ~ .hfp-header { display: none; }
.elementor-location-header:not(:empty) ~ .hfp-portal-overlay { display: none; }
.elementor-location-header:not(:empty) ~ .hfp-portal-panel { display: none; }
