@font-face {
  font-display: swap; 
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url('../poppins-v24-latin-regular.woff2') format('woff2'); 
}

/* MUUTTUJAT JA PERUSASETUKSET */
:root {
    --primary: #222222; 
    --accent: #380441;  
    --light: #268739;   
    --muted: #F5E7C6;   
    --text: #222222;    
    --white: #ffffff;
    --transition: all 0.3s ease;
    --header-height: 150px;
}

@media (max-width: 992px) {
    :root {
        --header-height: 150px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

section[id] {
    scroll-margin-top: 0px; /* Ankkuri osuu tasan yläreunaan */
    /* Firefox-kohtainen optimointi */
    overflow-anchor: none; 
    scroll-margin-top: 0px;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--white);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-top: 0.4rem; /* Further reduce top spacing for index page h2 headings */
    margin-bottom: 2.5rem; /* Slightly reduced bottom spacing */
    color: var(--primary);
    position: relative;
    padding-bottom: 0.5rem;
}

/* Tyylikäs keskitetty alleviivaus */
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px; /* Maltillinen leveys antaa hienostuneen ilmeen */
    height: 4px;
    background-color: var(--primary); /* #b87333 kupari/ruskea */
    border-radius: 2px;
}


header {
    position: fixed;
    width: 100%;
    top: 0;
    padding: 2rem 0;
    z-index: 1000;
    background: transparent;
    /* Pakottaa laitteen käyttämään GPU:ta */
    transform: translate3d(0, 0, 0); 
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    
    /* Käytä hieman nopeampaa transitionia mobiilille */
    transition: transform 0.3s ease-out, opacity 0.3s;
}

/* Nav-up luokka dynaamiseen käyttöön */
header.nav-up {
    transform: translate3d(0, -100%, 0);
    opacity: 0;
    padding: 0.8rem 0;
}


/* LOGON EROTTUVUUS */
.logo a {
    color: var(--white) !important; 
    font-weight: 400;
    transition: text-shadow 0.3s ease;
}

header.scrolled .logo a {
    text-shadow: none; /* Poistetaan varjo, kun tausta on kiinteä */
}

/* Mobiilissa pidetään header aina saman kokoisena */
@media (max-width: 768px) {
    header {
        padding: 2rem 0; /* Pakotetaan vakio padding */
        pointer-events: auto;
        /* Estää selainta "tarrautumasta" headeriin skrollauksen aikana */
        user-select: none; 
    }
}

/* 1. YLEISET NAV-TYYLIT */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.logo {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.logo a {
    text-decoration: none;
    color: var(--muted);
}

/* 2. TYÖPÖYTÄVALIKKO (Yli 992px) */
@media (min-width: 993px) {
    .menu-toggle { display: none; }

    .nav-links {
        display: flex;
        list-style: none;
        gap: 2rem;
        align-items: center;
    }

    .nav-links a, .dropdown-toggle {
        text-decoration: none;
        color: var(--white);
        font-weight: 400;
        font-size: 0.8rem;
        transition: var(--transition);
        background: none;
        border: none;
        cursor: pointer;
    }

    .nav-links a:hover, .dropdown-toggle:hover {
        color: #00ff33;
    }

    /* Työpöydän alavalikko */
    .dropdown { position: relative; }
    
    .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 240px;
        gap: 1rem;
        display: none;
        flex-direction: column;
        padding: 0.5rem 0;
        list-style: none;
    }

    .submenu a {
        color: var(-) !important;
        padding: 0.7rem 1.2rem;
        width: 100%;
        
    }

    .submenu a:hover {
        
        color:#00ff33 !important;
    }

    .dropdown:hover .submenu {
        display: flex;
        
    }
}

