/* nasnegohode.ru — modern homepage overrides (flex/grid, no skew) */
:root {
  --ns-gap: 20px;
  --ns-radius: 14px;
  --ns-blue: #0b5f8a;
  --ns-text: #303030;
  --ns-muted: #5a5a5a;
  --ns-max: 1100px;
}

/* Kill global img stretch inside modern blocks */
.ns-gallery img,
.ns-holidays img,
.ns-circs-grid img,
.ns-map-wrap img {
  width: 100%;
  height: 100%;
  max-width: none;
}

/* ========== PHOTO GALLERY ========== */
.portfolio {
  overflow: hidden;
}
.portfolio .top-triangle,
.portfolio .bottom-triangle,
.portfolio > .top-triangle {
  display: none !important;
}
.portfolio .b-portfolio {
  width: 100%;
  max-width: var(--ns-max);
  margin: 0 auto;
  padding: 28px 16px 40px;
  box-sizing: border-box;
}
.portfolio .b-portfolio > .head,
.portfolio .ns-gallery-title {
  color: #fff;
  text-align: center;
  margin: 0 0 24px;
  font-size: 34px;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.ns-gallery,
.portfolio .b-portfolio.ns-gallery,
.b-portfolio.ns-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ns-gap);
  float: none !important;
  width: 100% !important;
}

.ns-gallery .photo,
.portfolio .ns-gallery .photo,
.b-portfolio .photo {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  transform: none !important;
  -webkit-transform: none !important;
  overflow: hidden;
  border-radius: var(--ns-radius);
  background: rgba(255, 255, 255, 0.08);
  aspect-ratio: 1 / 1;
  position: relative;
}

.ns-gallery .photo a,
.portfolio .ns-gallery .photo a,
.b-portfolio .photo a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  transform: none !important;
  -webkit-transform: none !important;
  overflow: hidden;
  border-radius: inherit;
}

.ns-gallery .photo img,
.portfolio .ns-gallery .photo img,
.b-portfolio .photo img,
.photo:nth-child(n) a.fancybox img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  margin: 0 !important;
  display: block;
  transform: none !important;
  transition: transform 0.35s ease;
}

.ns-gallery .photo:hover img {
  transform: scale(1.04) !important;
}

/* ========== HOLIDAYS ========== */
.celebrations {
  text-align: left;
  margin: 40px 0 48px;
  position: relative;
}
.celebrations > .ny_tree,
.celebrations > .santa {
  display: none !important; /* clutter on modern layout */
}
.celebrations > .head.center,
.celebrations .ns-holidays-title {
  text-align: center;
  margin: 0 0 12px;
  font-size: 34px;
}
.celebrations > p {
  width: min(720px, 92%);
  margin: 0 auto 28px;
  text-align: center;
  color: var(--ns-muted);
  line-height: 1.55;
}

.ns-holidays,
.celebrations .reason_wrapper.ns-holidays,
.reason_wrapper.ns-holidays {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  position: relative !important;
  max-width: var(--ns-max);
  margin: 0 auto;
}

.ns-holidays .box-reason,
.reason_wrapper.ns-holidays .box-reason {
  width: auto !important;
  float: none !important;
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  margin: 0 !important;
}

