/* poppins-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/poppins-v24-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* MUUTTUJAT JA PERUSASETUKSET */
:root {
    --primary: #3d2b1f; /* Tumma puu */
    --accent: #a05a2c;     
    --light: #f9f7f2;   /* Luonnonvalkoinen */
    --text: #333;       
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--white);
}

html {
    scroll-behavior: smooth;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.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(--accent); /* #b87333 kupari/ruskea */
    border-radius: 2px;
}

/* NAVIGAATIO */
header {
    position: sticky;
    top: 0;
    z-index: 1000; /* Varmistaa, että pysyy kaiken muun (myös marqueen) päällä */
    background: rgba(255, 255, 255, 0.95); /* Hieman läpinäkyvä valkoinen */
    backdrop-filter: blur(10px); /* Moderni lasiefekti */
    border-bottom: 1px solid rgba(184, 115, 51, 0.1); /* Ohut kuparinen alaviiva */
    transition: all 0.3s ease;
    padding: 1.2rem 0;
}

/* Mobiilissa pidetään header aina saman kokoisena */
@media (max-width: 768px) {
    header {
        padding: 1rem 0 !important; /* Pakotetaan vakio padding */
        height: auto !important;
    }
}

section {
    scroll-margin-top: 70px; /* Headerin korkeus + hieman ilmaa */
}

