@font-face {
    font-family: 'Balalajka';
    src: url('/f/t/balalajka-regular.eot');
    src: local('balalajka'), local('balalajka-Regular'),
        url('/f/t/balalajka-regular.eot?#iefix') format('embedded-opentype'),
        url('/f/t/balalajka-regular.woff2') format('woff2'),
        url('/f/t/balalajka-regular.woff') format('woff'),
        url('/f/t/balalajka-regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Balalajka';
    src: url('/f/t/balalajka-bold.eot');
    src: local('balalajka bold'), local('balalajka-bold'),
        url('/f/t/balalajka-bold.eot?#iefix') format('embedded-opentype'),
        url('/f/t/balalajka-bold.woff2') format('woff2'),
        url('/f/t/balalajka-bold.woff') format('woff'),
        url('/f/t/balalajka-bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Balalajka';
    src: url('/f/t/balalajka-bolditalic.eot');
    src: local('balalajka bold italic'), local('balalajka-bolditalic'),
        url('/f/t/balalajka-boldItalic.eot?#iefix') format('embedded-opentype'),
        url('/f/t/balalajka-boldItalic.woff2') format('woff2'),
        url('/f/t/balalajka-boldItalic.woff') format('woff'),
        url('/f/t/balalajka-boldItalic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}

@font-face {
    font-family: 'Balalajka';
    src: url('/f/t//f/t/balalajka-italic.eot');
    src: local('balalajka italic'), local('balalajka-italic'),
        url('/f/t/balalajka-italic.eot?#iefix') format('embedded-opentype'),
        url('/f/t/balalajka-italic.woff2') format('woff2'),
        url('/f/t/balalajka-italic.woff') format('woff'),
        url('/f/t/balalajka-italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

:root {
  font-family: "Balalajka", sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 16pt;
  line-height: 140%;
  color: #1B4C8F;
  background-color: #F2F5F8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --primary: #1B4C8F;
  --bg-primary: #5E6D81;
  --lightgray: #AFB5B8;
  --white: #ffffff;
  --black: #222;
  --pinky-winky: #ff687a;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--primary);
}

a.text {
    color: var(--black);
    border-bottom: 1px solid #B8D6F4;  
}

a:hover {
    color: var(--pinky-winky);
}

a:active, li.active {
    color: var(--lightgray);
}

.herovo {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    flex: 1 0 0;
    width: 100%;
    gap: 10vh;
}

.wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

footer {
    position: relative;
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 3;
}

.hide {
    display: none !important;
}


.rebreding .bg {
  inset: 0;
  background-image: linear-gradient(to right, var(--primary) 1px, transparent 1px),
    linear-gradient(to bottom, var(--primary) 1px, transparent 1px);
  background-size: 150px 150px;
}

.full_width {
   display: block;
   width: 100%;
}

.page_content, .bg {
    background: #F2F5F8;
}

.library {
    padding-top: 100px;
}

.padd_t_150 {
    padding-top: 150px;
}

.padd_t_300 {
    padding-top: 300px;
}

.padd_b_150 {
    padding-bottom: 150px;
}

.padd_b_300 {
    padding-bottom: 300px;
}

.padd_150 {
    position: relative;
    padding: 150px 0 0 0;
}

.padd_100 {
    padding: 100px 0 0 0;
}

.padd_50 {
    padding: 50px 0 0 0;
}

.inline-block {
    position: relative;
    display: inline-block;
}

.inline-block img {
    display: block;
    float: left;
    width: 75px;
    height: 75px;
    border-radius: 50%;
    vertical-align: middle;
}

/* Цвета проектов */

.bgxsignal {
    color: #FB6645;
    background: #FFF8DA;
}

.bgxsignal_old {
    color: #273238;
    background: #fff;
}

.bgei {
    color: #137547;
    background: #00311A;
}

.deledger-interfaces, .bgdeledger {
    color: #6472FF;
    background: #151027;
}

.fiz-bricks, .fiz-kgb {
    color: #222;
    background: #E6E4E1;
}

.fiz-kgb .description {
    color: #BE8055;
}

.bg_bennu {
    color: #4EADEA;
    background: #E3EEFF;
}

.bg_bennu_ident {
    color: #4EADEA;
    background: #1A4183;
}

.bg_inschooltech {
    color: #17618F;
    background: #E5EFF8;
}

.bg_swanhellenic {
    color: #074254;
    background: #668D9A;
}

.bg_gondomir {
    color: #E84E88;
    background: #FDD1E2;
}


section {
    display: block;
    overflow: hidden;
    padding: 0 0; 
}

.responsive {
    padding-left: 48px;
    padding-right: 48px;
    margin: 0 auto;
    /* width: 100%; */
    max-width: 1920px;
}

.site {
    margin: 0 auto;
    width: 100%;
    max-width: 1440px;
    overflow: hidden;
}

.rounded {
    border-radius: 35px;
}

.big_site {
    margin: 0 auto;
    width: 100%;
    max-width: 1680px;
    overflow: hidden;   
}


.container_text {
    display: flex;
    flex-direction: column;
    justify-content: left;
    align-items: flex-start;
    align-self: flex-start;
    flex: 1 0 0;
    margin-bottom: 0;
    width: 100%;
    max-width: 1080px;
}

.container_text h2 {
    margin-bottom: 0.4em;
}

.horizontal_hr {
    display: block;
    width: 100%;
    height: 2px;
    border: none;
    background: #1B4C8F;
}

.radius_20 {display: block; border-radius: 20px }
.radius_30 {display: block; border-radius: 30px }

h1 {
    margin: 0 0 0;
    font-family: 'Balalajka';
    font-weight: bold;
    font-style: normal;
    font-size: 6em;
    line-height: 100%;
}

h1.design-title {
    max-width: 1330px;
    margin-bottom: .6em;
}

h2 {
    margin: 0 0 0;
    font-family: 'Balalajka';
    font-weight: bold;
    font-style: normal;
    font-size: 4em;
    line-height: 100%;
}

h3 {
    margin: 0 0 0;
    font-family: 'Balalajka';
    font-weight: bold;
    font-style: normal;
    font-size: 2em;
    line-height: 100%;
}


p {
    margin: 0 0 10px;
   font-family: "Balalajka", sans-serif;
   letter-spacing: 0.02em;
   line-height: 130%;
}

.text_l {
    font-size: 3em;
}

.mobile_nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    margin: 0 auto;
    top: 16px;
    z-index: 99;
}

.nav_wrap {
    position: fixed;
    top: 20px;
    margin: 0 auto;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 990;
}

.glassContainer {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    border-radius: 20px;
    background: #ffffff99;
}

.glassContainer::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: 30px;
    -webkit-box-shadow: inset 2px 2px 0px -2px rgba(255, 255, 255, 0.7), inset 0 0 3px 1px rgba(255, 255, 255, 0.7);
            box-shadow: inset 2px 2px 0px -2px rgba(255, 255, 255, 0.7), inset 0 0 3px 1px rgba(255, 255, 255, 0.7);
}

.glassContainer::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: 30px;
    -webkit-backdrop-filter: blur(0px);
            backdrop-filter: blur(0px);
    -webkit-filter: url(#container-glass);
            filter: url(#container-glass);
    overflow: hidden;
    isolation: isolate;
}

.back_btn {
    left: 0 !important;
    z-index: 999;
}

.glassBtn {
  position: fixed;
  top: 20px;
  right: 20px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  cursor: pointer;
  width: 70px;
  height: 70px;
  padding: 15px;
  background: transparent;
  border-radius: 9999px;
  outline: none;
  border: none;
  z-index: 0;
}

.glassBtn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: 9999px;
    -webkit-box-shadow: inset 2px 2px 0px -2px rgba(255, 255, 255, 0.7), inset 0 0 3px 1px rgba(255, 255, 255, 0.7);
            box-shadow: inset 2px 2px 0px -2px rgba(255, 255, 255, 0.7), inset 0 0 3px 1px rgba(255, 255, 255, 0.7);
    background-color: rgb(255 255 255 / 10%);
}

.glassBtn::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: 9999px;
    -webkit-backdrop-filter: blur(0px);
            backdrop-filter: blur(0px);
    -webkit-filter: url(#btn-glass);
            filter: url(#btn-glass);
    overflow: hidden;
    isolation: isolate;
}

.glassBtn svg {
  width: 100%;
  height: 100%;
  stroke: var(--primary);
}

nav ul {
    position: relative;
    display: inline-flex;
    margin: 0;
    padding: 0 16px;
    align-items: center;
    gap: 12px;
}

nav li {
    display: flex;
    padding: 0 16px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    line-height: 140%;
    letter-spacing: 0.56px;
}

nav li a:hover {
    color: var(--black);
}

.designs_grid {
    padding: 0 24px;
}

.grid {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 1680px;
}

.grid-sizer {
    height: 0;
    clear: none;
}

.grid-sizer,
.grid-item {
    position: absolute;
  box-sizing: border-box;
  clear: none;
  float: left; /* Помогает корректно рассчитывать координаты до запуска JS */
}


/* clearfix */
.grid:after {
  content: '';
  display: block;
  clear: both;
}

.grid-sizer, .grid-item.w50 {
    width: 50%;
    margin-bottom: 10%;
}

.grid-sizer, .grid-item.w33 {
    width: 33%;
    margin-bottom: 10%;
}

.grid-sizer, .grid-item.w25 {
    width: 25%;
    margin-bottom: 10%;
    aspect-ratio: 1/1;
}

.grid-item.w100 {
    width: 100%;
    aspect-ratio: 1/0.57;
}

.grid-item.w50 {
    width: 50%;
    aspect-ratio: 1/1;
}




/* Начальное состояние: карточка скрыта, смещена вниз и немного уменьшена */
.portfolio-card {
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  filter: blur(4px); /* Легкое размытие для премиального эффекта */
  transition: 
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity; /* Оптимизация производительности */
}

/* Состояние после активации скриптом */
.portfolio-card.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}


.tunnel-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  will-change: transform; 
}

/* Оставляем исходник огромным для идеальной четкости */
.slide-content {
  width: 2500px;  
  height: 2500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-content svg {
  width: 100%;
  height: 100%;
}








.work_box, .bred_box {
    position: relative;
    width: 100%;
    height: 100%;
}

.work_box .title {
    font-size: 30pt;
    line-height: 100%;
    letter-spacing: 0.01em;
    padding-left: 30px;
    z-index: 99;
}

.work_link {
    height: 100%;
    width: 100%;
    border-width: initial !important;
    border-style: none !important;
    border-color: initial !important;
    border-image: initial !important;
}

.work_img_wrap {
    margin: 0 auto 10px;
    width: 100%;
    height: 100%;
    z-index: 90;
    overflow: hidden;
}

.work_icon {
    display: block;
    width: 100%;
}

.bred_box img {
    width: 100%;
}

.item.w2, .item.hw2 {
    width: 27.5%;
}


.item.h2, .item.hw2 {
    height: 720px;
}


.thing_date {
    display: block;
    margin-bottom: 15px;
    letter-spacing: 0.03em;
    color: var(--lightgray);
}

.ivanov_site_url {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
    padding: 10px 35px;
    font-size: 22pt;
    font-weight: 400;
    color: var(--black);
    background: var(--white);
    border-radius: 30px;
}

a.ivanov_site_url {
    transition: background 1.1s ease;
}

a.ivanov_site_url:hover {
    color: var(--white);
    background: var(--black);
}

.favicon {
    display: inline-block;
    margin-left: -6px;
    width: 24px;
    height: auto;
}

.paragraph {
    font-size: 1.8em;
    line-height: 130%;
    margin: 0rem 0rem 2rem;
}

.paragraph_m {
    font-size: 1.6em;
    line-height: 130%;
    margin: 0rem 0rem 2rem;
}

.paragraph_l {
    font-size: 2.2em;
    line-height: 130%;
    margin: 0rem 0rem 2rem;
}

.read_more_stack {
    display: inline-block;
    font-size: 3em;
}

.simple_list {
    margin: 0;
    padding: 0;
}

.simple_list li {
    position: relative;
    margin-bottom: 0.6em;
    padding-left: 30px;
    font-size: 1.8em;
    line-height: 120%;
    list-style-type: none;
}

.simple_list li:before {
    position: absolute;
    content:'×';
    left: 0;
    top: 0;
    color: var(--lightgray);
}

.fancy {
  position: relative;
  white-space: nowrap;
  &:after {
    --deco-height: 0.3125em;
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--deco-height) * -0.625);
    height: var(--deco-height);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='64' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='M-17 30.5C-1 22 72-4 54 13 37.9 28.2-2.5 57.5 16 55.5s72-29 104-40' stroke='%239747FF' stroke-width='10'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h100v64H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
    background-size: auto 100%;
    background-repeat: round;
    background-position: 0em;
  }
}

.description {
    position: relative;
    right: 12%;
    float: right;
    width: 400px;
    font-size: 1.3em;
    line-height: 110%;
    color: var(--lightgray);
}

em, .itality {
    font-style: italic;
}

.id_light_gray {
    color: var(--lightgray);
}

.from-them {
padding: 5px 16px;
  font-size: 28px;
background: #fff;
border-radius: 30px;
}

.big_title {
  margin: 0;
  font-size: 14vw;
  text-align: center;
  letter-spacing: -0.03em;
}

.middle_title {
    margin: 0;
    text-align: center;
    font-size: 13vw;
    /* text-transform: uppercase; */
    /* letter-spacing: 1vw; */
}

.breding_title {
    margin: 0;
    text-align: center;
    font-size: 10vw;
}

.breding_title em {
    color: var(--lightgray);
    letter-spacing: -9%;
    margin-right: 2%;
}

.rounded_10 {
    border-radius: 10px;
    overflow: hidden;
}

.rounded_20 {
    border-radius: 20px;
    overflow: hidden;
}

.rounded_50 {
    border-radius: 50px;
    overflow: hidden;
}

.images_id {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    align-self: stretch;
}

.images_id img {
    flex: 1 0 0;
    width: 33%;
}

.old_i {
    padding-top: 10%;
}

.turbo_i {
    padding-top: 20%;
}

.list {
    width: 100%;
    padding: 0;
    margin: 50px auto 0;
    -moz-column-count: 2;
    -moz-column-width: 290px;
    -moz-column-gap: 10px;
    -webkit-column-count: 2;
    -webkit-column-width: 290px;
    -webkit-column-gap: 10px;
    column-count: 2;
    column-width: 290px;
    column-gap: 10px;
}

.tag_list {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.tag_list li {
    padding: 0 16px;
    list-style-type: none;
    font-size: 2em;
    line-height: 140%;
    background: var(--white);
    border-radius: 20px;
}

.columns_grid {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    align-self: stretch;
}

.columns_grid.gap_70 {
    gap: 70px;
}

.column_50 {
    width: 50%;
}

.direction {
    margin-bottom: 100px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    align-content: flex-start;
    gap: 0 2vw;
    flex-wrap: wrap;
}

.direct_title {
    position: relative;
    margin: 0;
    font-size: 9vw;
    font-weight: bold;
    letter-spacing: -4px;
    line-height: 95%;
}

.direct_title sup {
    position: absolute;
    top: -1vw;
    right: -4vw;
    padding: 0;
    z-index: 2;
    font-size: 5vw;
    line-height: 110%;
    border-radius: 50px;
    width: 5vw;
    height: 5vw;
    transform: rotate(90deg);
}

.direct_title .sup {
    position: absolute;
    height: 3vw;
    right: -3vw;
    top: 1vw;
}

.history_wrap {
    background: var(--primary);
    color: var(--white);
    border-radius: 10px;
    padding: 50px 60px 16px;
}

.history_title_wrap {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.history_title_wrap h2 {
    flex: 1 1 100px;
}

.history_wrap .tag {
    background: var(--white);
    display: inline-flex;
    color: var(--primary);
    font-size: 36pt;
    padding: 16px 20px 10px;
    border-radius: 36px;
}

.box_inner {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    padding: 20px 30px 0;
    min-height: 360px;
}

.cv_wrap {
    background: var(--white);
}

.box_inner h2 {
    flex: 1 1 100px;
}

.mob_app {
    font-size: 8vw;
}

.action_tags {
    margin-top: 30px;
}

.skills_details_item {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 1280px;
    text-align: center;
    animation-delay: 0.5s;
}

.skills_details_item input[type=checkbox] {
    position: absolute;
    left: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
}

.skills_details_item input[type=checkbox]:checked ~ .details_inner_wrap {
    margin-top: 0;
    max-height: 0;
    opacity: 0;
    transform: translate(0, 50%);
}

.details_inner_wrap {
    margin: 20px auto 0;
}

.details_inner {
    position: relative;
    padding: 50px 20px;
    z-index: 2;
    background: var(--white);
    border-radius: 30px;
}

.skills_details_item .details_inner {
    opacity: 1;
    transform: translate(0, 0);
}

.experience_list li {
    list-style-type: none;
    font-size: 1.5em;
    line-height: 130%;
    margin-bottom: 0.7em;
}

.transition, p {
    transition: all 0.25s ease-in-out;
}

.offer h2 {
    margin-bottom: 0.4em;
}

.offer h3 {
    margin-bottom: 0.4em;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 1.7em;
    color: var(--bg-primary);
}

.offer .columns_grid {
    margin-bottom: 5em;
}

.contacts img {
    width: 36px;
    height: 36px;
}

.contacts .inline-block {
    display: inline-flex;
    align-items: center;
}

.two-column li {
    position: relative;
    list-style-type: none;
    width: 95%;
    display: inline-table;
    margin: 0 50px 10px 0;
}

/*Books*/

section.cd_gallery {
    overflow: visible;
}

ol {
    display: flex;
    /* list-style-type: none; */
    padding: 0 25px;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
    align-content: flex-start;
    flex-flow: row wrap;
    /* counter-reset: bookitem; */
    /* counter-reset: li; */
}

ol li {
    position: relative;
    /* flex-grow: 1; */
    flex: 2 2 25%;
    /* min-height: 250px; */
    /* overflow: hidden; */
    /* float: left; */
    padding: 0 70px 60px 0;
    font-size: 12pt;
    color: #c2d0df;
}

ol li::before {
    position: absolute;
    top: 23px;
    text-align: right;
    left: -30px;
}

.load, .paragraph, img, li {
    animation: fade-in 1s ease;
}

.book_inner {
    position: relative;
    top: 20px;
    /* left: -35px; */
    padding-right: 15px;
    width: 100%;
}

.book_name {
    font-size: 20pt;
    line-height: 120%;
    font-weight: bold;
    color: var(--primary);
}

.notread p {
    color: #c2d0df;
}

.book_author {
    font-style: italic;
}

.book_author {
    font-size: 16pt;
    color: var(--primary);
    font-style: italic;
}

.book_author em {
    display: inline-block;
    vertical-align: middle;
}

.book_pages, .book_price, .bookcount {
    position: relative;
    display: block;
    float: left;
    padding-right: 20px;
    color: #979797;
}

.book_btn, .close_btn {
    position: relative;
    border-radius: 50%;
    display: block;
    width: 18px;
    height: 18px;
    text-indent: 20px;
    overflow: hidden;
    background: #B8D6F4;
}

ins {
    text-decoration: none;
}

.fingal p {
    display: block;
    width: 100%;
    max-width: 1140px;
    margin-bottom: 7em;
    font-size: 22pt;
}

::selection {
background: #ff687a;
}

::-moz-selection {
background: #ff687a;
}

.book_fingals {
    max-width: 1280px;
}

.book_fingals h1 {
    margin-bottom: .3em;
    text-align: center;
    font-size: 4em;
}

.book_fingals em {
    font-size: 36pt;
}

@keyframes fadeIn {
      0% {
        opacity: 0; /* Элемент полностью прозрачный в начале */
        transform: translateY(20px); /* Смещён вниз на 20px */
      }
      100% {
        opacity: 1; /* Полностью видимый */
        transform: translateY(0); /* Возвращается на своё место */
      }
    }

    .fade_in {
      animation: fadeIn 1s ease-out;
}


.scroll-fade-img {
    margin-top: -1px;
    opacity: 0;
    transform: translateY(30px); /* Смещение вниз для эффекта выплывания */
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform; /* Оптимизация для плавной анимации на смартфонах */
}

/* Первая картинка видна ВСЕГДА (сразу отменяем для неё скрытие) */
.scroll-fade-img:first-of-type {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Класс, который скрипт добавит при скролле */
.scroll-fade-img.is-visible {
    opacity: 1;
    transform: translateY(0);
}








/* Задний фон БЕЗ размытия и БЕЗ темной заливки (полностью прозрачный оверлей поверх сайта) */
.ios-blur-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* Убрали размытие и заливку */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Состояние, когда модалка активна */
.ios-blur-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Всплывающее аккуратное окно (сделаем его чуть плотнее, чтобы текст не сливался с задним фоном сайта) */
.ios-modal-window {
    position: relative;
    background: #fff;
    box-shadow: 0 15px 50px rgba(27, 76, 143, 0.20);
    border-radius: 16px;
    padding: 50px 40px;
    width: 90%;
    max-width: 960px;
    min-height: 300px;
    text-align: center;
    
    /* Эффект плавного появления */
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

#quote-rotator {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: inherit;
    gap: 20px;
}

#quote-text {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    max-width: 85%;
    font-size: 30px;
}

#quote-link {
    max-width: 650px;
    color: var(--lightgray);
}

/* Окно при активном состоянии */
.ios-blur-backdrop.is-active .ios-modal-window {
    transform: scale(1);
}

/* Кнопка-крестик закрытия */
.ios-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    background: var(--white);
    border: none;
    width: 33px;
    height: 33px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 28px;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease, transform 0.1s ease;
}

.quote-apple-icon {
    font-family: -apple-system, BlinkMacSystemFont, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

/* Эффект при наведении — облачко слегка увеличивается */
.quote-apple-icon:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Эффект при клике — слегка сжимается, как кнопка в iOS */
.quote-apple-icon:active {
    transform: scale(0.95);
}


/* Статистика книг */
.stats-container {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 25px;
}

/* Каждая отдельная группа */
.stat-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-shrink: 0;
}

/* Стиль для названий параметров (Всего книг, Прочитано и т.д.) */
.stat-label {
    font-size: 20px;
}

/* Стиль для жирных цифр и значений */
.stat-number {
    font-size: 18px;
    font-weight: 700;
    margin: 0 !important;
}

/* Вспомогательный текст (из X всего) */
.stat-sub {
    font-size: 13px;
    color: #8e8e93;
    margin: 0 !important;
}

/* Микро-правка для мобилок, чтобы на смартфонах группы аккуратно дышали */
@media (max-width: 768px) {
    .stats-container {
        gap: 15px;
        padding: 10px 15px;
    }
    .stat-number {
        font-size: 16px;
    }
    .stat-label, .stat-sub {
        font-size: 12px;
    }
}


.book-search-input {
    display: block;
    flex: 1 1 200px;
    min-width: 180px; /* Минимальная ширина, ниже которой он не сожмется */
    padding: 6px 15px;
    font-family: inherit;
    font-size: 20px;
    background: var(--white);
    border: none;
    border-radius: 20px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.book-search-input:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.book-search-input::placeholder {
  color: var(--lightgray);
}

/* Плавное появление/скрытие карточек при поиске */
li.mix {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

li.mix.search-hidden {
    opacity: 0 !important;
    transform: scale(0.95);
    pointer-events: none;
    /* Используем setTimeout в JS для display: none, чтобы сработала анимация */
}
















/*DEVICES*/

@media (min-width: 2551px) and (max-width: 3000px) {
    .grid-item.w50 {
        width: calc( (( 100% ) / 3 ) - 1px );
        aspect-ratio: 1/1;
    }
}


@media (max-width: 1200px) {
    .responsive {
        padding: 0 24px;
    }
    
    .grid {
        padding-left: 50px;
        padding-right: 50px;
    }
    
    .grid .item {
        width: 100%;
    }
}

@media screen and (min-width: 1025px) and (max-width: 1281px) {
  /* Стили для маленьких экранов и писюнов экранов */
  
  .herovo img {
      width: 300px;
  }
  
  .from-them {
      font-size: 18pt;
  }
  
  h1.design-title {
      max-width: 960px;
      font-size: 4.3em;
  }
  
  .container_text h2 {
        margin-bottom: 0.4em;
    }
  
  h2 {
      font-size: 2.8em;
  }
  
  .skills_details_item {
      width: 80%;
  }
  
  .tag_list li {
      font-size: 1.6em;
  }
  
  .container_text {
      max-width: 760px;
  }
  
  .paragraph_l {
      font-size: 2em;
  }
  
  .paragraph_m {
      font-size: 1.2em;
  }
  
  .paragraph {
      font-size: 1.4em;
  }

  .description {
      right: 0;
      font-size: 1.1em;
  }
  
  .grid-item, .grid-sizer {
    width: calc(((100%) / 2) - 20px);
  }
  
  .grid-item.w50 {
      width: 100%;
  }
  
  .work_box .title {
    font-size: 28pt;
  }
  
  .work_img_wrap {
      margin: 0 auto 30px;
  }
  
  .ivanov_site_url {
      font-size: 18pt;
  }
  
  .offer .columns_grid {
        margin-bottom: 1em;
    }
    
    .herovo {
        gap: 5vh;
    }
  
}


@media screen and (min-width: 768px) and (max-width: 1024px) {
  /* Стили для планшетов */
}


@media (max-width: 520px) {
    /* Мобилы */
    
    .responsive {
        padding-left: 16px;
        padding-right: 10px;
    }
    
    .padd_150 {
        padding-top: 50px;
    }
    
    .padd_100 {
        padding-top: 75px;
    }
    
    .library {
        padding-top: 35px;
    }
    
    .padd_50 {
        padding-top: 35px;
    }
    
    .padd_b_300 {
        padding-bottom: 100px;
    }
    
    .padd_t_300 {
        padding-top: 100px;
    }
    
    h1 {
        font-size: 3em;
    }
    
    h1.design-title {
        font-size: 2em;
    }
    
    .big_title {
        font-size: 15vw;
    }
    
    .container_text h2 {
        margin-bottom: 0.4em;
        font-size: 2em;
    }
    
    .mobile_nav {
        display: block;
    }
    
    .mobile_none {
        display: none;
    }
    
    .glassBtn {
        width: 60px;
        height: 60px;
    }
    
    .nav_wrap {
        display: none;
    }
    
    .herovo img {
        width: 100%;
        max-width: 300px;
    }
    
    ol li {
        padding: 0 0 20px;
        flex: 1 1 100%;
        font-size: 10pt;
    }
    
    .paragraph_l {
        font-size: 1.4em;
    }
    
    .paragraph_m {
        font-size: 1em;
    }
    
    .paragraph {
        font-size: 1em;
        margin: 0rem 0rem 2rem;
    }
    
    .ivanov_site_url {
        padding: 10px 25px;
        font-size: 1em;
    }
    
    .rounded {
        border-radius: 20px;
    }
    
    .rounded_20 {
        border-radius: 10px;
    }
    
    .rounded_50 {
        border-radius: 25px;
    }
    
    .designs_grid {
        padding: 0 16px;
    }  
    
    .grid {
        padding-left: 0;
        padding-right: 0;
    }
    
    .grid-item.w100 {
    /* width: 100%; */
    aspect-ratio: 1/.56;
}
    
    .grid-sizer, .grid-item, .grid-item {
        width: 100%;
    }
    
    .work_img_wrap {
        width: 100%;
        height: 100%;
    }
    
    .work_box .title {
        bottom: 15px;
        padding-left: 15px;
        font-size: 24pt;
    }
    
    .columns_grid {
        flex-direction: column;
    }
    
    .column_50 {
        width: 100%;
    }
    
    .text_l {
        font-size: 1.7em;
        line-height: 115%;
    }
    
    .inline-block img {
        width: 40px;
        height: 40px;
    }
    
    .tag_list {
        gap: 8px;
    }
    
    .tag_list li {
        font-size: 1.2em;
    }
    
    .offer .columns_grid {
        margin-bottom: 0;
    }
    
    .columns_grid.gap_70 {
        gap: 0;
    }
    
    .offer h2 {
        font-size: 2.5em;
        margin-bottom: 0em;
    }
    
    .offer h3 {
        font-size: 1.2em;
    }
    
    .book_fingals h1 {
        font-size: 1.6em;
    }
    
    .book_fingals em {
        font-size: 16pt;
    }
    
    .fingal p {
        margin-bottom: 4em;
        font-size: 16pt;
    }
    
    .direct_title {
        font-size: 16vw;
        letter-spacing: -1px;
        text-align: center;
    }
    
    .direct_title#graph span {
        font-size: 28.5vw;
    }
    
    .direct_title#sites {
        font-size: 32.5vw;
    }
    
    .direct_title#interface span {
        font-size: 16.7vw;
    }
    
    .direct_title#apps {
        font-size: 17vw;
    }
    
    .direct_title#apps span {
        font-size: 18vw;
    }
    
    .direct_title .sup, .direct_title sup {
        display: none;
    }
    
    .description {
        width: 84%;
        right: 0;
        font-size: 0.9em;
    }
    
    .book_name {
        margin-bottom: 5px;
        font-size: 14pt;
    }
    
    .book_author {
        font-size: 12pt;
    }
    
    .book_price {
        display: none;
    }
}