* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0e0e1d;
    color: #fff;
}

/* Pääsivu */
.main {
    color: #fff;
    background-image: url("https://geronimo.okol.org/~illeem/maalausfirma/images/paasivu-bg.jpg");
    background-position: center 60%;
    padding: 5rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(114, 137, 218, 0.5);
}

.main img {
    width: 300px;
    height: auto;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
}

.main h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

.main p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    margin-bottom: 1.5rem;
}

.main-button {
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    padding: 0.8rem 1.5rem;
    transition: background-color 0.3s ease;
}

.main-button:hover {
    background-color: #7b86ff;
}

/* Ominaisuudet */
.features {
    color: #fff;
    background-color: #1b1b32;
    text-align: center;
    padding: 4rem 1.5rem;
}

.features h3 {
    margin-bottom: 15px;
}

.feature-list {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.feature-item {
    background-color: #212132;
    border-radius: 10px;
    padding: 2rem;
    max-width: 300px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: scale(1.05);
}

.feature-item img {
    width: 60px;
    margin-bottom: 1rem;
}

.feature-item h4 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.feature-button {
    background-color: #212132;
    width: 160px;
    display: block;
    margin: 2rem auto 0 auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Galleria */
.gallery {
    color: #fff;
    background-color: #212132;
    padding: 4rem 1.5rem;
}

.images {
    display: flex;
    justify-content: center;
    gap: 20px; 
}

.images img {
    border-radius: 30px;
}

.images .eka {
    width: 500px;
    height: 400px;
}

.images .toka {
    width: 250px;
    height: 200px;
    border: 8px solid #212132;
    border: 8px solid #212132;
}

/* Texts in gallery */
.texts {
    max-width: 600px;
    text-align: center;
    margin: 20px auto; /* Center the text block */
}

.texts h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.texts p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Gallery button */
.gallery-button {
    display: block;
    width: 250px;
    margin: 0 auto;
    text-align: center;
}

/* Värein testaus osuus */
.color_testing {
    background-image: url("https://geronimo.okol.org/~illeem/maalausfirma/images/color_bg.jpg");
    background-position: center 70%;
    padding: 5rem 1.5rem;
    text-align: center;
}

.color_testing img {
    width: 100%;
    max-width: 500px; 
    border-radius: 30px;
    height: auto; 
    margin: 20px 0; }

.color_testing h3 {
    font-size: 1.8rem;
    margin: 1rem 0;
}

.color_testing p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.color_testing a {
    border: 4px solid #212132;
    border-radius: 20px;
    display: inline-block;
    margin-top: 20px; 
}

/* Footer */
.footer {
    padding: 3rem;
    background-color: #212132;
    color: #ffffff;
    text-align: center;
    font-weight: bold;
}

.footer a {
    color: #fff;
}

/* Scroll button */
#scrollToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #5865F2;
    color: white;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}

#scrollToTopBtn.show {
    opacity: 1;
}

/* Responsive styles */
@media (max-width: 768px) {
    .feature-list {
        flex-direction: column; 
        align-items: center;     
    }

    .feature-item {
        max-width: 90%;
    }

    .gallery .images {
        flex-direction: column;
    }

    .images .eka, .images .toka {
        width: 100%;
        height: auto;
    }

    .texts {
        margin: 0 1rem; 
    }

    .color_testing img {
        width: 100%;
    }

    .color_testing h3, .color_testing p {
        margin: 0 1rem; /* Center text with side margin */
    }

    #scrollToTopBtn {
        font-size: 1rem; /* Adjust button size */
    }
}

@media (max-width: 480px) {
    .main h2 {
        font-size: 2rem; /* Reduce font size on very small screens */
    }

    .main p {
        font-size: 1rem; /* Reduce paragraph size */
    }

    .main-button {
        padding: 0.6rem 1rem; /* Adjust button padding */
    }

    .color_testing h3 {
        font-size: 1.5rem; /* Adjust heading size */
    }

    .color_testing p {
        font-size: 1rem; /* Adjust paragraph size */
    }
}