@media (max-width: 768px) {
    header {
        position: -webkit-sticky; /* Safari-tuki */
        position: sticky;
        top: 0;
        padding: 2rem 0; /* Hieman matalampi mobiilissa säästämään tilaa */
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    /* Varmistetaan, että navigaatiolinkit aukeavat stickyn alta oikein */
    .nav-links {
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background: var(--white);
        display: none;
        flex-direction: column;
        padding: 2rem 0;
        border-bottom: 2px solid var(--accent);
    }

    .nav-links.active {
        display: flex;
    }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
}

.logo span { color: var(--accent); }

/* Pieni visuaalinen palaute klikatessa */
.logo:active {
    transform: scale(0.98);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-links a:hover { color: var(--accent); }

/* HAMBURGER-PAINIKE */
.menu-toggle {
    display: none; /* Desktopilla piilossa */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Aktiivinen tila (X-muoto) */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* MOBIILITYYLIT (Breakpoint 768px) */
@media (max-width: 768px) {
    .menu-toggle { 
        display: flex; 
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 2rem 0;

        /* TÄMÄ KESKITTÄÄ LISTAN */
        align-items: center; 
        
        gap: 1.5rem;
    }

    .nav-links li {
        /* TÄMÄ PAKOTTAA TEKSTIN VASEMMALLE LISTAN SISÄLLÄ */
        width: fit-content; /* Laatikko on vain tekstin levyinen */
        min-width: 150px;   /* Valinnainen: pitää linkit samalla alkulinjalla */
        text-align: left;
    }

    .nav-links a {
        text-transform: uppercase;
        display: block;
        width: 100%;
    }
}

/* 1. PERUSASETUKSET (Desktop/Kaikki) */
.hero {
    position: relative; /* Tarvitaan kuvan asemointiin */
    height: 94vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
    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;
    object-position: 50% 30%;
    z-index: -1;
    /* Tummennus suoraan kuvaan (vastaa aiempaa gradienttia) */
    filter: brightness(0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero h1 {
    font-size: clamp(1.4rem, 5vw, 2.5rem); /* Korjattu clamp-arvot paremmiksi */
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* 2. MOBIILIASETUKSET */
@media (max-width: 768px) {
    .hero {
        height: 90vh;
        align-items: flex-end; 
        padding-bottom: 20vh; /* Säätää kuinka alhaalla teksti on */
    }
    .hero h1 {
        /* Pienempi fontti mobiiliin */
        font-size: 1.4rem !important; 
        margin-bottom: 0.8rem;
        /* 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 p {
        font-size: 0.85rem !important;
        max-width: 70%; /* Kapeampi tekstimassa on helpompi lukea */
        margin-bottom: 1.5rem;
    }
    
    .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ä */
    }
}


/* Painikkeen hienosäätö tekstin kokoon sopivaksi */
.hero .btn {
    padding: 0.8rem 1.8rem;
    font-size: 0.9rem;
}

/* 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: #2a1d15; color: var(--white);
    border: 1px solid #ffffff;
}

.primary-btn:hover {
    background: #3d2b1f; transform: translateY(-2px);
    border: 1px solid #ffffff;
}

.secondary-btn { background: var(--primary); color: var(--white); width: 100%; }
.secondary-btn:hover { background: #2a1d15; }

/* PALVELUT */
.services {
    padding: 5rem 0;
    margin-top: 5rem;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2rem;
    background: var(--light);
    border-top: 4px solid var(--accent);
}

.service-card p {
    text-align: left;
    padding-left: 2rem;
    justify-content: center;
}

.service-card h3 {
    margin-bottom: 1rem; color: var(--primary);
}

.materials { padding: 5rem 0; background: var(--white); }

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    text-align: center;
}

.material-card {
    padding: 1.5rem;
    transition: var(--transition);
}

.mat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.material-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.4rem;
}

/* Larger spacing for section titles on subpages */
.subpage .section-title {
    margin-top: 3.5rem; /* restore larger top gap on non-index pages */
}

.material-card p {
    font-size: 0.95rem;
    color: #555;
    text-align: left;
    padding-left: 2rem;
    justify-content: center;
}

/* Pieni korostus leijuttaessa */
.material-card:hover {
    transform: translateY(-5px);
}


/* MEISTÄ & USP */
.about {
    background-image: radial-gradient(circle at 16% 83%, rgba(148, 148, 148,0.06) 0%, rgba(148, 148, 148,0.06) 50%,rgba(63, 63, 63,0.06) 50%, rgba(63, 63, 63,0.06) 100%),radial-gradient(circle at 68% 87%, rgba(66, 66, 66,0.06) 0%, rgba(66, 66, 66,0.06) 50%,rgba(105, 105, 105,0.06) 50%, rgba(105, 105, 105,0.06) 100%),radial-gradient(circle at 38% 50%, rgba(123, 123, 123,0.06) 0%, rgba(123, 123, 123,0.06) 50%,rgba(172, 172, 172,0.06) 50%, rgba(172, 172, 172,0.06) 100%),linear-gradient(90deg, hsl(18,0%,1%),hsl(18,0%,1%));
    padding: 5rem 0;
    color: #ffffff;
    margin-bottom: 3rem;
}

.about-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
}

.about-text {
    flex: 1; min-width: 300px;
}

.about-text h2 {
    margin-bottom: 1.5rem;  
}

@media (max-width: 768px) {
    .about-text h2 {
        text-align: center;
    }
}

.usp-grid {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.usp-item {
    display: flex; align-items: flex-start; gap: 1rem;
}
.usp-item .icon {
    color: var(--accent); font-size: 1.5rem;
}

/* MOBIILI-KESKITYS (Alle 768px) */
@media (max-width: 768px) {
    .usp-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.8rem;
    }
    
    .usp-text {
        text-align: center;
    }
    
}

/* ASIAKKAIDEN TESTIMONIALS */
.testimonials { padding: 5rem 0; background: var(--white); }
.testimonial {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    font-style: italic;
}

.testimonial cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    color: var(--accent);
}

/* TYYLIT MODAALILLE */
/* Palvelukortin nappi */
.service-btn {
    background: none;
    border: none;
    color: #a05a2c; /* Kupari */
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
    font-family: inherit;
    transition: transform 0.2s ease;
}

.service-btn:hover {
    transform: translateX(5px);
}

/* Modaali-ikkuna */
#serviceDialog {
    border: none;
    border-radius: 15px;
    border-top: 4px solid #a05a2c; 
    padding: 0;
    max-width: 550px;
    width: 90%;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    background: white;
    margin: 0;
    overflow: hidden;

    /* ANIMAATIO KUN MODAALI AVATAAN */
    animation: modalFadeIn 0.4s ease-out forwards;
}

/* Häivytys ja pieni nousu alhaalta päin */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%); /* Alkaa hieman alempaa */
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%); /* Päätyy keskelle */
    }
}

