/* Basic resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    padding-top: 200px;
    background-color: #000;
    font-family: 'Roboto Condensed', sans-serif;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body img {
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

#bg-video, #next-video {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 1.5s ease;
}

#bg-video.fade-in {
    opacity: 1;
}

#next-video {
    opacity: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 110vh;
/*  background-color: rgba(0, 0, 0, 0.7); */
/*  backdrop-filter: blur(3px); */
    z-index: -1;
    transform: translateZ(0); /* Trigger GPU acceleration */
    will-change: transform; /* Hint to browsers for better performance */
}

.logo, footer {
    width: 100%;
}

.container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 25px;
    width: 100%;
    max-width: 1200px;
    margin: 0px auto 50px auto;
    box-sizing: border-box;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    background: radial-gradient(ellipse at top, rgba(0,0,0,0.8), transparent),
                radial-gradient(ellipse at bottom, rgba(94,131,71,0.8), transparent);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    z-index: 100;
    transition: height 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.logo img {
    display: block;
    margin: 0 auto;
    width: 500px;
    height: auto;
    max-width: 80vw;
}

.navbar {
    margin: 0;
}

.navbar ul {
    font-size: 1.2em;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0 0 20px 0;
    gap: 15px;
    width: 100%; /* Ensure full width */
}

.navbar li {
    margin: 0;
    text-align: center;
    flex: 0 1 calc(50% - 15px);
    min-width: max-content;
    max-width: 200px;
    display: flex; /* Add flex display */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.navbar a {
    color: #ddd8bc;
    font-family: 'Funnel Display', sans-serif;
    font-variant: small-caps;
    text-decoration: none;
    font-size: 1.2em;
    white-space: normal;
    display: inline-block;
    line-height: 1.2;
    padding: 5px 10px;
    transition: color 0.3s ease;
    text-align: center; /* Ensure text is centered */
    width: 100%; /* Take full width of li */
}

.navbar a:hover {
    color: #85bb65; /* Hover color */
    text-decoration: none;
}

.navbar a.active {
    color: #85bb65; /* Active color */
    font-weight: bold; /* Optional: make the active link bold */
}

.accent-bar {
    width: 80vw;
    height: 6px;
    border-radius: 3px;
    background-color: #85bb65;
    margin: 0 auto 20px auto;
}

.sticky {
    height: 150px;
    transition: height 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.sticky .logo img {
    max-width: 300px;
    transition: max-width 0.3s ease;
    padding: 0;
    margin: 0 auto;
}

.sticky .navbar ul {
    font-size: 1.0em;
    padding: 0;
    margin-top: 0;
    margin-bottom: 10px;
    transition: margin-bottom 0.3s ease;
}

.sticky .accent-bar {
    height: 3px;
    border-radius: 1.5px;
    margin: 0 auto 10px auto;
}

.main-content {
    position: relative;
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin-top: 50px;
    margin-left: auto;
    margin-right: auto;
    color: #fff;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 1);
    overflow-x: hidden;
    z-index: 2;
}

.content-section {
    margin: 60px 0;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px;
    border-radius: 10px;
}

.content-section h2 {
    font-family: 'Funnel Display', sans-serif;
    font-size: 2.5em;
    color: rgba(221,216,188,1);
    text-shadow: 2px 2px 0 rgba(94,131,71,1);
    margin-bottom: 20px;
}

.section-content {
    line-height: 1.6;
}

.section-content p {
    margin-bottom: 20px;
    font-size: 1.2em;
    line-height: 1.8;
}

.services-list {
    list-style-type: none;
    padding: 20px;
    margin: 0 10px 0 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* This prevents overflow */
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.services-list li {
    margin-bottom: 15px;
    position: relative;
    font-size: 1.3em;
    line-height: 1.4;
    padding-left: 20px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

.services-list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #fff;
    display: block;
}

.legal-list {
    list-style-type: none;
    padding: 20px;
    margin: 0 10px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 90%;
    box-sizing: border-box;
}

.legal-list li {
    margin-bottom: 15px;
    position: relative;
    font-size: 1em;
    line-height: 1;
    padding-left: 20px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
}

/* Links styling */
ul {
    list-style-type: none;
    flex: 1 1 auto; /* Allow the ul to grow and shrink */
    margin: 0 auto; /* Adjust margins for better spacing */
    max-width: 100%; /* Ensure ul doesn't exceed the container width */
    padding: 0; /* Remove any default padding */
}

ul li {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
}

ul li h3 {
    font-size: 2em;
    margin-bottom: 5px;
    font-family: 'Modum', sans-serif;
}

ul li p {
    font-size: 0.9em;
    margin-bottom: 10px;
    color: #ccc;
    font-family: 'Roboto', sans-serif;
}

a {
    color: #fff;
    text-decoration: none;
}

a:hover {
    color: #85bb65;
}

/* Circle/Icon styling */
.company-icon {
    width: 60px;
    height: 60px;
    margin-right: 15px;
    flex-shrink: 0;
}

.company-blank {
    width: 60px;
    height: 60px;
    background-color: #fff;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    opacity: 0.5;
}

#companies-section {
    margin-bottom: 0;
}

footer {
    width: 100vw;
    padding: 20px;
    background: radial-gradient(ellipse at top, rgba(94,131,71,0.8), transparent),
                radial-gradient(ellipse at bottom, rgba(0,0,0,0.8), transparent);
    backdrop-filter: blur(10px);
    box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.5);
    font-size: 0.9em;
    font-family: 'Funnel Display', sans-serif;
    text-align: center;
}

footer span {
    margin: 0 8px;
}

footer .accent-bar {
    height: 3px;
    border-radius: 1.5px;
}

footer a {
    opacity: 0.5;
    transform: opacity 0.3s ease;
}

footer a:hover {
    opacity: 1;
}

.half-opacity {
    opacity: 0.5;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    backdrop-filter: blur(5px); /* Subtle blur effect */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999; /* Ensure it appears above other content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #111; /* Modal box background */
    color: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    text-align: center;
    position: relative;
}

.modal-content h2 {
    font-family: 'Funnel Display', sans-serif;
    font-size: 2em;
    margin-bottom: 15px;
    color: #85bb65; /* Accent color for headings */
}

.modal-content p {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-content button {
    background-color: #85bb65;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-content button:hover {
    background-color: #6fa54f;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5em;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #85bb65;
}

/* For WebKit browsers (Chrome, Safari) */
::-webkit-scrollbar {
    width: 20px !important; /* Width of the scrollbar */
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.8); /* Background of the scrollbar track */
    border-radius: 10px; /* Rounded corners for the track */
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5); /* Color of the scrollbar thumb */
    border-radius: 10px; /* Rounded corners for the thumb */
    border: 3px solid rgba(0, 0, 0, 0.8); /* Adds a border around the thumb */
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.7); /* Color of the thumb on hover */
}

