html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    margin: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
    font-family: "Inter", sans-serif;
    color: #333;
    background-color: #F0FFF0;
    height: 100%;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #4CAF50;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

#loading-gif {
    max-width: 300px;
    max-height: 300px;
    transition: opacity 0.2s ease;
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px;
    box-sizing: border-box;
}

.content-wrapper {
    flex: 1;
}

body.fade-out {
  opacity: 1;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #4CAF50;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0;
}

.logo-container img {
    margin: 0;
    padding: 0;
    width: 90px;
    height: auto;
}

.logo-container .logo {
    margin: 0;
    padding: 35px;
    font-size: 18px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 15px;
}

.nav-links a.current::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: white;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 2rem;
    padding-top: calc(5rem + 80px);
    margin-top: -80px;
    background: linear-gradient(to right, #4CAF50, #81C784);
    color: white;
}

.hero button {
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    border: none;
    background-color: white;
    color: #4CAF50;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.content-section {
    padding: 3rem 2rem;
    background-color: white;
    margin: 2rem auto;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.about-section {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.caption-image {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.caption-image img {
    display: block;
    width: 100%;
    height: auto;
}

.caption-image .caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 20px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.wide-image {
    width: 100%;
    text-align: center;
}

.wide-image img,
.full-width-image img {
    width: 100%;
    border-radius: 8px;
}

footer {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    text-align: center;
    padding: 1rem;
    background-color: #4CAF50;
    color: white;
    margin-top: auto;
}

.contact-btn {
    display: inline-block;
    padding: 0px 24px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.contact-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-btn:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.h3-text {
  font-size: 1.17em;
}

.new-tab-link {
  color: #014421;
  text-decoration: none;
  display: inline-block;
  background-image: linear-gradient(90deg, #5ab05c, #5ab05c),
                    linear-gradient(90deg, #014421, #014421);
  background-size: 15px 2px, 100% 2px;
  background-repeat: no-repeat;
  background-position-x: -15px, 0;
  background-position-y: 100%;
  transition: background-position-x 0.5s;
}

.new-tab-link-white-gap {
    background-image: linear-gradient(90deg, white, white),
                    linear-gradient(90deg, #014421, #014421);
}

.new-tab-link:hover {
  background-position-x: calc(100% + 15px), 0;
}

@media (min-width: 768px) {
    .nav-links {
        list-style: none;
        display: flex;
        gap: 2.5rem;
        margin: 0;
        padding: 0;
    }

    .nav-links a {
        position: relative;
        display: inline-block;
        text-decoration: none;
        color: white;
        font-weight: bold;
        font-size: 15px;
        padding: 4px 8px;
    }

    .nav-links #mobile {
        display: none;
    }

    .nav-links a:not(.current)::before,
    .nav-links a:not(.current)::after {
        content: "";
        position: absolute;
        width: 0;
        height: 0;
        border: 2px solid transparent;
        transition: all 0.35s ease;
        pointer-events: none;
        box-sizing: border-box;
    }

    .nav-links a:not(.current)::before {
        top: -2px;
        left: 0;
    }

    .nav-links a:not(.current)::after {
        bottom: -2px;
        right: 0;
    }

    .nav-links a:not(.current):hover::before {
        width: 65%;
        height: calc(100% + 4px);
        border-top-color: white;
        border-left-color: white;
    }

    .nav-links a:not(.current):hover::after {
        width: 65%;
        height: calc(100% + 4px);
        border-bottom-color: white;
        border-right-color: white;
    }

    .nav-links a.current::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 0;
        height: 3px;
        background-color: white;
        transition: width 0.3s ease;
    }

    .nav-links a.current:hover::after {
        width: 100%;
    }

    .nav-links a.current::before,
    .nav-links a.current::after {
        border: none;
    }
}

@media (max-width: 480px) {
  .caption-image { width: 100%; }
  .caption-image .caption { font-size: 14px; padding: 10px; }
}

@media screen and (max-width: 768px) {
    .h3-text {
        font-size: 1rem;
    }

    ul {
        padding-left: 1em;
    }

    #loading-gif {
        max-width: 150px !important;
        max-height: 150px !important;
    }

    .page-container {
        padding-top: 120px;
    }

    .navbar {
        position: absolute; /* Allow navbar to scroll with content */
        top: 0;
        flex-direction: column;
        padding: 0.5rem 1rem;
        gap: 1rem;
    }

    .nav-links #computer {
        display: none;
    }

    .logo-container .logo {
        padding: 15px;
        font-size: 0.9rem;
    }

    .logo-container img {
        width: 60px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .nav-links.sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background-color: #4CAF50;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 1rem;
        margin: 0;
    }

    .nav-links a {
        font-size: 0.9rem;
        position: relative;
    }

    .hero {
       padding: 3rem 1rem;
       padding-top: calc(3rem + 120px);
       margin-top: -120px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero h3 {
        font-size: 1rem;
    }

    .content-section {
        margin: 1rem;
        padding: 2rem 1rem;
    }

    .contact-btn {
        padding: 0px 28px;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
    }
}
