* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa; 
    color: #2d3748;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background-color: #5F005A;
    padding: 12px 40px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #ffe600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-kuva {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #ffe600;
}

.btn-login {
    background-color: transparent;
    border: 2px solid #ffe600;
    padding: 8px 22px;
    border-radius: 6px;
    color: #ffe600;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: #ffe600;
    color: #5F005A;
}

.menu-toggle {
    display: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

.sivu-nakyma {
    display: none;
    flex: 1;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.sivu-nakyma.active-nakyma {
    display: block;
}

.hero-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 50px;
}

.hero-teksti {
    flex: 1;
}

.hero-teksti h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #5F005A;
}

.hero-teksti p {
    font-size: 18px;
    color: #4a5568;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-yhteystiedot {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-yhteystiedot p {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2d3748;
    font-weight: 600;
    font-size: 16px;
}

.hero-yhteystiedot i {
    color: #5F005A;
    font-size: 20px;
    width: 25px;
}

.hero-galleria {
    flex: 1.2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.galleria-sailyts {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #5F005A;
    padding: 12px;
    border-radius: 16px;
    border: 3px solid #ffe600;
    box-shadow: 0 10px 25px rgba(95, 0, 90, 0.25);
}

.esittelykuva {
    width: 100%;
    aspect-ratio: 16 / 9; 
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background-color: #3b0038;
}

.kuva-laatikko {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.kuva-laatikko.active-laatikko {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.kuva-laatikko img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
}

.nuoli-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #5F005A;
    border: 2px solid #ffe600;
    color: #ffe600;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.nuoli-btn:hover {
    background-color: #ffe600;
    color: #5F005A;
}

.nuoli-btn.vasen { left: -18px; }
.nuoli-btn.oikea { right: -18px; }

.ei-kuvia-viesti {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 3px dashed #ffe600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    color: #ffffff;
    background-color: #5F005A;
}

.palvelut-container {
    text-align: center;
}

.palvelut-container h2 {
    font-size: 36px;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    color: #5F005A;
}

.palvelut-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #ffe600;
    border-radius: 2px;
}

.palvelut-ruudukko {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.palvelu-kortti {
    background-color: #5F005A;
    padding: 40px 30px;
    border-radius: 12px;
    border: 2px solid transparent;
    box-shadow: 0 8px 20px rgba(95, 0, 90, 0.15);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.palvelu-kortti:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(95, 0, 90, 0.3);
    border-color: #ffe600;
}

.palvelu-kortti h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #ffe600; 
}

.palvelu-kortti p {
    color: #ffffff; 
    line-height: 1.6;
}

.lomake-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #5F005A;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(95, 0, 90, 0.25);
    border-top: 5px solid #ffe600;
}

.lomake-container h2 {
    font-size: 30px;
    margin-bottom: 30px;
    text-align: center;
    color: #ffffff;
}

.tarjous-lomake {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lomake-ryhma {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lomake-ryhma label {
    font-size: 14px;
    font-weight: 600;
    color: #ffe600;
}

.lomake-ryhma input, .lomake-ryhma textarea {
    background-color: #ffffff;
    border: 2px solid transparent;
    padding: 12px 16px;
    border-radius: 6px;
    color: #2d3748;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lomake-ryhma input:focus, .lomake-ryhma textarea:focus {
    border-color: #ffe600;
    box-shadow: 0 0 0 3px rgba(255, 230, 0, 0.3);
}

.btn-laheta {
    background-color: #ffe600;
    color: #5F005A;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-laheta:hover {
    background-color: #ffffff;
    color: #5F005A;
}

.lataa-btn {
    background-color: transparent;
    border: 2px dashed #5F005A;
    color: #5F005A;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.lataa-btn:hover {
    background-color: #5F005A;
    color: #ffe600;
}

.poista-kuva-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 15;
    font-size: 14px;
    display: none;
    transition: background-color 0.2s;
}

.poista-kuva-btn:hover {
    background-color: rgb(185, 28, 28);
}

body.admin-tila-aktiivinen .admin-muokattava {
    outline: 2px dashed #ffe600 !important;
    outline-offset: 4px;
    cursor: text;
}

.modal-rajaus {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-rajaus.active {
    display: flex;
}

.modal-sisalto {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    max-width: 950px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    color: #2d3748;
}

.modal-sisalto h3 {
    margin-bottom: 20px;
    font-size: 22px;
    color: #5F005A;
}

.rajausalue {
    height: 600px;
    max-height: 70vh;
    margin-bottom: 25px;
    overflow: hidden;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.rajausalue img {
    max-width: 100%;
    display: block;
}

.modal-napit {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-lakkauta {
    background-color: transparent;
    border: 1px solid #cbd5e0;
    color: #4a5568;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.btn-toteuta {
    background-color: #5F005A;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}

#kirjautuminen {
    max-width: 400px;
    margin: 40px auto;
}

#kirjautumis-lomake {
    background-color: #5F005A;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(95, 0, 90, 0.2);
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
    border-top: 5px solid #ffe600;
}

#kirjautumis-lomake h2 {
    color: #ffffff;
}

#kirjautumis-lomake input {
    background-color: #ffffff;
    border: 1px solid #cbd5e0;
    padding: 12px;
    border-radius: 6px;
    color: #2d3748;
    font-size: 16px;
    width: 100%;
    outline: none;
}

#kirjautumis-lomake input:focus {
    border-color: #ffe600;
}

#kirjautumis-lomake button {
    background-color: #ffe600;
    color: #5F005A;
    border: none;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: #5F005A;
        padding: 20px;
        border-bottom: 3px solid #ffe600;
        gap: 20px;
    }

    .nav-menu.active {
        display: flex;
    }

    .sivu-nakyma {
        padding: 30px 15px;
    }

    .hero-container {
        flex-direction: column;
        gap: 30px;
    }

    .hero-teksti {
        text-align: center;
    }

    .hero-teksti h1 {
        font-size: 36px;
    }

    .nuoli-btn.vasen { left: -10px; }
    .nuoli-btn.oikea { right: -10px; }

    .rajausalue {
        height: 350px; 
    }

    .esittelykuva, .ei-kuvia-viesti {
        aspect-ratio: auto;
        height: 300px;
    }

    .logo-kuva {
        height: 55px;
    }
}
STATIC_URL = 'static/'
STATIC_ROOT = BASE_DIR / 'staticfiles'
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
