html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f9f9f9;
    color: #333;
}

.navbar {
    position: fixed;
    width: 100%;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    z-index: 1000;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    padding-left: 1.5rem;
}

.logo {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    padding-right: 3%;
}

.nav-links a {
    text-decoration: none;
    color: black;
    font-weight: 600;
    font-size: x-large;
}

.nav-links a::before {
    margin-left: auto;
}

.nav-links a::after,
.nav-links a::before {
    content: '';
    width: 0%;
    height: 2px;
    background: black;
    display: block;
    transition: 0.5s;
}

.nav-links a:hover::after,
.nav-links a:hover::before {
    width: 100%;
}

.hero {
    background-image: url('kuvat/glenn-carstens-peters-npxXWgQ33ZQ-unsplash.jpg');
    background-size: cover;
    background-position: center;
    height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px;
}

.hero-overlay {
    background-color: rgba(112, 112, 112, 0.5);
    color: white;
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
}

.hero img {
    max-width: 100%;
    height: auto;
    max-height: 7rem; /* ei kasva liian suureksi */
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
}

.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: black;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: lightslategray;
}

.section {
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.section p {
    font-size: x-large;
}

.section a {
    color: #0077cc;
    display: block;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 1rem;

    transition: color 0.3s ease;
    cursor: pointer;
    font-size: x-large;
}

.section a:hover,
.section a:focus {
    color: #005fa3;
    outline: none;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    text-align: center;
}

.card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
}

.footer a {
    color: #66ccff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Hampurilaisikoni (piilotettu isommilla näytöillä) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    cursor: pointer;
    margin-right: 1.5rem;
}

.hamburger div {
    width: 100%;
    height: 3px;
    background-color: black;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Pienemmillä näytöillä */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 64px; /* nav-palkin korkeus */
        right: 0;
        height: calc(100vh - 64px);
        background-color: white;
        flex-direction: column;
        width: 200px;
        padding-top: 2rem;
        padding-right: 0;
        gap: 1.5rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }

    /* Kun nav on auki */
    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.2rem;
        padding-left: 1.5rem;
    }

    /* Näytetään hampurilaisikoni */
    .hamburger {
        display: flex;
    }

    .nav-links a::before,
    .nav-links a::after {
        transition: none;
        width: 0;
        display: none;
    }

    .hero img {
        max-height: 6rem; /* pienemmillä näytöillä pienempi korkeus */
    }
}
