
/* --- 1. ÜLDISED STIILID --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #f8f8f8;
    color: #333;
    min-width: 320px;
}

/* --- 2. PÄISERIBI --- */
.header {
    width: 100%;
    height: 240px;
    background-image: url('images/banner1.png');
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 20px 20px 0 20px;
    box-sizing: border-box;
}

.header-top {
    display: flex;
    align-items: center;
    min-height: 120px;
}

.logo-le {
    height: 120px;
    width: auto;
    margin-left: 80px;
    margin-top: 15px;
}

.header-text-img {
    height: 90px;
    margin-left: 20px;
}

.main-nav {
    display: flex;
    padding-left: 320px;
    gap: 15px;
}

.nav-button {
    background-color: rgb(56, 82, 255);
    color: white;
    padding: 6px 25px;
    height: 40px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* --- 3. SISU ÜMBRIS --- */
.content-wrapper {
    margin-top: 240px;
    width: 100%;
}

/* --- 4. SLAIDER --- */
.product-hero {
    position: relative;
    width: 100%;
    height: 650px;
    overflow: hidden;
    background-color: #f6f9f3;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    animation: slideAnimation 21s infinite;
}

.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 7s; }
.slide:nth-child(3) { animation-delay: 14s; }

@keyframes slideAnimation {
    0% { opacity: 0; visibility: hidden; transform: scale(1.08); }
    5% { opacity: 1; visibility: visible; transform: scale(1.04); }
    10% { transform: scale(1.04); }
    30% { opacity: 1; visibility: visible; transform: scale(1.04); }
    35% { opacity: 0; visibility: hidden; transform: scale(1.04); }
    100% { opacity: 0; visibility: hidden; }
}

.hero-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 90% center;
    z-index: 1;
    backface-visibility: hidden;
}

.hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 0 60px;
}

.hero-text-overlay {
    max-width: 600px; /* Veidi laiem tekstiala üldiselt */
}

.hero-container.text-right { justify-content: flex-end; }
.text-right .hero-text-overlay { text-align: right; }

.hero-text-overlay h2 {
    font-size: 2.8rem; /* Suurem pealkiri */
    color: #4b0082;
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255,255,255,0.8);
}

.hero-text-overlay p {
    font-size: 1.3rem; /* Suurem ja loetavam tekst */
    color: #111;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 500;
}

.hero-button {
    display: inline-block;
    background-color: #3852ff;
    color: white !important;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

/* --- 4.1 KOLMANDA SLAIDI ERIPÄRA (Kammid) --- */
.slide:nth-child(3) .hero-container {
    max-width: 100%; /* Lubame tekstil minna ekraani servani */
    justify-content: flex-end; 
    padding-right: 5%; /* Kasutame protsenti, et servas oleks alati õige vahe */
}

.slide:nth-child(3) .hero-text-overlay {
    max-width: 380px; 
    background: none; 
    text-align: right;
    /* Lisame tekstile veelgi tugevama "valge pilve", et puidu tekstuur üldse ei segaks */
    filter: drop-shadow(0 0 10px white) drop-shadow(0 0 20px white);
}

.slide:nth-child(3) h2 {
    font-size: 2.2rem;
    color: #4b0082;
    text-shadow: 0 0 15px white, 0 0 5px white;
}

.slide:nth-child(3) p {
    font-size: 1.15rem;
    color: #000;
    text-shadow: 0 0 10px white;
    font-weight: 600;
}


/* --- 5. NOOL JA LIIKUMINE --- */
.scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: 55px;
    height: 55px;
    background: rgba(56, 82, 255, 0.85); /* Sinine taust, et oleks nähtav */
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s infinite;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    text-decoration: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.scroll-down svg {
    width: 30px;
    height: 30px;
    stroke: white;
    stroke-width: 3; /* Jämedam ja selgem nool */
}

/* --- 6. TUTVUSTAV OSA --- */
.about-section {
    padding: 100px 20px;
    background-color: white;
    text-align: center;
}

.about-section .container {
    max-width: 900px;
    margin: 0 auto;
}

.about-section h2 {
    font-size: 2.5rem;
    color: #4b0082;
    margin-bottom: 30px;
    font-weight: bold;
}

.about-section p {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #333;
}

/* --- 7. JALUS --- */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 25px;
}
/* ==========================================
   MOBIILIVAADE (KORRIGEERITUD JA TUGEVDATUD)
   ========================================== */
