* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Базовые настройки */
body {
    font-family: 'GT Eesti Pro Display', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f2f8fc;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/*Настройка логотипа*/
.logo img {
    width: 64px;
    height: 64px;
    display: block;
    object-fit: contain;
    transition: transform 0.2s, box-shadow 0.2s;
}

.logo:hover{
  transform: scale(1.04);
}


/* менюшка */
.nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #5494cf;
    width: 100%;
    padding: 0 3%;
    position: sticky;
    top: 0;
    z-index: 1000;
    cursor: pointer;
}

.nav-menu .dropdown ul li a {
    display: block;
    font-family: 'GT Eesti Pro Display', sans-serif;
    color: #1A3055;
    text-decoration: none;
    font-size: calc(12px + (18+12)*((100vw-350px)/(1600-300)));
    padding: 5% 0 5% 10%;
    border-radius: 15px;
}

.nav-menu .dropdown ul li a:hover {
    background-color: #cde3f7;

}

.nav-menu .dropdown ul li ul {
    flex-direction: column;
    position: absolute;
    right: 0;
    width: 18rem;
    background-color: #e8f3fc;
    opacity: 0;
    border-radius: 15px;
    transition: 0.3s;
    margin-top: 45%;
    visibility: hidden;
}

/* Активное меню (открытое по клику) */
.nav-menu .dropdown ul li ul.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-menu .dropdown ul li {
    position: relative;
    list-style: none;
}



.nav-brand {
    gap: 10px;
    display: flex;
    align-items: center;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    margin-left: 4px;
    font-size: calc(20px + (35+20)*((100vw-350px)/(1600-300)));
}

.menu-item {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 16px;
    text-decoration: none;
    color: #f8f3e7;
    font-family: 'GT Eesti Pro Display', sans-serif;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    text-decoration: none;
}

.brand-name {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #f8f3e7;
    font-family: 'GT Eesti Pro Display', sans-serif;
    font-weight: bold;
    font-size: 28px;
    line-height: 1;
    white-space: nowrap;
}

.brand-subtitle {
    color: #f8f3e7;
    font-family: 'GT Eesti Pro Display', sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: 1;
    white-space: nowrap;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    margin-left: -4px;
    border: 0;
    border-radius: 50%;
    background-color: #858b94;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle::before {
    content: "☾";
    font-size: 18px;
    line-height: 1;
}

.theme-toggle:hover {
    background-color: #6e747c;
    transform: translateY(-1px);
}

.theme-toggle:focus-visible {
    outline: 3px solid rgba(248, 243, 231, 0.85);
    outline-offset: 3px;
}

body.theme-dark {
    background-color: #121923;
    color: #e7edf5;
}

body.theme-dark .nav-menu,
body.theme-dark .site-footer {
    background-color: #243140;
}

body.theme-dark .nav-menu .dropdown ul li ul {
    background-color: #1b2430;
}

body.theme-dark .nav-menu .dropdown ul li a,
body.theme-dark .brand-name,
body.theme-dark .brand-subtitle,
body.theme-dark .menu-item,
body.theme-dark .footer-nav a,
body.theme-dark .footer-contact a,
body.theme-dark .footer-brand-block h3,
body.theme-dark .footer-brand-block p,
body.theme-dark .footer-bottom p,
body.theme-dark .textic,
body.theme-dark .textic a {
    color: #e7edf5;
}

body.theme-dark .nav-menu .dropdown ul li a:hover {
    background-color: #334254;
}

body.theme-dark .textic a {
    background-color: #334254;
}

body.theme-dark .textic a:hover {
    background-color: #415164;
}

body.theme-dark .back-to-top {
    background-color: #334254;
}

body.theme-dark .back-to-top:hover {
    background-color: #415164;
}

body.theme-dark .theme-toggle {
    background-color: #a0a6ae;
    color: #1b2430;
}

body.theme-dark .theme-toggle::before {
    content: "☀";
}

.image-container {
    position: relative;
    width: 100%;
    height: clamp(300px, 42vw, 500px);
    margin: 0 auto 5%;
    overflow: hidden;
}


.photo-shape {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: brightness(40%);
   
}



.text-overlay {
    position: absolute;
    top: 5%;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4%;
    flex-direction: column;
}

.text-overlay h1 {
    color: #f2f8fc;
    font-family: 'GT Eesti Pro Display', Arial, sans-serif;
    font-size: 75pt;
    font-weight: 600;
    margin: 0;
    max-width: 80%;
    text-align: center;
}

