/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

svg {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
    visibility: hidden;
}

header, nav, .navbar, .nav-links, .logo {
    vertical-align: top;
}

body {
    font-family: Arial, sans-serif !important;
    color: #333;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

header.nav-hidden {
    transform: translateY(-100%);
}

header.scrolled .navbar {
    background-color: rgb(139, 98, 73); /* Muutub tumedamaks */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    padding: 5px 40px; /* Muutub veidi kitsamaks (compact mode) */
    transition: all 0.3s ease;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    /* Muudame tausta väga läbipaistvaks, et pilt paistaks läbi */
    background-color: rgba(126, 49, 5, 0.2); 
}

.logo {
    padding: 1px 1px;
    font-weight: bold;
    color: white;
}

.logo a {
    text-decoration: none;
    font-weight: bold;
    color: white;
}

.logo img {
    display: block; /* Eemaldab pildi all oleva nähtamatu tühimiku */
    margin: 0;
    width: 12%;
    height: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0; /* Oluline! */
    padding: 0; /* Oluline! */
    align-items: center;
    font-size: 13px;
}

.nav-links a {
    text-decoration: none;
    position: relative;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif !important;
    padding: 12px 14px;
    border-radius: 5px;
    color: #ffffff;
    background-color: rgba(126, 49, 5, 0.404);
    font-weight: 500;
    display: inline-block
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    background-color: rgba(163, 71, 18, 0.4); /* Muudab värvi veidi heledamaks/erksamaks */
    transform: translateY(-2px); /* Tõstab nuppu visuaalselt 2 pikslit ülespoole */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Suurendab varju, rõhutades tõusmist */
    text-decoration: none; 
}

/* HERO SECTION */
.hero {
    position: relative;
    width: 100%;
    height: 100vh; /* Võtab kogu ekraani kõrguse */
    background: url("../Pildid/pilt.jpg") center/cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    width: fit-content;
    max-width: 600px; 
    background-color: rgba(112, 38, 15, 0.6);
    padding: 20px 80px;
    border-radius: 12px;
}

.hero h1 {
    font-size: 60px;
    margin-top: 20px;
    font-weight: 300;
    font-family: 'Georgia', cursive !important;
    -webkit-font-smoothing: antialiased;
    display: inline-block; /* Aitab filtril paremini tekstile "kinnituda" */
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-shadow: 
        1px 1px 0px rgba(0,0,0,0.2),
        -1px -1px 0px rgba(0,0,0,0.1);
    filter: url(#rough);
}

/* WHITE CONTENT SECTION */
.content {
    background: #f3f3f3;
    padding: 100px 20px;
    display: flex;
    justify-content: center;
}

.content-inner {
    max-width: 900px;
    background: white;
    padding: 60px;
    text-align: center;
}

.columns {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    margin-bottom: 60px;
}

.t1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 60px;
    text-align: left;
}

.l1, .l2, .l3, .l4, .l5 {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 0px;
    text-align: left;
}

.about p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 24px;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif !important;
    line-height: 1.6;
}

.tekst {
    flex: 1;
}

.pilt {
    flex: 1;
}

.pilt img {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: block;
}

/* IMAGE SECTION (parallax style) */
.image-section {
    height: 900px;
    background: url("../Pildid/pilt.jpg") center/cover fixed no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-overlay {
    background: rgba(0,0,0,0.5);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 40px;
}

.schedule {
    color: white;
    text-align: center;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif !important;
    max-width: 1000px;
}

.schedule h3 {
    margin-bottom: 5px;
    font-size: 24px;
    font-weight: 300;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif !important;
}

.schedule h4 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 300;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif !important;
}

.schedule p {
    margin-top: 30px;
    font-size: 28px;
    line-height: 1.6;
}

.footer {
    height: auto;
    width: 100%;
    background-color: rgb(139, 98, 73);
    padding: 20px 20px 20px 20px;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif !important;
}

.footer-container {
    background-color: rgba(0, 0, 0, 0);
    margin: 0 auto;
    display: flex;
    justify-content: center; /* Lükkab kõik veerud lehe keskele */
    flex-wrap: wrap;
    gap: 60px; /* Panin vahe veidi suuremaks, et veerud ei oleks liiga pead-jalad koos */
}

