/******************************************************
 * 1. Глобальные стили и сброс
 ******************************************************/

/* Сброс box-sizing для упрощения расчёта ширины/высоты */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Убираем внутренние и внешние отступы по умолчанию */
html, body {
    margin: 0;
    padding: 0;
    /* Если нужно совсем исключить горизонтальную прокрутку: */
    overflow-x: hidden;
}

/******************************************************
 * 2. Стили для body (фон, шрифт, отступ под фиксированную шапку)
 ******************************************************/
body {
    font-family: Arial, sans-serif;
    background: url('bg.webp') no-repeat center center fixed;
    background-size: cover;
    color: #ffffff;
    /* Отступ сверху, чтобы контент не заходил под фиксированную шапку */
    padding-top: 80px;
    min-height: 100vh;
}

/******************************************************
 * 3. Единый стиль для основных секций
 *    Делает все блоки одинаковой ширины и фоном
 ******************************************************/

.about-section,
.departments-section,
.gallery-section,
.offer-section {
    width: 90%;               /* Одинаковая ширина */
    max-width: 1200px;        /* Максимальная ширина */
    margin: 40px auto;        /* Центрирование + отступ сверху/снизу */
    background: rgba(0, 0, 0, 0.5); /* Полупрозрачный фон */
    backdrop-filter: blur(10px);    /* Эффект размытия */
    border-radius: 15px;      /* Скруглённые углы */
    padding: 40px;            /* Внутренние отступы */
}

/******************************************************
 * 4. Шапка (navbar)
 ******************************************************/

.navbar {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    margin: 0;
    border-radius: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    /* Фон и размытие для шапки (если нужно) */
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

/* Ссылки в меню */
.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-grow: 1;
    justify-content: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 8px 15px;
    border-radius: 5px;
}

.nav-links a.active,
.nav-links a:hover {
    background: #0056b3;
    color: white;
}

/* Кнопка "Join our Discord" */
.btn-discord {
    padding: 10px 20px;
    background: #5865F2;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

/******************************************************
 * 5. Логотип и название
 ******************************************************/
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
    border-radius: 50%;
}

.site-name {
    font-size: 20px;
    font-weight: bold;
    color: white;
    line-height: 50px; /* Совпадает с высотой логотипа */
}

/******************************************************
 * 6. Блок "О себе" (about-section)
 *    Убираем дублирующиеся стили width/margin/background,
 *    т.к. они уже заданы выше.
 ******************************************************/

.about-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    min-height: 350px; /* Если нужен минимум по высоте */
}

.text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    color: #ffffff;
    line-height: 1.6;
}

.text-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

.text-content p {
    font-size: 16px;
    margin-bottom: 15px;
}

.video-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-content iframe {
    width: 100%;
    max-width: 560px;
    height: 315px;
    border-radius: 10px;
}

/******************************************************
 * 7. Департаменты (departments-section)
 ******************************************************/

.departments-section {
    text-align: center; /* Сохраняем выравнивание */
}

.departments-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Два департамента в ряд */
    gap: 20px;
    margin-top: 20px;
}

.department-box {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative; /* Для оверлея */
    overflow: hidden;
}

.department-box img {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.department-box h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.department-box p {
    font-size: 14px;
    line-height: 1.5;
}

/* Стили для затемнения и блюра */
.under-development {
    position: relative;
    overflow: hidden;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.6); /* Затемняем весь блок */
    color: rgba(255, 255, 255, 0.7); /* Затемняем текст */
}

.under-development h3,
.under-development p {
    color: rgba(255, 255, 255, 0.6); /* Затемняем текст */
}

.under-development img {
    filter: brightness(0.6); /* Уменьшаем яркость логотипа */
}

