/* --- General Setup --- */
:root {
    --primary-color: #09271f;
    --secondary-color: #0d3b2e;
    --accent-color: #d6b884;
    --text-light: #f4f7f5;
    --text-dark: #333;
    --bg-light: #ffffff;
    --bg-grey: #f9f6f1;
    --logo-width: 120px;
    /* half of logo + buffer (20px) */
    --logo-half: calc(var(--logo-width) / 2 + 20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: initial;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-grey);
}

section {
    min-height: 100vh;
    scroll-snap-align: start;
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

main {
    padding-top: 80px;
}

.content-section {
    padding: 80px 5%;
    text-align: center;
}

.custom-color {
    background-color: var(--primary-color);
    color: var(--bg-grey);
}

.grid-container {
    color: black;
    margin: auto;
    display: grid;
    grid-template-columns: auto auto;
    grid-gap: 20px;
    width: fit-content;
}



.content-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.content-section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 10px auto 0;
}

.alternate-bg {
    background: var(--bg-light);
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background: #c9a871;
    transform: translateY(-3px);
}

a:hover,
a:visited,
a:link,
a:active {
    text-decoration: none !important;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    color: unset;
}

header {
    background: rgba(9, 39, 31, 0.9);
    backdrop-filter: blur(10px);
    color: var(--text-light);
    padding: 0 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

nav {
    width: 100%;
}

/* 4-column grid: 1) left nav, 2) logo, 3) right nav, 4) language */
.nav-links-container {
    display: grid;
    grid-template-columns: 1fr var(--logo-width) 1fr auto;
    align-items: center;
    column-gap: 8px;
    width: 100%;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    padding: 0 1.5rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.vive::after {
    width: 100%;
    left: 0;
}

.mobile-nav {
    display: none;
}

.logo-desktop {
    padding: 0 1rem;
}

/* place the logo in the second grid column and center it */
.logo-desktop {
    grid-column: 2 / 3;
    justify-self: center;
    align-self: center;
    z-index: 5;
}

/* give room for the centered logo so nav lists don't overlap it */
.nav-links.nav-left {
    grid-column: 1 / 2;
    display: flex;
    justify-content: flex-end;
    /* align items toward the centered logo */
    gap: 0.5rem;
}

.nav-links.nav-right {
    grid-column: 3 / 4;
    display: flex;
    justify-content: flex-start;
    /* align items toward the centered logo */
    gap: 0.5rem;
}

/* language dropdown sits in the fourth column */
#language-switcher-desktop {
    grid-column: 4 / 5;
    display: flex;
    justify-self: end;
    align-self: center;
}

/* When the screen is small, let the logo be part of the flow and nav items wrap */
@media only screen and (max-width: 900px) {
    .logo-desktop {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin: 10px 0;
    }

    .nav-links-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .nav-links.nav-left,
    .nav-links.nav-right {
        margin: 0;
        width: 100%;
        justify-content: center;
        flex: 1 1 100%;
    }

    .nav-links li {
        padding: 0.5rem 0.75rem;
    }

    /* ensure companies submenu stacks in the flow on mobile */
    #companies-menu {
        position: static !important;
        display: block !important;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
}

/* Mobile header and mobile menu styling */
@media only screen and (max-width: 900px) {
    .nav-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .logo-mobile img {
        width: 120px;
        height: auto;
    }

    .burger {
        display: block;
        cursor: pointer;
    }

    .burger .line1,
    .burger .line2,
    .burger .line3 {
        width: 25px;
        height: 3px;
        background: var(--text-light);
        margin: 4px 0;
        transition: all 0.3s ease;
    }

    /* mobile nav panel: align right and stack vertically */
    .mobile-nav {
        display: none;
        /* toggled via .nav-active on container */
        position: absolute;
        right: 5%;
        top: 80px;
        background: rgba(9, 39, 31, 0.95);
        padding: 12px 14px;
        border-radius: 8px;
        z-index: 200;
        flex-direction: column;
        align-items: flex-end;
        /* align items to the right */
        min-width: 160px;
    }

    .nav-links-container.nav-active .mobile-nav,
    .nav-links-container.nav-active .mobile-nav {
        display: flex;
    }

    .mobile-nav li {
        width: 100%;
    }

    .mobile-nav li a {
        display: block;
        text-align: right;
        padding: 8px 12px;
    }

    /* language options sit at the bottom of the mobile menu */
    .mobile-language {
        display: flex;
        gap: 8px;
        flex-direction: column;
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.04);
        padding-top: 8px;
        margin-top: 8px;
    }

    .mobile-language .lang-option {
        color: var(--text-light);
        padding: 8px 12px;
        text-align: right;
    }

    /* show mobile logo and burger, hide desktop logo */
    .logo-mobile {
        display: block;
    }

    .logo-desktop {
        display: none;
    }
}

/* helper used by JS toggles (Tailwind 'hidden' equivalent) */

.hidden {
    display: none !important;
}