/* For Firefox */
* {
    scrollbar-width: thin; /* Makes the scrollbar thinner */
    scrollbar-color: rgba(255, 255, 255, 0.5) rgba(0, 0, 0, 0.8); /* thumb color track color */
}

@media (max-width: 768px) { 
    .section-content p {
        font-size: 1.2em;
    }
    
    .services-list li {
        font-size: 1.2em;
    }

    ul li h3 {
        font-size: 1.5em;
    }

    ul li p {
        font-size: 0.8em;
    }

    body {
        padding-top: 150px; /* Adjust based on your header height */
    }

    .header {
        height: auto; /* Allow header to adjust to content */
        min-height: 150px; /* Minimum height when sticky */
    }

    .sticky {
        height: auto;
        min-height: 120px;
    }

    .navbar ul {
        font-size: 1em;
        padding: 10px;
        margin-bottom: 10px;
    }

    .navbar a {
        font-size: 1em;
    }

    .accent-bar {
        margin: 10px auto;
    }
}

/* Update navbar styles for balanced wrapping */
.navbar ul {
    font-size: 1.2em;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0 0 20px 0;
    gap: 15px;
}

.navbar li {
    margin: 0;
    text-align: center;
    flex: 0 1 calc(50% - 15px); /* Set items to prefer 50% width minus gap */
    min-width: max-content; /* Ensure text doesn't get crushed */
    max-width: 200px; /* Prevent items from getting too wide */
}