.ns-holidays .reason {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--ns-radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(11, 50, 80, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.ns-holidays .image-reason,
.ns-holidays .image-reason.new_year,
.ns-holidays .image-reason.army,
.ns-holidays .image-reason.march8 {
  min-height: 0 !important;
  margin: 0 !important;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-size: cover !important;
  background-position: center !important;
  border-radius: 0 !important;
}

.ns-holidays .image-reason img {
  display: none !important; /* spacer gif not needed */
}

.ns-holidays .reason > .head {
  margin: 16px 18px 8px !important;
  text-align: left;
  font-size: 20px;
}
.ns-holidays .reason > .head a {
  text-decoration: none;
  color: var(--ns-text);
}
.ns-holidays .reason > .head a:hover {
  color: #eb2a3f;
}
.ns-holidays .reason > p {
  margin: 0 18px 20px;
  padding: 0 !important;
  text-align: left !important;
  color: var(--ns-muted);
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}

/* ========== CONDITIONS (see bottom ns-circs-card) ========== */

/* ========== VIDEO ========== */
.ns-video {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 28px auto 8px;
  aspect-ratio: 16 / 9;
  background: #0b1520;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(11, 50, 80, 0.12);
}
.ns-video iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block;
}
/* kill legacy stretched vk embeds on homepage */
.b-circs .vk-embed,
.img_center1 {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== LOCATION / CONTACTS ========== */
.ns-location {
  margin: 36px 0 48px;
  padding: 8px 0 12px;
}
.ns-location__title {
  text-align: center;
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 28px;
  color: #2b3a48;
  font-weight: 700;
}
.ns-location__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 28px;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
}
.ns-location__map {
  border-radius: 16px;
  overflow: hidden;
  background: #e7eef4;
  min-height: 360px;
  box-shadow: 0 8px 28px rgba(11, 50, 80, 0.08);
  position: relative;
}
.ns-location__map iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block;
}
.ns-location__info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 2px;
}
.ns-location__card {
  background: #fff;
  border: 1px solid rgba(15, 40, 70, 0.06);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(11, 50, 80, 0.05);
}
.ns-location__label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7a8794;
  margin-bottom: 4px;
  font-weight: 600;
}
.ns-location__value {
  font-size: 17px;
  color: #243442;
  line-height: 1.4;
  font-weight: 600;
}
a.ns-location__phone {
  text-decoration: none;
  color: #0b5f8a;
}
a.ns-location__phone:hover {
  color: #eb2a3f;
}
.ns-location__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ns-stat {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 40, 70, 0.06);
}
.ns-stat__name {
  font-size: 13px;
  color: #5a6b7a;
  margin-bottom: 8px;
  line-height: 1.3;
}
.ns-stat__rating {
  display: flex;
  gap: 4px;
  align-items: center;
}
.ns-flake {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d5e3ec;
  display: inline-block;
}
.ns-flake--on {
  background: #2ea3d2;
  box-shadow: 0 0 0 1px rgba(46, 163, 210, 0.2);
}
.ns-location__distance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #eaf6fb 0%, #f7fbfe 100%);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(46, 163, 210, 0.18);
}
.ns-location__distance-val {
  font-size: 28px;
  font-weight: 800;
  color: #0b5f8a;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.ns-location__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
}
.ns-location__more {
  color: #0b5f8a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ns-location__more:hover {
  color: #eb2a3f;
}
.ns-location__btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, #eb2a3f 0%, #d62134 100%);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(214, 33, 52, 0.28);
}
.ns-location__btn:hover {
  filter: brightness(1.05);
}

/* Hide leftover old slider decorations if any remain */
.slider .fir-tree_left,
.slider .fir-tree_right {
  display: none !important;
}

@media screen and (max-width: 960px) {
  .ns-location__title {
    font-size: 28px;
    margin-bottom: 20px;
  }
  .ns-location__grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .ns-location__map {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }
  .ns-video {
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    margin: 20px auto;
  }
}

@media screen and (max-width: 560px) {
  .ns-location {
    margin: 24px 0 32px;
  }
  .ns-location__stats {
    grid-template-columns: 1fr;
  }
  .ns-location__distance {
    flex-direction: column;
    align-items: flex-start;
  }
  .ns-location__distance-val {
    font-size: 24px;
  }
  .ns-location__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .ns-location__btn {
    width: 100%;
    text-align: center;
  }
  .ns-video {
    aspect-ratio: 4 / 3;
    border-radius: 12px;
  }
}

/* ========== GENERAL SPACING ========== */
.b-rates,
.sertificat,
.b-structure,
.b-comments,
.opinion {
  margin-top: 28px;
  margin-bottom: 28px;
}
.layer-2--cards {
  margin: 24px 0;
}

/* Hide broken/empty triangular decorations that break spacing */
.portfolio .top-triangle,
.celebrations + .clear {
  display: none;
}