/* language dropdown styling — match header color scheme */
#language-switcher-desktop {
    position: relative;
}

/* Unified dropdown styles for compact menus (language, companies) */
.dropbtn {
    background: transparent;
    color: var(--text-light);
    border: none;
    padding: 6px 10px;
    font-weight: 600;
    cursor: pointer;
}

.dropbtn:focus {
    outline: 2px solid rgba(214, 184, 132, 0.25);
    outline-offset: 2px;
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(9, 39, 31, 0.98);
    color: var(--text-light);
    min-width: 160px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    padding: 8px 0;
    z-index: 1200;
}

.dropdown-content a {
    display: block;
    padding: 10px 14px;
    color: var(--text-light);
    font-weight: 500;
}

.dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* make sure the dropdowns look natural when used inside the header */
.nav-links .dropdown {
    position: relative;
}

#companies-menu {
    z-index: 1300;
}

.nav-mobile-header,
.burger,
.logo-mobile {
    display: none;
}

#hero {
    position: relative;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    padding: 0 5%;
    margin-top: -80px;
    overflow: hidden;
}

#hero-video,
#hero-video-m {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: fill;
    transform: translate(-50%, -50%);
    z-index: 1;
}

@media only screen and (min-width: 768px) {
    .hero-mobile-ar {
        display: none !important;
    }
}

@media only screen and (max-width: 767px) {
    .hero-desktop-ar {
        display: none !important;
    }
}

.volume-button {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 3;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.volume-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

#hero .hero-content {
    position: relative;
    z-index: 2;
    background: rgba(9, 39, 31, 0.6);
    padding: 30px;
    border-radius: 10px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.page-hero {
    padding: 60px 5%;
    text-align: center;
    background: var(--secondary-color);
    color: var(--text-light);
}

.page-hero h1 {
    font-size: 3rem;
}

.page-hero p {
    font-size: 1.1rem;
    color: #e0e0e0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}


.dropdown {
    position: relative;
}

.dropdown .dropbtn {
    font-size: 16px;
    padding: 14px 16px;
    background-color: inherit;
    font-family: inherit;
    margin: 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(9, 39, 31, 0.9);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    /* must be above the fixed header (z-index:1000) */
    z-index: 1100;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    float: none;
    padding: 12px 16px;
    display: block;
    text-align: left;
}

.dropdown:hover .dropdown-content {
    display: block;
}
/* also open dropdown when a child has keyboard focus (accessibility) */
.dropdown:focus-within .dropdown-content {
    display: block;
}

/* companies menu will position relative to its parent .dropdown (no hardcoded calc) */
#companies-menu {
    z-index: 1100;
}

.service-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--accent-color);
}

.service-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.read-more {
    display: block;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.spacer {
    height: 40px;
}

.spacer-small {
    height: 10px;
}

.gm-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: auto;
}

.gm-content img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 4px solid var(--accent-color);
}

.about-content {
    display: flex;
    gap: 40px;
    text-align: left;
    margin-bottom: 60px;
}

