body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
}

h1 {
    font-size: clamp(18px, 4vw, 30px); /* Minimum 20px, preferred 5vw, maximum 40px */
}

h2 {
    font-size: clamp(16px, 3.5vw, 25px); /* Minimum 18px, preferred 3.5vw, maximum 35px */
}

p {
    font-size: clamp(14px, 2.5vw, 20px); /* Minimum 16px, preferred 2.5vw, maximum 30px */
}

header {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    transition: background-color 0.4s ease;
}

nav {
    transition: background-color 0.4s ease;
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 70px;
    margin-right: 20px;
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-align: center;
}

nav ul li {
    display: inline;
}

nav ul li a {
    display: inline-block;
    color: #2e6830;
    text-align: center;
    padding: 12px 16px;
    text-decoration: none;
    font-size: clamp(15px, 2.5vw, 18px); /* Minimum 18px, preferred 3.5vw, maximum 35px */
    font-weight: bold;
    border-radius: 10px;
}

nav ul li a:hover {
    background-color: #214623;
    color: white;
    border-radius: 10px;
    font-weight: bold;
}

section {
    padding: 20px;
    height: calc(100vh - 60px);
    box-sizing: border-box;
}

.container {
    max-width: 1000px;
    margin: 20px auto;
    text-align: left;
}

#home {
    background: url('forest.jpg') no-repeat center center;
    background-size: cover;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 0px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#home h1{
    margin-top: 200px;
    font-size: clamp(18px, 4vw, 35px);
}

#home h2{
    font-size: clamp(16px, 3vw, 25px);
    font-weight: normal;
}

#about {
    min-height: 380px;
    background-color: #fdfbfb;
    position: relative;
    z-index: 1;
    height: 400px;
}

#about::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px;
    background-color: inherit;
    transform: skewY(3deg);
    transform-origin: top right;
    z-index: -1;
}

#services {
    min-height: 350px;
    background-color: #f5f5f5;
    position: relative;
    z-index: 1;
    height: 700px;
}

#services::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px;
    background-color: inherit;
    transform: skewY(-3deg);
    transform-origin: top left;
    z-index: -1;
}

.contact{
    max-width: 1000px;
    margin: 40px auto;
    text-align: left;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

#contact {
    height: auto;
    padding: 20px;
    text-align: center;
    background-color: #f5f5f5;
    position: relative;
    z-index: 1;
}

#contact .map-container {
    width: 50%;
    height: 450px;
    margin-left: 20px;
    max-width: 500px;
}

#contact::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px;
    background-color: inherit;
    transform: skewY(-3deg);
    transform-origin: top left;
    z-index: -1;
}

#gallery {
    background-color: #fdfbfb;
    position: relative;
    z-index: 1;
    height: auto;
}

#gallery::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 90%;
    height: 500px;
    background-color: inherit;
    transform: skewY(3deg);
    transform-origin: top right;
    z-index: -1;
}

#gallery {
    padding: 20px;
}

.video-box {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

#main-video {
    width: 100%;
    border: 2px solid #ccc;
    border-radius: 5px;
}

.thumbnails {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.thumbnails img {
    width: 30%;
    margin: 0 10px;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s;
    border: 2px solid #ccc;
    border-radius: 5px;
    transition: transform 0.2s, border-color 0.2s;
}

.thumbnails img:hover {
    transform: scale(1.1);
    border-color: #000;
}

.thumbnails img.active {
    border-color: #000;
}

.language-selector {
    display: flex;
    gap: 10px;
}

.language-selector a {
    color: rgb(7, 68, 7);
    text-decoration: none;
    font-size: small;
    cursor: pointer;
    padding: 3px 8px;
    border: 1px solid rgb(7, 68, 7);
    border-radius: 5px;
}

.language-selector a.active {
    color: white;
    background-color: darkgreen;
    border-color: darkgreen;
}

.map-container {
    max-width: 1000px;
    margin: 20px auto;
    text-align: left;
}

.menu-icon {
    display: none;
    cursor: pointer;
}

.menu-icon .bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: transform 0.4s ease;
}

.nav-open {
    transform: translateX(0);
}

.nav-closed {
    transform: translateX(-100%);
}

.word-list {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: row;
}

.word-list ul {
    list-style-type: none;
    padding: 0;
}

