* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
  flex: 1;
}
header {
    background-color: #333;
    background-image: linear-gradient(45deg, #333, #555);
    color: #fff;
    padding: 20px 0;
    text-align: center;
}
h2 {
    margin: 20px 20px 10px;
    color: black;
    line-height: 1.6;
}
h3 {
    margin: 20px 20px 10px;
    color: black;
    line-height: 1.6;
}
footer {
    background-color: #333;
    background-image: linear-gradient(45deg, #333, #555);
    color: #fff;
    text-align: center;
}
p {
    font-size: large;
    margin: 20px;
    line-height: 1.6;
}
a {
    color: #3a82df;
    margin: 20px;
    line-height: 1.6;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
.home img {
    max-width: 100%;
    height: auto;
    margin: 10px 10px 10px 10px;
}
.collage {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px;
}
.collage a {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    text-decoration: none;
}
.collage img {
    width: 100%;
    height: 200px;
    object-fit: contain; /* 👈 tärkeä muutos */
    background-color: #eee; /* tyhjät reunat */
}
.collage a:hover img {
    transform: scale(1.1);
}
.hero {
    text-align: center;
    padding: 30px;
}
.quick-links {
    text-align: center;
    margin: 30px;
}
.button {
    display: inline-block;
    margin: 10px;
    padding: 12px 20px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s;
}

.button:hover {
    background-color: aquamarine;
    color: #000;
}
.about img {
    max-width: 100%;
    width: 1080px;
    height: auto;
    position: center;
}
nav {
    background-color: none;
    padding: 10px 0;
    margin-top: 10px;
}
nav a {
    color: #ffffff;
    margin: 20px;
    line-height: 1.6;
    text-decoration: none;
}
nav a:hover {
    text-decoration: none;
    color: aquamarine;
    background-color: #333;
    transition: background-color 0.3s ease;
    border-radius: 10px;
    padding: 10px 15px;
}
nav ul {
    list-style: horizontal;
    display: flex;
    justify-content: center;
    list-style: none;
}
form {
    max-width: 400px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.products div {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px;
    max-width: 500px;
}
.products img {
    max-width: 100%;
    height: auto;
    margin-top: 10px;
}
.products h3 {
    margin-top: 10px;
}
.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.contact div {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px;
}
input[type="submit"] {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}
input[type="submit"]:hover {
    background-color: #555;
    color: aquamarine;
}
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.productcard {
    flex: 1 1 250px; /* grow, shrink, minimum width */
    text-decoration: none;
    color: inherit;
}
.productcard img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}
.productcard a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.productcard a * {
    text-decoration: none;
    color: inherit;
}
.productcard a:hover {
    text-decoration: none;
    background-color: #555;
}
.productcard a:hover * {
    color: inherit;
    text-decoration: none;
}
.productcard div {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px;
    flex: 1 1 300px;
}
.productcard div:hover {
    background-color: #e0e0e0;
    color: aquamarine;
    transition: background-color 0.3s ease;
}