:root {
    --bg-color: rgba(221, 226, 227, 0.1);
    --red: #ba0000;
    --border-radius: 10px;
    --transition: all 0.5s;
    --scale: 1.05;
    --gap: 1vw;
    --padding-header-footer: 1% 4%;
    --padding-section: 0 10vw;
    --padding-item: 10px;
    --height-section: 100vh;
    /* ---------------main theme--------------- */
    --accent-color: #1e717c;
    --default-color: #ffffff;
    --border: 1px solid var(--accent-color);
    --bg-color-footer-header: #ffffff21;
    --bg-main: rgba(0, 0, 0, 0.5);
}
/* ========================light theme================================================= */
/* ==================================================================================== */
:root[data-theme="light"] {
    --accent-color: #ffffff;
    --default-color: #ffffff;
    --border: 1px solid #0000;
    --bg-color-footer-header: rgba(0, 0, 0, 0.5);
    --bg-main: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .wrapper::before {
    background-image: url('/images/background/background--light-theme__webp.webp');
}

[data-theme="light"] spline-viewer {
    display: none;
}

[data-theme="light"] .cookie__modal-body {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .button,
[data-theme="light"] .cookie__modal h3,
[data-theme="light"] .cookie__modal h4,
[data-theme="light"] .cookie__modal p,
[data-theme="light"] .cookie__modal li,
[data-theme="light"] .cookie__modal button {
    color: black;
}

[data-theme="light"] .cookie__accept{
    box-shadow: 0 0 10px 0.5px black;
}
/* ==================================================================================== */
/* ==================================================================================== */
html {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.body {
    font-family: "Jura";
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 1px;

    margin: 0;
    padding: 0;
    color: var(--default-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 100vw;
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;

    min-height: 100vh;
    width: 100%;
}

.wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;

    background-image: url('/images/background/background_webp.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;

    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: brightness(1.1) contrast(1.1);
    z-index: -1;

    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.container {
    width: 100vw;
    height: 100%;
    max-width: 1440px;
}

.main {
    flex-grow: 1;
    overflow: hidden;

    background-color: var(--bg-main);
    border-radius: var(--border-radius);
}

spline-viewer {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}


.title {
    font-size: 40px;
    font-weight: 700;

    margin-bottom: 150px;
}

h2 {
    font-size: 40px;
}

h3 {
    font-size: 30px;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;

    letter-spacing: 1px;
    font-size: 16px;
    font-weight: 400;

    padding: 5px 15px;
    border-radius: 10px;
    border: 1px solid var(--accent-color);
    background-color: var(--accent-color);
    box-shadow: 0 0 5px var(--accent-color);
    scale: 1;
    transition: all 2s;
    cursor: pointer;
    z-index: 1;

    position: relative;
}

.button:hover {
    background-color: var(--accent-color);
    scale: 1.1;
    box-shadow: 0 0 15px var(--accent-color);
}

.button svg {
    width: 16px;
    height: auto;
    /* стрелка — <use> из спрайта, цвет берётся из color кнопки */
    fill: currentColor;
}

/* ========== Card Text Open ================================================== */
.expanded {
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    display: block;
}

/* ======= Gradient Animation ======================================= */
.gradient {
    background: linear-gradient(to right, #fafafa, #d3f5fd, #9fe5f5, #5dcae3, #008baa, #5dcae3, #e0dede, #fafafa);
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animate-gradient 2.5s linear infinite;
    color: transparent;
    display: inline-block;
}

@keyframes animate-gradient {
    to {
        background-position: 200%;
    }
}
/* ============== SIDEBAR ================================================== */
/* Раньше это была <a>; у <button> браузер рисует свой фон (на Android — белый). */
.menu-icon {
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;

    padding: 0;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
}

ion-icon {
    font-size: 40px;
}

.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 70%;

    width: 0%;
    background-color: #000000b8;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(211, 211, 211, 0.411);
    opacity: 0;
    z-index: 999;
}

.close-icon {
    font-size: 50px;
    color: lightgray;

    padding-left: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.sidebar ul {
    padding-left: 20px;
}

.sidebar ul li {
    list-style: none;
    margin-bottom: 15px;
}

.sidebar ul li a {
    text-decoration: none;
    color: lightgray;
    font-size: 30px;
    font-weight: 700;

    text-shadow: 0 0 15px rgba(128, 128, 128, 0.256);
}

.sidebar .social-icons {
    text-wrap: nowrap;

    padding-left: 20px;
    margin-top: 30px;
}

.sidebar .social-icons a ion-icon {
    font-size: 30px;

    padding: 5px 5px;
    cursor: pointer;
}
/*-----Sidebar Language Dropdown---------*/
.sidebar__lang {
    padding-top: 20px;
    padding-left: 15px;
}

.sidebar__lang img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: var(--transition);
}

.sidebar__lang .lang-dropdown__menu {
    left: -2px;
    right: auto;

    min-width: fit-content;
    backdrop-filter: unset;
}

.sidebar__lang .lang-dropdown__item {
    background: none;
    font-size: 14px;
}

/* Open Sidebar Animation */
.sidebar.open-sidebar {
    animation: openSidebarAnimation 0.2s forwards;
}

@keyframes openSidebarAnimation {
    to {
        bottom: 0;
        width: 60%;
        opacity: 1;
        border-radius: 0;
    }
}

/* Close Sidebar Animation */
.sidebar.close-sidebar {
    animation: closeSidebarAnimation 1s forwards;
}

@keyframes closeSidebarAnimation {
    from {
        bottom: 0;
        width: 50%;
        opacity: 1;
    }

    to {
        bottom: 70%;
        width: 0;
        opacity: 0;
    }
}

/* ======================== BACK TO TOP ==================================== */
.back-to-top {
    visibility: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    position: fixed;
    right: 20px;
    bottom: 25px;

    padding: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(20px) scale(0.9);
    border: none;
    outline: none;
    background: none;
    color: inherit;
    cursor: pointer;
    z-index: 1000;
}

.back-to-top.show {
    visibility: visible;
    transform: translateY(0) scale(0.8);
}

.back-to-top:hover {
    transform: translateY(-8px) scale(1.05);
}

.back-to-top:active {
    transform: translateY(-4px) scale(1.02);
    transition: all 0.2s ease;
}

.back-to-top ion-icon {
    font-size: 45px;
    color: white;
    transition: transform 0.3s ease;
}

.back-to-top:hover ion-icon {
    transform: translateY(-2px);
}
/* ================================THEME=================================== */
.site-settings {
    position: fixed;
    bottom: 10px;
    left: 10px;

    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.header__theme {
    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    scale: 1;
    transition: var(--transition);
    z-index: 1000;
}

.header__theme:hover {
    scale: 1.2;
}

.header__theme:hover svg path {
    color: black;
}

.header__theme svg {
    width: 40px;
    height: 40px;
    transition: var(--transition);
}

.header__theme svg path {
    fill: var(--accent-color);
    color: black;
    transition: var(--transition);
}

/* ================================COOKIE=================================== */
.cookie {
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: transparent;
    scale: 1;
    transition: var(--transition);
}

.cookie:hover {
    scale: 1.2;
}

.cookie:hover svg path {
    color: black;
}

.cookie svg {
    width: 40px;
    height: 40px;
    transition: var(--transition);
}

.cookie svg path {
    fill: var(--accent-color);
    color: black;
    background: var(--default-color);
    transition: var(--transition);
}

/*----- Cookie Modal-------*/
.cookie__modal {
    position: fixed;
    bottom: 100px;
    left: 40px;
    z-index: 1000;

    max-width: 400px;
    width: calc(100% - 80px);

    background: var(--default-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);

    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.cookie__modal h3,
.cookie__modal h4 {
    text-decoration: underline;
}

.cookie__modal--visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cookie__modal-content {
    padding: 24px;
}

.cookie__modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 16px;
}

.cookie__modal-header h3 {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin: 0;
}

.cookie__modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-color);
    opacity: 0.7;
    transition: var(--transition);
}

.cookie__modal-close:hover {
    opacity: 1;
    color: var(--accent-color);
}

.cookie__modal-body {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--accent-color);

    background: var(--bg-color);
    max-height: 300px;
    padding: 0 5px;
    overflow-y: auto;
}

.cookie__modal-body p {
    margin-bottom: 12px;
}

.cookie__section {
    margin-bottom: 16px;
}

.cookie__section h4 {
    font-size: 0.95rem;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.cookie__section ul {
    margin: 0;
    padding-left: 20px;
}

.cookie__section li {
    margin-bottom: 4px;
}

.cookie__section a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie__modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.cookie__accept {
    background: var(--accent-color);
    color: var(--default-color);
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.cookie__accept:hover {
    opacity: 0.9;
    transform: scale(1.02);
}
/* ================================scroll-down============================== */
.scroll-down {
    visibility: visible;

    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 8%;

    height: 50px;
    width: 30px;
    border: none;
    border-radius: 50px;
    transition: all 0.5s ease;
    pointer-events: auto;
    opacity: 1;
    z-index: 100;
}

.scroll-down::before,
.scroll-down::after {
    content: "";
    position: absolute;
    top: 20%;
    left: 50%;

    height: 10px;
    width: 10px;
    border: 2px solid lightgray;
    transform: translate(-50%, -100%) rotate(45deg);
    border-top: transparent;
    border-left: transparent;
    animation: scroll-down 2s ease-in-out infinite;
}

.scroll-down::before {
    top: 30%;

    animation-delay: 0.5s;
}

@keyframes scroll-down {
    0% {
        opacity: 0;
    }

    30%,
    60% {
        opacity: 1;
    }

    100% {
        top: 90%;
        opacity: 0;
    }
}
/*====================== notification ====================================== */
.notification {
    display: flex;
    align-items: center;
    gap: 10px;

    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;

    font-weight: 500;
    color: white;

    border-radius: 5px;
    animation: slideIn 0.3s ease;
    z-index: 10000;
}

.notification.success {
    background: #4CAF50;
}

.notification.error {
    background: #f44336;
}
/* ========== Скрытый спрайт SVG ============================================== */
.svg-defs {
    display: none;
}

/* ========== Ссылка «к содержимому» ========================================== */
.skip-link {
    position: absolute;
    left: 8px;
    top: -100px;
    z-index: 10001;

    padding: 10px 16px;
    border-radius: var(--border-radius);
    background-color: #1e717c;
    color: #ffffff;

    transition: top 0.2s;
}

.skip-link:focus-visible {
    top: 8px;
}

/* ========== Уважение к системной настройке анимаций ========================= */
@media (prefers-reduced-motion: reduce) {
    :root {
        --transition: none;
    }

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .button,
    .button:hover {
        scale: 1;
    }
}