.word-list li {
    margin-bottom: 10px;
}

.word {
    cursor: pointer;
    color: black;
    font-size: clamp(10px, 2.5vw, 25px);
    padding: 20px 40px;
    display: block;
    text-align: center;
    position: relative;
    background-color: #f0f0f0;
}

.word::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 100%;
    background-color: #f0f0f0;
    z-index: -1;
}

.word:hover::after, 
.word.hover::after {
    background-color: #214623;
    z-index: -1;
}

.word:hover, .word.hover {
    color: white;
    background-color: #214623;
}

.image-box {
    margin-top: 16px;
    margin-left: 30px;
    width: 100%;
    overflow: hidden;
    position: relative;
    transform: scale(1);
    transform-origin: center;
}

.image-box img {
    width: 100%;
    height: 100%;
    transform: scale(0.9);
    transform-origin: top; 
    object-fit: cover;
}

.contacts {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.contact-entry {
    margin-bottom: 20px;
    border: 1px solid #ccc;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.contact-entry p {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.contact-entry p strong {
    font-weight: bold;
}

.contact-entry p span {
    color: #007bff;
}

.email-form textarea {
    height: 100%;
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.photo-gallery {
    margin-top: 30px;
    text-align: center;
}

.main-photo-box {
    margin-bottom: 15px;
}

#main-photo {
    width: 100%;
    max-width: 1000px;
    height: auto;
    border: 3px solid #ccc;
    border-radius: 5px;
}

.photo-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.photo-thumbnail {
    width: 100px;
    height: auto;
    cursor: pointer;
    border: 2px solid #ccc;
    border-radius: 5px;
    transition: transform 0.2s, border-color 0.2s;
}

.photo-thumbnail:hover {
    transform: scale(1.1);
    border-color: #000;
}

.photo-thumbnail.active {
    border-color: #000;
}

@media (max-width: 1000px) {
    .logo img {
        height: 60px;
    }

    .language-selector {
        display: flex;
        align-items: center;
        flex-direction: column;
    }

    .language-selector a {
        margin-right: 10px;
        padding: 1px 8px;
    }
}

@media (max-width: 890px) {

    .contact{
        margin: 20px auto;
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .email-form{
        margin-top: 8px;
        margin: 8px 10px;
    }

    .container {
        text-align: center;
    }

    #services a{
        height: 700px;
    }
    
    #contact {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: auto;
    }

    #contact .map-container {
        width: 100%;
        height: 400px;
        max-width: 1000px;
        margin: 0px 30px;
        margin-bottom: 50px;
        text-align: center;
    }

    .menu-icon {
        margin-left: 35px;
        display: block;
    }

    .logo img {
        height: 50px;
        margin-right: -140px;
    }

    .header-container {
        flex-direction: row;
        align-items: center;
        height: 50px;
    }

    nav {
        width: 180px;
        height: 270px;
        overflow-y: auto;
        transition: background-color 0.4s ease, transform 0.4s ease;
        transform: translateX(100%);
        position: fixed;
        top: 70px;
        right: 0px;
        background-color: rgba(255, 255, 255, 0.5);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        padding: 20px;
        border-radius: 5px;
        z-index: 999;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        transform-origin: top right;
    }

    nav ul li a{
        font-size: 18px;
    }

    .language-selector {
        display: flex;
        align-items: center;
        flex-direction: column;
    }

    .language-selector a {
        margin-right: 10px;
        padding: 1px 8px;
    }

    nav.open {
        transform: translateX(0);
    }

    #services .word-list ul {
        padding: 0;
    }

    #services .word-list li {
        font-size: 0.5rem;
        margin: 5px 0;
    }
}

@media (max-width: 770px){
    .logo img {
        width: 120px;
        height: auto;
    }

    .image-box {
        position: relative;
        overflow: hidden;
        width: 100%;
        margin-left: -10%;
    }
}

@media (max-width: 630px) {
    #services{
        height: 500px;
    }

    #about{
        height: 300px;
    }
}

[data-lang="lv"] {
    display: block;
}

.language-lv [data-lang="lv"] {
    display: none;
}

.language-lv [data-lang="en"] {
    display: block;
}

.language-en [data-lang="en"] {
    display: none;
}

.language-en [data-lang="lv"] {
    display: block;
}