@media screen and (max-width: 960px) {
  .ns-gallery,
  .portfolio .ns-gallery,
  .b-portfolio.ns-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .ns-holidays,
  .reason_wrapper.ns-holidays {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .ns-contacts-grid {
    grid-template-columns: 1fr;
  }
  .portfolio .b-portfolio > .head,
  .celebrations > .head.center {
    font-size: 28px;
  }
}

@media screen and (max-width: 560px) {
  .ns-gallery,
  .portfolio .ns-gallery,
  .b-portfolio.ns-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ns-circs-grid {
    grid-template-columns: 1fr;
  }
  .portfolio .b-portfolio {
    padding: 20px 12px 28px;
  }
}

/* Force-disable legacy skew from style_sneg/mobile on gallery */
.portfolio .photo,
.portfolio .photo a,
.ns-gallery .photo,
.ns-gallery .photo a,
.b-portfolio .photo,
.b-portfolio .photo a {
  -webkit-transform: none !important;
  -moz-transform: none !important;
  -ms-transform: none !important;
  -o-transform: none !important;
  transform: none !important;
}

.ns-holidays a.image-reason {
  display: block;
  text-decoration: none;
}

/* Prevent global img {width:100%;height:auto} from breaking square tiles */
.ns-gallery .photo img {
  height: 100% !important;
}

@media screen and (max-width: 860px) {
  .portfolio .photo,
  .portfolio .photo a,
  .ns-gallery .photo,
  .ns-gallery .photo a {
    -webkit-transform: none !important;
    transform: none !important;
    width: auto !important;
    margin: 0 !important;
  }
  .portfolio .photo a {
    height: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
  }
}

/* ========== CENTER ALL SECTION H2/.head ========== */
.framework > .head,
.framework .b-circs > .head,
.framework .b-comments .head,
.comments .head,
.celebrations > .head,
.portfolio .ns-gallery-title,
.portfolio .b-portfolio > .head,
.ns-section-title,
.b-rates .head,
.sertificat .head,
.head.center {
  text-align: center !important;
  float: none !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Gallery title lives outside grid now */
.portfolio .framework > .ns-gallery-title,
.portfolio .ns-gallery-title {
  color: #fff !important;
  text-align: center !important;
  margin: 0 0 24px !important;
  font-size: 34px;
  line-height: 1.2;
  position: relative;
  z-index: 2;
  width: 100% !important;
  float: none !important;
  grid-column: auto !important;
}
.portfolio .b-portfolio.ns-gallery,
.b-portfolio.ns-gallery {
  /* title no longer inside grid — only photos */
  display: grid !important;
}

/* ========== REVIEWS FULL WIDTH ========== */
.opinion .framework,
.opinion .b-comments,
.opinion .comments,
.rew_container {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  float: none !important;
}
.rew_container {
  margin: 8px 0 0;
}
.rew_block {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box;
  border-radius: 16px;
  padding: 36px 40px;
}
.comments .head {
  margin-bottom: 22px !important;
}

@media screen and (max-width: 960px) {
  .ns-includes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .ns-includes-title,
  .b-structure.ns-includes .head.head3 {
    font-size: 24px;
  }
  .rew_block {
    padding: 24px 20px !important;
  }
}

@media screen and (max-width: 560px) {
  .ns-includes-grid {
    grid-template-columns: 1fr;
  }
  .portfolio .ns-gallery-title {
    font-size: 26px;
  }
}

/* Gallery title sibling of grid: same width container */
.portfolio .framework {
  max-width: var(--ns-max);
  margin: 0 auto;
  padding: 28px 16px 40px;
  box-sizing: border-box;
  width: 100%;
}
.portfolio .b-portfolio.ns-gallery {
  padding: 0 !important;
  max-width: none !important;
}


/* ========== REASONS (Мощно / Драйвово / Комфортно) ========== */
.b-reason.ns-reasons,
.ns-reasons {
  margin: 36px 0 28px !important;
  text-align: center !important;
  float: none !important;
  width: 100% !important;
}
.ns-reasons-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
  max-width: var(--ns-max);
  margin: 0 auto;
  align-items: start;
}
.ns-reason {
  text-align: center !important;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
}
.ns-reason .image-reason,
.ns-reason .image-reason.power,
.ns-reason .image-reason.drive,
.ns-reason .image-reason.comfort {
  margin: 0 auto 16px !important;
  float: none !important;
  width: 100% !important;
  max-width: 280px;
  min-height: 200px;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
.ns-reason .head {
  text-align: center !important;
  margin: 0 0 12px !important;
  float: none !important;
  width: 100% !important;
}
.ns-reason p {
  text-align: center !important;
  margin: 0 auto !important;
  max-width: 320px;
  color: var(--ns-muted);
  font-size: 14px;
  line-height: 1.55;
}

/* ========== INCLUDES ("В цену проката входит") ========== */
.b-structure.ns-includes,
.ns-includes {
  float: none !important;
  width: 100% !important;
  max-width: 100%;
  margin: 36px 0 40px;
  clear: both;
}
.ns-includes-title,
.b-structure.ns-includes .head.head3 {
  float: none !important;
  width: 100% !important;
  text-align: center !important;
  margin: 0 0 28px !important;
  font-size: 28px;
  line-height: 1.25;
}
.ns-includes-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  float: none !important;
  width: 100% !important;
  max-width: var(--ns-max);
  margin: 0 auto;
}
.ns-includes .structure,
.ns-includes .component:before {
  display: none !important;
}
.ns-includes-card {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 22px 18px !important;
  position: relative;
  background: #fff !important;
  border-radius: 16px;
  box-sizing: border-box;
  min-height: 150px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  text-align: center;
  font-size: 15px;
  line-height: 1.35;
  color: var(--ns-text);
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(11, 50, 80, 0.08);
  border: 1px solid rgba(11, 95, 138, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.ns-includes-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(11, 50, 80, 0.12);
}
.ns-includes-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
}
.ns-includes-icon svg {
  width: 56px;
  height: 56px;
  display: block;
}
.ns-includes-text {
  color: var(--ns-text);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
}
a.ns-includes-card .ns-includes-text {
  color: var(--ns-blue);
  text-decoration: none;
}

/* ========== CONDITIONS (Условия проката) ========== */
.b-circs {
  margin: 36px 0 28px;
}
.b-circs > .head.center {
  margin-bottom: 24px;
  text-align: center !important;
}
.ns-circs-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: var(--ns-max);
  margin: 0 auto 12px;
}
.ns-circs-card {
  display: flex !important;
  align-items: flex-start;
  gap: 16px;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 22px 20px !important;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(11, 50, 80, 0.07);
  box-sizing: border-box;
  text-align: left !important;
  overflow: visible;
  position: relative;
}
.ns-circs-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef6fb;
  border-radius: 12px;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  margin: 0 !important;
}
.ns-circs-icon svg {
  display: block;
}
.ns-circs-body {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left !important;
}
.ns-circs-body .head4 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  text-align: left !important;
  font-size: 18px;
  line-height: 1.3;
  position: static !important;
}
.ns-circs-body .head4 a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ns-circs-body p {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ns-muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: left !important;
  text-align-last: left !important;
}
/* kill legacy absolute sprite icons */
.ns-circs-grid .info-circs:before,
.ns-circs-card .info-circs:before,
.circs .info-circs:before {
  content: none !important;
  display: none !important;
}
.b-circs > .fir-tree_right,
.b-circs > .fir-tree_left {
  display: none !important;
}

@media screen and (max-width: 960px) {
  .ns-reasons-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .ns-includes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ns-circs-grid {
    grid-template-columns: 1fr;
  }
}
@media screen and (max-width: 560px) {
  .ns-includes-grid {
    grid-template-columns: 1fr;
  }
  .ns-includes-card {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 16px !important;
  }
  .ns-includes-icon {
    width: 52px;
    height: 52px;
  }
}


/* ========== FIX: reviews + footer full width, hide snowmobile ========== */
.snowmobile {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  background: none !important;
}

/* Reviews: kill side margins from .framework { margin: 0 4% } */
.b-framework.opinion {
  max-width: var(--ns-max) !important;
  width: 100% !important;
  margin: 0 auto 36px !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
}
.b-framework.opinion .framework {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.b-framework.opinion .b-comments,
.b-framework.opinion .comments,
.b-framework.opinion .rew_container {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}
.b-framework.opinion .rew_block,
.rew_container .rew_block,
.rew_block {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

/* Footer image: full viewport width */
footer {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  position: relative !important;
  left: 0 !important;
  right: 0 !important;
  box-sizing: border-box !important;
}
footer .footer_snow {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  background-size: cover !important;
  background-position: center bottom !important;
  background-repeat: no-repeat !important;
}
