/* Grunge case styles - standalone, paths relative to assets/img/img/ */
/* Override .body padding-right from general.css */
.page-vse-keysy--case-open.body {
  padding-right: 0;
}
/* New layout: sidebar 90px, dyslider and controls shifted right */
.page-vse-keysy--case-open #dyslider {
  margin-left: 90px;
}
.page-vse-keysy--case-open #dyslider section.section {
  width: 100%;
}
.page-vse-keysy--case-open button#next {
  left: 90px;
  width: calc(100% - 90px);
}
.page-vse-keysy--case-open .scrollbar {
  right: 0;
}
/* Mobile: no sidebar, 52px header offset for sections and scroll */
@media (max-width: 768px) {
  .page-vse-keysy--case-open.body {
    margin-top: 52px;
    height: calc(100vh - 52px);
  }
  .page-vse-keysy--case-open #dyslider {
    margin-left: 0;
  }
  .page-vse-keysy--case-open #dyslider section.section {
    height: calc(100vh - 52px) !important;
    padding-bottom: 70px;
  }
  .page-vse-keysy--case-open button#next {
    left: 0;
    width: 100%;
  }
}

@media screen and (min-width: 1025px) {
  section.case .content-new-txtTopCenter {
    width: calc(100% - 80px);
    height: 100%;
    margin-left: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 80px 80px 0 !important;
    text-align: center;
    box-sizing: border-box;
  }
  section.case .content-new-txtRight {
    margin-left: 0;
  }
}

section.case.grunge-6 .content-new-txtLeft .withbefore-line {
  color: #ffffff;
}

section.case.grunge-9 .content-new-txtRight .withbefore-line--right {
  color: #ffffff;
}

@media screen and (max-width: 1024px) {
  section.case h2 {
    padding: 0 !important;
  }
  
  section.case.grunge-1 h2 {
    padding: 0 20px !important;
  }
    section.case.grunge-6 h2 {
      padding: 0 20px !important;
    }
    section.case.grunge-8 h2 {
      padding: 0 20px !important;
    }

  section.case .withbefore-line {
    padding-left: 20px;
    margin-bottom: 20px;
  }
  section.case.grunge.grunge-1 .withbefore-line {
    padding-right: 20px;
  }

  section.case .withbefore-lineCenter {
    color: #000;
  }

  section.case .content-new-txtTopCenter .withbefore-lineCenter {
    padding: 0 20px;
    margin-bottom: 20px;
  }
section.case.grunge-6 .content-new-txtLeft .withbefore-line {
  color: #ffffff;
}
section.case.grunge-9 .content-new-txtRight .withbefore-line--right {
  color: #ffffff;
}

  section.mactak.accompany .wrapper-video {
    height: fit-content !important;
  }
}

@media screen and (max-width: 1024px) {
  section.case h2 {
    padding: 0 20px;
  }
  section.case .withbefore-line {
    padding-left: 20px;
    margin-bottom: 20px;
  }
  section.case .withbefore-lineCenter {
    color: #000;
  }
  section.case .content-new-txtTopCenter .withbefore-lineCenter {
    padding: 0 20px;
    margin-bottom: 20px;
  }
}