/* 3. MOBIILI & TABLETTI (Alle 992px) */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1100;
    }
  
    .dropdown-toggle {
        background: transparent;
        border: none;
        padding: 2rem;
    }
    .menu-toggle .bar {
        width: 100%;
        height: 3px;
        background-color: var(--white);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Hampurilaisanimaatio X-muotoon */
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .nav-links {
        display: none; /* JavaScript kytkee .active päälle */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100vw;
        height: 100dvh;
        background: transparent;
        flex-direction: column;
        padding: 2rem 5%;
        gap: 0.8rem;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li { width: 100%; list-style: none; }

    .nav-links a, .dropdown-toggle {
        font-size: 1rem;
        text-transform: uppercase;
        font-weight: 400;
        margin-left: 1rem;
        color: var(--white);
        width: 100%;
        text-align: left;
        padding: 0.5rem 0;
        display: block;
        
    }
    /* Mobiilin alavalikko (Aukeaa klikkaamalla) */
    .submenu {
        display: none;
        list-style: none;
        padding-left: 1.5rem;
        
        border-radius: 4px;
    }
    /* Kun dropdown-isälle lisätään .open luokka JS:llä */
    .dropdown.open .submenu {
        display: flex;
        flex-direction: column;
        font-weight: 400;
        font-size: 0.8;
        mix-blend-mode: normal;
    }
    .submenu a {
        font-size: 1rem;
    }
}

/* 1. PERUSASETUKSET */
.hero {
    position: relative; /* Tarvitaan kuvan asemointiin */
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: clip;
    padding-top: 20vh;
}

/* Kuva käyttäytyy kuin taustakuva */
.hero-background-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    /* Tummennus suoraan kuvaan (vastaa aiempaa gradienttia) */
    filter: brightness(0.7);
}

.hero-content h1 {
    display: flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    justify-content: center;
    font-weight: 400;
    font-size: 1.5rem; /* Sopiva koko mobiiliin */
    min-height: 120px;
    margin-bottom: -15rem;
    line-height: 1.4;
    text-align: center;
    color: white;

    /* GLOW-EFEKTI */
    /* Luodaan useampi kerros syvyyden saamiseksi */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4),
                 0 0 20px rgba(255, 255, 255, 0.2),
                 0 0 30px rgba(255, 255, 255, 0.1);

    /* ANIMAATIO (Hienovarainen syke) */
    animation: glowPulse 4s ease-in-out infinite;
    will-change: text-shadow; /* Optimoi suorituskyvyn */
}

@keyframes glowPulse {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.4),
                     0 0 20px rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.6),
                     0 0 30px rgba(255, 255, 255, 0.3),
                     0 0 40px rgba(255, 255, 255, 0.1);
        transform: scale(1.08); /* Kevyt hengitysliike */
    }
}

/* Kohdistetaan tarinan ensimmäiseen kappaleeseen */
.story-text p:first-of-type {
    position: relative;
    overflow: visible;
}

/* Itse alkukirjain (Drop Cap) */
.story-text p:first-of-type::first-letter {
    font-family: 'Georgia', serif;
    font-size: 4rem;
    font-weight: 900;
    float: left;
    line-height: 0.85;
    margin-right: 15px;
    margin-top: 8px;
    color: #2d5a27; /* Klaanin vihreä */
    position: relative;
    z-index: 2; /* Nostetaan symbolin päälle */
}

/* Klaanin symboli alkukirjaimen alla */
.story-text p:first-of-type::before {
    content: "ᛗ"; 
    position: absolute;
    top: -10px;
    left: -5px;
    font-size: 5.5rem;
    color: rgba(180, 255, 150, 0.15); 
    z-index: 1;
    pointer-events: none;
    font-family: serif;
    filter: blur(1px); /* Pehmennetään symbolia */
    transform: rotate(-10deg);
    transition: color 0.8s ease, transform 1.2s ease-in-out, filter 1s ease;
    filter: blur(2px);
    opacity: 0.8; /* Hieman vahvempi oletus */
}

/* Mobiilisäätö, jotta teksti ei puuroudu */
@media (max-width: 600px) {
    .story-text p:first-of-type::first-letter {
        font-size: 3rem;
        margin-right: 10px;
    }
    .story-text p:first-of-type::before {
        font-size: 4rem;
        top: -5px;
    }
}