/* Taustasumennuksen häivytys (toimii useimmissa selaimissa) */
#serviceDialog::backdrop {
    background: rgba(31, 22, 16, 0.0);
    backdrop-filter: blur(0px);
    transition: all 0.3s ease-out;
}

/* Kun dialogi on auki, tausta sumenee pehmeästi */
#serviceDialog[open]::backdrop {
    background: rgba(31, 22, 16, 0.85);
    backdrop-filter: blur(8px);
}

/* Sumentuva tausta */
#serviceDialog::backdrop {
    background: rgba(31, 22, 16, 0.85);
    backdrop-filter: blur(5px);
}

/* PALVELUKORTTIEN PERUSTYYLI */
.service-card {
    background: var(--light);
    backdrop-filter: blur(10px); /* Sumentaa taustan kortin alta */
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid #eee;
    text-align: center;
    /* Tärkeä osa: Pehmeä siirtymä takaisin perusasentoon */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    cursor: default;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* NOSTO-EFEKTI HOVERISSA */
.service-card:hover {
    /* 1. Nosto ylöspäin (transform) */
    transform: translateY(-10px);
    
    /* 2. Syvempi ja pehmeämpi varjo, joka luo syvyysvaikutelman */
    box-shadow: 0 20px 40px rgba(31, 22, 16, 0.12);
    
    /* 3. Valinnainen: Hienovarainen kuparin sävyinen reunus */
    border-color: rgba(184, 115, 51, 0.3);
}

/* Myös kortin sisällä oleva otsikko voi reagoida kevyesti */
.service-card:hover h3 {
    color: #a05a2c; /* Kupari */
    transition: color 0.3s ease;
}

/* Animoidaan myös "Lue lisää" -nuoli liikkumaan sivulle päin */
.service-btn {
    transition: transform 0.3s ease, color 0.3s ease;
}

.service-card:hover .service-btn {
    transform: translateY(8px);
}

/* Estää taustan rullauksen */
.no-scroll {
    overflow: hidden;
    height: 100vh;
}


/* Sisällön asettelu */
.modal-content {
    padding: 3.5rem 2.5rem 2.5rem;
    position: relative;
    text-align: center;
}

/* Sulkemisruksi */
.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #a05a2c; /* Kupari hoverissa */
    transform: rotate(90deg); /* Pieni dynaaminen kääntö tehosteena */
    transition: all 0.3s ease;
}

#modalBody h2 {
    margin-bottom: 20px;
    color: #1f1610;
}

#modalBody p {
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
    text-align: left;
    padding-left: 2rem;
    justify-content: center;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
}


/* SLIDER / VALOKUVAGALLERIA */
.slider-container {
    position: relative;
    overflow: hidden;
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

.slide {
    min-width: 100%;
    flex: 0 0 100%;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.92);
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.prev-btn { left: 1rem; }
.next-btn { right: 1rem; }

.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.indicator {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #e6e6e6;
    border: none;
    cursor: pointer;
    padding: 0;
}

.indicator.active {
    background: var(--primary);
    box-shadow: 0 0 0 6px rgba(160,90,44,0.06);
}

.slider-btn:focus, .indicator:focus { outline: 2px solid rgba(160,90,44,0.14); }



/* MARQUEE KARUSELLI */
.marquee {
    overflow: hidden;
    display: flex;
    padding: 2rem 0;
    /* TÄMÄ ON PAKOLLINEN: */
    margin-bottom: 5rem;
    position: relative; 
    border-top: 1px solid rgba(184, 115, 51, 0.25);
    border-bottom: 1px solid rgba(184, 115, 51, 0.25);
    background: linear-gradient(to right, var(--white) 0%, var(--light) 50%, var(--white) 100%);
}

.marquee-content {
    display: flex;
    flex-shrink: 0;
    /* Animaatio rullaa puoleenväliin (yhden ryhmän verran) */
    animation: scroll 40s linear infinite;
}

.marquee-group {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    min-width: max-content;
}

.partner-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: #666;
    white-space: nowrap;
    font-weight: 500;
    text-transform: uppercase;
    cursor: default;
    display: inline-block;
    
    /* TÄMÄ ESTÄÄ PÖTKÖKSI MENEMISEN: */
    padding: 0 4rem; 
    
    letter-spacing: 2px;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.partner-logo:hover {
    color: #a05a2c;
    letter-spacing: 4px;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); } /* Saumaton hyppy puoleenväliin */
}

