body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f2e9e4 0%, #c9ada7 100%);
    color: #222;
}
header {
    background: #22223b;
    color: #f2e9e4;
    padding: 25px 0 10px;
    text-align: center;
}
header h1 {
    margin: 0 0 8px 0;
    font-size: 2.5em;
    letter-spacing: 2px;
}
nav a {
    color: #f2e9e4;
    margin: 0 20px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}
nav a:hover {
    color: #9a8c98;
}
main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 70vh;
    margin-top: 25px;
}
.cards {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
}
.card {
    background: #fff;
    padding: 22px 18px;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(34,34,59,0.1);
    width: 265px;
    transition: transform 0.18s, box-shadow 0.18s;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-7px) scale(1.03);
    box-shadow: 0 12px 32px rgba(154,140,152,0.15);
}
.card img {
    width: 100%;
    height: 165px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(170, 160, 150, 0.09);
}
.card h2 {
    font-size: 1.4em;
    margin: 0 0 8px 0;
    color: #22223b;
}
.card p {
    margin-bottom: 14px;
    color: #4a4e69;
}
.details-btn {
    background: #c9ada7;
    color: #fff;
    border: none;
    padding: 7px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(34,34,59,0.08);
    transition: background 0.2s;
}
.details-btn:hover {
    background: #9a8c98;
}
footer {
    text-align: center;
    padding: 30px 0 18px;
    background: #22223b;
    color: #f2e9e4;
    font-size: 1em;
}
/* Модальное окно */
.modal {
    display: none; 
    position: fixed;
    z-index: 2;
    padding-top: 120px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(42,41,55,0.25);
}
.modal-content {
    background: #fff;
    margin: auto;
    padding: 25px 23px;
    border-radius: 9px;
    width: 90%;
    max-width: 400px;
    color: #222;
    box-shadow: 0 8px 36px rgba(154,140,152,0.18);
    position: relative;
    text-align: left;
}
.close {
    color: #9a8c98;
    float: right;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 9px;
    right: 15px;
}

@media (max-width: 900px) {
    .cards { flex-direction: column; align-items: center; }
    main { min-height: 50vh; }
}
