/* ===================================
   Layout V2 Updates - Separated Navigation and Hero
   CSS UPDATED - VERSION 2.3 - INTERNAL PAGES 75VH MAX
   =================================== */

/* -- Hero and Navigation Wrapper -- */
#hero-nav-wrapper {
    position: relative;
    min-height: 100vh;
}

/* Account for announcement bar */
.announcementWrapper ~ #hero-nav-wrapper {
    min-height: calc(100vh - 47px);
}

/* Minimum height for smaller viewports to prevent text collision */
@media only screen and (max-height: 600px) {
    #hero-nav-wrapper {
        min-height: 600px;
    }
    
    .announcementWrapper ~ #hero-nav-wrapper {
        min-height: 600px;
    }
}

@media only screen and (max-height: 500px) {
    #hero-nav-wrapper {
        min-height: 500px;
    }
    
    .announcementWrapper ~ #hero-nav-wrapper {
        min-height: 500px;
    }
}

/* -- Navigation Bar (Floating over Hero) -- */
#navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
}

/* Announcement bar offset */
.announcementWrapper ~ #hero-nav-wrapper #navigation {
    //top: 47px;
}

#navigation .navbar-container {
    height: 130px;
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 0;
}

#navigation .logo {
    position: absolute;
    top: 47px;
    left: 71px;
    z-index: 3;
    display: block;
    text-indent: -9999px;
    width: 103px;
    height: 38px;
    background: url(/assets/img/logo.svg);
    background-size: 103px 38px;
}

/* Navigation styles - UPDATED VERSION */
body.layout-v2 #navigation .nav {
    position: absolute;
    top: 42px;
    right: 20px;
    padding-left: 200px;
}

body.layout-v2 #navigation .nav li {
    display: inline-block !important;
    padding-left: 0 !important;
    padding-bottom: 20px !important;
    margin-right: 2.5rem !important;
    padding-right: 0 !important;
}

/* Override original nav styles with maximum specificity - MATCH PRODUCTION */
body.layout-v2 #navigation .nav ul#nav li,
body.layout-v2 #navigation .nav li,
body.layout-v2 #navigation .hide-mobile ul#nav li,
body.layout-v2 #navigation .hide-mobile .nav li {
    margin-right: 1vw !important;
    padding-left: 1rem !important;
    padding-right: 0 !important;
}

@media only screen and (max-width: 1200px) and (min-width: 769px) {
    #navigation .nav li {
        margin-right: 1.5rem;
    }
}

@media only screen and (max-width: 1024px) and (min-width: 768px) {
    #navigation .nav li {
        margin-right: 1rem;
    }
}

#navigation .nav a {
    color: #FFF;
    font: 20px/20px "Graphik-Medium", sans-serif;
    display: block;
    position: relative;
    text-align: left;
}

#navigation .nav a:hover {
    text-decoration: none;
}

#navigation .nav a:hover:after {
    content: " ";
    position: absolute;
    bottom: -9px;
    left: 0;
    height: 1px;
    width: 100%;
    border-bottom: 2px solid #08E1BC;
}

#navigation .nav .dropdown > a:hover:after {
    border-bottom: 0;
}

#navigation .nav .dropdown a:hover:after {
    left: 7px;
}

/* Contact button special treatment - UPDATED VERSION */
body.layout-v2 #navigation .nav #contact {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.layout-v2 #navigation .nav #contact a {
    background: transparent !important;
    color: #FFF !important;
    border: 2px solid #08E1BC !important;
    padding: 8px 16px !important;
    border-radius: 3px !important;
    font: 20px/20px "Graphik-Medium", sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
}

body.layout-v2 #navigation .nav #contact a:hover {
    background: #08E1BC !important;
    color: #252525 !important;
}

body.layout-v2 #navigation .nav #contact a:hover:after {
    display: none !important;
}

/* Contact button styling - style the LI element like production */
body.layout-v2 #navigation .nav ul#nav li#contact,
body.layout-v2 #navigation .nav ul#nav li#contact-us,
body.layout-v2 #navigation .nav li#contact,
body.layout-v2 #navigation .nav li#contact-us {
    border: 2px solid #1bf3ce !important;
    padding: 20px !important;
    background: transparent !important;
}

