body, html {
            margin: 0;
            padding: 0;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important; /* Moderni, selkeä fontti */
            background-color: #f1f5f1;
            color: #333;
            scroll-behavior: smooth;
            box-sizing: border-box;
        }

        /* Otsikot käyttävät eleganttia Playfair Display -fonttia */
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Playfair Display', serif;
            font-weight: 600;
        }

        /* Varmistetaan että kaikki tekstielementit käyttävät Inter-fonttia */
        p, span, div, a, button, input, textarea {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
        }

        /* Poikkeus: Allekirjoitus säilyttää Dancing Script -fontin */
        .signature {
            font-family: 'Dancing Script', cursive !important;
        }

        main {
            
            background-color: rgba(255, 255, 255, 0.5); /* Valkoinen väri, 50% läpinäkyvä */
            padding: 20px; /* Lisää sisäistä täytettä */
            border-radius: 10px; /* Pyöristetyt kulmat (valinnainen) */
             
        }

        img {
            max-width: 100%;
            height: auto;
        }

        .container {
            width: 90%;
            max-width: 1200px;
            margin: 0 auto;
        }


        .navbar {
            display: flex;
            justify-content: center;
            align-items: center;
            position: fixed;
            top: 0;
            height: 80px; /* Asetetaan kiinteä korkeus */
            line-height: 80px; /* Keskitetään teksti pystysuunnassa */
            width: 100%;
            background: linear-gradient(to bottom, rgba(0, 0, 0, 1.9), rgba(0, 0, 0, 0)); /* Liukuväri ylhäältä alas */
            padding: 10px 20px;
            z-index: 1000;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Hieno varjo */
            transition: all 0.3s ease;
        }
        
        .navbar a {
            font-size: 1.5rem;
            text-decoration: none;
            margin: 0 15px;
            font-weight: bold;
            color: white;
            transition: color 0.3s ease;
        }
        
        .navbar a:hover {
            color: #ffdd57; /* Korostettu väri hoverilla */
        }

        .navbar a.active {
            color: #ffdd57; /* Korostettu väri aktiiviselle linkille */
            font-weight: bold; /* Halutessasi voit lisätä lihavoinnin */
            
        }

        /* Navigointilinkit, kun valikko on aktiivinen */
        .navbar.active {
            flex-direction: column; /* Muutetaan pystysuunnanaiseksi */
            align-items: center;
            background: rgba(0, 0, 0, 0.9); /* Tumma tausta */

            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: auto; /* Koko näytön korkeus */
            z-index: 1000;
            overflow-y: auto; /* Salli vieritys, jos sisältö ylittää näytön */
            padding-top: 30px;
        }

        .navbar.active a {
            display: block; /* Näytetään linkit pystysuunnassa */
            margin: 10px 0;
            font-size: 1.2rem; /* Suurempi fonttikoko */
            text-align: center;
        }


            /* Hampurilaisvalikon responsiivinen asettelu */
            .menu-toggle {
                display: flex; /* Näytetään hampurilaisvalikko */
                flex-direction: column;
                cursor: pointer;
                position: absolute; /* Sijoitetaan suhteessa sen sisältävään elementtiin */
                top: 20px; /* Sijoitetaan 20px yläreunasta */
                left: 50%; /* Keskitetään vaakasuunnassa */
                transform: translateX(-50%); /* Siirretään elementti keskelle */
                z-index: 1000; /* Varmistetaan, että se näkyy muiden elementtien päällä */
                margin-bottom: 20px; /* Lisätään tilaa alapuolelle */
            }

        .menu-toggle .bar {
            background-color: white;
            height: 3px;
            width: 25px;
            margin: 4px 0;
            transition: 0.3s;
        }

        .icon {
            position: fixed;
            top: 10px; /* Sijoitetaan yläreunaan */
            right: 10px; /* Sijoitetaan vasempaan reunaan */
            z-index: 1000; /* Näkyy muiden elementtien päällä */
        }
        
        .icon-link {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-decoration: none;
            color: white;
            background: #6c3483; /* Kuvakkeen taustaväri */
            padding: 10px;
            border-radius: 50%; /* Pyöristetty kuvake */
            width: 60px;
            height: 60px;
            justify-content: center;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        
        .icon-link:hover {
            transform: scale(1.1); /* Suurentaa kuvaketta hoverilla */
            box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
        }
        
        .icon-link i {
            font-size: 24px; /* Kuvakkeen koko */
            margin-bottom: 5px;
        }
        
        .icon-text {
            font-size: 0.8rem; /* Tekstin koko */
            text-align: center;
        }
        .signature {
            position: absolute;
            top: 0.8vw; /* Skaalaa suhteessa näyttöön */
            left: 3vw;
            font-family: 'Dancing Script', cursive;
            font-size: 2vw; /* Skaalaa fontti suhteessa näyttöön */
            font-weight: bold;
            color: white;
            transform: rotate(-15deg);
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        }

        /* Pienemmille näytöille */
        @media (max-width: 768px) {
        .signature {
        position: absolute;
        text-align: center; /* Keskitetään teksti */
        margin-top: 10px; /* Lisätään hieman tilaa yläreunaan */
        transform: none; /* Varmistetaan, että teksti pysyy suorassa */
        font-size: 4vw;
    }
}

/*TIETOA MINUSTA*/
        
.text-boxes {
    display: flex;
    gap: 20px; /* Väli laatikoiden välillä */
    margin-top: 20px;
}

.text-box {
    flex: 1; /* Laatikoiden tasainen jakautuminen */
    background-color: rgba(255, 255, 255, 0.8); /* Vaalea tausta */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Hieno varjo */
}

.text-box h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #313030;
}

