/* Site examples block — namespaced; does not touch .portfolio */

.site-examples {
  position: relative;
  padding: 4vw 0 3vw;
}

.site-examples__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}

.site-examples .wrapper,
.site-examples__cont,
.site-examples__footer {
  position: relative;
  z-index: 1;
}

.site-examples__heading {
  text-align: center;
  margin-bottom: 1vw;
}

.site-examples__graf {
  text-align: center;
  margin-bottom: 1.5vw;
}

.site-examples__graf img {
  max-width: 3vw;
  height: auto;
}

.site-examples__subtitle {
  text-align: center;
  max-width: 60vw;
  margin: 0 auto 2.5vw;
}

.site-examples__cont {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  /* Same offset as .wrapper — leave room for left side menu */
  width: 90.8854166668vw;
  margin-left: auto;
  margin-right: 0;
  box-sizing: border-box;
}

.site-examples__item {
  position: relative;
  width: 33.333%;
  height: 30vw;
  padding: 2vw;
  cursor: pointer;
  transition: transform .4s, box-shadow .4s;
  z-index: 5;
  overflow: hidden;
  box-sizing: border-box;
  background-color: #2a2a2a;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.site-examples__item:hover {
  transform: scale(1.08);
  z-index: 10;
  box-shadow: 0 0 92px rgba(0, 0, 0, 0.3);
}

.site-examples__item:before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 7px;
  opacity: 0;
  z-index: 0;
  transition: opacity .4s;
  background-image: linear-gradient(to top, #191919 6%, rgba(25, 25, 25, 0.76) 29%, rgba(53, 108, 184, 0) 100%);
  pointer-events: none;
}

.site-examples__item:hover:before {
  opacity: 1;
}

.site-examples__shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to top, rgba(40, 40, 40, 0.92) 0%, rgba(40, 40, 40, 0.35) 42%, rgba(40, 40, 40, 0) 72%);
  pointer-events: none;
}

.site-examples__text {
  position: relative;
  z-index: 2;
  opacity: 1;
  transition: opacity .2s;
  color: #fff;
}

.site-examples__text .white {
  color: #fff;
}

.site-examples__item:hover .site-examples__text {
  opacity: 0;
}

.site-examples__pr {
  position: absolute;
  right: 1vw;
  top: 1vw;
  z-index: 3;
}

.site-examples__it {
  text-align: center;
  padding: .5vw .7vw;
  background: #747474;
  margin-left: auto;
  border-radius: 35px;
  margin-top: 0 !important;
  color: #fff;
  font-size: 0.7vw;
  line-height: 1.2;
}

