:root {
    --bg: #e6f3fa;
    --bg-top: #d0ecf9;
    --bg-bottom: #f8fcff;
    --card: #ffffffcc;
    --accent: #005f99;
    --muted: #4b5563;
    --container: 1100px;
    --shadow: 0 6px 20px rgba(16, 24, 40, 0.06);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* {
    box-sizing: border-box
}

html {
    overflow: hidden;
}

html,
body {
    height: 100%;
    margin: 0;
    color: #111827;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background: var(--bg-bottom);
}

/* === Переводы === */
.translation {
    display: none;
}

.translation.ru {
    display: inline;
}

main {
    flex: 0 1 100%;
}

.gradient {
    width: 100%;
    height: 1000px;
    position: absolute;
    background: linear-gradient(to bottom, var(--bg-top), var(--bg-bottom));
    z-index: -1;
}

.wrap {
    max-width: var(--container);
    margin: 0 auto;
}

header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 0 rgba(16, 24, 40, 0.04)
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0
}

nav a.active {
    color: var(--accent);
    background: rgba(0, 95, 153, 0.15);
}

/* === Подменю === */

.nav ul li {
    position: relative;
}

.dropdown>a::after {
    content: none;
}

.submenu {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    border-radius: 12px;
    list-style: none;
    padding: 8px 0;
    margin: 4px 0 0;
    min-width: 200px;
    z-index: 100;
}

.submenu li {
    width: 100%;
}

.submenu a {
    display: block;
    padding: 10px 16px;
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease;
}

.submenu a:hover {
    background: rgba(0, 95, 153, 0.1);
    color: var(--accent);
}

/* Показываем подменю при наведении */
.dropdown:hover>.submenu {
    display: block;
}

/* Бургер-меню */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    user-select: none;
    padding: 5px 10px;
}

/* Скрываем меню на мобильных по умолчанию */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    #nav-menu {
        flex-direction: column;
        width: 100%;
    }

    #nav-menu li {
        width: 100%;
        margin: 5px 0;
    }

    .dropdown .submenu {
        position: relative;
        top: 0;
        left: 0;
        box-shadow: none;
        background: transparent;
        padding-left: 10px;
    }
}


.brand {
    display: flex;
    align-items: center;
    gap: 12px
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow);
    flex-shrink: 0;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.site-title {
    font-weight: 700
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav ul {
    display: flex;
    gap: 18px;
    list-style: none;
    padding: 0;
    margin: 0
}

nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600
}

nav a:hover {
    color: var(--accent);
    background: rgba(0, 95, 153, 0.08)
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    cursor: pointer;
}

.lang-flag {
    width: 24px;
    height: 16px;
    border-radius: 3px;
    opacity: 0.6;
    object-fit: cover;
    /* 🔸 растягивает изображение */
    object-position: center;
    /* центрирует его */
    transition: transform 0.2s ease, opacity 0.2s ease;
    user-select: none;
    -webkit-user-drag: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.lang-flag:hover {
    transform: scale(1.1);
    opacity: 1;
}

.lang-flag.active {
    opacity: 1;
    box-shadow: 0 0 4px rgba(0, 95, 153, 0.6);
}

.hero {
    display: grid;
    align-items: center;
    gap: 28px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center
}

.card {
    background: var(--card);
    margin-bottom: 14px;
    padding: 28px;
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(4px)
}

.card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    /* color: var(--accent); */
}

/* === Карточка с кнопкой (без движения при наведении) === */
.service-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* убираем transform hover */
}

.service-card p {
    color: var(--muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.card-button {
    display: inline-block;
    text-decoration: none;
    background: var(--accent);
    color: #fff;
    padding: 6px 12px;
    /* уменьшенный размер */
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    /* меньше шрифт */
    text-align: center;
    transition: background 0.3s ease;
    align-self: flex-end;
    /* выравнивание вправо */
}

.card-button:hover {
    background: rgba(0, 95, 153, 0.8);
}

.kicker {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 95, 153, 0.1);
    color: var(--accent);
    font-weight: 700;
    margin-top: 12px;
    margin-bottom: 12px
}

h1 {
    font-size: clamp(22px, 4.2vw, 36px);
    margin: 0 0 12px
}

p.lead {
    color: var(--muted);
    margin: 0 0 20px;
    line-height: 1.5
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 18px
}

.feature {
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(0, 95, 153, 0.05), rgba(0, 0, 0, 0));
}