/* Стикер "В разработке" */
.development-overlay {
    position: absolute;
    top: 9px;
    right: -36px;
    background: rgba(255, 0, 0, 0.85);
    color: white;
    font-size: 13px;
    font-weight: bold;
    padding: 10px 40px;
    border-radius: 5px;
    text-transform: uppercase;
    transform: rotate(30deg);
    z-index: 3;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

/******************************************************
 * 8. Галерея (gallery-section)
 ******************************************************/

.gallery-section {
    text-align: center; /* уже единая ширина, фон и т.д. */
}

/* Улучшенная адаптивная сетка галереи */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
    gap: 10px;
    justify-content: center;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Различные размеры (при желании) */
.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.medium {
    grid-column: span 2;
    grid-row: span 1;
}

/******************************************************
 * 9. Секция "Что мы предлагаем" (offer-section)
 ******************************************************/

.offer-section {
    text-align: center;
    /* Ширина и фон уже заданы выше */
    /* Если нужно меньше горизонтальных отступов, можно переопределить:
       padding: 40px 20px; */
}

.offer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 40px 20px;
}

.offer-box {
    width: 30%;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.offer-box:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1);
}

.offer-box img {
    width: 50px;
    margin-bottom: 10px;
}

.offer-box h3 {
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.offer-box p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

/******************************************************
 * 10. Модальные окна (галерея, "Что мы предлагаем")
 ******************************************************/

/* Общие стили для любых модальных окон */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

/* Модальное окно для галереи */
.modal-content {
    background: rgba(20, 20, 20, 0.9);
    padding: 20px;
    border-radius: 12px;
    width: 60%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.modal-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.modal-text {
    width: 50%;
    text-align: left;
}

.modal-text h2 {
    font-size: 28px;
    color: #ffffff;
    margin-bottom: 10px;
}

.modal-text p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.modal-image {
    width: 50%;
}

.modal-image img {
    width: 100%;
    border-radius: 8px;
}

/* Модальное окно "Что мы предлагаем" */
.offer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.offer-modal.active {
    display: flex;
    opacity: 1;
}

.offer-modal-content {
    background: #222;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 1000px;
    text-align: left;
    position: relative;
    color: white;
}

.offer-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.offer-modal-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    width: 100%;
    gap: 40px;
}

.offer-modal-body img {
    max-width: 300px;
    border-radius: 5px;
}

.offer-text {
    flex: 1;
    text-align: left;
}

.offer-text h2 {
    font-size: 32px;
    color: #ffffff;
    margin-bottom: 15px;
}

.offer-text p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
}

/******************************************************
 * 11. Секция логина (login-section)
 ******************************************************/
.login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60vh;
}

.login-container {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 300px;
}

.input-group {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.input-group label {
    margin-bottom: 5px;
    color: white;
}

.input-group input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.btn-login {
    width: 100%;
    padding: 10px;
    background: #0056b3;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.btn-login:hover {
    background: #003d80;
}

/******************************************************
 * 12. Документы
 ******************************************************/
/* Стили для страницы документов */
.content-section {
    margin-top: 120px; /* создаёт внешний отступ от фиксированной шапки */
    padding: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    backdrop-filter: blur(4px);
}

.content-section h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    text-align: center;
}

.document-category {
    margin-bottom: 30px;
}

.document-category h2 {
    font-size: 1.6em;
    margin-bottom: 10px;
    border-bottom: 2px solid white;
    padding-bottom: 5px;
}

.document-category ul {
    list-style: none;
    padding-left: 0;
}

.document-category li {
    margin: 8px 0;
}

.document-category a {
    color: #79a9ff;
    text-decoration: none;
}

.document-category a:hover {
    text-decoration: underline;
}


/******************************************************
 * 12. Футер
 ******************************************************/
footer {
    width: 100%;
    margin: 0;
    padding: 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    /* Убираем background-color: #fff; 
       если хотите белый цвет футера, замените ниже:
    */
    /* background-color: #fff; */
    color: #fff;
}

/******************************************************
 * 13. Адаптивность (медиа-запросы)
 ******************************************************/

/* Галерея: уменьшаем количество колонок на планшетах */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .offer-box {
        width: 45%;
    }
}

/* Галерея: на мобильных оставляем одну колонку */
@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .offer-box {
        width: 90%;
    }
}