.site-examples__it:nth-child(1) { background: #0057ff; }
.site-examples__it:nth-child(2) { background: #ed1a24; }
.site-examples__it:nth-child(3) { background: #303030; }
.site-examples__it:nth-child(4) { background: #fbbb20; color: #1c1c1c; }

.site-examples__bot {
  position: absolute;
  bottom: 2vw;
  left: 2vw;
  right: 2vw;
  width: auto;
  opacity: 0;
  transition: opacity .4s;
  z-index: 3;
}

.site-examples__item:hover .site-examples__bot {
  opacity: 1;
}

.site-examples__title {
  margin-bottom: 1vw;
  color: #fff;
}

.site-examples__btn {
  background: transparent;
  border-radius: 50px;
  border: 1px solid #fff;
  color: #fff;
  padding: 1vw 1.4vw;
  cursor: pointer;
  width: 15vw;
  max-width: 100%;
  transition: all .3s;
}

.site-examples__btn:hover {
  background: #fff;
  color: #282828;
}

.site-examples__case-btn {
  position: relative;
  color: #ee1a24;
  margin-left: 1vw;
  transition: all .3s;
}

.site-examples__case-btn:before {
  content: "";
  width: 100%;
  top: 100%;
  height: 1px;
  background-color: #ee1a24;
  position: absolute;
  transition: opacity .3s;
}

.site-examples__case-btn:hover:before {
  opacity: 0;
}

.site-examples__footer {
  margin-top: 2.5vw;
  gap: 2vw;
  flex-wrap: wrap;
}

.site-examples__more-a a {
  border-bottom: 1px dotted #282828;
  transition: border-color .3s;
}

.site-examples__more-a a:hover {
  border-bottom-color: #31B939;
}

.site-examples__ico {
  flex-shrink: 0;
  width: 1.7vw;
  padding: 0.3vw;
}

.site-examples__ico img {
  width: 100%;
  height: auto;
  animation: siteExamplesRotate 4s linear infinite;
}

@keyframes siteExamplesRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.site-examples__archive {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #1c1c1c;
  color: #fff;
  border-radius: 50px;
  padding: 1vw 2.5vw;
  text-decoration: none;
  transition: background .3s;
}

.site-examples__archive:hover {
  background: #31B939;
  color: #fff;
}

.site-examples__archive .small-text {
  opacity: 0.8;
  font-size: 0.75vw;
}

/* Modal — above fixed side header */
.site-examples-modals {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.65);
  display: none;
}

html.site-examples-stop {
  overflow: hidden;
}

.site-examples-case {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #fff;
}

/* Desktop: bar is invisible shell; only close shows (absolute). Mobile: full strip. */
.site-examples-case__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  pointer-events: none;
}

.site-examples-case__bar-text {
  display: none;
  margin: 0;
}

.site-examples-case__close {
  position: absolute;
  right: 32px;
  top: 32px;
  z-index: 30;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #1c1c1c;
  border: 4px solid #ee1a24;
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  transform: rotate(45deg);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: background .25s, border-color .25s, transform .25s;
  box-sizing: border-box;
  user-select: none;
  pointer-events: auto;
}

.site-examples-case__close:hover {
  background: #ee1a24;
  border-color: #ee1a24;
  color: #fff;
}

.site-examples-case__grid {
  display: grid;
  grid-template-columns: 1fr min(29.688vw, 420px);
  height: 100%;
}

.site-examples-case__scroll {
  position: relative;
  overflow: auto;
  max-height: 100vh;
  background: #f5f5f5;
}

.site-examples-case__load {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  background: #fff;
}

.site-examples-case__preview {
  position: relative;
  z-index: 10;
  min-height: 100%;
}

.site-examples-case__preview.frm {
  overflow: hidden;
  height: 100%;
}

.site-examples-case__preview iframe {
  width: 100%;
  height: 100vh;
  border: 0;
  display: block;
}

.site-examples-case__preview img {
  width: 100%;
  height: auto;
  display: block;
}

.site-examples-case__info {
  background: #fff;
  height: 100vh;
  overflow-y: auto;
  padding: 2.5vw 2vw 3vw 2.5vw;
  box-sizing: border-box;
}

.site-examples-case__title {
  font-size: 1.4vw;
  margin: 0 0 1.5vw;
  max-width: 100%;
}

.site-examples-case__video {
  display: flex;
  flex-direction: column;
  gap: 0.8vw;
  margin-bottom: 1vw;
}

.site-examples-case__video a {
  color: #1c1c1c;
  text-decoration: underline;
  font-size: 0.95vw;
}

.site-examples-case__video-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6vw;
}

.site-examples-case__play {
  display: inline-flex;
  width: 2vw;
  height: 2vw;
  align-items: center;
  justify-content: center;
}

.site-examples-case__play img {
  max-width: 100%;
}

.site-examples-case__info h3 {
  font-size: 1.1vw;
  margin: 1.5vw 0 0.8vw;
}

.site-examples-case__ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-examples-case__ul li {
  display: flex;
  align-items: flex-start;
  gap: 0.6vw;
  font-size: 0.9vw;
  margin-bottom: 0.6vw;
}

.site-examples-case__ul li img {
  max-width: 0.9vw;
  margin-top: 0.2vw;
  flex-shrink: 0;
}

/* Helpers used by donor markup patterns */
.site-examples .rel { position: relative; }
.site-examples .row-center {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.site-examples .row-vcenter {
  display: flex;
  align-items: center;
}
.site-examples .col-vcenter {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.site-examples .mbm { margin-bottom: 0.5vw; }
.site-examples .mrm { margin-right: 0.8vw; }
.site-examples .mb { margin-bottom: 0.8vw; }
.site-examples .mbs { margin-bottom: 0.3vw; }
.site-examples .ttu { text-transform: uppercase; }
.site-examples .fwb { font-weight: 700; }
.site-examples .tac { text-align: center; }
.site-examples .text24 { font-size: 1.25vw; line-height: 1.3; }
.site-examples .t-ss { font-size: 1.05vw; line-height: 1.3; }
.site-examples .tsm13 { font-size: 0.68vw; }
.site-examples .text-md { font-size: 0.85vw; }
.site-examples .mr { margin-right: 0.8vw; }

@media (max-width: 1024px) {
  .site-examples__cont {
    width: 100%;
    margin-left: 0;
    padding: 0 4vw;
  }
  .site-examples__item {
    width: 50%;
    height: 45vw;
  }
  .site-examples__btn { width: auto; }
  .site-examples-case__grid {
    grid-template-columns: 1fr;
    overflow: auto;
  }
  .site-examples-case__info,
  .site-examples-case__scroll {
    height: auto;
    max-height: none;
  }
  .site-examples-case__preview iframe {
    height: 70vh;
  }
  .site-examples-case__title { font-size: 1.563rem; }
  .site-examples-case__info h3 { font-size: 1.25rem; }
  .site-examples-case__ul li,
  .site-examples-case__video a {
    font-size: 1.1rem;
    line-height: 1.4;
  }
  /* vw icons collapse on narrow screens — donor uses rem */
  .site-examples-case__ul li img {
    max-width: 0.938rem;
    width: 0.938rem;
  }
  .site-examples-case__play {
    width: 1.5rem;
    height: 1.5rem;
  }
  .site-examples-case__close {
    width: 44px;
    height: 44px;
    font-size: 30px;
    right: 30px;
    top: 30px;
    z-index: 44;
  }
}

/* Donor (Paradigma): preview = full viewport, then info below */
@media (max-width: 768px) {
  /* Sticky chrome: «Пример сайта» + close — always on top */
  .site-examples-case__bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 12vw;
    min-height: 48px;
    max-height: 56px;
    padding: 0 10px 0 14px;
    background: #1c1c1c;
    color: #fff;
    pointer-events: auto;
    box-sizing: border-box;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  }
  .site-examples-case__bar-text {
    display: block;
    flex: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .site-examples-case__bar-kicker {
    opacity: 0.75;
    margin-right: 0.3em;
  }
  .site-examples-case__close {
    position: relative;
    right: auto;
    top: auto;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    font-size: 24px;
    border-width: 3px;
  }
  .site-examples-case__grid {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: max(12vw, 48px);
    box-sizing: border-box;
  }
  .site-examples-case__scroll {
    order: -1;
    flex-shrink: 0;
    height: calc(100vh - max(12vw, 48px));
    max-height: none;
  }
  .site-examples-case__preview,
  .site-examples-case__preview.frm {
    min-height: 100%;
    height: 100%;
  }
  .site-examples-case__preview iframe {
    height: calc(100vh - max(12vw, 48px));
  }
  .site-examples-case__load {
    top: 0;
  }
  .site-examples-case__info {
    height: auto !important;
    flex-shrink: 0;
    padding: 1.5rem 1.25rem 2.5rem;
  }
  .site-examples-case__title {
    font-size: 22px;
    margin-bottom: 1rem;
  }
  .site-examples-case__info h3 {
    font-size: 18px;
    margin: 1.25rem 0 0.75rem;
  }
  .site-examples-case__ul li,
  .site-examples-case__video a {
    font-size: 15px;
    line-height: 1.45;
  }
  .site-examples-case__ul li {
    gap: 0.65rem;
    margin-bottom: 0.55rem;
  }
  .site-examples-case__ul li img {
    max-width: 1rem;
    width: 1rem;
    margin-top: 0.15rem;
  }
  .site-examples-case__video {
    gap: 0.75rem;
  }
  .site-examples-case__play {
    width: 1.5rem;
    height: 1.5rem;
  }
}

@media (max-width: 640px) {
  .site-examples__cont {
    padding: 0 3vw;
  }
  .site-examples__item {
    width: 100%;
    height: 70vw;
  }
  .site-examples__subtitle,
  .site-examples__heading {
    max-width: 100%;
  }
  .site-examples__text24,
  .site-examples .text24 { font-size: 4.5vw; }
  .site-examples .t-ss { font-size: 4vw; }
  .site-examples__it { font-size: 3vw; }
  .site-examples__graf img { max-width: 8vw; }
  .site-examples__ico { width: 6vw; }
  .site-examples__archive .small-text { font-size: 3vw; }
}