/* NUOLI NAPPI */
.arrow-link {
    display: inline-flex;
    align-items: center;
    margin-top: 2rem;
    text-decoration: none;
    color: var(--hippie-green, #2d5a27); /* Käyttää aiempaa vihreää */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.arrow-link .arrow {
    margin-left: 10px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Nuoli liikkuu hieman oikealle hoverissa */
.arrow-link:hover {
    color: #4a6741;
}

.arrow-link:hover .arrow {
    transform: translateX(8px);
}

/* LOPPUU JA ALKAA UUSI */
.story-navigation {
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 30px;
    padding: 3rem 0;
    width: 100%;
}

/* Nuolilinkkien ryhmä */
.nav-links-wrapper {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    gap: 20px;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1e5a2a;
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.05);
    background: var(--accent);
}

.whatsapp-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Mobiilisäädöt */
@media (max-width: 600px) {
    .nav-links-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

.arrow-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #2d5a27;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

/* Vasen nuoli liikkuu vasemmalle hoverissa */
.arrow-link.back:hover .arrow {
    transform: translateX(-8px);
}

/* Oikea nuoli liikkuu oikealle hoverissa */
.arrow-link.forward:hover .arrow {
    transform: translateX(8px);
}

.arrow-link .arrow {
    margin: 0 10px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* section-luokalla yhtenäinen padding */
.contact {
    padding: 5rem 0;
}

/* 2. MOBIILIASETUKSET */
@media (max-width: 768px) {
    .hero {
        height: 94vh;
        align-items: flex-end; 
        padding-bottom: 20vh; /* Säätää kuinka alhaalla teksti on */
    }
    .hero h1 {
        /* Pienempi fontti mobiiliin */
        text-transform: uppercase;
        letter-spacing: 3px;
        font-size: 0.9rem !important; 
        line-height: 1.5rem;
        font-weight: 400;
        margin-bottom: -10rem;
        text-transform: uppercase;
        /* Varmistetaan luettavuus tummemmalla varjolla jos kuva on vaalea */
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
        padding: 0 1rem; /* Estää tekstin osumisen reunoihin */
    }
    
    .hero-background-img {
        object-position: center center; /* Mobiilissa kuva yleensä parempi keskellä */
    }

}

/* 3. ERITTÄIN SUURET NÄYTÖT */
@media (min-width: 2500px) {
    .hero {
        height: 200vh; /* Järkevämpi korkeus ultra-wide näytöillä */
    }
}

/* PAINIKKEET */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.primary-btn {
    background: var(--light);
    color: var(--muted);
    border: 1px solid var(--muted);
}

.primary-btn:hover {
    background: var(--accent);
    border: 1px solid var(--muted);
}

.secondary-btn {
    background: #1e5a2a;
    color: var(--white);
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--muted);
}

.secondary-btn:hover {
    background: var(--accent);
    color: var(--white);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.contact-info address {
    font-style: normal; margin-top: 1.5rem;
}

.footer-contact-box {
    width: 100%;
    max-width: 550px;
    margin: 0; 
}

.footer-intro {
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
    text-align: left;
}

/* Työpöytänäkymä: Grid jakaa tilan tasan */
.footer-details-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Kaksi yhtä suurta saraketta */
    gap: 30px;
    align-items: center; 
}

.footer-address {
    font-style: normal;
    font-size: 1rem;
    line-height: 1.6;
}

.footer-address a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border 0.3s;
}

.footer-address a:hover {
    border-bottom: 1px solid currentColor;
}

/* Napin tyyli */
.wa-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #1e5a2a;
    color: white !important;
    padding: 12px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    transition: transform 0.3s ease, background-color 0.3s;
}

.wa-footer-link svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.wa-footer-link:hover {
    transform: translateY(-3px);
    background-color: var(--accent);
}

