/* HEADER */

header .menu-wrapper {
	z-index:90;
    position: relative;
}

header {
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 10;
    padding: clamp(12px, 1vw, 1%);
    padding-bottom: 0;
    z-index: 90;
}

header .container {
	align-items: center;
    justify-content: space-between;
}

header .flex {
	gap: 40px;
}

header .menu.flex { align-items:center; }

header .logo {
	width: 44px;
	height: 44px;
}

header .logo svg {
	width: 100%;
	height:auto;
}

header .menu li {
	text-align: justify;
	font-style: normal;
}

header .menu li div {
	width: 100%;
	position: relative;
	display: inline-flex;
	align-items: center;
}

header .menu li div::before {
	content: '';
	width: 0;
	height: 1px;
	background-color: var(--color-sand);
	transition: width 0.15s ease-out, margin-right 0.15s ease-out;
	display: block;
	margin-right: 0;
}

header .menu li:hover div::before {
	width: 100%;
	margin-right: 8px;
}

header .menu ul span {
	font-size: 12px;
    font-weight: 500;
    line-height: 12px;
    letter-spacing: -0.12px;
}

header .menu p {
	margin: 0; 
	font-size: clamp(16px, 1.1vw, 18px);
	font-weight: 400;
	line-height: clamp(16px, 1.1vw, 18px); 
	letter-spacing: -0.18px;
}

header ul li a, header ul li a:hover, header ul li a:active, header ul li a:focus, header ul li a:visited {
	color: var(--color-sand);
	text-decoration: none;
}

header .menu ul li a {
	display: flex;
    flex-direction: column;
	gap: 3px;
}
nav ul { align-items:center; }

.menu-button {
	-webkit-appearance: none;
    border: none;
    background: none;
	position: relative;
    padding: 0;
    width: 30px;
    height: 30px;
    overflow: hidden;
    z-index: 10;
}

.menu-button svg {
	width: 30px;
	height: 30px;
	max-width: 30px;
	position:absolute;
	top:0;
	left:0; right:0;
	opacity: 1;
	transition: opacity 0.2s ease-out, max-width 0.2s ease-out;
}

.menu-button svg:last-child,
header:has(.menu-mobile.open) .menu-button svg:first-child {
	transform:scale(0);
	opacity: 0;
}

header:has(.menu-mobile.open) .menu-button svg:last-child {
	max-width: 30px;
	opacity: 1;
	transform:scale(1);
}

.menu-button svg path {
	fill: var(--color-sand);
}


header .logo svg path,
header .menu ul a,
header .menu ul li div::before,
header .cta-button,
header .cta-button-arrow svg path,
header .cta-button-text,
header .cta-button-patch svg path {
	transition: fill 0.2s ease-out, background-color 0.2s ease-out, color 0.2s ease-out, width 0.2s ease-out;
}


/* Mobile Menu Styling */
@media (max-width: 1024px) {
    .menu-mobile {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-dark-sand);
        z-index: 9;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        padding: 0 var(--spacing-wrapper);
    }

    .menu-mobile.open {
        transform: translateX(0);
    }

    body.no-scroll {
        overflow: hidden;
    }
    
    header:has(.menu-mobile.open) .logo svg path,
    header:has(.menu-mobile.open) .menu-button svg path {
        fill: var(--color-sand) !important;
    }

    .menu-mobile ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: 100%;
    }

    .menu-mobile li {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 30px 0;
        border-top: 1px solid rgba(0, 0, 0, 0.3);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        font-smooth: always;
    }

    .menu-mobile li:first-child {
        border-top: none;
    }

    .menu-mobile li a {
        width: 100%;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        color: var(--color-sand) !important;
        text-decoration: none;
        gap: 5px;
    }

    .menu-mobile li div span {
        font-size: 17px;
        font-weight: 400;
        opacity: 0.5;
    }

    .menu-mobile li p {
        font-size: var(--font-size-heading-h3);
        font-weight: 400;
        line-height: 1.1;
        text-transform: uppercase;
        margin: 0;
    }
}


@media (max-width: 1024px) {
	header .menu.flex {
    	gap: 8px;
	}
}

@media (max-width: 768px) {
    header {
        padding: 16px 16px 0 16px;
    }
    header .logo {
        width: 38px;
        height: 38px;
    }
}


/* SECTION COLOR MANAGEMENT */
header .logo svg path,
header .menu ul a,
header .menu ul li div::before,
header .cta-button,
header .cta-button-arrow svg path,
header .cta-button-text,
header .cta-button-patch svg path {
	transition: fill 0.2s ease-out, background-color 0.2s ease-out, color 0.2s ease-out, width 0.2s ease-out;
}

/* Fundo laranja e branco */
header.bg-section-biosphera .logo svg path,
header.bg-section-simbioses .logo svg path,
header.bg-section-biomas .logo svg path,
header.bg-section-newsletter .logo svg path {
	fill: var(--color-title-primary);
}

header.bg-section-biosphera .menu ul li a,
header.bg-section-simbioses .menu ul li a,
header.bg-section-biomas .menu ul li a,
header.bg-section-newsletter .menu ul li a {
	color: var(--color-title-primary);
}

header.bg-section-biosphera .menu li div::before,
header.bg-section-simbioses .menu li div::before,
header.bg-section-biomas .menu li div::before,
header.bg-section-newsletter .menu li div::before {
	background-color: var(--color-title-primary);
}

header.bg-section-biosphera .cta-button,
header.bg-section-simbioses .cta-button,
header.bg-section-biomas .cta-button,
header.bg-section-newsletter .cta-button {
	color: var(--color-orange);
}

header.bg-section-biosphera .cta-button-arrow svg path,
header.bg-section-simbioses .cta-button-arrow svg path,
header.bg-section-biomas .cta-button-arrow svg path,
header.bg-section-newsletter .cta-button-arrow svg path {
	fill: var(--color-orange);
}

header.bg-section-biosphera .cta-button-text,
header.bg-section-simbioses .cta-button-text,
header.bg-section-biomas .cta-button-text,
header.bg-section-newsletter .cta-button-text {
	background-color: var(--color-title-primary);
}

header.bg-section-biosphera .cta-button-patch svg path,
header.bg-section-simbioses .cta-button-patch svg path,
header.bg-section-biomas .cta-button-patch svg path,
header.bg-section-newsletter .cta-button-patch svg path {
	fill: var(--color-title-primary);
}

header.bg-section-biosphera:has(.menu-mobile.closed) .menu-button svg path,
header.bg-section-simbioses:has(.menu-mobile.closed) .menu-button svg path,
header.bg-section-biomas:has(.menu-mobile.closed) .menu-button svg path,
header.bg-section-newsletter:has(.menu-mobile.closed) .menu-button svg path {
	fill: var(--color-title-primary);
}