.feature h4 {
    margin: 0 0 6px
}

.feature p {
    margin: 0;
    color: var(--muted);
    font-size: 14px
}

.aligned-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 18px
}

.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.photo-gallery img {
    width: calc(33.333% - 8px);
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.photo-gallery img:hover {
    transform: scale(1.03);
}

footer {
    padding: 40px 24px;
    color: var(--muted);
}

.footer-container {
    margin: 0 auto;
    max-width: var(--container)
}

.wave-container {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 200%;
    height: 150px;
    opacity: 0.5;
    z-index: -1;
}

.wave path {
    fill: #00BFFF;
    /* голубой цвет */
}

.wave {
    animation: moveWave 6s linear infinite;
}

@keyframes moveWave {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

.wrap {
    max-width: var(--container);
    margin: 0 auto;
}

@media (max-width:980px) {

    .features,
    .aligned-section {
        grid-template-columns: repeat(2, 1fr)
    }

    .photo-gallery img {
        width: calc(50% - 8px);
    }
}

@media (max-width:520px) {

    .features,
    .aligned-section {
        grid-template-columns: 1fr
    }

    .photo-gallery img {
        width: 100%;
    }
}

/* === Мобильная адаптация === */
@media (max-width: 768px) {
    header .wrap.nav {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 20px;
    }

    .nav-controls {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nav-controls.active {
        display: flex;
    }

    .brand {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .brand .logo img {
        width: 50px;
        height: auto;
    }

    .site-title {
        font-size: 18px;
        line-height: 1.2;
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 10px;
        margin-top: 10px;
    }

    header nav ul li {
        margin: 5px 0;
    }

    header nav a {
        font-size: 16px;
    }

    .dropdown .submenu {
        position: relative;
        top: 0;
        left: 0;
        width: 100%;
        box-shadow: none;
        background: transparent;
        padding-left: 10px;
    }

    .dropdown:hover .submenu {
        display: block;
    }
}

/* Для очень маленьких экранов (до 480px) */
@media (max-width: 480px) {
    .site-title {
        font-size: 16px;
    }

    .brand {
        gap: 0px;
    }

    .brand .muted {
        font-size: 10px;
    }

    header nav a {
        font-size: 14px;
    }
}

/* -------------------------------------------- */

/* === Боковое меню (sidebar) === */
.sidebar {
    position: fixed;
    top: 80px;
    /* немного ниже шапки */
    left: 10px;
    width: 220px;
    padding: 20px;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(4px);
    z-index: 40;
    transition: transform 0.3s ease;
}

.sidebar-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    color: var(--accent);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 8px 0;
}

.sidebar-menu a {
    display: block;
    text-decoration: none;
    color: var(--muted);
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(0, 95, 153, 0.15);
    color: var(--accent);
}

/* Скрываем sidebar на мобильных */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-260px);
    }
}

/* === Боковое меню на планшетах === */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 180px;
        /* чуть уже, чтобы меньше перекрывало контент */
        top: 80px;
        left: 0px;
        /* небольшой отступ от края */
        padding: 16px;
    }

    /* Основной контент с отступом слева */
    main.sidebar-container>.wrap.hero,
    main.sidebar-container>section.wrap {
        margin-left: 200px;
        /* оставляем место для sidebar */
    }
}

/* На десктопе оставляем стандартное фиксированное меню */
@media (min-width: 1025px) and (max-width: 1599px) {

    main.sidebar-container>.wrap.hero,
    main.sidebar-container>section.wrap {
        margin-left: 240px;
        /* ширина sidebar + отступ */
    }
}