@media (max-width: 768px) {
    .footer-details-row {
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    
    .footer-contact-box {
        text-align: center; 
        max-width: 100%;
    }
    
    .wa-footer-link {
        max-width: 250px;
        margin: 0 auto;
    }
}

.footer-cta-area span{
    font-weight: 500;
}

/* --- YHTEYDENOTTO JA LOMAKE --- */
.contact-wrapper {
    display: grid;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-form {
    background: var(--light);
    padding: 2.5rem;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
    color: var(--white);
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.form-actions {
    position: relative; /* Tämä on ankkuri absolute-elementille */
}

/* Pyörivä lataussymboli */
.spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-left: 10px;
    border: 2px solid rgba(245, 231, 198, 0.3);
    border-radius: 50%;
    border-top-color: #F5E7C6;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
}


@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pehmeä häivytys palautteelle */
#formFeedback {
    transition: opacity 1s ease, transform 1s ease;
    opacity: 0;
}

#formFeedback.show {
    opacity: 1;
    transform: translateY(0);
    display: block !important;
}

#formFeedback.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

/* MOZILLA VÄÄNTÖÄ */
@media (prefers-reduced-motion: no-preference) {
    :root {
        scroll-behavior: auto; /* Muuta smooth -> auto */
    }
}

header {
    pointer-events: auto;
    /* Estää selainta "tarrautumasta" headeriin skrollauksen aikana */
    user-select: none; 
}

/* PELI */
#gameCanvas {
    image-rendering: pixelated;
    display: block; /* Varmistaa että vie tilan */
    width: 250px;    
    height: 400px;   
    max-width: 500px; /* Estää venymästä liian suureksi desktopilla */
    background: #000 !important; /* Pakotetaan musta tausta */
    border: 2px solid white;
    touch-action: none;
    margin: 0 auto;

    touch-action: none; /* Estää skrollauksen ja zoomauksen pelatessa */
    user-select: none;  /* Estää tekstin valitsemisen */
    -webkit-tap-highlight-color: transparent; /* Poistaa harmaan välähdyksen klikatessa */
}

/* Tämä luokka lisätään bodylle JS:llä pelin ajaksi */
body.game-open {
    overflow: hidden;
    position: fixed; /* Pakottaa lukituksen mobiililaitteilla */
    width: 100%;
}

/* PELI LOPPU */

@media (min-width: 769px) {
    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .section-title { font-size: 2rem; margin-bottom: 1.5rem; }
    .contact-form { padding: 1.5rem; }
}

/* RESPONSIIVISUUS */
@media (min-width: 769px) {
    .contact-wrapper {
        /* Varmistetaan että sisältö alkaa siististi otsikon jälkeen */
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; } /* Mobiilissa piilotettu yksinkertaisuuden vuoksi */
    .hero h1 { font-size: 2rem; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .section-title { font-size: 2rem; margin-top: 0; margin-bottom: 1.5rem; }
}

/* TARINA OSA */
.story-section {
    padding: 100px 0;
    
    scroll-margin-top: 100px;
    display: flex;
    align-items: center;
    min-height: 80vh; /* Pitää osiot näyttävinä */
}

.story-grid {
    display: flex;
    align-items: stretch; /* Tärkeä: Pakottaa kuvan ja tekstin saman korkuisiksi */
    gap: 6rem;
    width: 100%;
}

/* Peilikuva-asettelu ilman tekstin kääntämistä */
.story-section:nth-of-type(even) .story-grid {
    flex-direction: row-reverse;
}

.story-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 550px;
}

/* KUVA-ASETUKSET */
.story-image-wrapper {
    flex: 1.5; 
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.1);
    min-height: 600px; 
}

.story-img {
    width: 100%;
    height: 100%; 
    object-fit: cover; 
    display: block;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.story-image-wrapper:hover .story-img {
    transform: scale(1.05);
}

/* TYPOGRAFIA */
.story-text h2 {
    font-size: clamp(2rem, 4vw, 3rem); /* Skaalautuva fontti */
    color: var(--hippie-green);
    margin-bottom: 20px;
    line-height: 1.2;
}

.subtitle {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    color: var(--text);
    display: block;
    margin-bottom: 10px;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--hippie-green);
    margin-bottom: 30px;
}

