@font-face {
    font-family: Montserrat;
    src: url(fonts/Montserrat.ttf);
}

@font-face {
    font-family: TiltWarp;
    src: url(fonts/TiltWarp-Regular.ttf);
}

*, *::before, *::after {
    box-sizing: border-box;
    font-family: Montserrat;
    font-weight: 450;
}

body {
    margin: 0;
    overflow-x: hidden;
    color: #132f3a;
    background-color: #F4FBF7;
    background-size: 14px 14px, 29% 29%;
    background-position: 9.1% 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /*
    background-image:
      linear-gradient(to bottom, transparent 8px, #efeee5 6px),
      linear-gradient(to right, #cecdc6 1px, transparent 1px)
    */
}

img, picture, svg, video {
    display: block;
    max-width: 100%;
}

header {
    display: block;
    width: 100%;
    background: #E8F8EF;
    margin-bottom: 40px;
}

.hero {
    width: min(100%, var(--site-max-width));
    padding: 40px var(--site-padding) 40px var(--site-padding);
    margin: 0 auto;
}

/*
header + div {
    content: '';
    position: absolute;
    z-index: -1;
    display: block;
    margin-top: -1px;
    width: 100%;
}

header + p {
    font-size: 32pt;
    font-family: Montserrat;
    font-weight: 400;
    letter-spacing: 0;
    padding: 0;
    color: #F9B75D;
    mix-blend-mode: normal;
}
*/

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.header {
    font-size: clamp(1.7rem, 5vw, 3rem);
    font-family: Montserrat;
    font-weight: 500;
    letter-spacing: 0;
    margin: 0;
    padding: 0;
    color: rgb(18 44 64 / 100%);
    mix-blend-mode: normal;
}

.header + p {
    margin: 0;
    height: max-content;
    line-height: normal;
    display: block;
    color: rgb(18 44 64 / 100%);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
}

@media only screen and (max-width: 480px) {
    .header {
        font-size: 18pt;
    }

    .header + p {
        font-size: 14pt;
    }
}

.header + .subtitle {
    font-size: 18pt;
}

h1 {
    font-family: TiltWarp;
    color: rgba(1, 50, 32, 0.75);
    font-weight: 900;
    font-size: min(17em, 20.5vw);
    line-height: 1;
    width: 84.4vw;
    margin: 30px auto 0 auto;
    letter-spacing: 5px;
    mix-blend-mode: difference;
    padding-left: 0.5vw;
    position: static;
    scale: 0.98;
}

h1 + p {
    width: 84.4vw;
    color: #F4FBF7;
    font-size: 24pt;
    margin: 0.2vw auto -60px auto;
    font-weight: 500;
}

mark {
    all: unset;
    color: #E97600;
}

/* We can definitely delete some of the lines below, I need to check for redundancy. Also should move all nav stuff into one section */

.topnav {
    z-index: 3;
    position: fixed;
    width: 100%;
    max-height: 86px;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    transition: background-color 0.25s, transform 0.25s;
}

nav a,
nav a:visited {
    color: #F4FBF7;
    border-top: 3px solid rgba(0,0,0,0);
    text-decoration: none;
    margin: 0 min(2.34vw, 30px) 0 0;
    padding: 13px 2px 5px 2px;
    height: min-content;
    letter-spacing: 0.2px;
    transition: padding 0.15s;
    font-size: 16px;
}

nav a:not([class="button"]):hover {
    border-top: 3px solid #e97600;
    color: #e97600;
    padding-top: 9px;
    padding-bottom: 8px;
}

.nav-current,
a.nav-current:visited {
    color: #e97600;
    font-weight: 500;
}

.topnav {
    overflow: hidden;
    height: 96px;
    background-color: #06402B;
    position: relative;
}

.topnav img {
    position: absolute;
    height: 95%;
    margin-top: 2px;
    left: 6.35vw;
    cursor: pointer;
    transition: filter 0.15s;
}