/* Grunge case specific styles */
section.grunge {
  background-color: #fff;
  overflow: hidden;
}
section.grunge .text-width {
  width: 610px;
  max-width: 100%;
}
section.grunge h2 {
  color: #4b4b4e;
  text-transform: uppercase;
}
section.grunge .wrapper-img {
  background-size: cover;
  background-repeat: no-repeat;
}
section.grunge:first-child {
  background-image: url(../img/img/mainimg.jpg);
  background-position: center;
  background-repeat: no-repeat;
}
section.grunge:first-child .content {
  width: 80vw;
}
section.grunge:first-child .mymouse {
  top: auto;
  bottom: 50px;
}
section.grunge:first-child span.case-name {
  font-size: 8.5vw;
  letter-spacing: 0.24em;
  padding-left: 0.24em;
}
section.grunge.explosion .wrapper-img {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 100%;
  max-width: calc(100% - 610px);
  background-position: 0% 50%;
  overflow: hidden;
}
section.grunge.explosion .wrapper-img img {
  height: 100%;
}
section.grunge.quality .wrapper-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: calc(100% - 600px - 160px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  background-image: url(../img/img/quality1.png);
  background-position: 100% 50%;
}
section.grunge.quality .wrapper-img img {
  flex: 0 0 auto;
  height: 90%;
}
section.grunge.filter .content {
  justify-content: space-between;
  padding-left: 0;
  padding-right: 0;
}
section.grunge.filter video {
  width: 100%;
}
section.grunge.accent .content {
  justify-content: space-between;
}
section.grunge.accent video {
  max-width: calc(100% - 520px);
  max-height: 95%;
  margin-left: -10%;
}
section.grunge.basket .content {
  justify-content: space-between;
  padding-bottom: 125px;
}
section.grunge.basket video {
  max-height: calc(100% - 80px - 125px);
  max-width: 100%;
}
section.grunge.emotions {
  color: #fff;
  background-image: url(../img/img/background_emotions.jpg);
}
section.grunge.emotions h2 {
  color: #fff;
}
section.grunge.for-everybody .content {
  justify-content: space-between;
  padding-right: 160px;
}
section.grunge.for-everybody video {
  width: 100%;
}
section.grunge.mobile .wrapper-img {
  position: absolute;
  top: 0;
  right: 0;
  width: calc(100% - 610px);
  height: 100%;
  background-image: url(../img/img/mobile-version.png);
  background-position: 0 50%;
}
section.grunge.result {
  background: url(../img/img/background_result.jpg) center no-repeat;
  background-size: cover;
  color: #fff;
}
section.grunge.result h2 {
  color: #fff;
}
section.grunge.result p {
  margin-bottom: 0;
}
section.grunge.last h2 {
  margin-bottom: 50px;
  letter-spacing: 0.05em;
}
section.grunge.last .mymouse {
  border-color: #000;
}
section.grunge.last .mymouse:before {
  background: #000;
}

@media (max-width: 1024px) {
  section.grunge .text-width {
    width: 450px;
  }
  section.grunge.explosion .wrapper-img {
    max-width: 50%;
  }
  section.grunge.quality .wrapper-img {
    max-width: 35%;
  }
  section.grunge.filter .content {
    justify-content: center;
  }
  section.grunge.accent .content {
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
  }
  section.grunge.accent .content .text-width {
    width: 610px;
  }
  section.grunge.accent video {
    max-width: 100%;
    max-height: 35%;
    margin: 20px auto 40px;
  }
  section.grunge.basket .content {
    justify-content: center;
  }
  section.grunge.basket video {
    max-height: 40%;
  }
  section.grunge.emotions {
    background-position: center;
  }
  section.grunge.for-everybody .content {
    padding-right: 20px;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  section.grunge .text-width {
    max-width: 100%;
  }
  section.grunge:first-child {
    background-image: url(../img/img/mainimg_mob.jpg);
    background-position: center;
    background-repeat: no-repeat;
  }
  section.grunge:first-child .content {
    width: 100%;
  }
  section.grunge.explosion .content {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 20px;
  }
  section.grunge.explosion .wrapper-img {
    max-width: 110%;
    opacity: 0.2;
  }
  section.grunge.quality .content {
    flex-direction: column;
  }
  section.grunge.quality .wrapper-img {
    max-width: 100%;
    position: initial;
    background: none;
  }
  section.grunge.quality .wrapper-img img {
    flex: 0 0 0;
    max-width: 100%;
    max-height: 100%;
  }
  section.grunge.filter .content .text-width {
    max-width: 90%;
    margin: 50px auto 20px;
  }
  section.grunge.accent .content .text-width {
    flex-shrink: 0;
  }
  section.grunge.accent video {
    max-height: 30%;
  }
  section.grunge.basket .content {
    padding-bottom: 20px;
  }
  section.grunge.emotions {
    background-image: url(../img/img/background_emotions_mob.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }
  section.grunge.mobile .wrapper-img {
    width: calc(100% - 290px);
  }
}

@media (max-width: 360px), (max-height: 530px) {
  section.grunge .text-width {
    max-width: 100%;
  }
  section.grunge:first-child .content {
    width: 100%;
  }
  section.grunge.explosion .content {
    padding: 20px;
  }
  section.grunge.accent .content .text-width {
    flex-shrink: 0;
  }
  section.grunge.accent video {
    max-height: 20%;
    margin: 20px auto;
  }
  section.grunge.basket video {
    max-height: 15%;
  }
}