@media (min-width: 1024px) {
    .story-grid {
        display: flex;
        align-items: stretch; 
        gap: 6rem;
        /* Varmistetaan, että koko osio on aina vähintään tietyn korkuinen */
        min-height: 700px; 
    }

    .story-text {
        flex: 1;
        /* Pakotetaan teksti pysymään kapeana, jotta kuvalle jää tilaa levitä */
        min-width: 400px; 
        max-width: 500px;
    }

    .story-image-wrapper {
        flex: 2; /* Nostetaan kuvan suhdetta (aiemmin 1.5) */
        position: relative;
        min-height: 600px; /* Tämä estää neliöitymisen etusivulla */
        width: 100%;
    }

    .story-img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Tämä täyttää suorakaiteen, vaikka alkuperäinen on neliö */
        display: block;
    }
}

@media (max-width: 768px) {
    .story-grid, 
    .story-section:nth-of-type(even) .story-grid {
        flex-direction: column !important; 
        align-items: flex-start;
        gap: 2.5rem;
        padding: 40px 1.5rem;
    }

    .story-text {
        width: 100%;
        max-width: none;
        order: 1;
    }

    .story-image-wrapper {
        width: 100%;
        min-height: 350px; /* Pienempi korkeus mobiilissa */
        order: 2;
    }

    .nav-links-wrapper {
        justify-content: flex-start;
    }
}

/* PLACEHOLDER TEKSTIT */
::placeholder {
    color: #4a4a4a;       /* Selkeä tummanharmaa */
    opacity: 1;           /* Varmistaa, ettei selain haalenna väriä */
}

/* Eri selainten tuki (varmuuden vuoksi) */
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
    color: #4a4a4a;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: #4a4a4a;
}

/* Kun käyttäjä klikkaa kenttää, voidaan placeholderia vielä vaalentaa tai piilottaa se */
input:focus::placeholder,
textarea:focus::placeholder {
    color: #999;
    transition: color 0.3s ease;
}

/* LOMAKKEEN KENTÄT */
.contact-form textarea {
    width: 100%;
    min-height: 180px; /* Sopiva aloituspituus */
    max-height: 180px; /* Estää kenttää venymästä loputtomiin */
    resize: vertical;  
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit; 
}

/* ILMOITUSTEN TYYLIT */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding-bottom: 3.5rem; 
}

#formFeedback {
    position: absolute;
    bottom: 0.5rem;
    left: 2.5rem; 
    right: 2.5rem;
    min-height: 2.5rem; 
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.4s ease;
}

#formFeedback.success {
    display: block;
    background-color: #e7f3ef;
    color: #2d5a4c;
    border: 1px solid #d1e7dd;
}

#formFeedback.error {
    display: block;
    background-color: #a10815;
    color: #ffffff;
    border: 1px solid #f5c2c7;
}

/* FOOTER */
.logo a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}
.site-footer {
    background-image: radial-gradient(circle at 73% 11%, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.02) 3%,transparent 3%, transparent 100%),radial-gradient(circle at 48% 73%, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.02) 3%,transparent 3%, transparent 100%),radial-gradient(circle at 99% 95%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 3%,transparent 3%, transparent 100%),radial-gradient(circle at 7% 76%, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.02) 3%,transparent 3%, transparent 100%),radial-gradient(circle at 56% 95%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 7%,transparent 7%, transparent 100%),radial-gradient(circle at 80% 39%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 7%,transparent 7%, transparent 100%),radial-gradient(circle at 17% 72%, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.01) 7%,transparent 7%, transparent 100%),radial-gradient(circle at 68% 73%, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.01) 7%,transparent 7%, transparent 100%),radial-gradient(circle at 71% 40%, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.01) 7%,transparent 7%, transparent 100%),radial-gradient(circle at 28% 50%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 7%,transparent 7%, transparent 100%),radial-gradient(circle at 0% 27%, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.01) 7%,transparent 7%, transparent 100%),radial-gradient(circle at 7% 45%, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.02) 7%,transparent 7%, transparent 100%),radial-gradient(circle at 34% 64%, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.02) 7%,transparent 7%, transparent 100%),radial-gradient(circle at 80% 24%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 5%,transparent 5%, transparent 100%),radial-gradient(circle at 15% 59%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 5%,transparent 5%, transparent 100%),radial-gradient(circle at 62% 67%, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.01) 5%,transparent 5%, transparent 100%),radial-gradient(circle at 73% 71%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 5%,transparent 5%, transparent 100%),radial-gradient(circle at 30% 40%, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.02) 5%,transparent 5%, transparent 100%),radial-gradient(circle at 73% 62%, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.03) 5%,transparent 5%, transparent 100%),radial-gradient(circle at 43% 93%, rgba(255,255,255,0.01) 0%, rgba(255,255,255,0.01) 5%,transparent 5%, transparent 100%),radial-gradient(circle at 15% 64%, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.02) 5%,transparent 5%, transparent 100%),linear-gradient(135deg, rgb(38, 135, 57),rgb(56, 4, 65));
    color: #d1d1d1;
    padding: 5rem 0 2rem;
    font-size: 0.8rem;
    text-align: left;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #3b3b3b;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    max-width: 300px;
    line-height: 1.6;
    text-align: left;
}