@media screen and (max-width: 768px) {
    /* 1. PÄIS JA NUPUD - Teeme veelgi kompaktsemaks */
    .header { height: auto !important; position: relative !important; padding: 5px !important; }
    .header-top { flex-direction: column !important; min-height: auto !important; }
    .logo-le { height: 40px !important; margin: 5px 0 !important; }
    .header-text-img { height: 28px !important; margin: 0 !important; }
    .main-nav { padding: 0 !important; justify-content: center !important; gap: 4px !important; flex-wrap: wrap !important; }
    .nav-button { padding: 0 5px !important; font-size: 11px !important; height: 30px !important; flex: 1 1 45% !important; justify-content: center; display: flex; align-items: center; }

    /* 2. KAOTAME TÜHIMIKU */
    .content-wrapper { margin-top: 0 !important; }

    /* 3. SLAIDER JA PILDID - ANNAME RUUMI JUURDE */
    .product-hero {
        height: 650px !important; /* Tõstame kõrgust, et modell mahuks ära */
        background-color: #f6f9f3 !important;
    }

    .product-hero .slide {
        display: block !important;
        height: 100% !important;
        background-size: contain !important; /* Muudame 'contain' peale, et pilt ei läheks katki */
        background-position: center bottom !important; /* Modell istub all servas */
        background-repeat: no-repeat !important;
    }

    /* MÄÄRAME PILDID */
    .product-hero .slide:nth-child(1) { background-image: url('images/mobseeria1.jpg') !important; }
    .product-hero .slide:nth-child(2) { background-image: url('images/mobseeria2.jpg') !important; }
    .product-hero .slide:nth-child(3) { background-image: url('images/mobseeria3.jpg') !important; }

    /* 4. TEKSTIKAST - LIIGUTAME ÜLES */
    .hero-container { padding: 0 !important; display: block !important; }
    
    .hero-text-overlay {
        background: rgba(255, 255, 255, 0.85) !important;
        padding: 12px !important;
        margin: 0 auto !important;
        border-radius: 0 0 15px 15px !important; /* Ainult alumised nurgad kumerad */
        width: 100% !important; /* Võtab täislaiuse päise all */
        text-align: center !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
        position: relative !important;
        top: 0 !important; /* Kleebime päise külge */
        box-sizing: border-box !important;
    }

    .hero-text-overlay h2 { font-size: 1rem !important; margin-bottom: 5px !important; color: #4b0082 !important; }
    .hero-text-overlay p { font-size: 0.8rem !important; line-height: 1.2 !important; margin-bottom: 8px !important; }
    .hero-button { padding: 6px 12px !important; font-size: 0.8rem !important; margin-bottom: 5px !important; }

    /* Peidame segajad */
    .hero-image, .scroll-down { display: none !important; }
}

/* Kontaktiploki kujundus */
.contact-box {
    margin-top: 40px;
    padding: 30px;
    background-color: #f0f2ff; /* Õrn sinakas taust, mis sobib su nupuvärviga */
    border-radius: 15px;
    display: inline-block;
    border: 1px dashed #3852ff;
}

.contact-box p {
    margin: 10px 0 !important;
    font-size: 1.1rem !important;
}

.contact-box a {
    color: #3852ff;
    text-decoration: none;
    font-weight: bold;
}

.contact-box a:hover {
    text-decoration: underline;
}

.contact-box i {
    margin-right: 10px;
    width: 20px; /* See hoiab ikoonid ühel joonel */
    text-align: center;
}


/* Mobiili jaoks kohandamine */
@media screen and (max-width: 768px) {
    .contact-box {
        width: 90%;
        padding: 15px;
    }
}