/* Основные стили */
:root {
    --primary-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --main-bg-color: #f0f8ff;
    --text-color: #333;
    --link-special-color: #d6d6d6;
    --footer-bg-color: #6a8faf;
    --button-bg-color: #46992d;
    --white: #fff;
    --transparent-white: rgba(255, 255, 255, 0.8);
    --light-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--primary-font);
    line-height: 1.6;
    margin: 0;
    color: var(--text-color);
    background-color: var(--main-bg-color);
}

a,
button {
    transition: transform 0.3s ease;
}

a:hover,
button:hover {
    transform: scale(1.05);
}

/* Навигация */
nav ul {
    list-style: none;
    margin: 20px 0 0;
    padding: 10px 0 0;
    text-align: center;
}

nav ul li {
    display: inline;
    margin: 0 20px;
}

nav a {
    color: var(--link-special-color);
    text-decoration: none;
    font-weight: bold;
    font-size: x-large;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
}

/* Основное содержимое */
main {
    padding: 0 20px;
}

#about,
#blog,
#services,
#games {
    background-color: var(--white);
    border-radius: 15px;
}

/* Подвал */
footer {
    text-align: center;
    padding: 20px 0;
    background-color: var(--main-bg-color);
    color: var(--footer-bg-color);
}

/* Иконки */
.title-icon {
    height: 0.5em;
    vertical-align: middle;
    margin: 0 0.5em;
    display: inline-block;
}

/* Контейнер для изображения */
.review-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Само изображение */
.review-image .phrase-image {
    height: 10em;
    width: 30em;
    background-position: center;
    background-size: 110%;
    background-repeat: no-repeat;
    margin: 0 0.5em;
}

/* Активная ссылка */
.active {
    font-size: 1.6em;
    color: #fefefe;
    font-weight: 900;
}

/* Фоновое изображение */
.background-image {
    position: relative;
    background: center/cover;
    min-height: 100vh;
    border-radius: 10px;
}

/* Текстовые стили */
.title-text {
    text-align: center;
    font-size: larger;
    font-weight: bold;
    margin-top: 35px;
    margin-bottom: 15px;
}

.title-text h2 {
    margin: 0px;
    display: inline-block;
}

.alert-box {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.alert-box h2 {
    display: inline-block;
    color: #fff;
}

.game h2 {
    margin-bottom: 5px;
}

.italic-text {
    font-size: x-large;
    font-weight: lighter;
    font-style: italic;
    padding: 0 10%;
}

.event-details {
    font-size: larger;
    font-weight: bold;
    display: inline-block;
    color: #ffffff42;
    padding: 0 30px;
}

.stat p {
    font-size: larger;
    margin: 15px;
}

.service h2 {
    margin-top: 0px;
}

/* Блоки контента */
.content,
.button-container,
.service,
.stat {
    text-align: center;
}

.content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding: 20px;
}

.text-block {
    background: var(--transparent-white);
    border-radius: 10px;
    box-shadow: var(--light-shadow);
    padding: 20px;
    margin: 20px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
}

.info-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.column ul {
    margin-top: 5px;
}

/* --- Services Section --- */
#services {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    border-radius: 15px;
    color: var(--footer-bg-color);
}

.service {
    background: var(--transparent-white);
    border-radius: 10px;
    box-shadow: var(--light-shadow);
    margin: 10px;
    flex: 1 1 30%;
    position: relative;
    height: 300px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.service-card {
    width: 100%;
    height: 100%;
    position: relative;
    perspective: 1000px;
    overflow: hidden;
    flex: 1;
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 25px;
}

.card-front {
    transform: rotateY(0deg);
}

.card-back {
    transform: rotateY(180deg);
}

.service-card.flip .card-front {
    transform: rotateY(-180deg);
}

.service-card.flip .card-back {
    transform: rotateY(0deg);
}

.content-bottom {
    margin-top: auto;
}

.button-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.join-button,
.services-button,
.info-button {
    background-color: var(--button-bg-color);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    font-size: 1em;
    padding: 12px 25px;
    text-align: center;
}

.info-button {
    background-color: transparent;
    color: var(--button-bg-color);
    border: 2px solid var(--button-bg-color);
}

/* --- Секция "Чем могу помочь" и "Мои направления" --- */
.help-section {
    display: flex;
    justify-content: space-around;
    padding: 20px 20px;
    background-color: var(--white);
    border-radius: 15px;
    gap: 30px;
}

.help-column {
    flex: 1 1 45%;
    padding: 0 20px;
}

.help-column h2 {
    text-align: center;
    color: var(--button-bg-color);
    font-size: 1.8em;
    margin-bottom: 20px;
}

.help-column ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.help-column ul li {
    padding: 10px 0 10px 30px;
    position: relative;
    border-bottom: 1px solid #eee;
    font-size: 1.1em;
    color: var(--text-color);
}

.help-column ul li:last-child {
    border-bottom: none;
}

.help-column ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 10px;
    color: var(--button-bg-color);
    font-weight: bold;
    font-size: 1.2em;
}

/* Статистика */
#stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    border-radius: 15px;
    color: var(--footer-bg-color);
}

.stat {
    flex: 1 1 30%;
    padding-bottom: 15px;
    margin: 10px;
    box-sizing: border-box;
}

/* Секция игр */
#games {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 0 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.game {
    flex: 1 1 45%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 10px;
    box-shadow: var(--light-shadow);
    margin: 10px;
    padding: 20px;
    min-height: 200px;
    color: #424242;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Центрированный контейнер */
#centred-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    background-color: white;
    padding: 20px;
}

.text-section {
    max-width: 600px;
    margin: 20px;
}

#centred-container .buttons-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
}

#centred-container .buttons-section button {
    width: 200px;
}

.buttons-section .join-button {
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 12px 50px;
}

/* Карусель */
.carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--button-bg-color);
}

.carousel-white {
    background-color: #ffffff;
    margin-top: 40px;
}

.carousel-items {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    flex: 0 0 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
}

.details-button {
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    font-size: 1em;
    padding: 12px 25px;
    text-align: center;
    text-decoration: none;
}