.footer-grid h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 400;
    font-size: 0.8;
}

.footer-links a:hover {
    color: #00ff33;
    padding-left: 5px;
}

/* Yhteystietojen tekstien väritys */
.contact-info p {
    color: var(--text);
    margin-bottom: 0.5rem; 
}

.footer-info-column p {
    color: #aaa;
    font-style: normal; 
}

.footer-info-column h4 {
    color: white; 
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: small;
    padding-top: 2rem;
    color: var(--muted);
}

.designer-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--primary);
}

/* FOOTER-TYYLIT */
.footer-nav-item {
    list-style: none;
    margin-bottom: 1.5rem;
}

.footer-main-link {
    letter-spacing: 1px;
    color: #F5E7C6; /* Klaanin kulta */
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.8rem;
    font-weight: 400;
}

.footer-submenu {
    list-style: none;
    padding-left: 1rem;
    border-left: 1px solid rgba(245, 231, 198, 0.2);
}

.footer-submenu li {
    margin-bottom: 0.5rem;
}

.footer-submenu a {
    color: rgba(245, 231, 198, 0.8);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    font-weight: 400;
}

.footer-submenu a:hover {
    color: #00ff33;
    padding-left: 5px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e5a2a; /* Klaanin vihreä */
    color: #F5E7C6;
    border: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: #F5E7C6; color: #2d5a27; transform: translateY(-3px); }

@media (max-width: 768px) {
    /* Pidetään grid sarakkeena ja keskitettynä */
    .footer-grid {
        display: flex;
        flex-direction: column;
        align-items: center; 
        text-align: center;
        gap: 3rem;
    }

    /* "Pohjaton" footer-kikka peittämään valkoinen palkki */
    .site-footer {
        background-color: #000;
        padding-bottom: 50px !important;
        margin-bottom: -50px !important;
        position: relative;
        overflow: hidden;
    }

    /* Keskistetään otsikot (Navigaatio, Yhteystiedot) */
    .footer-links h3, 
    .footer-contact h3 {
        text-align: center;
        width: 100%;
        margin-bottom: 1.5rem;
    }

    /* 1. Keskistetään koko yhteystieto-osio */
    .footer-contact {
        display: flex;
        flex-direction: column;
        align-items: center; 
        text-align: center; /* Otsikko pysyy keskellä */
        width: 100%;
    }

    /* 2. Luodaan näkymätön "laatikko" tekstiriveille */
    .footer-contact p {
        display: block;
        text-align: left;      /* Teksti rivittyy vasemmalle laatikon sisällä */
        width: fit-content;    /* Laatikko on vain pisimmän rivin levyinen */
        margin: 0 auto 0.5rem; /* Keskittää koko laatikon ruudun keskelle */
        
        /* Lisätään minimileveys, jotta lyhyet rivit (kuten postinumero) 
           eivät karkaa vasemmalle suhteessa sähköpostiin */
        min-width: 220px;      
        padding-left: 1rem;    /* Hienosäätö, jos haluat marginaalia vasemmalle */
    }

    /* 3. Varmistetaan h3 pysyy vakaana */
    .footer-contact h3 {
        margin-bottom: 1.5rem;
        width: 100%;
    }

    /* Linkkien ryhmittely: Keskistetään koko paketti, mutta tekstit nojaavat vasempaan */
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .footer-links ul {
        display: block;
        text-align: left;
        width: fit-content; /* Keskittää listan ryhmänä */
        margin: 0 auto;
        padding-left: 0;
        list-style: none;
    }

    /* Erityishuomio Palvelut-päälinkille ja sen alavalikolle */
    .footer-nav-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* Alavalikko alkaa päälinkin alta */
        margin-top: 0.8rem;
    }

    /* Porrastetaan alavalikon linkit oikealle */
    .footer-submenu {
        display: block !important;
        padding-left: 1.5rem !important; /* TÄMÄ tekee porrastuksen */
        margin-top: 0.5rem;
        border-left: 1px solid rgba(245, 231, 198, 0.1); /* Valinnainen: hieno pystyviiva */
    }
    .footer-brand p {
        margin: 0 auto 1.5rem;
        max-width: 90%;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        font-size: 0.75rem;
        gap: 1rem;
        border-top: 1px solid rgba(245, 231, 198, 0.1);
        padding-top: 2rem;
    }

}

