body {
    background-image: linear-gradient(to right top, #702963, #562f67, #3b3266, #1f335e, #003153);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 100vh;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
}
hr{
    color: white;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.logo {
    max-width: 150px;
    height: auto;
}

header h1 {
    margin: 10px 0 0;
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    text-align: center;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.subjects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 20px;
}

.subject-card {
    background-color: transparent;
    border: 1px solid #ffffff;
    width: 100%;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    text-decoration: none; /* Remove default underline for links */
    color: inherit; /* Inherit text color */
}

.subject-card:hover,
.subject-card:active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.subject-card div {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.subject-card h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 500;
    color: #ffffff;
}

/* Optional: If you want to keep the ::before pseudo-element */
.subject-card::before {
    content: attr(data-subject);
    position: absolute;
    top: -20px;
    font-size: 0.8rem;
    color: #ffffff;
    opacity: 0.7;
}

.description {
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
}

.description p {
    font-size: 1rem;
    line-height: 1.5;
    color: #ffffff;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
    }
        .logo {
        max-width: 100px; /* Уменьшаем максимальную ширину */
        width: 20vw; /* Масштабируем относительно ширины экрана */
        min-width: 50px; /* Минимальная ширина, чтобы логотип не стал слишком маленьким */
    }

    .subjects {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .subject-card {
        height: 80px;
    }

    .subject-card h2 {
        font-size: 1.3rem;
    }

    .subject-card::before {
        font-size: 0.7rem;
        top: -15px;
    }

    .description p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }
    .logo {
        max-width: 80px;
        width: 18vw;
        min-width: 40px;
    }
    .subjects {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .subject-card {
        height: 70px;
    }

    .subject-card h2 {
        font-size: 1.1rem;
    }

    .subject-card::before {
        font-size: 0.6rem;
        top: -12px;
    }

    .description p {
        font-size: 0.8rem;
    }
}

footer {
    text-align: center;
}