.topnav #top-nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topnav a,
.topnav a:visited {
    color: #F4FBF7;
    border-top: 3px solid rgba(0,0,0,0);
    text-decoration: none;
    margin: 0 min(2.34vw, 30px) 0 0;
    padding: 13px 2px 5px 2px;
    height: 100%;
    letter-spacing: 0.2px;
    transition: padding 0.15s;
    font-size: 16px;
}

.topnav a:not([class="button"]):hover {
    border-top: 3px solid #e97600;
    color: #e97600;
    padding-top: 9px;
    padding-bottom: 8px;
}

.topnav a#mobile-nav-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
}

.active {
    background-color: #04AA6D;
    color: white;
}

@media only screen and (max-width: 480px) {
    .topnav #top-nav-links {
        display: none;
        padding-top: 0 !important;
        margin-top: 5px !important;
    }

    .topnav a {
        color: white;
        padding: 14px 16px;
        text-decoration: none;
        font-size: 17px;
        display: block;
        height: min-content
    }

    .topnav a:hover {
        color: black;
    }

    .active {
        background-color: #04AA6D;
        color: white;
    }
}


.team-all {
    padding-top: 20px;
    display: flex;
    flex-flow: row wrap;
}

.team-member {
    padding: 10px;
}

.team-member-info {
    width: 200px;
    cursor: pointer;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
}

.team-member-info:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.team-member-info::after {
    content: '';
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 16px;
    height: 16px;
    background-image: url(img/arrow-right.svg);
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.team-member-info:hover::after {
    opacity: 1;
    transform: translateX(2px);
}

.team-photo {
    width: 150px;
    height: 150px;
}

.team-photo img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    clip-path: circle(50%);
}

.team-name {
    margin-top: 5px;
    font-size: 10pt;
    font-weight: 600;
}

.team-title {
    margin-top: .2em;
    font-size: 10pt;
    font-weight: 600;
}

.team-degree {
    padding-left: 10px;
    margin-top: 10px;
    font-size: 10pt;
    width: 20%;
}

.team-bio {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(6, 64, 43, 0.2);
    z-index: 1000;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.team-bio.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.team-bio .team-bio-text {
    position: relative;
    display: block;
    width: min(92vw, 760px);
    max-height: min(80vh, 820px);
    overflow: auto;
    border: 2px solid #39804F;
    background-color: #F4FBF7;
    text-align: left;
    border-radius: 18px;
    padding: 12px 24px 24px;
    margin: 0;
    box-shadow: 0 24px 60px rgba(6, 64, 43, 0.28);
    animation: fadeIn 0.2s ease;
}

.team-bio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(6, 64, 43, 0.15);
}

.team-bio-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #06402B;
}

.team-bio .team-bio-text::after {
    display: none;
}

.team-bio-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #06402B;
    color: #F4FBF7;
    font-size: 22px;
    line-height: 1;
    padding: 0 0 2px 0;
    cursor: pointer;
}

.team-bio-close:hover {
    background: #0a5a3e;
}

body.modal-open {
    overflow: hidden;
}

@-webkit-keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@-webkit-keyframes fadeOut {
    from {opacity: 1;}
    to {opacity: 0;}
}

@keyframes fadeOut {
    from {opacity: 1;}
    to {opacity: 0;}
}

.assay-info {
    display: none;
    margin-top: 5px;
    margin-bottom: 5px;
    padding-top: 15px;
    padding-bottom: 15px;
    border-top: 2px solid #39804F;
    border-bottom: 2px solid #39804F;
    width: fit-content;
}

.assay-info.show {
    display: block;
}

.assay-title {
    font-size: 18pt;
    font-weight: 500;
}

.assay-sub {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 14pt;
}

.assay-req {
    display: inline-block;
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 14pt;
    font-weight: 500;
}

.assay-equip {
    margin-bottom: 0;
    color: #4b5b68;
    font-style: italic;
}

