/* GLOBAL */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial;
    font-size: clamp(14px, 1.2vw, 20px);;
    background-color: rgb(222, 230, 220);
}

/* Navbari jaoks sipa paremal */
.page-content {
    margin-right: 20%;
}

/* -----------NAVBAR----------- */

/* Mobile layout navbari jaoks */
@media (max-width: 768px) {
    .nav li:not(.header-logo) {
        display: none;
    }
}

.header-home {
    position: relative;
    height: 500px; /* header heigt - background image same height! */
}

/* background image for header under navbar */
.header-image {
    max-width: 100%;
    height: 100%;
    background-image: url("assets/metsapilt1.jpg");
    background-size: cover;
    background-position: center;
}

/* Text over header background image under navbar */
.header-content {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-shadow: 2px 2px 2px black;
}

.header-content p {
    font-weight: bold;
    font-size: 30px;
    text-align: center;
    line-height: 1.2;
}

/* Navbar logo */
.header-logo img {
    border-radius: 10px;
    margin: 0 50px 0 50px; /* vasakule ja paremale ruumi logost */
    width: auto;
    height: 90px;
}

/* Default navbar (at the top, transparent, over image) */
.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    height: 100px; /* navbar kõrgus, sipa rohkem kui logo */
    z-index: 1000; /* hoiame navbari kõige kõrgemal pinnast */
}

/* Navbar when scrolled (fixed + dark background) */
.navbar.fixed {
    position: fixed;
    background: rgba(53, 129, 59, 0.8);
    z-index: 1000; /* hoiame navbari kõige kõrgemal pinnast */
}

