/* Design: умеренно строгий + умеренно молодёжный. Светлая тема по умолчанию */
:root {
    --font: 'Outfit', system-ui, sans-serif;
    --bg: #f0f2f5;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --text: #1f2937;
    --text-muted: #6b7280;
    --accent: #16a34a;
    --accent-hover: #15803d;
    --link-hover: #466aeb;
    --border: #e5e7eb;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --transition: 0.2s ease;
}

/* Тёмная тема (если понадобится) */
.site-header--with-bg {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.92)), var(--header-bg-image) center/cover no-repeat;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

body.has-page-background {
    background-color: var(--page-background-color, var(--bg));
    background-image: var(--page-background-image, none);
    background-size: auto;
    background-position: top left;
    background-repeat: no-repeat;
    background-attachment: scroll;
    min-height: 100vh;
}

.main {
    min-height: 60vh;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    border-bottom: none;
}

.header-inner {
    background: #ffffff;
}

.header-inner {
    max-width: 1100px;
    margin: 10px auto 0;
    padding: 0.65rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    border-radius: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.5rem;
    min-height: 2.75rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo:hover {
    color: var(--link-hover);
}

.header-inner .logo,
.header-inner .logo-text {
    color: #5a8bc0;
}

.header-inner .logo:hover {
    color: #6b9dd4;
}

.logo--with-image {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-image {
    height: 2.75rem;
    width: auto;
    max-width: min(200px, 45vw);
    display: block;
    object-fit: contain;
    vertical-align: middle;
}

.logo-text {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
}

/* Классическое меню в шапке (горизонтальная полоса ссылок) */
.header-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.65rem;
    margin-left: 0.75rem;
    min-width: 0;
}

.header-menu-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.header-menu-link:hover,
.header-menu-link.active {
    color: var(--link-hover);
}

.header-menu-link-icon {
    width: 1.3rem;
    height: 1.3rem;
    object-fit: contain;
    flex-shrink: 0;
}

.header-menu-link-icon--hover {
    display: none;
}

.header-menu-link:hover .header-menu-link-icon:not(.header-menu-link-icon--hover) {
    display: none;
}

.header-menu-link:hover .header-menu-link-icon--hover {
    display: inline-block;
}

.header-menu-dropdown {
    position: relative;
}

.header-menu-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 10rem;
    margin-top: 0;
    padding: 0.35rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    z-index: 20;
}

/* Небольшой нахлёст вверх, чтобы при движении курсора вниз не терялся hover */
.header-menu-dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 8px;
}

.header-menu-dropdown:hover .header-menu-dropdown-content {
    display: flex;
}

.header-menu-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    font-size: 1.15rem;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition), background var(--transition);
}

.header-menu-dropdown-link:hover,
.header-menu-dropdown-link.active {
    color: var(--link-hover);
    background: rgba(0, 0, 0, 0.05);
}

.header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 1 auto;
    gap: 0.35rem;
    min-width: 0;
}

.header-login-btn {
    padding-inline: 0.9rem;
    font-size: 0.9rem;
    white-space: nowrap;
    background: linear-gradient(to bottom, #0cb501, #0d5c0a);
    color: #fff;
    border: none;
}

.header-login-btn:hover {
    background: linear-gradient(to bottom, #0a9f01, #0a4d08);
    color: #fff;
}

.lang-switch {
    position: relative;
}

.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
}

.lang-switch-btn:hover {
    background: var(--bg-card);
    border-color: var(--text-muted);
}

.lang-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.25rem);
    min-width: 160px;
    padding: 0.4rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 20;
}