.req-box {
    display: inline-block;
    margin: auto;
    width: 48px;
    height: 48px;
    border-radius: 4px;
    font-size: 7pt;
    background-color: #265645;
    padding: 0;
    margin: 0 0 2px;
    transition: box-shadow 150ms;
}

.req-box div:has(img) {
    margin-top: 6px;
    margin-bottom: 6px;
    width: 36px;
    height: 36px;
    border-radius: 32px;
    background: #F4FBF7;
}

.chat {
    position: sticky;
    bottom: 15px;
    float: right;
    margin: 15px;
    z-index: 2;
    padding: 8px;
    border-radius: 25px;
    background-color: #36aa53;
    cursor: pointer;
    box-shadow: 0 0 5px #aaa;
}

.topnav .nav-cta-button:hover::after {
    filter: brightness(0) saturate(100%) invert(69%) sepia(61%) saturate(6675%) hue-rotate(10deg) brightness(99%) contrast(108%);
}

.non-nav {
    display: block;
    box-sizing: content-box;
    color: #164a41;
    text-decoration: none;
    padding: 5px 13px 2.5px 13px !important;
    margin-top: 15px !important;
    width: max-content;
    border: none !important;
    background: #F4FBF7 !important;
    font-weight: 600;
    font-size: 18px !important;
}

.non-nav::after {
    width: 20px;
    height: 20px;
    transform: translate(2px, 3.5px);
    background-size: 20px 20px;
    filter: invert(22%) sepia(25%) saturate(1071%) hue-rotate(120deg) brightness(92%) contrast(91%);
}

.non-nav:hover::after {
    transform: translate(5px, 3.5px);
}

.changing-info,
.panel-info {
    margin: 0 6.8vw 0 min(4vw, 100px);
}

#change-title,
#panel-title {
    font-weight: 500;
    font-size: 32px;
    margin: 0;
}

@media only screen and (max-width: 480px) {
    #change-title,
    #panel-title {
        font-size: 21px;
    }
}

.dotted {
    position: absolute;
    z-index: -1;
    width: 1px;
    height: 100%;
    border-left: 2px dashed #aaa;
}

.dark-content {
    box-sizing: border-box;
    background: #265645;
    min-height: 150px;
    max-height: 300px;
    width: 87.1%;
    margin: 0 auto;
    border-radius: 25px;
    background-size: 14px 14px, calc(33.3% + 1px);
    background-position: 49.95%;
    background-image: linear-gradient(to bottom, transparent 8px, #265645 6px), linear-gradient(to right, #cecdc6 1px, transparent 1px);
    display: flex;
}

.popup-img {
    position: relative;
    width: calc(100% / 3);
    min-height: 150px;
    max-height: 300px;
    aspect-ratio: 1/1;
    border-radius: 15px 0 0 15px;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: transform 0.25s, box-shadow 0.25s;
}

.popup-img:nth-of-type(1)::before {
    border-radius: 15px 0 0 0;
}

.popup-img:nth-of-type(2),
.popup-img:nth-of-type(2)::before,
.popup-img:nth-of-type(2)::after {
    border-radius: 0;
}

.popup-img:nth-of-type(3),
.popup-img:nth-of-type(3)::before,
.popup-img:nth-of-type(3)::after {
    border-radius: 0 15px 0 0;
}

.popup-img:hover {
    transform: scale(1.03);
    z-index: 3;
    box-shadow: 0 0 10px 0 #1e1e1e;
}

.popup-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(6 64 43 / 30%) 20%, rgba(6, 64, 43, 0.1) 100%);
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
}