/* Simple layout */
.navbar-container {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Navbar setup and texts layout */
.nav {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 50px;
    font-size: 25px;
}

.nav li {
    display: flex;
    align-items: center;
}

/* Navbar text decoration */
.nav a {
    color: rgb(255, 255, 255);
    text-decoration: none;
    font-weight: bold;
    line-height: 1;
}

/* navbar hover värvus ja tekst sipa suuremaks */
.nav a:hover {
    color: #2a3f1b;
    font-size: 30px;
}

/* -------------SIDEBAR-------------- */
.sidebar-content {
    background-color: #b2cab1;
    position: absolute;
    margin-top: 0px;
    right: 0;
    width: 20%;
    height: 100vh;
}

.sidebar-content.fixed {
    position: fixed;
    background-color: #b2cab1;;
    top: 100px;
    bottom: 0;
}



/* -------------SECTIONS------------- */

/* INFO SECTION */
/* section info kasti asetus ja kujundus */
.section-info {
    scroll-margin-top: 100px; /* scrollib natukene ülespoole kui sektsioon ise */
    width: 90%;
    margin: 50px auto; /* div lehe keskele vertikaalselt */
    text-align: center;

     /* kasti ümber hajutus */
    border-radius: 30px;
}

/* section info teksti kujundus */
.section-info-tekst {
    font-size: 20px;
    line-height: 1.5;
    color:rgb(34, 37, 33)
}

/* info section põhimõtete logod */
.section-info-ideals-logod {
    display: grid;
    grid-template-columns: 1fr 1fr; /* lükkab nad üksteise kõrvale */
}

.section-info-ideals-tekst {
    display: grid;
    grid-template-columns: 1fr 1fr; /* lükkab nad üksteise kõrvale */
    font-size: 25px;
    font-weight: bold;
}

.section-info-ideals-tekst-small {
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-size: 20px;
}

/* pakutavad teenused */
.pakutavad-teenused {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.pakutavad-teenused a {
    background-color: #b2cab1;
    color: #213612;
    padding: 10px;
    border-radius: 30px;
    width: 75%;
    justify-self: center;
    text-decoration: none;
}

.pakutavad-teenused a:hover {
    transform: scale(1.05);
    background-color: #91a390;
}

/* section market galerii */
.slides-gallery {
    width: 93%;
    margin: 10px auto; /* galerii keskel ja selle ümbere ruumi */
    overflow: hidden;
}

/* section market galerii slides */
.slides-gallery .slides{
    display: flex;
    width: fit-content;
    animation: move 30s linear infinite;
}

/* gallery images */
.slides-gallery img{
    width: 25vw;
    max-width: 300px;
    height: auto;
    object-fit: cover;
    margin: 10px;
    border-radius: 20px;
}

/* pildid ei liigu kui hoverid */
.slides-gallery:hover .slides{
    animation-play-state: paused;
}

/* galerii liikumise animatsioon */
@keyframes move{
    to { transform: translateX(-30%); }
}

/* MAKRET SECTION */
/* section market kasti asetus ja kujundus */
.section-market {
    scroll-margin-top: 200px;
    text-align: center;
    color:#2a3f1b;
}

.section-market-tooted {
    display: grid;
    grid-template-columns: auto auto auto auto;
    justify-content: center;
}

.section-market-toode {
    margin: 20px 30px 20px 30px; /* TOP RIGHT BOTTOM LEFT */
}

.section-market-toode img{
    border-radius: 20px;
    max-width: 300px;
    width: 100%;
}

.toote-title {
    background-color: #b2cab1;
    color: #213612;
    padding: 10px;
    border-radius: 30px;
    width: 40%;
    justify-self: center;
    text-decoration: none;
}

/* toodete koguse valijad */
.quanity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid #394734;
    border-radius: 10px;
    overflow: hidden;
}

.qty-btn {
    background: #ffffff;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
}

.qty-btn:hover {
    background: rgba(53, 129, 59, 0.8);
}

.valitud_kogus {
    min-width: 30px;
    text-align: center;
    font-size: 18px;
}

/* TELLIMINE SECTION */
.section-tellimine {
    scroll-margin-top: 200px;
    width: 90%;
    margin: auto;
    text-align: center;
    color:#2a3f1b;
}

/* Form container */
.contact-form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Input alad ja tekstiala */
.contact-form input,
.contact-form textarea {
    font-family: Arial;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid #2a3f1b;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

/* Larger textarea */
.contact-form textarea {
  min-height: 80px;
  resize: vertical;
}

/* Focus state - millises lahtris hetkel oled */
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #4749b3;
  box-shadow: 0 0 0 3px #4749b3;
}

/* Submit button */
.submit-btn {
  margin-top: 0.5rem;
  margin: auto;
  padding: 0.4rem 0.6rem;
  width: 100%;
  max-width: 200px;
  font-size: 1.2rem;
  font-weight: 500;
  color: white;
  background: linear-gradient(20deg, #2a3f1b, rgba(53, 129, 59, 0.8));
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

/* Button hover */
.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 20px rgba(125, 189, 149, 0.25);
  background-color: #b2cab1;
  opacity: 0.85;
}

/* Button active - all vajutatud */
.submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(155, 204, 153, 0.2);
}

/* Tellimus saadetud nupu muutus */
.submit-btn.sent {
    background: #16a34a; /* green */
    cursor: default;
    box-shadow: none;
}

/* KONTAKT SECTION */
.section-contact {
    scroll-margin-top: 200px;
    width: 90%;
    margin: 50px auto;
    text-align: center;
    color:#2a3f1b;
}

.contact-lingid {
    display: flex;
    flex-direction: column; /* stack items vertically */
    gap: 20px;
    align-items: center; /* center the whole block */
}

.contact-item {
    display: flex;
    align-items: center; /* vertically align icon + text */
    gap: 15px; /* space between image and text */
}

.contact-social a {
    display: flex;           /* Keep flex layout inside the link */
    align-items: center;     /* Vertically align image and text */
    gap: 15px;               /* Space between image and text */
    text-decoration: none;   /* Remove underline */
    color: inherit;          /* Keep the original text color */
}

.vahejoon {
    background-color: #2a3f1b;
    width: 30%;
    height: 7px;
    margin: auto;
    border-radius: 10px;
}

/* border: 3px solid rgb(255, 255, 255); */