* {
    box-sizing:border-box;
}

body {
    margin:0;
    font-family:'Montserrat',sans-serif;
    background:#0f0f10;
    color:#fff;
}

header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 40px;
    background:rgba(0,0,0,0.6);
    backdrop-filter:blur(10px);
    position:sticky;
    top:0;
    z-index:10;
}

header img {
    height:60px;
}

.social a {
    color:#fff;
    margin-left:18px;
    font-size:20px;
    transition:0.3s;
}
.social a:hover {color:#ff8c2a;}

.hero {
    height:93vh; /* было 90 но появляется серая полоска внизу страницы */
    background:linear-gradient(rgba(0,0,0,0.7),rgba(0,0,0,0.7)), url('images/background.jpg');
    background-size:cover;
    background-position:center;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
    padding:20px;
}

.hero h1 {
    font-size:48px;
    margin-bottom:20px;
}

.hero p {
    font-size:20px;
    color:#ccc;
    max-width:600px;
}

.btn {
    margin-top:25px;
    padding:14px 30px;
    min-width: 142px;
    background:linear-gradient(45deg,#ff7a00,#ffb347);
    border:none;
    border-radius:30px;
    color:#fff;
    font-weight:600;
    cursor:pointer;
    text-decoration:none;
    transition:0.3s;
}

.button-wrapper {
    display: flex;
    justify-content: center;
}

.answers-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.btn:hover {
    transform:translateY(-2px);
    box-shadow:0 10px 25px rgba(255,122,0,0.4);
}

.container {
    max-width:1200px;
    margin:auto;
    padding:60px 20px;
}

#quiz {
    padding:30px;
    min-height: 300px;
}

#answers {
    margin-top:20px;
}

h2 {
    font-size:32px;
    margin-bottom:
    30px;
}

.grid {
    display:grid;
    grid-template-columns:
    repeat(auto-fit,minmax(280px,1fr));
    gap:25px;
}

.card {
    background:#1a1a1d;
    border-radius:16px;
    overflow:hidden;
    transition:0.4s;
    position:relative;
}

.card:hover {
    transform:translateY(-8px);
    box-shadow:0 20px 40px rgba(0,0,0,0.5);
}

.card img {
    width:100%;
    height:200px;
    object-fit:cover;
}

.card-content {
    padding:20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price {
    font-size:22px;
    color:#ff8c2a;
    margin:10px 0;
}

/* Стили для модального окна */
.modal {
    display: none; /* скрыто по умолчанию */
    position: fixed;
    z-index: 1000; /* поверх всего */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* прокрутка, если нужно */
    background-color: rgba(0, 0, 0, 0.5); /* полупрозрачный фон */
}

.modal-content {
    background-color: #0f0f10;
    margin: 10% auto; /* по центру */
    padding: 20px;
    border-radius: 8px;
    width: 80%; /* ширина окна */
    max-width: 600px; /* максимум по ширине */
    position: relative;
    min-height: 560px;
}

/* Крестик закрытия */
.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

footer {
    text-align:center;padding:30px;background:#000;color:#777;
}

@media(max-width:768px){
    .hero h1 {
        font-size:32px;
    }

    header {
        padding:10px 20px;
    }

    #quiz {
        min-height: 430px;  
    }

    .answers-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 90%;         /* ширина под маленький экран */
        margin: 20px auto;  /* немного больше отступов сверху и снизу */
        padding: 10px;      /* меньше паддинга */
        max-height: 90vh;  /* чуть больше высоты */
    }

    h2 {
        margin-bottom: 20px;
    }

    #quiz {
        min-height: 394px; 
    }

    .answers-wrapper {
        grid-template-columns: 1fr;
    }
}