/* MAP */
.map-container {
    background-color: #2d5a27;
    margin-top: 2rem;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .map-container {
        width: calc(100% - 35px); 
        margin-left: auto;
        margin-right: auto;
        height: auto; 
    }
    .map-img, .map-container iframe {
        height: 200px !important;
        width: 100%;
        object-fit: cover;
    }
}

.map-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    
    transition: all 0.5s ease;
}

.map-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #2d5a27;
    mix-blend-mode: multiply;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.map-container:hover .map-overlay {
    opacity: 1;
}

.map-container:hover .map-img {
    filter: grayscale(0) brightness(1);
    transform: scale(1.05);
}

/* SOME-IKONIEN TYYLIT */
.some-icons {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .some-icons {
    justify-content: center;
    }
}

.some-icons svg {
    width: 28px;
    height: 28px;
    fill: var(--muted); 
    transition: all 0.3s ease;
}

.some-icons svg:hover {
    fill: #00ff33;
    transform: translateY(-3px);
}

@media (min-width: 768px) {
    .designer-tag {
        padding: 1rem 0 2rem;
    }
}

.designer-tag { 
    background-color: transparent;
    margin-bottom: 0;
    text-align: center;
    padding: 1rem 0 0.5rem;
    font-size: 0.7rem;
    color: var(--muted);
    text-shadow: 1px 1px 0px #000000; 
}

.designer-tag a {
    text-shadow: none;
}

.designer-tag text, a {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.designer-tag a:hover {
    color: var(--muted);
    border-bottom: 1px solid var(--muted);
}

.footer-nav-item {
    list-style: none;
    margin-bottom: 1.5rem;
}

.footer-main-link {  
    letter-spacing: 1px;
    color: #F5E7C6;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.8rem;
}

.footer-submenu {
    list-style: none;
    padding-left: 1rem;
    border-left: 1px solid rgba(245, 231, 198, 0.2);
}

.footer-submenu li {
    margin-bottom: 0.5rem;
}

.footer-submenu a {
    color:  rgba(245, 231, 198, 0.8);
    text-decoration: none;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.footer-submenu a:hover {
    color: #F5E7C6;
    padding-left: 5px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1e5a2a;
    color: var(--white);
    border: none;
    box-shadow: 0 8px 20px rgba(31,22,16,0.18);
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 240ms ease, transform 180ms ease, background 160ms ease;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-3px);
    border: 1px solid var(--white);
}

@media (max-width: 480px) {
    .back-to-top { width: 44px; height: 44px; right: 0.75rem; bottom: 1rem; }
}