/* Contact button link - keep simple */
body.layout-v2 #navigation .nav ul#nav li#contact a,
body.layout-v2 #navigation .nav ul#nav li#contact-us a,
body.layout-v2 #navigation .nav li#contact a,
body.layout-v2 #navigation .nav li#contact-us a {
    color: #FFF !important;
    font: 20px/20px "Graphik-Medium", sans-serif !important;
}

body.layout-v2 #navigation .nav ul#nav li#contact a:hover:after,
body.layout-v2 #navigation .nav ul#nav li#contact-us a:hover:after,
body.layout-v2 #navigation .nav li#contact a:hover:after,
body.layout-v2 #navigation .nav li#contact-us a:hover:after {
    display: none !important;
}

/* Responsive contact button */
@media only screen and (max-width: 1024px) and (min-width: 768px) {
    body.layout-v2 #navigation .nav li#contact,
    body.layout-v2 #navigation .nav li#contact-us {
        padding: 10px !important;
        width: 130px !important;
    }
}

#navigation .nav .dropdown {
    padding: 0;
    width: 150px;   
}

/* Industries dropdown positioning - align to right edge */
#navigation .nav #industries {
    position: relative;
}

#navigation .nav #industries .dropdown-content {
    width: 200px;
    right: 0;
    left: auto;
}

/* Contact dropdown positioning if it has one */
#navigation .nav #contact .dropdown-content {
    right: 0;
    left: auto;
}

/* Improve dropdown positioning - MATCH PRODUCTION */
#navigation .hide-mobile .dropdown-content {
    visibility: hidden;
    margin-top: 30px;
    opacity: 0;
    position: absolute;
    transition: all 0.3s ease;
    background: rgba(122, 122, 122, 0.89);
    border-radius: 0;
    z-index: 1000;
    width: 100%;
    max-width: 300px;
}

/* Prevent dropdowns from going off-screen on smaller viewports */
@media only screen and (max-width: 1024px) {
    #navigation .nav li:nth-last-child(-n+2) .dropdown-content:not(.is-flex) {
        right: 0;
        left: auto;
    }
}

#navigation .nav.hide-mobile .dropdown > a {
    text-align: center;
}

#navigation .hide-mobile .dropdown-content li {
    padding: 14px 20px;
    display: block;
    border-bottom: none;
}

#navigation .hide-mobile .dropdown-content li:last-child {
    border-bottom: none;
}

#navigation .hide-mobile .dropdown-content li a {
    display: inline-block;
    line-height: 1.3;
    padding-left: 10px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}


/* Products dropdown (is-flex) specific styles */
#navigation .dropdown-content.is-flex {
    display: flex;
    width: 500px;
    max-width: 500px;
    right: 100px;
    left: auto;
}

@media only screen and (max-width: 1200px) {
    #navigation .dropdown-content.is-flex {
        right: 20px;
        width: 400px;
        max-width: 400px;
    }
}

@media only screen and (max-width: 768px) {
    #navigation .dropdown-content.is-flex {
        flex-direction: column;
        right: auto;
        left: 0;
        width: 100%;
    }
}

#navigation .dropdown-content.is-flex .dropdown-content-column {
    width: 50%;
}

#navigation .dropdown-content.is-flex .dropdown-content-column span {
    line-height: 1.2;
    padding: 12px 20px 8px;
    color: #08E1BC;
    font: 18px/20px "Graphik-Medium", sans-serif;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Restore dropdown hover functionality */
#navigation .hide-mobile ul li:hover > .dropdown-content,
#navigation .hide-mobile ul li:focus-within > .dropdown-content,
#navigation .hide-mobile .dropdown-content:hover,
#navigation .hide-mobile .dropdown-content:focus {
    visibility: visible;
    opacity: 1;
}

/* Mobile hamburger */
#navigation .hamburger {
    position: absolute;
    top: 20px;
    right: 40px;
    z-index: 4;
}