.lang-dropdown[hidden] {
    display: none;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.lang-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lang-flag {
    font-size: 1.1rem;
}

.lang-label {
    flex: 1;
    text-align: left;
}

/* Hero */
.hero {
    position: relative;
    padding: 5rem 1.5rem 4rem;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-top {
    margin-bottom: 1.5rem;
}

.hero-bottom {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.hero-col {
    text-align: left;
}

.hero-second-text {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.hero-title {
    margin: 0 0 1rem;
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    max-width: 18ch;
}

.hero-subtitle {
    margin: 0 0 2rem;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 42ch;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.hero--with-bg {
    background-image: linear-gradient(to right, rgba(240, 242, 245, 0.9) 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%), var(--hero-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero--image-only {
    background-image: var(--hero-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Цвет текста секции из админки: сбрасываем явный --text-muted у потомков */
.hero.hero--themed-text .hero-title,
.hero.hero--themed-text .hero-subtitle,
.hero.hero--themed-text .hero-second-text {
    color: inherit;
}

.hero.hero--themed-text .hero-subtitle,
.hero.hero--themed-text .hero-second-text {
    opacity: 0.88;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.35rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: #d1d5db;
    color: #1f2937;
}

.btn-primary:hover {
    background: #9ca3af;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.btn-ghost.header-login-btn {
    background: linear-gradient(to bottom, #0cb501, #0d5c0a);
    color: #fff;
    border: none;
}

.btn-ghost.header-login-btn:hover {
    background: linear-gradient(to bottom, #0a9f01, #0a4d08);
    color: #fff;
}

/* Services */
.services {
    margin: 2rem auto 0;
    max-width: 1100px;
    padding: 1.5rem;
    border-radius: 20px;
    background: #ffffff;
}

.services--with-bg {
    background-image: linear-gradient(to right, rgba(240, 242, 245, 0.9) 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%), var(--services-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.services--image-only {
    background-image: var(--services-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.services-header {
    margin-bottom: 1rem;
    text-align: left;
}

.services-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title-icon {
    display: inline-block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.services-track {
    position: relative;
    display: flex;
    align-items: stretch;
}

.services-inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.services-inner--scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    text-align: center;
    overflow-x: hidden; /* скрываем «торчащие» карточки по краям */
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE/Edge */
}

.services-inner--scroll::-webkit-scrollbar {
    display: none;               /* Chrome/Safari */
}
.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border-radius: 20px;
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition), background var(--transition), transform 0.15s ease;
}

.service-item--link:hover,
.service-item:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.services-inner--scroll .service-item {
    /* 4 плитки ровно по ширине трека с учётом трёх промежутков по 1.5rem */
    flex: 0 0 calc((100% - 4.5rem) / 4);
}

.services-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(255, 255, 255, 0.9);
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.services-arrow:hover {
    background: #e5e7eb;
}

.services-arrow--left {
    left: -40px; /* вынесена за пределы блока сервисов */
}

.services-arrow--right {
    right: -40px; /* вынесена за пределы блока сервисов */
}

.service-icon-wrap {
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.service-icon {
    width: 130px;
    height: 130px;
    object-fit: contain;
    display: block;
    transition: opacity var(--transition);
}

.service-icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #0cb501, #0d5c0a);
    mask-image: var(--icon-mask);
    -webkit-mask-image: var(--icon-mask);
    mask-size: contain;
    -webkit-mask-size: contain;
    mask-position: center;
    -webkit-mask-position: center;
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    opacity: 0;
    transition: opacity var(--transition);
}

.service-item:hover .service-icon-wrap::after,
.service-item:focus-visible .service-icon-wrap::after {
    opacity: 1;
}

.service-item:hover .service-icon,
.service-item:focus-visible .service-icon {
    opacity: 0;
}

.service-title {
    font-weight: 600;
    font-size: 0.95rem;
    width: 100%;
    text-align: left;
}

.services.services--themed-text .services-title,
.services.services--themed-text .service-title {
    color: inherit;
}

.services.services--themed-text .services-arrow {
    color: inherit;
    border-color: currentColor;
    background: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
    .services-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services-inner--scroll .service-item {
        min-width: 70%;
    }

    .services-arrow--left {
        left: -24px;
    }

    .services-arrow--right {
        right: -24px;
    }
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
}

/* Sections */
.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.section-title {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-lead {
    margin: 0 0 2.5rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Страница (одна запись из БД) */
.page-content {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.page-content .section-title {
    margin-bottom: 1.5rem;
}

.page-body {
    color: var(--text-muted);
    line-height: 1.7;
}

.page-body p {
    margin: 0 0 1rem;
}

.page-body h2, .page-body h3 {
    margin: 1.5rem 0 0.5rem;
    color: var(--text);
    font-size: 1.25rem;
}

.page-body ul, .page-body ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.page-body a {
    color: var(--accent);
    text-decoration: none;
}

.page-body a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Tariff page — оформление как у блока «Сервисы» */
.tariff-page {
    margin: 2rem auto 0;
    max-width: 1100px;
    padding: 1.5rem;
    border-radius: 20px;
    background: #ffffff;
}

.tariff-page.page-blocks-transparent-enabled {
    background: transparent;
}

.tariff-page.tariff-page--themed-text .tariff-option-text {
    color: inherit;
    opacity: 0.92;
}

.tariff-block {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 20px;
}

.tariff-block:last-of-type {
    margin-bottom: 0;
}

.tariff-block--reverse {
    flex-direction: row-reverse;
}

.tariff-block-media {
    flex: 0 0 40%;
    max-width: 40%;
}

.tariff-block-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    object-fit: cover;
}

/* Сервисы: не растягиваем логотипы, а вписываем */
.service-page .tariff-block-media img {
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.tariff-block-content {
    flex: 1 1 0;
    min-width: 0;
}

.tariff-block-title {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: inherit;
}

.tariff-block-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: inherit;
}

.tariff-options-wrap {
    margin-top: 1.5rem;
}

.tariff-options {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tariff-option-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tariff-option-item:last-child {
    margin-bottom: 0;
}

.tariff-option-icon {
    flex-shrink: 0;
}

.tariff-option-icon img {
    display: block;
    width: 24px;
    height: 24px;
}

.tariff-option-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.tariff-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.tariff-action-btn {
    text-decoration: none;
}

@media (max-width: 768px) {
    .tariff-block,
    .tariff-block--reverse {
        flex-direction: column;
    }

    .tariff-block-media {
        flex: 0 0 auto;
        max-width: 100%;
    }
}

/* Features */
.features {
    margin: 2rem auto 0;
    max-width: 1100px;
    padding: 1.5rem;
    border-radius: 20px;
    background: #ffffff;
}

.features .section-inner {
    padding: 2rem 0 2rem;
}

.features--with-bg {
    background-image: linear-gradient(to right, rgba(240, 242, 245, 0.9) 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%), var(--features-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.features--image-only {
    background-image: var(--features-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.features-track {
    position: relative;
    display: flex;
    align-items: stretch;
}

.features-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    flex: 1 1 auto;
    min-width: 0;
}

.features-grid--scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    overflow-x: hidden;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.features-grid--scroll::-webkit-scrollbar {
    display: none;
}

.features-grid--scroll .feature-card {
    flex: 0 0 calc((100% - 4.5rem) / 4);
}

.features-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(255, 255, 255, 0.9);
    color: #4b5563;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.features-arrow:hover {
    background: #e5e7eb;
}

.features-arrow--left {
    left: -40px;
}

.features-arrow--right {
    right: -40px;
}

.feature-card {
    padding: 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
    min-width: 0; /* чтобы широкие img не раздували ячейку grid */
}

.feature-card:hover {
    border-color: rgba(63, 185, 80, 0.4);
    box-shadow: var(--shadow);
}

.feature-image-wrap {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.feature-image {
    display: block;
    max-width: 100px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: var(--radius-sm);
}

.feature-icon {
    display: block;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.feature-icon-image {
    display: block;
    width: 40px;
    height: 40px;
    max-width: 100%;
    object-fit: contain;
    margin: 0 0 1rem;
}

.feature-title {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.feature-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.features.features--themed-text .section-title,
.features.features--themed-text .section-lead,
.features.features--themed-text .feature-title,
.features.features--themed-text .feature-text {
    color: inherit;
}

.features.features--themed-text .section-lead,
.features.features--themed-text .feature-text {
    opacity: 0.88;
}

.features.features--themed-text .features-arrow {
    color: inherit;
    border-color: currentColor;
    background: rgba(255, 255, 255, 0.85);
}

@media (max-width: 768px) {
    .features-grid--scroll .feature-card {
        min-width: 70%;
        flex: 0 0 auto;
    }

    .features-arrow--left {
        left: -24px;
    }

    .features-arrow--right {
        right: -24px;
    }
}

/* About */
.about {
    padding: 4rem 1.5rem;
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.about-text {
    margin: 0;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.about.about--themed-text .section-title,
.about.about--themed-text .about-text {
    color: inherit;
}

.about.about--themed-text .about-text {
    opacity: 0.88;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-block {
    width: 300px;
    max-width: 100%;
    aspect-ratio: 1;
    height: auto;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(63, 185, 80, 0.12) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.about-image {
    display: block;
    width: 300px;
    max-width: 100%;
    aspect-ratio: 1;
    height: auto;
    object-fit: contain;
    object-position: center;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* CTA */
.cta {
    margin: 2rem auto 0;
    max-width: 1100px;
    padding: 1.5rem;
    border-radius: 20px;
    background: #ffffff;
    text-align: center;
}

.cta .cta-inner {
    padding: 2rem 0 2rem;
}

.cta--with-bg {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.88), rgba(240, 242, 245, 0.95)), var(--cta-bg-image) center/cover no-repeat;
}

.cta--image-only {
    background: var(--cta-bg-image) center/cover no-repeat;
}

.cta-inner {
    padding: 4rem 1.5rem;
}

.cta-title {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.cta-text {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
}

.cta.cta--themed-text .cta-title,
.cta.cta--themed-text .cta-text {
    color: inherit;
}

.cta.cta--themed-text .cta-text {
    opacity: 0.88;
}

/* Contact */
.contact {
    padding: 4rem 1.5rem;
}

.contact--with-bg {
    background: linear-gradient(to right, rgba(240, 242, 245, 0.95) 0%, rgba(255, 255, 255, 0.85) 60%), var(--contact-bg-image) top right/cover no-repeat;
}

.contact--image-only {
    background: var(--contact-bg-image) top right/cover no-repeat;
}

.contact-form {
    max-width: 480px;
}

.contact.contact--themed-text .section-title,
.contact.contact--themed-text .section-lead {
    color: inherit;
}

.contact.contact--themed-text .section-lead {
    opacity: 0.88;
}

.contact.contact--themed-text .form-label {
    color: inherit;
    opacity: 0.85;
}

.form-row {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 0.7rem 1rem;
    font-family: var(--font);
    font-size: 1rem;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.contact.contact--themed-text .form-input,
.contact.contact--themed-text .form-textarea {
    color: inherit;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.message {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.message-success {
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid rgba(63, 185, 80, 0.4);
    color: var(--accent);
}

.message-error {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.35);
    color: #f85149;
}

/* Footer */
.site-footer {
    position: relative;
    margin-top: 4rem;
    padding: 0 0 2rem;
    background: transparent;
    color: #1f2937;
}

.site-footer--with-bg {
    background: linear-gradient(to bottom, rgba(61, 66, 72, 0.92), rgba(61, 66, 72, 0.98)), var(--footer-bg-image) center/cover no-repeat;
}

.site-footer--image-only {
    background: var(--footer-bg-image) center/cover no-repeat;
}

/* Цвет текста футера из админки: сбрасываем явные hex у потомков (как у секций --themed-text) */
.site-footer.site-footer--themed-text .footer-tagline,
.site-footer.site-footer--themed-text .footer-address,
.site-footer.site-footer--themed-text .footer-phone,
.site-footer.site-footer--themed-text .footer-email,
.site-footer.site-footer--themed-text .footer-copyright,
.site-footer.site-footer--themed-text .footer-right-content,
.site-footer.site-footer--themed-text .footer-left .logo,
.site-footer.site-footer--themed-text .footer-company-name,
.site-footer.site-footer--themed-text .footer-links a,
.site-footer.site-footer--themed-text .footer-version {
    color: inherit;
}

.site-footer.site-footer--themed-text .footer-phone a,
.site-footer.site-footer--themed-text .footer-email a {
    color: inherit;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
    border-radius: 20px;
    background: #ffffff;
}

.footer-version {
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.footer-left {
    flex: 0 0 39%;
    box-sizing: border-box;
    padding-right: 1rem;
    text-align: left;
}

.footer-tagline {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.footer-center {
    flex: 0 0 36%;
    box-sizing: border-box;
    padding: 0 1rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.footer-right {
    flex: 0 0 25%;
    box-sizing: border-box;
    padding-left: 1rem;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-left .footer-logo {
    display: inline-block;
    margin-bottom: 0;
}

.footer-logo img {
    max-height: 2.5rem;
    width: auto;
    display: block;
}

.site-footer .footer-left .logo,
.site-footer .footer-company-name {
    color: #1f2937;
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-address,
.footer-phone,
.footer-email {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #4b5563;
}

.footer-phone a,
.footer-email a {
    color: inherit;
    text-decoration: none;
}

.footer-phone a:hover,
.footer-email a:hover {
    color: var(--link-hover);
}

.footer-social {
    margin: 0.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    text-decoration: none;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
}

.footer-social-link--telegram .footer-social-icon {
    background: #229ED9;
}

.footer-social-link--vk .footer-social-icon {
    background: #2787F5;
}

.footer-social-logo-img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    display: block;
}

.footer-social-link:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.footer-copyright {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #4b5563;
}

.footer-right-content {
    font-size: 0.9rem;
    color: #4b5563;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.site-footer .footer-links a {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--link-hover);
}

.site-footer .footer-copy {
    margin: 0;
    font-size: 0.85rem;
    color: #4b5563;
}

@media (max-width: 768px) {
    .footer-left,
    .footer-center,
    .footer-right {
        flex: 0 0 100%;
        padding: 0.5rem 0;
        text-align: center;
        justify-content: center;
    }

    .footer-center {
        text-align: left;
        align-items: flex-start;
    }

    .footer-links {
        align-items: flex-start;
    }

    .footer-left .footer-brand {
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-inner {
        padding: 0.5rem 0.65rem;
    }

    .header-left {
        flex: 1 1 100%;
        margin-left: 0;
    }

    .header-menu {
        margin-left: 0;
        flex: 1 1 100%;
    }

    .header-actions {
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo-image {
        height: 2.25rem;
        max-width: min(160px, 50vw);
    }

    .header-menu-link {
        font-size: 0.9rem;
        padding: 0.25rem 0.35rem;
    }

    .header-login-btn {
        font-size: 0.75rem;
        padding-inline: 0.5rem;
    }

    .lang-switch-btn {
        width: 34px;
        height: 34px;
    }

    .about-inner {
        grid-template-columns: 1fr;
    }

    .about-visual {
        order: -1;
    }

    .hero-bottom {
        grid-template-columns: 1fr;
    }
}

/* Модальное окно формы обратной связи */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.is-open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-box {
    position: relative;
    width: 100%;
    max-width: 28rem;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}

.modal-close:hover {
    color: var(--text);
    background: var(--bg-card);
}

.modal-title {
    margin: 0 2rem 0.25rem 0;
    font-size: 1.25rem;
}

.modal-lead {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.modal .contact-form {
    margin: 0;
}

.modal-box--auth {
    max-width: 26rem;
}

.auth-modal-form {
    margin: 0;
}

.auth-modal-form .form-row {
    margin-bottom: 1rem;
}

.auth-modal-form .form-row:last-of-type {
    margin-bottom: 0;
}

.auth-register-consents {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.auth-consent-label {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.auth-consent-label input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.auth-consent-label a {
    color: var(--link-hover);
    font-weight: 500;
}

.btn-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.65rem 1.35rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff !important;
    background: #0cb501 !important;
    border: 1px solid #0cb501 !important;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), transform 0.15s ease;
}

.btn-auth-submit:hover:not(:disabled) {
    background: #099601 !important;
    border-color: #099601 !important;
    transform: translateY(-1px);
}

.btn-auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.auth-modal-msg {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.04);
    max-height: 10rem;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
    hyphens: auto;
    -webkit-overflow-scrolling: touch;
}

.auth-modal-msg--error {
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.1);
    border: 1px solid rgba(185, 28, 28, 0.35);
    font-weight: 500;
}

.auth-modal-msg--ok {
    color: var(--accent);
}

.auth-modal-switch {
    margin: 1.25rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.auth-modal-link {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: var(--link-hover);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.auth-modal-link:hover {
    color: var(--text);
}

.auth-modal-forgot {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.auth-modal-link--muted {
    color: var(--text-muted, #888);
    font-size: 0.9rem;
}

.auth-register-profile-hint {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.auth-register-avatar-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.auth-register-avatar-preview-wrap {
    position: relative;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.auth-register-avatar-fallback {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #c5c5c5;
}

.auth-register-avatar-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
}

.auth-register-avatar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.35rem;
    font-size: 0.9rem;
}

.auth-register-avatar-label {
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

.auth-register-avatar-clear {
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    text-align: center;
}

.auth-modal-uin-wrap {
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

/* Уведомление об использовании cookies */
.cookie-notice {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 150;
    max-width: 320px;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-notice[hidden] {
    display: none;
}

.cookie-notice:not([hidden]) {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.cookie-notice-text {
    margin: 0 0 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.cookie-notice-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}

.cookie-notice-btn:hover {
    background: var(--border);
    border-color: var(--text-muted);
}

/* Стартовый экран: вращающийся логотип (как у веб-мессенджера), затем плавное появление страницы */
@keyframes landing-loader-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.landing-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--page-background-color, var(--bg));
    opacity: 1;
    transition: opacity 0.45s ease;
    pointer-events: auto;
}

.landing-loading-overlay--hide {
    opacity: 0;
    pointer-events: none;
}

.landing-loading-overlay__logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    animation: landing-loader-spin 1s linear infinite;
}

body.landing-boot:not(.landing-boot--revealed):not(.landing-ready) .landing-boot-content {
    opacity: 0;
}

body.landing-boot--revealed .landing-boot-content,
body.landing-ready .landing-boot-content {
    opacity: 1;
}

body.landing-boot--revealed .landing-boot-content {
    transition: opacity 0.5s ease 0.06s;
}

@media (prefers-reduced-motion: reduce) {
    .landing-loading-overlay {
        transition-duration: 0.15s;
    }

    .landing-loading-overlay__logo {
        animation: none;
    }

    body.landing-boot--revealed .landing-boot-content {
        transition-duration: 0.15s;
    }
}