.popup-img a {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding-top: 25px;
    display: block;
    color: #F4FBF7;
    font-weight: 500;
    font-size: 26px;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-align: center;
    height: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-img:hover a::after {
    transform: translate(5px, 5px) !important;
}

@media only screen and (max-width: 480px) {
    .popup-img a {
        font-size: 12px;
    }
}

footer {
    justify-content: center;
    padding-bottom: 10px;
}

footer strong {
    color: #F4FBF7;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
}

footer svg {
    display: inline-block;
    padding-right: 3px;
    filter: brightness(0) saturate(100%) invert(93%) sepia(13%) saturate(151%) hue-rotate(91deg) brightness(104%) contrast(95%);
}

footer svg:hover {
    filter: brightness(0) saturate(100%) invert(79%) sepia(31%) saturate(400%) hue-rotate(90deg) brightness(87%) contrast(94%);
    cursor: pointer;
}

footer a, footer p {
    color: #F4FBF7;
    font-size: 14px;
    line-height: 1.7;
    text-decoration: none;
}

footer a:hover {
    color: #7EC99A;
}

footer > div > div:nth-of-type(1) {
    margin-right: clamp(8px, 5vw, 80px)
}
footer > div > div:nth-of-type(2) {
    margin-right: clamp(8px, 5vw, 80px)
}

footer > div > div:nth-of-type(2) {
    display: flex;
    flex-direction: row;
}

footer hr {
    border: none;
    border-top: 1px solid #F4FBF7;
    width: 50%;
    min-width: 320px;
    padding-top: 10px;
}

footer hr:after {
    content: '© 2026 ANTHEA LABS. All Rights Reserved';
    font-size: 11px;
    color: #F4FBF7;
}

.inline {
    display: inline-block;
    margin: 5px 5px 24px;
}

.mini {
    display: inline-block;
    width: 120px !important;
    height: 120px !important;
    border-radius: 6px;
}

.mini img {
    width: 44px;
}

.mini p {
    font-size: 13px;
    width: 120px;
}

.mini div:has(img) {
    margin-top: 15px;
    width: 60px;
    height: 60px;
}


main {
    margin: auto 10px auto 10px;
    flex: 1;
}

main hr {
    margin: 10px auto;
    border: none;
    border-bottom: 2px #39804F solid;
    background-color: #F4FBF7;
}

/*I think we can just delete all of the nav lines below*/

nav .menu {
    clear: both;
    width: 250px;
    position: absolute;
    right: 0;
    height: 0;
    overflow: hidden;
    display: block;
    transition: height 0.2s ease-out;
}

nav .menu-icon {
    cursor: pointer;
    float: right;
    padding: 25px 20px 15px;
    position: relative;
    user-select: none;
}

nav .menu-icon .navicon {
    background: #fff;
    display: block;
    height: 2px;
    position: relative;
    transition: background 0.2s ease-out;
    width: 18px;
}

nav .menu-icon .navicon:after,
nav .menu-icon .navicon:before {
    background: #fff;
    content: "";
    display: block;
    height: 100%;
    position: absolute;
    transition: all 0.2s ease-out;
    width: 100%;
}

nav .menu-icon .navicon:before {
    top: 5px;
}

nav .menu-icon .navicon:after {
    top: -4.5px;
}

nav .menu-btn {
    display: none;
}

nav .menu-btn:checked ~ .menu {
    height: calc(100vh - 40px);
    overflow-y: auto;
}

nav .menu-btn:checked ~ .menu-icon .navicon {
    background: 0 0;
}

nav .menu-btn:checked ~ .menu-icon .navicon:before {
    transform: rotate(-45deg);
}

nav .menu-btn:checked ~ .menu-icon .navicon:after {
    transform: rotate(45deg);
}

nav .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:after,
nav .menu-btn:checked ~ .menu-icon:not(.steps) .navicon:before {
    top: 0;
}

.menu-dropdown,
.menu-mini {
    padding: 0;
}

.menu-mini:before {
    color: #fff;
    width: 100%;
    font-size: 12pt;
    padding: 12px 20px;
    display: inline-block;
    cursor: pointer;
}

nav li:first-of-type {
    margin-top: 8px;
}

.menu-mini:hover::before {
    background-color: #8a1818;
}

.menu-mini:focus {
    pointer-events: none;
}

.menu-mini:focus .menu-dropdown {
    opacity: 1;
    visibility: visible;
    position: static;
}

.menu-dropdown {
    background-color: #961818;
    pointer-events: auto;
    position: absolute;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: visibility 1s;
}

.menu-dropdown a {
    border: none;
    outline: 0;
    color: #fff;
    text-decoration: none;
    width: 100%;
}

.contact-table {
    display: flex;
    flex-direction: row;
    width: 87.1%;
    margin: auto auto min(20px, 4vw) auto;
}

.contact-method {
    width: 33%;
}

.contact-title {
    font-weight: 500;
    font-size: 1.5em;
}

@media only screen and (max-width: 480px) {
    .contact-table {
        display: flex;
        flex-direction: column;
    }

    .contact-method {
        width: 100%;
        border: none;
        border-top: 1px solid #e97600;
    }

    div.contact-method:nth-of-type(1) {
        border: none;
    }
}


.contact-form-section {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 40px 0 60px 0;
    padding: 0 20px;
    box-sizing: border-box;
}

.contact-form-card {
    width: 100%;
    max-width: 900px;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 24px rgba(19, 46, 67, 0.08);
    border: 1px solid rgba(19, 46, 67, 0.08);
    box-sizing: border-box;
}

.contact-form-card h2 {
    margin: 0 0 10px 0;
    color: #132e43;
    font-size: 28px;
}

.contact-form-intro {
    margin: 0 0 24px 0;
    color: #4b5b68;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #132e43;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #cfd8df;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    color: #132e43;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e97600;
    box-shadow: 0 0 0 3px rgba(233, 118, 0, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.contact-submit-btn {
    width: fit-content;
    background: #e97600;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.contact-submit-btn:hover {
    background: #cf6700;
    transform: translateY(-1px);
}

.contact-submit-btn:active {
    transform: translateY(0);
}

.primary-btn {
    background: #e97600;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
}

.primary-btn:hover {
    background: #cf6500;
}

@media (max-width: 768px) {
    .contact-form-card h2 {
        font-size: 24px;
    }

    .form-row {
        flex-direction: column;
        gap: 12px;
    }
}

.page-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.subheader {
    font-size: 1.1em;
    font-weight: 400;
    margin-top: 10px;
}


.cta-container {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-cta-button {
    /*background-color: #e97600;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.25s ease;*/

    font-size: 16px !important;
    border-radius: 25px !important;
    border: 2px solid #e97600 !important;
    background: rgba(255, 255, 255, 0) !important;
    margin-top: 7px !important;
    padding: 5px 10px !important;
    font-weight: bold !important;
    letter-spacing: 0.2px !important;
    transition: padding 0.15s;
    text-decoration: none;
    margin: 0 min(2.34vw, 30px) 0 0;
    height: min-content !important;
}

.nav-cta-button::after {
    content: '';
    width: 16px;
    height: 16px;
    display: inline-block;
    transition: transform 0.15s;
    transform: translate(0, 2.5px);
    margin-left: 3px;
    background: url(img/arrow-right.svg);
    filter: invert(98%) sepia(45%) saturate(100%) hue-rotate(342deg) brightness(99%) contrast(89%)
}

.nav-cta-button:hover::after {
    transform: translate(3px, 2.5px);
}

.cta-base {
    background-color: #E97600;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    cursor: pointer;
}

.hero-cta-button {
    padding: 18px 36px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    margin: 0 auto 35px auto;
}

.hero-cta-button:hover {
    background-color: #cf6700;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}


:root {
    --nav-height: 54px;
    --site-max-width: 1270px;
    --site-padding: clamp(16px, 4vw, 48px);
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-width: 0;
}

main,
.page-container {
    width: min(100%, var(--site-max-width));
    margin: 0 auto;
    padding-left: var(--site-padding);
    padding-right: var(--site-padding);
}

h1 {
    width: min(100%, 1100px);
    font-size: clamp(3rem, 14vw, 15rem);
    line-height: 0.95;
    margin-top: clamp(24px, 5vw, 60px);
    letter-spacing: clamp(1px, 0.5vw, 5px);
}

h1 + p {
    width: min(100%, 1100px);
    font-size: clamp(1.1rem, 3vw, 2rem);
    margin: 10px auto 20px auto;
    color: #132f3a;
}

.topnav {
    min-height: var(--nav-height);
    height: auto;
}

.topnav img {
    /*height: clamp(54px, 8vw, 82px);*/
    height: 48px;
    left: var(--site-padding);
}

/*.topnav img:hover {
    filter: brightness(0) invert(1);
}*/

.topnav a {
    font-size: clamp(14px, 1.5vw, 16px);
}

@media only screen and (max-width: 640px) {
    .topnav img {
        margin-left: var(--site-padding);
        position: relative;
        left: 0;
        margin-right: auto;
    }

    .topnav {
        height: max-content;
        min-height: 76px;
        overflow: visible;
    }

    .topnav img {
        height: 68px;
    }

    .topnav #top-nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin: 15px 0;
        padding-top: 10px;
        justify-content: center;
        gap: 8px;
        padding-bottom: 15px;
        background: #06402B;
    }

    .topnav.responsive #top-nav-links,
    .topnav.open #top-nav-links {
        display: flex;
    }

    .topnav a {
        width: 100%;
        padding: 14px 18px;
        font-size: 16px;
        text-align: left;
    }

    .topnav a:hover {
        padding: 14px 18px !important;
    }

    .topnav .nav-cta-button {
        width: calc(100% - min(4.68vw, 60px));
        margin: 0 auto;
    }

    .topnav .nav-cta-button:hover {
        padding: 5px 10px !important;
    }

    .topnav a#mobile-nav-menu {
        display: block;
        position: absolute;
        right: 8px;
        top: 14px;
        width: auto;
        height: auto;
    }
}


.changing-info,
.panel-info {
    margin: 24px auto;
    width: min(100%, var(--site-max-width));
    padding-left: var(--site-padding);
    padding-right: var(--site-padding);
}

#change-title,
#panel-title {
    font-size: clamp(1.4rem, 4vw, 2rem);
}

.assay-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
}