.about-column {
    flex: 1;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.value-item i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.value-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-item::after {
    justify-self: center;
    content: '';
    position: relative;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 5px;
    right: 0;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.value-item:hover {
    transform: translateY(-5px) scale(1.02);
}

.value-item:hover::after {
    justify-self: center;
    width: 60px;
    left: 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.team-member {
    text-align: center;
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.team-member.full-width {
    grid-column: 1 / -1;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: block;
    margin: auto;
    object-fit: cover;
    margin-bottom: 15px;
}

.services-list-container {
    max-width: 900px;
    margin: auto;
    text-align: left;
}

.service-list-item {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-list-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.service-list-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-right: 25px;
}

.service-list-arrow {
    font-size: 2rem;
    color: var(--accent-color);
    margin-left: auto;
}

.service-page-layout {
    display: flex;
    gap: 40px;
    text-align: left;
}

.service-content {
    flex: 3;
}

.service-content h3 {
    margin-top: 30px;
    margin-bottom: 10px;
}

.service-sidebar {
    flex: 1;
    padding: 30px;
    border-radius: 10px;
}

.director-img {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 15px;
    border: 4px solid var(--accent-color);
}

.director-title {
    text-align: center;
    margin-bottom: 15px;
    color: #666;
}

.service-sidebar blockquote {
    font-style: italic;
    border-left: 3px solid var(--accent-color);
    padding-left: 15px;
}

.invalid-feedback,
.empty-feedback {
    display: none;
}

.was-validated :placeholder-shown:invalid~.empty-feedback {
    display: block;
}

.was-validated :not(:placeholder-shown):invalid~.invalid-feedback {
    display: block;
}

.is-invalid,
.was-validated :invalid {
    border-color: #dc3545;
}

.h1 small {
    font-size: 24px;
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: white;
}

.contact-form select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M5%208l5%205%205-5z%22%20fill%3D%22%23555%22/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    cursor: pointer;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(214, 184, 132, 0.5);
}

.contact-form button {
    width: auto;
    align-self: flex-start;
    border: none;
    cursor: pointer;
    margin-top: 10px;
}

.contact-info {
    flex: 1;
    text-align: left;
    min-width: 300px;
    padding-left: 20px;
}

.contact-info a:hover {
    color: var(--accent-color);
}

.social-icons a {
    color: var(--bg-grey);
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--accent-color);
}

footer {
    background: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 20px 5%;
}

@media screen and (max-width: 900px) {
    body {
        overflow-x: hidden;
    }

    header {
        padding: 0;
        justify-content: center;
    }

    .logo-desktop {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 60;
        /* ensure logo sits above nav items */
    }

    .logo-mobile {
        display: block;
        font-family: 'Montserrat', sans-serif;
        font-size: 1.8rem;
        font-weight: 700;
        color: var(--accent-color);
        text-decoration: none;
    }

    .burger {
        display: block;
        cursor: pointer;
    }

    .burger div {
        width: 25px;
        height: 3px;
        background: var(--text-light);
        margin: 5px;
        transition: all 0.3s ease;
    }

    .nav-links-container {
        position: fixed;
        right: 0px;
        height: calc(100vh - 80px);
        top: 80px;
        background: var(--primary-color);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links-container.nav-active {
        transform: translateX(0%);
    }

    .nav-links-container ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    /* hide items only when the container is not active (drawer closed) */
    .nav-links-container:not(.nav-active) ul li {
        opacity: 0;
        margin: 1.5rem 0;
    }

    /* show items when drawer is active */
    .nav-links-container.nav-active ul li {
        opacity: 1;
        margin: 1.5rem 0;
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }

    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .toggle .line2 {
        opacity: 0;
    }

    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .content-section h2,
    .page-hero h1 {
        font-size: 2rem;
    }

    .about-content,
    .gm-content,
    .service-page-layout {
        flex-direction: column;
        text-align: center;
    }

    .gm-text,
    .service-content,
    .service-sidebar {
        text-align: center;
    }

    .gm-text blockquote,
    .service-sidebar blockquote {
        text-align: left;
    }

    .form-row {
        flex-direction: row;
        gap: 0;
    }

    .grid-container {
        grid-template-columns: auto;
    }

    .contact-info {
        padding-left: 0;
    }
}

.language-switcher {
    list-style: none;
    padding: 0;
    margin: 0;
}

.language-switcher .dropdown-content a {
    padding: 5px 10px;
    cursor: pointer;
    color: var(--text-light);
    text-decoration: none;
    display: block;
}

.language-switcher .dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#language-switcher .dropbtn {
    font-size: 16px;
    padding: 14px 16px;
    background-color: inherit;
    font-family: inherit;
    margin: 0;
    color: var(--text-light);
}

#mobile-drawer {
    display: none;
}

@media only screen and (max-width: 900px) {
    .nav-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .logo-mobile {
        display: block;
    }

    .logo-desktop {
        display: none;
    }

    .burger {
        display: block;
        cursor: pointer;
        padding: 8px;
        margin-right: 12px;
        border-radius: 6px;
    }

    .burger:focus {
        outline: 2px solid rgba(255, 255, 255, 0.12);
        outline-offset: 2px;
    }

    #mobile-drawer {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 85%;
        max-width: 360px;
        background: rgba(9, 39, 31, 0.98);
        transform: translateX(100%);
        transition: transform .28s ease;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        padding: 16px;
    }

    #mobile-drawer.open {
        transform: translateX(0%);
    }

    .mobile-drawer-close {
        align-self: flex-end;
        font-size: 28px;
        background: transparent;
        border: 0;
        color: var(--text-light);
    }

    .mobile-drawer-list {
        list-style: none;
        padding: 12px 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-drawer-list a {
        color: var(--text-light);
        text-decoration: none;
        padding: 10px;
        display: block;
        text-align: right;
    }

    .mobile-drawer-language {
        margin-top: auto;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .mobile-drawer-language .mobile-lang {
        color: var(--text-light);
        text-align: right;
        padding: 8px;
        text-decoration: none;
    }
}

.drawer-submenu {
    list-style: none;
    margin: 6px 0 12px 0;
    padding-left: 0;
    display: none;
}

.drawer-submenu.open {
    display: block;
}

.drawer-submenu li a {
    padding: 8px 12px;
    text-align: right;
    font-size: 15px;
}

.drawer-submenu-toggle {
    width: 100%;
    text-align: right;
    padding: 10px;
    background: transparent;
    color: var(--text-light);
    border: 0;
    font-size: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.drawer-submenu-toggle .caret {
    display: inline-block;
    transition: transform .18s ease;
}

.portfolio-pager {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 24px 0 40px;
}

.portfolio-pager .pager-btn {
    background: transparent;
    border: 1px solid rgba(0,0,0,0.06);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.portfolio-pager .pager-btn.active,
.portfolio-pager .pager-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    border-color: transparent;
}