/* -- Hero Section -- */
#hero {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    background-color: #252525;
}

/* When there's no hero, make wrapper smaller */
#hero-nav-wrapper:has(.hero-section.no-hero) {
    min-height: 120px;
}

.announcementWrapper ~ #hero-nav-wrapper:has(.hero-section.no-hero) {
    min-height: calc(120px + 47px);
}

/* Hero background */
#hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

/* Optional: Add subtle overlay for better nav visibility if needed */
#hero .hero-background.add-gradient:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 100%);
    z-index: 1;
}

/* Hero video wrapper */
#hero .hero-video-wrapper {
    position: absolute;
    overflow: hidden;
    width: 100%;
    height: 100%;
    z-index: 1;
    top: 0;
    left: 0;
}

#hero .hero-video-wrapper iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
}

@media (min-aspect-ratio: 16/9) {
    #hero .hero-video-wrapper iframe {
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    #hero .hero-video-wrapper iframe {
        width: 177.78vh;
    }
}

/* Hero content container */
#hero .hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Minimum height for hero content on small viewports */
@media only screen and (max-height: 600px) {
    #hero .hero-content {
        min-height: 600px;
    }
}

@media only screen and (max-height: 500px) {
    #hero .hero-content {
        min-height: 500px;
    }
}

/* Hero inner content */
#hero .hero-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 60px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 100%;
}

#hero .hero-inner.has-padding {
    padding-bottom: 80px;
    padding-top: 80px;
}

/* Default layout hero */
.hero-section .hero-inner .headline {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 60px;
}

.hero-section .hero-inner .headline h1 {
    color: #FFF;
    margin: 0;
    font: 90px/90px 'Graphik-Semibold', sans-serif;
}

.hero-section .hero-inner .headline-two {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font: 34px/38px 'Graphik-Semibold', sans-serif;
    padding-bottom: 25px;
    color: #fff;
}

.hero-section .hero-inner .copy {
    text-align: center;
    color: #FFF;
    font: 20px/24px 'Graphik-Regular', sans-serif;
}

.hero-section .hero-inner .cta {
    text-align: center;
    padding-top: 20px;
}

.hero-section .hero-inner .cta a {
    color: #FFF;
    font: 16px/16px 'Graphik-Medium', sans-serif;
    text-decoration: none;
    display: inline-block;
    position: relative;
    padding-right: 30px;
}
.hero-section .hero-inner .cta a:hover,
.hero-section .hero-inner .cta a:focus {
    color: #08E1BC;
}

.hero-section .hero-inner .cta a .arrow {
	display: inline-block;
	width: 41px;
	height: 13px;
	background: no-repeat url(/assets/img/arrow-long.png);
	margin-left: 20px;
}
.hero-section .hero-inner a:hover .arrow {
	background: url(/assets/img/arrow-long-over.png);
	transform: translate(5px, 0);
	transition:all .3s;
}

/* Product/Industry/Page specific heroes */
.hero-product .hero-inner,
.hero-industry .hero-inner,
.hero-page .hero-inner,
.hero-certification .hero-inner {
    min-height: 400px;
}

.hero-product .hero-content,
.hero-industry .hero-content,
.hero-page .hero-content,
.hero-certification .hero-content {
    min-height: 400px;
}

.hero-section.no-hero {
    position: relative;
    min-height: 130px;
    background: #252525;
}

/* Blog hero specific */
.hero-section.blog-hero {
    height: 150px;
    background: #252525;
}

.hero-section.blog-hero .hero-background {
    background-attachment: scroll;
}

/* Internal pages hero maximum height - 75vh accounting for announcement bar */
body:not(#page-home) #hero-nav-wrapper {
    max-height: 75vh;
    min-height: 500px;
}

body:not(#page-home) .announcementWrapper ~ #hero-nav-wrapper {
    max-height: calc(75vh - 47px);
    min-height: calc(75vh - 47px);
}

body:not(#page-home) #hero {
    max-height: 75vh;
}