.block_on_block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3%;
    width: 92%;
    max-width: 87.5rem;
    margin: 0 auto 5%;
}

.block_on_block svg {
   transition: transform 0.2s, box-shadow 0.2s;
}


.block_on_block svg:hover{
  transform: scale(1.04);
}

.textic {
    color: #1A3055;
    width: 50%;
    flex-shrink: 1;
    padding-left: 0;
}

.textic h2 {
    font-size: 22pt;

}

.textic p {
    font-size: 14pt;

}

.textic a {
    min-width: 128px;
    min-height: 44px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #ff8d5c;
    border-radius: 20px;
    text-decoration: none;
    padding: 12px 18px;
    margin-top: 2%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.textic a:hover{
  transform: scale(1.04);
}

/*.textic a:hover {
    text-decoration: underline;

}*/

.blob-shape {
    margin-left: 0;
    flex: 0 1 598px;
    max-width: 44%;
}

/*подвал сайта*/
.site-footer {
    margin-top: 56px;
    padding: 32px 40px 24px;
    background-color: #5494cf;
    color: #f8f3e7;
    width: calc(100% + (var(--page-gutter) * 2));
    margin-left: calc(var(--page-gutter) * -1);
    margin-right: calc(var(--page-gutter) * -1);
}

/*структура подвала*/
.footer-top {
    display: grid;
    grid-template-columns: 1.2fr 1.6fr 1fr;
    gap: 32px;
    align-items: start;
}

/*стили для блоков внутри подвала*/
.footer-brand-block h3 {
    margin-bottom: 10px;
    font-size: 28px;
    line-height: 1;
}

/*стили для текста внутри блоков подвала*/
.footer-brand-block p,
.footer-contact p,
.footer-bottom p {
    font-size: 16px;
    line-height: 1.6;
}

/*стили для навигационных ссылок в подвале*/
.footer-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
}

/*стили для ссылок в навигации и контактах подвала*/
.footer-nav a,
.footer-contact a {
    color: #f8f3e7;
    text-decoration: none;
}

/*эффект при наведении на ссылки в навигации и контактах подвала*/
.footer-nav a {
    font-size: 17px;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s ease;
}

.footer-nav a:hover {
    transform: scale(1.08);
}

/*эффект при наведении на ссылки в навигации и контактах подвала*/
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(248, 243, 231, 0.28);
}

/*эффект при наведении на ссылки в навигации и контактах подвала*/
.main-content {
    position: relative;
    width: 94%;
    max-width: 107.5rem;
    margin: -18px auto 0;
    padding: 5% 5% 5.5%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(248, 243, 231, 0.96) 100%);
    border-radius: 40px;
    box-shadow: 0 18px 48px rgba(26, 48, 85, 0.08);
    margin-top: 5%;
}