.assay-sub,
.assay-req {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
}

.dark-content {
    width: min(100%, var(--site-max-width));
    flex-wrap: nowrap;
    min-height: unset;
    max-height: none;
}

.popup-img {
    min-height: 180px;
    max-height: none;
}

@media only screen and (max-width: 768px) {
    .dark-content {
        flex-direction: column;
        border-radius: 18px;
    }

    .popup-img {
        width: 100%;
        aspect-ratio: 16 / 9;
        border-radius: 0;
    }

    .popup-img:nth-of-type(1),
    .popup-img:nth-of-type(1)::after {
        border-radius: 18px 18px 0 0;
    }

    .popup-img:nth-of-type(3),
    .popup-img:nth-of-type(3)::after {
        border-radius: 0 0 18px 18px;
    }
}

.team-all {
    justify-content: center;
    gap: 20px;
}

.team-member {
    width: clamp(180px, 25vw, 240px);
    text-align: center;
}

.team-member-info {
    width: 100%;
}

.team-photo,
.team-photo img {
    width: clamp(120px, 18vw, 160px);
    height: clamp(120px, 18vw, 160px);
    margin: 0 auto;
}

.team-degree {
    width: 100%;
    padding-left: 0;
}

.team-bio .team-bio-text {
    width: min(92vw, 760px);
    left: auto;
    transform: none;
    margin-left: 0;
}

