/* Fit the logo to the viewport height; the original header-based size is only
   an upper limit. svh stays stable when mobile browser controls open/close. */
body.tekforstaa-front #main-header:not(.et-fixed-header) #logo {
    max-height: min(var(--tf-logo-height, 212.4%), var(--tf-logo-viewport-height, 24svh));
    width: auto;
}

/* The logo protrudes out of the header. Reserve its viewport-based height plus
   the existing 30px top offset and an editable gap before the hero content.
   On short windows the content determines the section height instead of
   overflowing a fixed 100vh box. Keep the native editor layout untouched. */
body.tekforstaa-front:not(.et-fb):not(.et-bfb) #page-container #et-main-area .video-header.et_pb_section:first-child {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    padding-top: calc(30px + var(--tf-logo-viewport-height, 24svh) + var(--tf-logo-gap, 32px));
}

/* This homepage intentionally overlays the standard header on the hero.
   Use one stable origin instead of cancelling Divi's changing page padding
   with fixed negative offsets. This also prevents stale parallax coordinates
   after returning to the top or crossing the mobile breakpoint. */
body.tekforstaa-front.et_fixed_nav.et_header_style_left:not(.et-tb-has-header):not(.et_secondary_nav_enabled):not(.et-fb):not(.et-bfb) #page-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.tekforstaa-front.et_fixed_nav.et_header_style_left:not(.et-tb-has-header):not(.et_secondary_nav_enabled):not(.et-fb):not(.et-bfb) #et-main-area {
    margin-top: 0;
}

/* Scoped IDs intentionally beat the legacy white-on-white homepage rule. */
body.tekforstaa-core #main-header #top-menu .sub-menu,
body.tekforstaa-core #main-header #mobile_menu.et_mobile_menu {
    background: var(--tf-menu-background, rgba(14, 36, 81, .94));
    border: 0;
}

body.tekforstaa-core #main-header #top-menu .sub-menu a,
body.tekforstaa-core #main-header #mobile_menu.et_mobile_menu a,
body.tekforstaa-core #main-header #mobile_menu .sub-menu-toggle::before {
    color: var(--tf-menu-text, #fff);
}

/* Equal item padding replaces the theme's different first/last-item spacing. */
body.tekforstaa-core #main-header #top-menu .sub-menu {
    padding: calc(var(--tf-dropdown-space, 12px) * 2 / 3) 0;
}

body.tekforstaa-core #main-header #top-menu .sub-menu > li > a {
    padding: var(--tf-dropdown-space, 12px) calc(var(--tf-dropdown-space, 12px) * 2);
    line-height: 1.4;
}

body.tekforstaa-core #main-header #top-menu .sub-menu a:hover,
body.tekforstaa-core #main-header #top-menu .sub-menu a:focus-visible,
body.tekforstaa-core #main-header #mobile_menu a:hover,
body.tekforstaa-core #main-header #mobile_menu a:focus-visible {
    background: rgba(255, 255, 255, .12);
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: .2em;
}

body.tekforstaa-core #main-header #top-menu li:focus-within > .sub-menu {
    visibility: visible;
    opacity: 1;
}

/* The last dropdown opens inward instead of spilling past the viewport. */
body.tekforstaa-core #main-header #top-menu > li:last-child > .sub-menu {
    right: 0;
    left: auto;
    max-width: 90vw;
}

body.tekforstaa-core #main-header #top-menu .sub-menu a,
body.tekforstaa-core #main-header #mobile_menu a {
    overflow-wrap: anywhere;
}