/*градиент для вертикальной линии слева от контента на главной странице*/
.main-content::before {
    content: "";
    position: absolute;
    top: 40px;
    left: 28px;
    width: 6px;
    height: 120px;
    border-radius: 999px;
    background: linear-gradient(180deg, #5494cf 0%, #7eb2df 100%);
}

/*кнопка для быстрого перехода наверх страницы*/
.back-to-top {
    position: fixed;
    right: 32px;
    bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    background-color: #5494cf;
    color: transparent;
    text-decoration: none;
    border-radius: 50%;
    font-family: 'GT Eesti Pro Display', sans-serif;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    z-index: 1000;
}

/*стили для стрелки внутри кнопки "Наверх"*/
.back-to-top::before {
    content: "";
    position: absolute;
    top: 18px;
    width: 14px;
    height: 14px;
    border-top: 10px solid #f8f3e7;
    border-left: 10px solid #f8f3e7;
    transform: rotate(45deg);
}

/*стили для вертикальной линии внутри кнопки "Наверх"*/
.back-to-top::after {
    content: "";
    position: absolute;
    top: 26px;
    width: 4px;
    height: 18px;
    background-color: #f8f3e7;
    border-radius: 999px;
}

/*эффект при наведении на кнопку "Наверх"*/
.back-to-top:hover {
    background-color: #467fb2;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
    transform: translateY(-2px);
}

/*стили для фокуса на кнопку "Наверх"*/
.back-to-top:focus-visible {
    outline: 3px solid #EAF0F8;
    outline-offset: 4px;
}

/*адаптивные стили для новостных карточек и кнопки "Наверх" на экранах до 768px*/
@media (max-width: 768px) {
    .nav-menu {
        padding: 18px;
    }

    .nav-brand {
        gap: 8px;
    }

    .brand-name {
        font-size: 22px;
    }

    .brand-subtitle,
    .menu-item {
        font-size: 16px;
    }

    .image-container {
        height: clamp(240px, 52vw, 360px);
        margin-bottom: 5%;
    }

    .text-overlay {
        padding-left: 0;
    }

    .text-overlay h1 {
        font-size: 48pt;
        text-align: center;
    }

    .block_on_block {
        flex-direction: column;
        align-items: stretch;
        width: calc(100% - 32px);
        gap: 18px;
        margin: 0 auto 24px;
        padding: 18px;
        background: linear-gradient(180deg, #ffffff 0%, #edf6fd 100%);
        border: 1px solid #d5e6f5;
        border-radius: 28px;
        box-shadow: 0 14px 32px rgba(84, 149, 207, 0.12);
    }

    .block_on_block:nth-of-type(even) {
        flex-direction: column;
    }

    .textic,
    .blob-shape {
        width: 100%;
        max-width: 100%;
    }

    .blob-shape,
    .block_on_block svg {
        order: 1;
        width: min(100%, 420px);
        margin: 0 auto;
    }

    .textic {
        order: 2;
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
        text-align: left;
    }

    .textic h2 {
        font-size: clamp(26px, 4.8vw, 34px);
        line-height: 1.12;
    }

    .textic p {
        font-size: 17px;
        line-height: 1.65;
        color: #2c3e4e;
    }

    .textic a {
        align-self: flex-start;
        min-width: 0;
        font-size: 16px;
        padding: 12px 20px;
        margin-top: 4px;
    }

    .back-to-top {
        right: 16px;
        width: 52px;
        height: 52px;
    }

    /*стили для стрелки внутри кнопки "Наверх" на экранах до 768px*/
    .back-to-top::before {
        top: 16px;
        width: 12px;
        height: 12px;
        border-top-width: 3px;
        border-left-width: 3px;
    }

    /*стили для вертикальной линии внутри кнопки "Наверх" на экранах до 768px*/
    .back-to-top::after {
        top: 23px;
        width: 3px;
        height: 16px;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 900px) {
    .nav-menu {
        padding: 10px 12px;
        gap: 12px;
        flex-wrap: wrap;
    }

    .nav-brand {
        flex: 1 1 auto;
        min-width: 0;
        gap: 8px;
    }

    .brand-text {
        min-width: 0;
        margin-left: 0;
    }

    .brand-name,
    .brand-subtitle {
        white-space: normal;
    }

    .brand-name {
        font-size: clamp(18px, 5vw, 24px);
    }

    .brand-subtitle {
        font-size: clamp(12px, 3vw, 14px);
    }

    .nav-menu .dropdown ul li ul {
        width: min(280px, calc(100vw - 24px));
        margin-top: 12px;
    }

    .block_on_block {
        width: calc(100% - 24px);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .logo img {
        width: 52px;
        height: 52px;
    }

    .text-overlay h1 {
        font-size: clamp(28px, 10vw, 52px);
    }

    .block_on_block {
        width: calc(100% - 20px);
        margin-inline: auto;
        padding: 16px;
        border-radius: 24px;
    }

    .blob-shape,
    .block_on_block svg {
        max-width: 100%;
        height: auto;
    }

    .textic {
        gap: 12px;
    }

    .textic h2 {
        font-size: clamp(24px, 7vw, 32px);
    }

    .textic p {
        font-size: 16px;
        line-height: 1.58;
    }

    .textic a {
        width: auto;
        max-width: 240px;
    }

    .back-to-top {
        right: 12px;
        bottom: 12px;
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        padding: 8px 10px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .brand-name {
        font-size: 17px;
    }

    .brand-subtitle {
        font-size: 11px;
    }

    .text-overlay h1 {
        font-size: 24px;
    }

    .textic h2 {
        font-size: 22px;
    }

    .textic p {
        font-size: 15px;
        line-height: 1.52;
    }

    .textic a {
        width: 100%;
        max-width: none;
        justify-content: center;
    }
}

@media (max-width: 375px) {
    .brand-name {
        font-size: 16px;
    }

    .brand-subtitle {
        font-size: 10px;
    }

    .textic h2 {
        font-size: 20px;
    }

    .textic p {
        font-size: 14px;
    }
}