.contact-table {
    width: min(100%, var(--site-max-width));
    gap: 24px;
    align-items: stretch;
}

.contact-method {
    flex: 1;
    min-width: 0;
}

@media only screen and (max-width: 768px) {
    .contact-table {
        flex-direction: column;
        gap: 0;
    }

    .contact-method {
        width: 100%;
        padding: 20px 0;
        border-top: 1px solid #e97600;
    }

    .contact-method:first-child {
        border-top: none;
    }
}

.contact-form-section {
    padding-left: var(--site-padding);
    padding-right: var(--site-padding);
}

.contact-form-card {
    padding: clamp(20px, 5vw, 36px);
}

.contact-form-card h2 {
    font-size: clamp(1.5rem, 4vw, 1.9rem);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media only screen and (max-width: 700px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-submit-btn {
        width: 100%;
    }
}

.cta-container {
    padding-left: var(--site-padding);
    padding-right: var(--site-padding);
}

.hero-cta-button {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
    line-height: 1.2;
    padding: clamp(14px, 3vw, 18px) clamp(22px, 6vw, 36px);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.nav-cta-button {
    white-space: nowrap;
}

footer {
    background: #06402B;
    padding-left: var(--site-padding);
    padding-right: var(--site-padding);
}

footer > div {
    width: min(100%, var(--site-max-width));
    margin: 0 auto;
    height: 125px;
}

footer > div > div:nth-of-type(2) {
    flex-wrap: wrap;
    gap: 20px;
}

footer hr {
    width: min(100%, 620px);
    min-width: 0;
}

@media only screen and (max-width: 640px) {
    footer > div > div:nth-of-type(1),
    footer > div > div:nth-of-type(2),
    footer > div > div:nth-of-type(2) > div {
        margin-left: 4px;
        margin-right: 4px;
    }

    footer > div > div:nth-of-type(2) {
        flex-direction: column;
    }
}

@media only screen and (max-width: 480px) {
    main {
        margin: 0 auto !important;
        padding: 0 12px;
    }

    .button,
    .button:visited,
    .primary-btn,
    .contact-submit-btn {
        min-height: 44px;
    }

    .mini {
        width: 46vw !important;
        max-width: 130px;
        height: 46vw !important;
        max-height: 130px;
    }

    .mini p {
        width: auto;
    }

    .team-bio {
        padding: 16px;
    }

    .team-bio .team-bio-text {
        width: 100%;
        max-height: 85vh;
        padding: 48px 16px 16px;
    }

    .team-bio-header {
        margin-bottom: 14px;
    }

    .team-bio-name {
        font-size: 1rem;
    }
}
html {
    max-width: 100%;
}


.cta-container {
    margin: 0 auto 30px auto;
}


.service-container {
    width: 100%;
    max-width: 100%;
    margin: 24px auto;
    display: block;
    overflow: visible;
}

.services,
.panels {
    width: 100%;
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 14px;
    justify-items: center;
    align-items: stretch;
}

.service-box,
.panel-box {
    width: 100%;
    max-width: 155px;
    min-height: 165px;
    border-radius: 8px;
    background-color: #06402B;
    padding: 16px 10px 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    transition: box-shadow 150ms, background-color 150ms, transform 150ms;
}

.service-box:hover,
.panel-box:hover {
    box-shadow: 0 8px 22px rgba(6, 64, 43, 0.24);
    background-color: #e97600;
    transform: scale(1.04);
    cursor: pointer;
}

.sb-selected {
    background-color: #e97600;
}

.service-box div:has(img),
.panel-box div:has(img) {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #F4FBF7;
    padding: 16px;
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-box img,
.panel-box img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.service-box p,
.panel-box p {
    width: 100%;
    margin: 0;
    padding: 0 4px;
    color: #F4FBF7;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: break-word;
}

.service-box-content {
    width: 100%;
    margin: 0;
    text-align: center;
}

.service-box::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 16px;
    height: 16px;
    background-image: url(img/arrow-right.svg);
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
    filter: brightness(0) saturate(100%) invert(100%) sepia(10%) saturate(508%) hue-rotate(61deg) brightness(100%) contrast(97%);
}

.service-box:hover::after {
    opacity: 1;
    transform: translateX(2px);
}

/* Tablet */
@media only screen and (max-width: 900px) {
    .services,
    .panels {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        max-width: 460px;
    }

    .service-box,
    .panel-box {
        max-width: 220px;
        min-height: 165px;
    }
}

/* Mobile: force vertical */
@media only screen and (max-width: 600px) {
    .services,
    .panels {
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 320px;
        width: 100%;
    }

    .service-box,
    .panel-box {
        width: 100%;
        max-width: 280px;
        min-height: 155px;
    }
}

.dark-content {
    position: relative;
    width: min(87.1%, 1200px);
    margin: 0 auto;
    display: flex;
    overflow: hidden;
    border-radius: 25px;
}

.popup-img {
    position: relative;
    width: calc(100% / 3);
    min-height: 300px;
    max-height: none;
    aspect-ratio: auto;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.popup-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20%;
    background: rgb(45 102 69 / 70%);
    z-index: 2;
    border-radius: inherit;
}

.popup-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(6, 64, 43, 0.4) 0%, rgba(6, 64, 43, 0.1) 100%);
    z-index: 1;
    border-radius: inherit;
    pointer-events: none;
}