.text-box p {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.story-image {
    max-width: 100%; /* Kuva skaalautuu laatikon leveyteen */
    height: auto; /* Säilyttää kuvasuhteen */
    border-radius: 10px; /* Pyöristetyt kulmat */
    margin-bottom: 15px; /* Väli kuvan ja tekstin välillä */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Hieno varjo kuvalle */
}
 /*rakas päiväkirjani*/

 .diary-boxes {
    display: flex;
    flex-wrap: wrap; /* Sallii laatikoiden rivittymisen */
    gap: 20px; /* Väli laatikoiden välillä */
    justify-content: center; /* Keskittää laatikot */
    margin: 20px;
}
 .diary-box {
    display: block;
    width: 300px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.diary-box img.diary-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.diary-box h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #6c3483; /* Taianomainen violetti */
}

.diary-box p {
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
}

.diary-box:hover {
    transform: translateY(-5px); /* Nostaa laatikkoa hover-tilassa */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); /* Syvempi varjo hover-tilassa */
}

.modal {
    display: none; /* Piilotetaan oletuksena */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); /* Tumma tausta */
}

/* Lightbox styles for full-size portfolio images */
.lightbox {
    display: none; /* hidden by default */
    position: fixed;
    inset: 0; /* top:0; right:0; bottom:0; left:0; */
    background-color: rgba(0,0,0,0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    position: relative;
    text-align: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: block;
    margin: 0 auto;
}

.lightbox-caption {
    color: #fff;
    margin-top: 10px;
    font-size: 0.95rem;
}

.lightbox-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fff;
    border-radius: 50%;
    border: none;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.portfolio-modern-grid img {
    /* hint to user that image is clickable */
    cursor: zoom-in;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #6c3483;
}

.modal-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

.close {
    color: #aaa;
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}






/* Responsiivisuus pienemmille näytöille */
@media (max-width: 768px) {
    .text-boxes {
        flex-direction: column; /* Asetetaan laatikot päällekkäin */
    }
}

        /* Otsikoille koristeellinen fontti - käytetään yleistä h-määritystä */
        h1 {
            font-weight: 700;
            color: #c4bfbf;
        }

        h2 {
            font-weight: 700;
            color: #313030;
        }

        h3 {
            font-weight: 700;
            color: #eb6518;
        }


         
        .hero {
            background: url('images/IMG_3959.JPG') no-repeat center center fixed; /* Taustakuva */
            background-size: cover;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            text-align: center;
            color: white;
        }
        
        .hero-text {
            background-color: rgba(0, 0, 0, 0.5); /* Läpinäkyvä musta tausta */
            padding: 20px;
            border-radius: 10px;
            max-width: 600px;
        }
        
                /* Hero-osio */
        .hero-text h1 {
            font-size: 3rem;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }
        
        .hero-text p {
            font-size: 1.2rem;
            font-weight: 500;
        }
        
        .cta-button {
            display: inline-block;
            margin-top: 20px;
            padding: 10px 20px;
            background-color: #e85d04;
            color: white;
            text-decoration: none;
            font-family: 'Inter', sans-serif;
            font-size: 1rem;
            font-weight: 500;
            border-radius: 5px;
            transition: background 0.3s ease;
            text-transform: uppercase;
    letter-spacing: 1px;
        }
        
        .cta-button:hover {
            background-color: #ff7f11;
        }


        @media (max-width: 768px) {
            .hero-text h1 {
                font-size: 2rem;
            }
        
            .hero-text p {
                font-size: 1rem;
            }
        
            .cta-button {
                font-size: 0.9rem;
                padding: 8px 16px;
            }
        }
        
        @media (max-width: 480px) {
            .hero-text h1 {
                font-size: 1.5rem;
            }
        
            .hero-text p {
                font-size: 0.8rem;
            }
        
            .cta-button {
                font-size: 0.8rem;
                padding: 6px 12px;
            }
        }

        /*Portfoliosivun-asetukset*/

        .parallax {
            background: url('images/IMG_3844.JPG') no-repeat center center fixed;
            background-size: cover;
            height: 400px;
            width: 100%;
            background-attachment: fixed;
        }

        @media (max-width: 768px) { 
            .parallax {
            background-attachment: scroll; }
        }

                /* Sisältö */
        .content {
            padding: 50px 20px;
            text-align: center;
            background-color: #ddd;
        }

        .content h2 {
            font-size: 2rem;
            margin-bottom: 20px;
        }

        .content p {
            font-size: 1rem;
            margin-bottom: 40px;
            line-height: 1.6;
        }

        .content-text {
            font-family: 'Inter', sans-serif; /* Käytetään Inter-fonttia */
            font-size: 1.1rem; /* Suurempi fonttikoko */
            line-height: 1.8; /* Lisää riviväliä */
            color: #444; /* Tummempi tekstiväri */
            background-color: rgba(255, 255, 255, 0.8); /* Vaalea tausta */
            padding: 20px; /* Lisää sisäistä täytettä */
            border-radius: 10px; /* Pyöristetyt kulmat */
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Hieno varjo */
        } 

        /* Vanhat portfolio-tyylit poistettu - käytetään uusia moderneja tyylejä */

        .portfolio-item_alarivi {
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 5px;
            padding: 20px;
            text-align: center;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            
        }

        .portfolio-item_alarivi img {
            max-width: 50%;
            border-radius: 5px;
            margin-bottom: 15px;
        }

        .portfolio-item_alarivi h3 {
            font-size: 1.2rem;
            margin-bottom: 10px;
            text-align: center; /* Keskitetään otsikko */
        }

        /* Suuremmat kuvat sovelluskehitys-laatikossa */
        .portfolio-item_alarivi img[alt*="oppimisseikkalu"],
        .portfolio-item_alarivi img[alt*="viestintäsovellus"] {
            width: 100%; /* Täyttää koko laatikon leveyden */
            height: 250px; /* Suurempi korkeus */
            object-fit: cover; /* Säilyttää kuvasuhteen */
            border-radius: 10px;
            margin: 5px 0; /* Pystysuuntainen marginaali */
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Hieno varjo */
        }

        /* Vanhat responsive-tyylit poistettu */

        .try-button {
        display: inline-block;
        margin-top: 10px;
        padding: 10px 20px;
        font-size: 0.9rem;
        font-weight: bold;
        color: white;
        background: linear-gradient(45deg, #28a745, #20c997); /* Vihreä liukuväri */
        text-decoration: none;
        border-radius: 25px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        border: 2px solid #1e7e34;
    }

    .try-button:hover {
        background: linear-gradient(45deg, #20c997, #28a745); /* Vaihtuva liukuväri hover-tilassa */
        box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
        transform: translateY(-2px); /* Nostaa nappia hieman */
    }

        /*Suosittelijat*/

        /* Suosittelijakortit */
        .recommendation-cards {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            padding: 20px;
        }

        .card {
            background: #fff;
            border: 1px solid #ddd;
            border-radius: 5px;
            padding: 20px;
            text-align: left;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .card h3 {
            font-size: 1.5rem;
            margin-bottom: 10px;
        }

        .card p {
            font-size: 1rem;
            margin: 5px 0;
            color: #666;
        }

                /* Taitojen esittely */
        .skills {
            padding: 50px 20px;
            text-align: center;
        }

        .skills h2 {
            font-size: 2rem;
            margin-bottom: 20px;
        }

        .skill-bars {
            display: flex;
            flex-direction: column;
            gap: 20px;
            align-items: center;
        }

        .skill {
            width: 80%;
        }

        .skill span {
            font-size: 1rem;
            display: block;
            margin-bottom: 5px;
        }

        .skill-bar {
            background: #ddd;
            border-radius: 5px;
            height: 20px;
            overflow: hidden;
            position: relative;
        }

        .skill-fill {
            background: #e85d04;
            height: 100%;
            border-radius: 5px;
            transition: width 0.5s ease;
        }

        @keyframes bounce {
            0%, 100% {
                transform: translateY(0);
            }
            50% {
                transform: translateY(-20px);
            }
        }

        /*  CVSisältö */
        .content {
            padding: 50px 20px;
            text-align: center;
        }

        .content h2 {
            font-size: 2rem;
            margin-bottom: 20px;
        }

        .content p {
            font-size: 1rem;
            margin-bottom: 20px;
            line-height: 1.6;
        }

        .download-button {
            display: inline-block;
            background: #e85d04;
            color: white;
            padding: 10px 20px;
            text-decoration: none;
            font-size: 1rem;
            font-weight: bold;
            border-radius: 5px;
            transition: background 0.3s ease;
        }

        .download-button:hover {
            background: #ff7f11;
        }

        /* CV-osio */
        .cv-section {
            padding: 50px 20px;
            text-align: left;
            max-width: 800px;
            margin: 0 auto;
        }

        .cv-section h2 {
            font-size: 1.8rem;
            margin-bottom: 20px;
        }

        .cv-section ul {
            list-style-type: none;
            padding: 0;
        }

        .cv-section ul li {
            font-size: 1rem;
            margin-bottom: 10px;
        }

        /*Ota yhteyttä*/
        /* Sisältö */
        .content2 {
            background: url('images/your-background-image.jpg') no-repeat center center;
            background-size: cover;
            color: rgb(56, 55, 55);
            padding: 50px 20px;
            text-align: center;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .content2 h2 {
            font-size: 2.5rem;
            margin-bottom: 20px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        }

        .content2 p {
            font-size: 1.2rem;
            line-height: 1.6;
            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
        }

        /* Yhteystiedot ja lomake */
        .contact-section {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            padding: 40px;
            gap: 20px;
            background-color: #f7f7f7; /* Vaaleanharmaa tausta */
        }

        .contact-info, .contact-form {
            flex: 1;
            max-width: 500px;
            background: #fff;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .contact-info h3, .contact-form h3 {
            font-size: 1.5rem;
            margin-bottom: 20px;
        }

        .contact-info p {
            font-size: 1rem;
            margin: 10px 0;
            color: #555;
        }

        .contact-info a {
            color: #e85d04;
            text-decoration: none;
        }

        .contact-info a:hover {
            text-decoration: underline;
        }

        .contact-form label {
            display: block;
            font-size: 1rem;
            margin-bottom: 5px;
            color: #333;
        }

        .contact-form input, .contact-form textarea {
            width: 100%;
            padding: 15px;
            margin-bottom: 20px;
            border: 1px solid #ddd;
            border-radius: 5px;
            font-size: 1rem;
            box-sizing: border-box; /* Sisällyttää paddingin elementin kokonaisleveyteen */
        }

        .contact-form input:focus, .contact-form textarea:focus {
            border-color: #e85d04;
            outline: none;
        }

        .submit-button {
            background: linear-gradient(90deg, #e85d04, #ff7f11); /* Liukuväri */
            color: white;
            padding: 12px 25px;
            border: none;
            border-radius: 5px;
            font-size: 1rem;
            font-weight: bold;
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .submit-button:hover {
            transform: scale(1.05); /* Suurentaa hieman hoverilla */
            box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2); /* Lisää varjo hoverilla */
        }


        /* Footer */
        .footer {
            background: rgba(0, 0, 0, 0.8);
            color: white;
            text-align: center;
            padding: 20px;
            margin-top: 20px;
        }
        
/*NAVIGOINTI RESPONSIIVISUUS*/

        
/* Erittäin pienet näytöt (alle 480px) */
        @media (max-width: 480px) {
            /* Tyylit erittäin pienille näytöille */
            .menu-toggle {
                display: flex; /* Näytetään hamburger-menu */
            } 
            
            .navbar a {
                display: none; /* Piilotetaan linkit oletuksena */
            }

            .navbar {
                flex-direction: column; /* Muutetaan navigaatio pystysuuntaiseksi */
                align-items: center; /* Keskitetään sisältö */
                padding: 10px; /* Pienennetään paddingia */
            }
        }

/* Pienet näytöt (481px–768px) */
        @media (max-width: 768px) {
            /* Tyylit pienille näytöille */

            .menu-toggle {
                display: flex; /* Näytetään hamburger-menu */
            }

            .navbar a {
                display: none; /* Piilotetaan linkit oletuksena */
            }

            .navbar {
                flex-direction: column; /* Muutetaan navigaatio pystysuuntaiseksi */
                align-items: center; /* Keskitetään sisältö */
                padding: 10px; /* Pienennetään paddingia */
            }
        }

/* Keskikokoiset näytöt (769px–1024px) */
        @media (min-width: 769px) and (max-width: 1024px) {
            /* Tyylit keskikokoisille näytöille */
            .menu-toggle {
                display: flex; /* Näytetään hampurilaisvalikko */
            } 
            
            .navbar a {
                display: none; /* Piilotetaan linkit oletuksena */
            }

            .menu-toggle {
                display: none; /* Piilotetaan hampurilaisvalikko suuremmilla näytöillä */
            }
        
            .navbar {
                display: flex; /* Näytetään navigointilinkit vaakasuunnassa */
                justify-content: center;
                align-items: center;
            }
        
            .navbar a {
                display: inline-block; /* Näytetään linkit vaakasuunnassa */
                margin: 0 15px;
                font-size: 1.2rem;
                color: white;
                text-decoration: none;
                font-weight: bold;
            }
        }

/* Suuret näytöt (1025px–1200px) */
        @media (min-width: 1025px) and (max-width: 1200px) {
            /* Tyylit suurille näytöille */
            .menu-toggle {
                display: none; /* Piilotetaan hampurilaisvalikko suuremmilla näytöillä */
            }
        
            .navbar {
                display: flex; /* Näytetään navigointilinkit vaakasuunnassa */
                justify-content: center;
                align-items: center;
            }
        
            .navbar a {
                display: inline-block; /* Näytetään linkit vaakasuunnassa */
                margin: 0 15px;
                font-size: 1.2rem;
                color: white;
                text-decoration: none;
                font-weight: bold;
            }
        }

/* Erittäin suuret näytöt (yli 1200px) */
        @media (min-width: 1201px) {
            /* Tyylit erittäin suurille näytöille */
            .menu-toggle {
                display: none; /* Piilotetaan hampurilaisvalikko suuremmilla näytöillä */
            }
        
            .navbar {
                display: flex; /* Näytetään navigointilinkit vaakasuunnassa */
                justify-content: center;
                align-items: center;
            }
        
            .navbar a {
                display: inline-block; /* Näytetään linkit vaakasuunnassa */
                margin: 0 15px;
                font-size: 1.2rem;
                color: white;
                text-decoration: none;
                font-weight: bold;
            }
        }

@media (min-width: 300px) and (max-width: 1200px) {  

    .etusivun_teksti {
        max-width: 90%; /* Tekstilaatikko vie lähes koko leveyden */
        font-size: 0.9rem; /* Pienennetään fonttikokoa */
        padding: 15px; /* Pienennetään sisäistä täytettä */
    }

    .portfolio-grid, .recommendation-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Mukautetaan grid pienemmille näytöille */
    }

    .contact-section {
        flex-direction: column; /* Asetetaan kontaktiosio pystysuuntaiseksi */
    }
}




@media (max-width: 480px) {
   

    .portfolio-item, .card {
        padding: 10px; /* Pienennetään korttien sisäistä täytettä */
    }

    .contact-info, .contact-form {
        max-width: 100%; /* Kontaktiosiot vievät koko leveyden */
    }

    .footer {
        font-size: 0.8rem; /* Pienennetään footerin fonttikokoa */
    }
}
/* Pienemmille näytöille (max-width: 768px) */
@media (max-width: 768px) {
    .icon {
        width: 50px; /* Pienennetään kuvakkeen leveys */
        height: 50px; /* Pienennetään kuvakkeen korkeus */
    }

    .icon-link {
        padding: 8px; /* Pienennetään sisäistä täytettä */
    }

    .icon-link i {
        font-size: 20px; /* Pienennetään kuvakkeen kokoa */
    }

    .icon-text {
        font-size: 0.7rem; /* Pienennetään tekstin kokoa */
    }
}

/* Erittäin pienille näytöille (max-width: 480px) */
@media (max-width: 480px) {
    .icon {
        width: 40px; /* Pienennetään kuvakkeen leveys entisestään */
        height: 40px; /* Pienennetään kuvakkeen korkeus entisestään */
    }

    .icon-link {
        padding: 6px; /* Pienennetään sisäistä täytettä entisestään */
    }

    .icon-link i {
        font-size: 16px; /* Pienennetään kuvakkeen kokoa entisestään */
    }

    .icon-text {
        font-size: 0.6rem; /* Pienennetään tekstin kokoa entisestään */
    }
}

@media (max-width: 768px) {
    .contact-section {
        flex-direction: column; /* Asetetaan pystysuuntaiseksi */
        padding: 20px;
    }

    .contact-info, .contact-form {
        max-width: 100%; /* Vie koko leveyden */
    }
}



/* ReCAPTCHA-säilö */
.recaptcha-wrapper {
    display: flex;
    justify-content: left; /* Keskitetään reCAPTCHA */
    align-items: center; /* Keskitetään pystysuunnassa */
    width: 100%; /* Vie koko leveyden */
    overflow: hidden; /* Piilotetaan ylimääräinen sisältö */
}

.g-recaptcha {
    transform: scale(0.85); /* Skaalataan pienemmäksi */
    transform-origin: 0 0; /* Skaalaus alkaa vasemmasta yläkulmasta */
}

@media (max-width: 768px) {
    .g-recaptcha {
        transform: scale(0.75); /* Skaalataan pienemmäksi pienemmillä näytöillä */
    }
}

@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.65); /* Skaalataan vielä pienemmäksi erittäin pienillä näytöillä */
    }
}

/* Rakas päiväkirjani -tyylit */
/* Responsiivisuus pienemmille näytöille */
@media (max-width: 768px) {
    .diary-box {
        width: 90%; /* Laatikoiden leveys pienemmillä näytöillä */
        margin: 0 auto; /* Keskittää laatikot */
    }
}

@media (max-width: 480px) {
    .diary-box {
        width: 100%; /* Laatikoiden leveys täyttää näytön */
        padding: 15px; /* Pienempi sisäinen marginaali */
    }

    .diary-box img.diary-image {
        height: 120px; /* Pienempi korkeus kuvalle */
    }

    .diary-box h3 {
        font-size: 1rem; /* Pienempi fonttikoko otsikolle */
    }

    .diary-box p {
        font-size: 0.9rem; /* Pienempi fonttikoko tekstille */
    }
}

/* =====================================
   MODERNI PORTFOLIO LAYOUT
   ===================================== */

/* Portfolio Hero Section */
.portfolio-hero {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(135deg, rgba(108, 52, 131, 0.1), rgba(142, 68, 173, 0.1));
    border-radius: 20px;
    margin-bottom: 40px;
}

.portfolio-hero h1 {
    font-size: 3rem;
    color: #6c3483;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #666;
    font-style: italic;
    margin: 0;
}

/* Category Filters */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #6c3483;
    background: transparent;
    color: #6c3483;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #6c3483;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 52, 131, 0.3);
}

/* Modern Portfolio Grid */
.portfolio-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Portfolio Cards */
.portfolio-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-card.featured {
    border: 3px solid #6c3483;
    position: relative;
}

.portfolio-card.wide {
    grid-column: span 2;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 0;
}

.category-tag {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.category-tag.tech {
    background: #e3f2fd;
    color: #1976d2;
}

.category-tag.media {
    background: #f3e5f5;
    color: #7b1fa2;
}

.category-tag.craft {
    background: #fff3e0;
    color: #f57c00;
}

.category-tag.renovation {
    background: #e8f5e8;
    color: #388e3c;
}

.featured-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Card Images */
.card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
    margin: 15px;
    border-radius: 10px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(108, 52, 131, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-image:hover .image-overlay {
    opacity: 1;
}

.cta-button {
    background: white;
    color: #6c3483;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-align: center;
}

.cta-button:hover {
    background: #6c3483;
    color: white;
    transform: scale(1.05);
}

/* Card Video */
.card-video {
    margin: 15px;
    border-radius: 10px;
    overflow: hidden;
}

.card-video iframe {
    border-radius: 10px;
}

/* Card Gallery */
.card-gallery {
    display: flex;
    margin: 15px;
    gap: 10px;
    height: 200px;
}

.gallery-main {
    flex: 2;
    border-radius: 10px;
    object-fit: cover;
    height: 100%;
}

.gallery-thumb {
    flex: 1;
    border-radius: 10px;
    object-fit: cover;
    height: 100%;
}

/* Before/After */
.card-before-after {
    margin: 15px;
}

.before-after-container {
    position: relative;
    height: 200px;
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.before-image,
.after-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.before-label,
.after-label {
    position: absolute;
    top: 10px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.8rem;
    border-radius: 5px;
}

.before-label {
    left: 10px;
}

.after-label {
    right: 10px;
}

/* Card Content */
.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tech-tag {
    background: #f0f2f5;
    color: #495057;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Skills List */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.skill-tag {
    background: #e8f5e8;
    color: #388e3c;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* External Link */
.external-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6c3483;
    text-decoration: none;
    font-weight: 500;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.external-link:hover {
    color: #8e44ad;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .portfolio-card.wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .portfolio-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .portfolio-modern-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-filters {
        padding: 0 20px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .portfolio-hero {
        padding: 40px 20px 30px;
    }
    
    .portfolio-hero h1 {
        font-size: 2rem;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .card-image,
    .card-video,
    .card-gallery,
    .card-before-after {
        margin: 10px;
    }
}

/* --- Nappien keskitys (vaaka + pysty) --- */
.button-center, .cta-button, .try-button, .submit-button, .download-button {
    display: inline-flex;            /* inline-flex säilyttää elem. linjassa ja asettaa sisällön flexiksi */
    align-items: center;             /* pystysuora keskitys */
    justify-content: center;         /* vaakasuora keskitys */
    text-align: center;              /* fallback */
    vertical-align: middle;          /* inline elementin keskitys */
    gap: 8px;                        /* icon + teksti erottelu */
}

/* Mahdollinen korkeus, jotta teksti on keskitetty myös korkeissa painikkeissa */
.button-center.tall, .cta-button.tall, .try-button.tall, .submit-button.tall {
    height: 48px;
}

/* Piilota puhelinnumerot mobiilissa, mutta mahdollista näyttää ne tarvittaessa lisäämällä
   body-reveal-contact -luokka tai poistamalla luokka HTML:stä. */
@media (max-width: 768px) {
    .hidden-contact {
        display: none !important;
    }
}

/* Automaattinen vaihtoehto: jos haluat paljastaa numerot (esim. admin-näkymä),
   lisää body- tai kontainerielementtiin luokka .reveal-contact */
.reveal-contact .hidden-contact {
    display: block !important;
}

/* Pieni parannus: varmistetaan että linkit jotka näyttävät painikkeilta perivät keskitys-säännöt */
a.cta-button, a.try-button, button.submit-button {
    display: inline-flex;
}

/* End of button center styles */