body:not(#page-home) .announcementWrapper ~ #hero-nav-wrapper #hero {
    max-height: calc(75vh - 47px);
}

/* Home page specific adjustments */
#page-home .hero-inner {
    width: 100%;
    height: 100%;
    margin: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0; /* Remove side padding for full width */
    min-height: 100%;
    position: relative;
}

/* Ensure adequate space for home page text on small viewports */
@media only screen and (max-height: 700px) {
    #page-home .hero-inner {
        min-height: 700px;
    }
}

@media only screen and (max-height: 600px) {
    #page-home .hero-inner {
        min-height: 600px;
    }
    
    #page-home .hero-inner .headline h1 {
        font-size: 60px;
        line-height: 64px;
    }
}

@media only screen and (max-height: 500px) {
    #page-home .hero-inner {
        min-height: 500px;
    }
    
    #page-home .hero-inner .headline h1 {
        font-size: 48px;
        line-height: 52px;
    }
}

/* Center the headline in the available space */
#page-home .hero-inner .headline {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#page-home .hero-inner .copy {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    padding: 35px 0 !important;
    background: rgba(217, 217, 217, 0.80);
    flex-shrink: 0;
}

#page-home .hero-inner .copy p {
    display: block;
    margin: 0 auto;
    font-family: 'Graphik-Regular', sans-serif;
    color: black;
    font-weight: bold;
    font-size: 20px;
    line-height: 140%;
    width: 75%;
    max-width: 790px;
}

/* Mobile adjustments */
@media only screen and (max-width: 768px) {
    #navigation .navbar-container {
        height: 140px;
    }
    
    #navigation .logo {
        top: 20px;
        left: 20px;
        width: 80px;
        height: 30px;
        background-size: 80px 30px;
        z-index: 1000;
    }
    
    #navigation .nav {
        top: 25px;
    }
    
    #navigation .hamburger {
        top: 20px;
        right: 20px;
        z-index: 1000;
    }
    
    #hero-nav-wrapper:has(.hero-section.no-hero) {
        min-height: 80px;
    }
    
    .announcementWrapper ~ #hero-nav-wrapper:has(.hero-section.no-hero) {
        min-height: calc(80px + 47px);
    }
    
    #hero .hero-inner {
        padding: 40px 20px;
    }
    
    #hero .hero-inner.has-padding {
        padding-top: 20px;
        padding-bottom: 40px;
    }
    
    .hero-section .hero-inner .headline h1 {
        font-size: 48px;
        line-height: 52px;
    }
    
    .hero-section .hero-inner .copy {
        padding: 20px;
        font-size: 18px;
        line-height: 28px;
    }
    
    .hero-section.blog-hero {
        height: 100px;
    }
}

@media only screen and (max-width: 450px) {
    .hero-section .hero-inner .headline h1 {
        font-size: 36px;
        line-height: 40px;
    }
    
    .hero-section .hero-inner .copy {
        padding: 20px 0;
    }
}

/* Touch screen adjustments */
@media only screen and (hover: none) {
    #hero .hero-background {
        background-attachment: scroll;
    }
}

/* Content container adjustments */
#content-container {
    position: relative;
    z-index: 10;
}

/* Override old header styles when using new layout */
body.layout-v2 #header {
    display: none;
}

/* Ensure mobile overlay works correctly */
#navigation .mobileoverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #252525;
    z-index: 999;
    display: none;
    padding-top: 120px;
}

@media only screen and (max-width: 768px) {
    #navigation .mobileoverlay {
        padding-top: 80px;
    }
}

#navigation.menu-open .mobileoverlay {
    display: block;
}

/* Adjust for different layout types */
.layout-certification .hero-inner.is-certification .headline h1,
.layout-product .hero-inner.is-product .headline h1,
.layout-industry .hero-inner.is-industry .headline h1,
.layout-page .hero-inner.is-product .headline h1 {
    font: 14px/36px 'Graphik-Regular', sans-serif;
    text-transform: uppercase;
    padding-bottom: 10px;
}

.tablinks {
    font-size: 14px;
}