/* 1. VEERG (Logo ja nimi) - Joondab sisu keskele */
.footer-content {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ÜLEJÄÄNUD VEERUD (Kontakt, Sotsiaalmeedia, Partnerid) - Joondab sisu keskele */
.footer-col {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    width: 100px;
    height: auto;
}

/* Pealkirjad */
.footer-heading {
  color: #ffffff;
  font-size: 16px;
  margin-bottom: 20px;
  font-weight: bold;
}

.footer-nimi {
  font-size: 20px;
  color: #ffffff;
  margin-top: 15px;
}

/* Tekst ja nimekirjad */
.footer-text {
  font-size: 14px;
  color: #ffffff;
  margin-top: 15px;
}

.contact-list {
  list-style: none; /* Eemaldab täpid */
  padding: 0;
  margin: 0;
}

/* Kontaktide ridade tsentreerimine */
.contact-list li {
  margin-bottom: 12px;
  font-size: 14px;
  display: flex;
  align-items: center; 
  justify-content: center; /* Lükkab ikooni ja teksti veeru keskele */
  color: #ffffff;
}

.contact-list .icon {
  margin-right: 10px;
  font-size: 16px;
  color: #ffffff;
}

/* Sotsiaalmeedia ringide tsentreerimine */
.social-icons {
  display: flex;
  gap: 15px;
  justify-content: center; /* Lükkab nupud veeru keskele */
}

.social-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #d8d8d8; /* Nupu tumehall taust */
  color: #fff;
  border-radius: 50%; /* Teeb nupu ümmarguseks */
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.social-circle:hover {
  background-color: #b9b9b9; /* Hover efekt */
  transform: translateY(-2px);
}

/* Partnerite piltide tsentreerimine */
.partner-logos {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center; /* Lükkab logod veeru keskele */
}

.partner-logos img {
  max-width: 100px; /* Piirab logode suurust */
  height: auto;
}

/* Alumine joon ja copyright */
.footer-bottom {
  max-width: 1600px;
  margin: 40px auto 0 auto;
  padding-top: 20px;
  border-top: 1px solid #e9e9e9; 
  text-align: center;
  font-size: 13px;
  color: #ffffff;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    width: 35px;
    height: auto;
    transition: transform 0.2s ease;
}

.menu-toggle:active {
    transform: scale(0.9);
}

.menu-toggle img {
    width: 100%;
    display: block;
    /* Kui ikoon on pildil must, siis see rida muudab selle valgeks, et sobida navbariga */
    filter: brightness(0) invert(1);
}

/* NAVBARI MUUDATUSED ALATES 1000px */
@media (max-width: 1000px) {
    .navbar {
        padding: 10px 20px; /* Vähendame veidi ääri */
    }

    .menu-toggle {
        display: block; /* Näitame ikooni */
        order: 2; /* Viib ikooni paremale poole */
    }

    .logo {
        order: 1;
    }

    .nav-links {
        display: flex;
        position: absolute;
        top: 100%;
        right: 0;           /* Menüü joondub paremale serva */
        width: auto;         /* Laius kohandub sisu järgi */
        min-width: 200px;    /* Tagab, et menüü pole liiga kitsas */
        background-color: rgb(139, 98, 73);
        flex-direction: column;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        box-shadow: -5px 5px 15px rgba(0,0,0,0.3); /* Vari ainult vasakul ja all */
        z-index: 999;
    }

    .nav-links.active {
        max-height: 600px;
        padding: 10px 0;    /* Lisab veidi ruumi üles ja alla */
    }

    .nav-links a {
        display: block;
        padding: 15px 40px !important; /* Suurem padding külgedel määrab menüü laiuse */
        background-color: transparent !important;
        border-radius: 0;
        text-align: center;
        white-space: nowrap; /* Keelab teksti murdmise mitmele reale */
        font-size: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    .nav-links a::after {
        display: none; /* Eemaldame hover-joone mobiilis */
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .columns {
        flex-direction: column;
        gap: 40px;
    }

    .hero {
        height: 100vh; /* Muudame kõrguse mobiilis veidi suuremaks, et tekst mahuks ära */
        background-attachment: scroll; /* Mobiilis on scroll sujuvam kui fixed */
    }

    .hero h1 {
        font-size: 32px;
        letter-spacing: 1px;
    }

    /* --- WHITE CONTENT SECTION --- */
    
    .content {
        padding: 40px 15px; /* Vähendame suuri täidiseid (100px -> 40px) */
    }

    .content-inner {
        padding: 30px 20px; /* Vähendame kasti sisemist tühjust */
        width: 100%;
    }

    /* Muudame horisontaalse reastuse (pilt ja tekst kõrvuti) vertikaalseks */
    .t1 {
        flex-direction: column; /* Tekst ja pilt üksteise alla */
        gap: 20px;              /* Vähendame vahet */
        margin-bottom: 40px;
        text-align: center;     /* Kesksuunaline tekst mobiilis on ilusam */
    }

    /* Lubame tekstil ja pildil võtta kogu laius */
    .tekst, .pilt {
        width: 100%;
        text-align: center;
    }

    .pilt img {
        max-width: 100%;       /* Pilt ei tohi ekraanilt välja sõita */
        margin: 0 auto;        /* Keskele */
    }

    /* About sektsiooni teksti suuruse kohandamine */
    .about p {
        font-size: 18px;       /* 24px on telefonis liiga suur massiivseks tekstiks */
        line-height: 1.5;
        width: 100%;
    }

    /* Joondame kõik l-klassid (l1, l2 jne) mobiilis keskele */
    .l1, .l2, .l3, .l4, .l5 {
        font-size: 12px;
        letter-spacing: 1px;
        padding: 15px 0;
        text-align: center;
    }

    .tekst h1 {
        font-size: 16px;
        letter-spacing: 1px;
    }

    /* Peidame liigsed tühimikud veergude vahel */
    .columns {
        gap: 20px;
        margin-bottom: 30px;
    }

/* IMAGE SECTION */
    .image-section {
        height: auto;             /* Lubab sektsioonil venida vastavalt tekstile */
        min-height: 400px;        /* Tagab, et pilt on vähemalt nii suur */
        background-attachment: scroll; 
    }

    /* 2. Parandame sisu paigutust kasti sees */
    .image-overlay {
        height: auto;             /* Lubab mustal filtril koos tekstiga venida */
        padding: 20px;
    }

    /* 3. Teeme graafiku/teksti kasti loetavamaks */
    .schedule {
        width: 100%;
        max-width: 100%;          /* Et tekst ei läheks ekraanilt välja */
    }

    .schedule p {
        font-size: 16px;          /* Vähendame fonti, et mahuks rohkem ridu pildile */
        line-height: 1.4;
        margin-top: 15px;
    }

    /* 4. Videote vahed (et ülemine video ei kataks teksti) */
    .video {
        height: auto;           /* Eemaldab igasuguse sundkõrguse */
        padding: 20px;          /* Lisab veidi ruumi ümber video */
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Video element ise (iframe või video märgend) */
    .video iframe, 
    .video video {
        width: 100%;            /* Kasutab ära ekraani laiuse... */
        max-width: 450px;       /* ...aga ei lähe mobiilis liiga laiaks */
        height: auto !important; /* Tühistab varasemad kõrguse määrangud */
        aspect-ratio: 16 / 9;   /* SUNNIB video õigesse proportsiooni */
        border-radius: 12px;    /* Teeb nurgad viisakamaks */
    }

    /* 3. INFO & VIDEO SECTIONS */
    .info, .video {
        padding: 20px;
    }

    /* FOOTER */
    .footer-container {
        flex-direction: column; /* Veerud üksteise alla */
        gap: 40px;
        text-align: center;
    }

    .footer-content {
        width: 100%;
        min-width: 0;
    }

    .contact-list li {
        justify-content: center; /* Ikoonid ja tekst keskele */
    }

    .partner-logos {
        flex-wrap: wrap; /* Logod mitmes reas, kui ei mahu */
        justify-content: center;
    }

    .partner-logos img {
        max-width: 80px; /* Vähendame logosid mobiilis */
    }

    .footer-bottom {
        margin-top: 20px;
        padding-top: 15px;
    }
}

/* Eriti väiksed ekraanid (telefonid püstises asendis) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 26px;
    }
    
    .schedule p {
        font-size: 16px;
    }
}

/* PARANDUS KÜLILIVAATELE (LANDSCAPE) */
@media (max-height: 500px) and (orientation: landscape) {
    
    /* Hero sektsioon ei tohiks võtta tervet ekraani, muidu ei saa kerida */
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 80px 0; /* Lisab ruumi üles ja alla, et tekst ei lämbuks */
    }

    .hero-content {
        padding: 20px 40px;
    }

    .hero h1 {
        font-size: 32px !important; /* Vähendame teksti, et see mahuks ära */
        margin-top: 10px;
    }

    .content-inner {
        padding: 30px;
    }

    /* Image section parallax (pilt2.jpg) ei tööta hästi madalal ekraanil */
    .image-section {
        height: auto;
        min-height: 100vh;
        background-attachment: scroll; /* Fixid pilt on madalal ekraanil segadusttekitav */
    }

    .schedule p {
        font-size: 18px;
        line-height: 1.2;
    }
}
