* {
    box-sizing: border-box;
}

h1, h2 {
    margin: 0;
}

body {
    background-color: rgb(245, 240, 250);
    display: grid;
    grid-template-areas:
        "header"
        "hero"
        "main"
        "footer";
    grid-template-rows: auto 300px 1fr auto;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

header {
    grid-area: header;
    background-color: #c280c4;
}

.wrapper_header {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    width: 70px;
    height: auto;
}

.naslov {
    flex: 1;
}

.naslov h2 {
    font-size: 28px;
    color: white;
}

.nav {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.nav a:hover {
    color: #43b8b8;
}

.hero {
    grid-area: hero;
    background-color: #e0d5e8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inner_wrapper {
    max-width: 960px;
    width: 100%;
    text-align: center;
    padding: 30px;
}

.hero h1 {
    font-size: 42px;
    color: #5a2d6b;
    margin: 0;
}

main {
    grid-area: main;
    display: grid;
    grid-template-areas:
        "card1 card2 card3"
        "textlines textlines textlines";
    grid-template-columns: repeat(3, 1fr);
    max-width: 960px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    gap: 25px;
}

.card1 {
    grid-area: card1;
}

.card2 {
    grid-area: card2;
}

.card3 {
    grid-area: card3;
}

.text-lines {
    grid-area: textlines;
    background: white;
    padding: 25px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.card p {
    font-weight: bold;
    margin: 0;
    font-size: 18px;
    color: #5a2d6b;
}

.card:hover {
    transform: translateY(-5px);
}

.slika {
    flex-shrink: 0;
}

.slika img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.tekst_drzac {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
}

.line {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

footer {
    grid-area: footer;
    background-color: #c280c4;
    margin-top: 40px;
}

.wrapper_footer {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
}

.footer-item {
    color: white;
    font-weight: bold;
}

@media (max-width: 768px) {
    body {
        grid-template-rows: auto 250px 1fr auto;
    }

    main {
        grid-template-areas:
            "card1 card2"
            "card3 card3"
            "textlines textlines";
        grid-template-columns: 1fr 1fr;
    }

    .wrapper_header {
        flex-wrap: wrap;
    }

    .nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    body {
        grid-template-rows: auto 200px 1fr auto;
    }

    main {
        grid-template-areas:
            "card1"
            "card2"
            "card3"
            "textlines";
        grid-template-columns: 1fr;
        margin: 20px auto;
        gap: 15px;
    }

    .wrapper_header {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .naslov {
        width: 100%;
        text-align: center;
    }

    .naslov h2 {
        font-size: 22px;
    }

    .nav {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .wrapper_footer {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}