.marquee:hover .marquee-content {
    animation-play-state: paused;
}


/* PALAUTETUT HÄIVYTYKSET */
.marquee::before,
.marquee::after {
    content: "";
    position: absolute;
    top: 0;
    width: 200px; /* Hieman leveämpi häivytys näyttää paremmalta */
    height: 100%;
    z-index: 5; /* Nostetaan tekstin päälle */
    pointer-events: none;
}

.marquee::before {
    left: 0;
    background: linear-gradient(to right, #ffffff 20%, transparent);
}

.marquee::after {
    right: 0;
    background: linear-gradient(to left, #ffffff 20%, transparent);
}





/* YHTEYSTIEDOT & LOMAKE */
.contact-lead {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--primary);
}
.contact { padding: 5rem 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.contact-info address {
    font-style: normal; margin-top: 1.5rem;
}

@media (max-width: 768px) {
    .footer-contact {
        text-align: center;
    }
}

.social-icons {
    margin-top: 2rem; display: flex; gap: 1rem; font-weight: bold; color: var(--accent);
}

.contact-form {
    background: var(--light); padding: 2.5rem; border-radius: 8px;
}
.form-group {
    margin-bottom: 0.5rem;
}

.form-group label {
    display: block; margin-bottom: 0.5rem; font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.hidden {
    display: none;
}

.success-msg {
    color: green; margin-top: 1rem; font-weight: bold;
}

footer { background: #1a1a1a; color: #888; padding: 2rem 0; text-align: center; font-size: 0.8rem; }

/* 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; }
}

/* LOMAKKEEN KENTÄT */
.contact-form textarea {
    width: 100%;
    min-height: 120px; /* Sopiva aloituspituus */
    max-height: 250px; /* Estää kenttää venymästä loputtomiin */
    resize: vertical;  /* Sallii vain pystysuuntaisen venytyksen */
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit; /* Varmistaa että fontti pysyy samana */
}

/* ILMOITUSTEN TYYLIT */
/* Varataan tila ilmoitukselle lomakkeen loppuun */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding-bottom: 3.5rem; /* Tilaa ilmoitukselle painikkeen alle */
}

#formFeedback {
    position: absolute;
    bottom: 0.5rem;
    left: 2.5rem; /* Samassa linjassa paddingin kanssa */
    right: 2.5rem;
    min-height: 2.5rem; /* Vakiokorkeus estää rakenteen hyppimisen */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Muuttuu keskitykseksi mobiili-MQ:ssa */
    text-align: center;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0; /* Piilossa oletuksena */
    pointer-events: none; /* Ei estä klikkauksia kun piilossa */
    transition: opacity 0.4s ease;
}

#formFeedback.success {
    display: block;
    background-color: #e7f3ef;
    color: #2d5a4c;
    border: 1px solid #d1e7dd;
}

#formFeedback.error {
    display: block;
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* PORTFOLIO TYYLIT */
.portfolio {
    padding: 5rem 0;
    margin-bottom: 5rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.portfolio-item-link {
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease;
}

.portfolio-item-link:hover {
    transform: translateY(-5px);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px; /* Hieman pyöristystä */
    height: 400px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease; /* Pehmeämpi zoom */
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    /* Tummempi liukuväri alhaalla parantaa luettavuutta */
    background: linear-gradient(to top, rgba(31, 22, 16, 0.9) 0%, rgba(31, 22, 16, 0.4) 60%, transparent 100%);
    color: white;
    padding: 2rem;
    
}

.portfolio-overlay h3 {
    font-size: 1.1rem; /* Säädä koko vastaamaan entistä h4-kokoa */
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.portfolio-overlay p {
    margin: 0;
    opacity: 0.9;
}

/* HOVER-EFEKTIT */
.portfolio-item:hover img {
    transform: scale(1.08); /* Kevyt zoom-sisään */
}

.portfolio-item:hover .portfolio-overlay {
    /* Syvennetään tummuutta hoverissa */
    background: linear-gradient(to top, rgba(31, 22, 16, 0.95) 0%, rgba(31, 22, 16, 0.6) 70%, transparent 100%);
}


/* FOOTER */

.logo a {
    text-decoration: none; /* Poistaa alleviivauksen */
    color: inherit;        /* Käyttää samaa väriä kuin .logo-luokassa on määritelty */
    display: inline-block;
}
.site-footer {
    background-image: radial-gradient(circle at 16% 83%, rgba(148, 148, 148,0.06) 0%, rgba(148, 148, 148,0.06) 50%,rgba(63, 63, 63,0.06) 50%, rgba(63, 63, 63,0.06) 100%),radial-gradient(circle at 68% 87%, rgba(66, 66, 66,0.06) 0%, rgba(66, 66, 66,0.06) 50%,rgba(105, 105, 105,0.06) 50%, rgba(105, 105, 105,0.06) 100%),radial-gradient(circle at 38% 50%, rgba(123, 123, 123,0.06) 0%, rgba(123, 123, 123,0.06) 50%,rgba(172, 172, 172,0.06) 50%, rgba(172, 172, 172,0.06) 100%),linear-gradient(90deg, hsl(18,0%,1%),hsl(18,0%,1%));
    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 #333;
}

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    max-width: 300px;
    line-height: 1.6;
}

.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);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Yhteystietojen tekstien väritys */
.contact-info p {
    color: #000000; /* Korvaa tämä samalla värikoodilla jota käytät footerin linkeissä */
    margin-bottom: 0.5rem;   /* Lisää hieman ilmaa rivien väliin */
}

.footer-info-column p {
    color: #aaa;
    /* Jos haluat poistaa address-elementin mahdollisen kursiivin tästä: */
    font-style: normal; 
}

/* Varmistetaan vielä, että otsikko pysyy ehkä hieman kirkkaampana */
.footer-info-column h4 {
    color: white; 
}



.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: small;
    padding-top: 2rem;
    color: #666;
}

