body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

header {
    background-color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    position: relative;
}

header img {
    height: 50px;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 15px;
}

nav ul li {
    display: inline;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}
.hero {
    background-color: #ececec;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero img {
    width: 100%;
    height: auto;
    max-height: 30vh;
    object-fit: cover;
}

.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000000;
    padding: 20px;
    width: 80%;
    box-sizing: border-box;
    font-size: clamp(1.5em, 2.5vw, 3em);
}
.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin: 20px;
}


.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.card img {
    width: 100%;
    height: auto;
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.card-content p {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-top: 1px solid #ddd;
}

.card-actions span {
    font-size: 14px;
    color: #999;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.hero-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

footer {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: repeat(2, 1fr); /* Два столбца для планшетов */
        gap: 15px; /* Уменьшенный отступ между элементами */
    }

    .menu-toggle {
        display: block;
        z-index: 1001; 
        position: relative;
    }

    nav {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #ddd;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        display: none;
        z-index: 1000; /* Поднимаем меню выше всех */
    }

    nav ul {
        list-style: none;
        padding: 10px;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    nav ul li {
        text-align: center;
    }

    nav ul li a {
        text-decoration: none;
        color: #333;
        font-weight: bold;
        display: block;
        padding: 10px;
    }

    nav.active {
        display: block;
    }


    .hero {
        position: relative;
        z-index: 1; 
    }
}


@media (max-width: 600px) {

    .main-content {
        grid-template-columns: repeat(1, 1fr); 
        gap: 15px; 
    }

    .menu-toggle {
        display: block;
        z-index: 1001; 
        position: relative;
    }

    nav {
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #ddd;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        display: none;
        z-index: 1000; /* Поднимаем меню выше всех */
    }

    nav ul {
        list-style: none;
        padding: 10px;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    nav ul li {
        text-align: center;
    }

    nav ul li a {
        text-decoration: none;
        color: #333;
        font-weight: bold;
        display: block;
        padding: 10px;
    }

    nav.active {
        display: block;
    }


    .hero {
        position: relative;
        z-index: 1; 
    }
}