.popup-img a {
    position: absolute;
    z-index: 3;
    left: 24px;
    right: 24px;
    top: 0;
    bottom: auto;
    translate: none;
    padding: 0;
    max-width: calc(100% - 48px);
    max-height: 20%;
    color: #F4FBF7;
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.15;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    overflow-wrap: break-word;
}

/* Mobile home cards */
@media only screen and (max-width: 768px) {
    .dark-content {
        width: calc(100% - 32px);
        flex-direction: column;
        border-radius: 18px;
    }

    .popup-img {
        width: 100%;
        min-height: 260px;
        aspect-ratio: 16 / 9;
        border-radius: 0;
    }

    .popup-img:nth-of-type(1),
    .popup-img:nth-of-type(1)::before,
    .popup-img:nth-of-type(1)::after {
        border-radius: 18px 18px 0 0;
    }

    .popup-img:nth-of-type(2),
    .popup-img:nth-of-type(2)::before,
    .popup-img:nth-of-type(2)::after {
        border-radius: 0;
    }

    .popup-img:nth-of-type(3),
    .popup-img:nth-of-type(3)::before,
    .popup-img:nth-of-type(3)::after {
        border-radius: 0;
    }
}


/* ---------- TESTING PAGE TILE FIX ---------- */

.service-container {
    width: 100%;
    max-width: 100%;
    margin: 24px auto;
    display: block;
    overflow: visible;
}

.services,
.panels {
    width: 100%;
    max-width: 1400px;
    margin: 24px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 14px;
    justify-items: center;
    align-items: stretch;
}

.service-box,
.panel-box {
    width: 100%;
    max-width: 155px;
    min-height: 165px;
    border-radius: 8px;
    background-color: #06402B;
    padding: 16px 10px 14px 10px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.service-box div:has(img),
.panel-box div:has(img) {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: #F4FBF7;
    padding: 16px;
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-box img,
.panel-box img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.service-box p,
.panel-box p {
    width: 100%;
    margin: 0;
    padding: 0 4px;
    color: #F4FBF7;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: break-word;
}

.service-box-content {
    width: 100%;
    margin: 0;
    text-align: center;
}

/* Mobile: force testing tiles vertical */
@media only screen and (max-width: 600px) {
    .services,
    .panels {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        max-width: 320px !important;
        width: 100% !important;
        gap: 14px !important;
    }

    .service-box,
    .panel-box {
        width: 100% !important;
        max-width: 280px !important;
        min-height: 155px !important;
        flex: none !important;
    }
}

@media only screen and (min-width: 640px) {
    #top-nav-links {
        display: flex !important;
    }
}