.designer-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* FOOTERIN MOBIILIKESKITYS */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center; /* Teksti keskelle */
    }

    .footer-brand p {
        margin: 0 auto 1.5rem; /* Keskittää tekstikappaleen leveyssuunnassa */
        max-width: 100%;
    }

    .footer-links ul {
        padding: 0;
        list-style: none; /* Varmistetaan ettei pisteitä näy */
    }

    .footer-contact p {
        margin-bottom: 0.5rem;
    }

    .social-icons {
        justify-content: center; /* Keskittää some-ikonit rivillä */
        margin-top: 1rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center; /* Keskittää alimman copyright-rivin */
        gap: 1rem;
        text-align: center;
        font-size: x-small;
    }
}

/* SOME-IKONIEN TYYLIT */
.social-icons {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-icons a {
    display: block;
    width: 24px; /* Ikonin leveys */
    height: 24px; /* Ikonin korkeus */
    transition: var(--transition);
}

.social-icons svg {
    width: 100%;
    height: 100%;
    fill: var(--accent); /* Käyttää kuparinväriäsi #b87333 */
    transition: fill 0.3s ease;
}

.social-icons a:hover svg {
    fill:brown; /* Muuttuu valkoiseksi hoverissa */
    transform: translateY(-3px);
}

/* Mobiilikeskitys (pysyy samana) */
@media (max-width: 768px) {
    .social-icons {
        justify-content: center;
    }
}

.designer-tag a {
    color: #888;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.designer-tag a:hover {
    color: var(--accent);
    border-bottom: 1px solid var(--accent);
}

/* CTA: center and add spacing for Pyydä tarjous button */
.cta-section .cta-content {
    text-align: center;
}

.cta-section .cta-content .btn {
    display: inline-block;
    margin: 2rem auto 3.5rem; /* space above and increased space below */
    padding: 1.1rem 2.4rem; /* slightly larger clickable area */
    font-size: 1rem;
}

@media (max-width: 768px) {
    .cta-section .cta-content .btn {
        padding: 0.95rem 1.6rem; /* slightly smaller on mobile */
        margin: 1.5rem auto 1.8rem; /* mobile: smaller bottom spacing */
        width: auto;
    }
}

/* Ensure hero primary CTA also has comfortable bottom spacing */
.hero .hero-content .btn.primary-btn {
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .hero .hero-content .btn.primary-btn {
        margin-bottom: 2rem;
    }
}

/* CTA section spacing above headings */
.cta-section {
    padding-top: 5.5rem; /* more space above the CTA heading */
    padding-bottom: 4rem;
}

@media (max-width: 768px) {
    .cta-section {
        padding-top: 3.25rem;
        padding-bottom: 3rem;
    }
}

/* Extra spacing under CTA heading */
.cta-section .cta-content h2 {
    margin-bottom: 1.6rem; /* larger gap below the heading */
}

@media (max-width: 768px) {
    .cta-section .cta-content h2 {
        margin-bottom: 1.1rem;
    }
}

/* CTA actions: align buttons to the right on desktop, stack on mobile; ensure strong contrast */
.cta-section .cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.25rem;
    align-items: center;
}

