/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    #services {
        justify-content: space-between;
        align-items: stretch;
    }

    .service {
        flex: 1 1 45%;
        margin: 10px;
        display: flex;
        flex-direction: column;
        height: 250px;
    }

    .service-card {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .join-button,
    .info-button {
        padding: 10px 20px;
        font-size: 0.95em;
    }

    .service:nth-child(3) {
        width: 50%;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {

    nav {
        display: none;
    }

    .content {
        padding: 10px;
    }

    .background-image {
        padding-top: 60px;
        background-size: cover;
        background-position: calc(100% + 280px) center;
        border-radius: 0;
    }

    .text-block {
        padding: 15px;
        margin: 0;
    }

    .text-block .button-container {
        margin-top: 0;
    }

    main {
        padding: 0px;
    }

    .stat {
        font-size: large;
        padding: 20px 10px;
        margin: 0px;
    }

    .stat h2 p {
        font-size: large;
    }

    .stat p,
    .stat h2 {
        margin: 0;
    }

    .alert-box {
        flex-direction: column;
    }

    #services {
        flex-direction: column;
        align-items: center;
        padding: 0 10px;
    }

    .service {
        flex: none;
        width: 100%;
        height: 250px;
        margin: 10px 0;
        display: flex;
        flex-direction: column;
    }

    .service-card {
        display: flex;
        flex-direction: column;
        position: relative;
    }

    .help-section {
        flex-direction: column;
        /* Колонки одна под другой */
        padding: 20px 15px;
        margin: 20px 0;
        gap: 0;
    }

    .help-column {
        padding: 0 10px;
        margin-bottom: 30px;
    }

    .help-column:last-child {
        margin-bottom: 0;
    }

    .help-column h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .help-column ul li {
        font-size: 1em;
        padding-left: 25px;
    }

    .help-column ul li::before {
        top: 8px;
        font-size: 1.1em;
    }

    .card-front,
    .card-back {
        padding: 15px;
        backface-visibility: hidden;
        display: flex;
        height: 100%;
        flex-direction: column;
        justify-self: center;
    }

    .join-button,
    .info-button {
        font-size: 0.9em;
        padding: 10px 20px;
    }

    .title-text,
    .italic-text,
    .event-details,
    .service h2,
    .stat p {
        font-size: medium;
    }

    .carousel-item {
        padding: 5px;
    }

    #games {
        flex-direction: column;
        align-items: center;
    }

    .game {
        flex: 1 1 100%;
        width: 100%;
        margin: 10px 0;
    }

    .text-section,
    .buttons-section {
        flex: 1 1 100%;
        max-width: 100%;
        margin: 10px 0;
    }

    .buttons-section .join-button {
        padding: 10px 25px;
    }

    .join-button,
    .info-button {
        font-size: 0.9em;
        padding: 10px 20px;
    }

    #centred-container {
        text-align: center;
    }

    #centred-container .buttons-section {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }

    #centred-container .buttons-section button {
        height: 40px;
        flex: 0 0 auto;
        width: auto;
        padding: 0 15px;
        margin: 0;
    }

}