/* Make both CTA buttons the same size and appearance in the CTA area */
.cta-section .cta-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.95rem 2rem;
    font-size: 1rem;
    min-width: 220px;
    border-radius: 6px;
    width: auto; /* override global width rules */
    margin: 0; /* reset default margin so buttons sit inline */
}

.cta-section .cta-actions .primary-btn {
    background: #2a1d15; color: #ffffff; border: 2px solid #ffffff; box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.cta-section .cta-actions .secondary-btn {
    background: var(--accent); color: #ffffff; border: 2px solid #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.cta-section .cta-actions .primary-btn:hover{
    background: #3d2b1f; border-color: #ffffff; transform: translateY(-2px);
}
.cta-section .cta-actions .secondary-btn:hover{
    background: #8c4b1f; border-color: #ffffff; transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cta-section .cta-actions {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .cta-section .cta-actions .btn {
        width: 100%;
        max-width: 360px;
    }
}

/* Slightly more spacing under CTAs in hero */
.hero .hero-content .btn.primary-btn {
    margin-bottom: 4.5rem;
}

@media (max-width: 768px) {
    .hero .hero-content .btn.primary-btn {
        margin-bottom: 2.5rem;
    }
}

/* Process steps: number left of h3 */
.process-step {
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
    gap: 0.25rem 1rem;
    align-items: start;
    margin-bottom: 2rem;
}

.step-number {
    grid-row: 1 / span 2;
    grid-column: 1 / 2;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.process-step h3 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    color: var(--primary);
}

.process-step p {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    margin: 0;
    margin-top: 0.35rem;
    color: #555;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .process-step {
        grid-template-columns: 44px 1fr;
        gap: 0.25rem 0.75rem;
        margin-bottom: 1.25rem;
    }

    .step-number {
        width: 44px; height: 44px; font-size: 0.95rem;
    }
}

/* 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: var(--primary);
    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);
}

@media (max-width: 480px) {
    .back-to-top { width: 44px; height: 44px; right: 0.75rem; bottom: 1rem; }
}

/* Project pages: more space for headings and back button */
.project-hero {
    /* allow slightly taller hero on project pages */
    padding-top: 8vh;
}

.project-hero .hero-content {
    padding-top: 26vh; /* increased to give more vertical breathing room */
}

.project-hero .hero-content h1 {
    margin-top: 4rem; /* extra space above the main heading */
    margin-bottom: 0.8rem;
    font-size: clamp(1.6rem, 5.5vw, 2.6rem);
}

.project-hero .hero-content p {
    margin-bottom: 1.8rem;
}

.back-btn {
    /* match CTA sizing but visually distinct */
    display: inline-block;
    width: auto; /* override any global full-width secondary styles */
    margin-left: 1rem;
    padding: 1.1rem 2.4rem;
    font-size: 1rem;
    background: var(--light);
    color: var(--primary);
    border: 1px solid var(--white);
    border-radius: 4px;
    transition: background 0.25s ease, color 0.25s ease, transform 0.12s ease, border-color 0.25s ease;
}

.back-btn:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
    border-color: var(--white);
}

.back-btn:focus {
    outline: 3px solid rgba(160,90,44,0.12);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .project-hero .hero-content {
        padding-top: 12vh;
    }
    .back-btn { margin-left: 0.5rem; padding: 0.7rem 1rem; }
}
