:root {
  --bg: #f3f0ea;
  --text: #1d1d1d;
  --muted: rgba(29, 29, 29, 0.6);

  --card-bg: #ffffff;
  --border: rgba(0, 0, 0, 0.08);

  --accent: #c2a15a;
  --accent-dark: #a78742;

  --radius-xl: 20px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Montserrat", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.3;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================= HERO ================= */
.hero {
  position: relative;
  height: 100vh;
  background: url("../images/hero.jpg") center/cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-top {
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  z-index: 5;
}

.hero-top-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo img {
  width: 104px;
  height: 89px;
  object-fit: contain;
  display: block;
}
.hero-mobile {
  display: none;
}
.hero-desktop {
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 0 70px 0;
}

.hero h1 {
  font-size: 44px;
  font-weight: 600;
  color: #f5f4ed;
  max-width: 900px;
  margin-top: 90px;
}

.hero p {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 400;
  color: #f5f4ed;
}

.hero-btn {
  margin-top: 24px;
  padding: 20px 40px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #e9e5da;
  color: #474645;
  font-size: 16px;
  font-weight: 600;
  transition: 0.2s ease;
}

.hero-btn:hover {
  background: #fff;
  transform: translateY(-1px);
}

.hero-bottom-buttons {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  z-index: 10;
  display: none;
}

.hero-bottom-inner {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.circle-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.circle-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.circle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-bottom-bar {
  display: none;
}

/* ================= SECTION COMMON ================= */
section {
  padding: 90px 0;
}

.section-label {
  display: inline-block;
  padding: 10px 20px;
  font-size: 12px;
  border: 1px solid #f5f4ed;
  border-radius: 100px;
  background: #f5f4ed;
  color: #9a988a;
  font-weight: 600;
  margin-bottom: 16px;
}

.section-label_dark {
  display: inline-block;
  padding: 10px 20px;
  font-size: 12px;
  border: 1px solid #9a988a;
  border-radius: 100px;
  background: #9a988a;
  color: #f5f4ed;
  font-weight: 600;
  margin-bottom: 16px;
}

.section-title {
  font-size: 48px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 12px;
  color: #474645;
}

.section-subtitle {
  font-size: 16px;
  color: #474645;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* ================= ADVANTAGES ================= */
.advantages {
  padding-top: 70px;
  background-color: #e9e5da;
}

.advantages-top {
  text-align: center;
  margin-bottom: 45px;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 35px;
}

.adv-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.adv-img {
  width: 100%;
  height: 235px;
  border-radius: 10px;
  overflow: hidden;
  background: #ddd;
}

.adv-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.adv-card h3 {
  margin-top: 16px;
  font-weight: 700;
  font-size: 24px;
  color: #474645;
}

.adv-card p {
  margin-top: 8px;
  font-weight: 400;
  font-size: 15px;
  color: #474645;
  line-height: 1.2;
}

/* ================= PORTFOLIO ================= */
.portfolio {
  background-color: #f5f4ed;
  padding-bottom: 90px;
}
.portfolio-top {
  text-align: center;
  margin-bottom: 35px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.portfolio-slider-wrap {
  width: 100%;
  margin-top: 35px;
  padding-left: 25px;
  padding-right: 25px;
}

.portfolio-swiper {
  width: 100%;
  padding: 10px 0;
  overflow: hidden;
}

.portfolio-swiper .swiper-slide {
  display: flex;
  justify-content: center;
}

.work-card {
  width: 450px;
  height: 450px;
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.8);
  transition: 0.3s ease;
}

.work-card:hover img {
  transform: scale(1.03);
  filter: brightness(0.72);
}

.work-info {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 20px;
  border-radius: 10px;
  backdrop-filter: blur(5px);
  background: rgba(154, 152, 138, 0.3);
  color: rgba(255, 255, 255, 0.92);
}

.work-info strong {
  font-weight: 700;
  font-size: 20px;
  color: #f5f4ed;
  display: block;
  margin-bottom: 4px;
}

.work-info span {
  font-weight: 500;
  font-size: 16px;
  color: #f5f4ed;
}

.portfolio-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 37px;
}

.arrow-btn {
  width: 50px;
  height: 50px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.arrow-btn img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
}

.arrow-btn:hover {
  transform: scale(1.05);
}

.arrow-btn:active {
  transform: scale(0.95);
}

.gallery-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.gallery-modal.active {
  display: block;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.gallery-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  margin: 5vh auto;
  padding: 20px;
  z-index: 2;
}

.gallery-close {
  position: absolute;
  top: -10px;
  right: -10px;
  color: #fff;
  z-index: 20;
  background: rgba(0, 0, 0, 0.4);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-swiper {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 80vh; /* адаптивная высота */
  max-height: 700px;
}

.gallery-swiper img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* НЕ обрезает, сохраняет пропорции */
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  z-index: 10;
  cursor: pointer;

  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-prev {
  left: -60px;
}

.gallery-next {
  right: -60px;
}
.gallery-prev::before,
.gallery-next::before {
  content: "";
  width: 10px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  display: block;
}

.gallery-prev::before {
  transform: rotate(135deg);
}

.gallery-next::before {
  transform: rotate(-45deg);
}

/* ================= QUIZ ================= */
.quiz {
  padding-top: 90px;
  background-color: #e9e5da;
}

.quiz-box {
  margin-top: 35px;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 24px;
  min-height: 360px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.quiz-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.5);
  font-size: 14px;
  border-radius: 18px;
  min-height: 320px;
}

/* ================= FOOTER ================= */
footer {
  background: #9a988a;
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  display: flex;
  align-items: center;
}

.footer-logo {
  height: 68px;
  width: auto;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
}

.footer-phone {
  font-size: 14px;
  font-weight: 400;
  color: #fff;
}

.footer-links {
  font-weight: 400;
  font-size: 14px;
  text-decoration: underline;
}

.footer-links a {
  color: #fff;
  transition: 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-copy {
  font-size: 14px;
  color: #fff;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
  .hero h1 {
    font-size: 34px;
  }

  .advantages-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .work-card {
    min-height: 320px;
  }

  section {
    padding: 70px 0;
  }

  .section-title {
    font-size: 30px;
  }

  .hero-inner {
    min-height: 680px;
  }
}

@media (max-width: 768px) {
  .hero {
    background: url("../images/hero.jpg") center/cover no-repeat;
    background-position: 80% center;
  }
  .hero-desktop {
    display: none;
  }

  .hero-mobile {
    display: block;
  }

  .hero h1 {
    font-size: 20px !important;
    margin-top: 40px;
  }

  .hero p {
    font-size: 12px !important;
  }

.hero-bottom-bar {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: fixed; 
  bottom: 0;
  left: 0;
  background: #9a988a;
  z-index: 9999; 
}

  .hero-bottom-row {
    display: flex;
    width: 100%;
  }

  .hero-social-item {
    flex: 1;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-right: 1px solid rgba(255, 255, 255, 0.2);
  }

  .hero-social-item:last-child {
    border-right: none;
  }

  .hero-social-item img {
    width: 32px;
    height: 32px;
    display: block;
  }

  .hero-bottom-text {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    color: #f5f4ed;
    text-align: center;

    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .footer-right {
    align-items: center;
    text-align: center;
  }

  .footer-logo {
    height: 68px;
  }

  .portfolio-swiper {
    overflow: hidden;
  }

  .portfolio-swiper .swiper-slide {
    width: 100% !important;
    display: flex;
    justify-content: center;
  }

  .work-card {
    width: 100%;
    max-width: 420px;
    height: 420px;
  }
  .portfolio-slider-wrap {
    padding-left: 15px;
    padding-right: 15px;
  }

  .gallery-content {
    width: 95%;
    margin: 10% auto;
  }

  .gallery-prev {
    left: 10px;
  }

  .gallery-next {
    right: 10px;
  }
}

@media (max-width: 767px) {
  .matomba_iframe iframe {
    min-height: 700px !important;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 650px;
  }

  .hero-inner {
    min-height: 650px;
    padding: 55px 0;
  }

  .logo strong {
    font-size: 38px;
  }

  .hero-phone {
    display: none;
  }

  .hero-btn {
    padding: 15px 30px;
    font-size: 12px;
  }
  .hero-bottom-buttons {
    display: block;
  }

  .circle-btn {
    width: 44px;
    height: 44px;
  }

  .section-title {
    font-size: 26px;
  }

  .quiz-box {
    padding: 16px;
  }
  .work-card {
    min-height: 320px;
  }
}
  .designer-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
  }

  .designer-modal.active {
    opacity: 1;
    visibility: visible;
  }

  .designer-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
  }

  .designer-modal__content {
    position: relative;
    width: 100%;
    max-width: 520px;
    padding: 48px 40px;
    background-color: #f5f4ed;
    border-radius: 24px;
    z-index: 2;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .designer-modal__body {
    width: 100%;
  }

  .designer-modal__close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #9a988a;
  }

  .designer-modal__title {
    margin: 0 0 32px;
    font-size: 32px;
    line-height: 1.2;
    color: #222;
  }

  .designer-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .designer-form__input {
    width: 100%;
    height: 58px;
    padding: 0 20px;
    border-radius: 16px;
    border: 1px solid #d8d5c7;
    background: #fff;
    font-size: 16px;
    outline: none;
    transition: 0.2s ease;
  }

  .designer-form__input:focus {
    border-color: #9a988a;
  }

  .designer-form__button {
    height: 58px;
    margin-top: 10px;
    border: 1px solid #9a988a;
    border-radius: 100px;
    background: #9a988a;
    color: #f5f4ed;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: 0.25s ease;
  }

  .designer-form__button:hover {
    opacity: 0.9;
  }

  /* success */
  .designer-modal__success {
    display: none;
    width: 100%;
    min-height: 220px;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
  }

  .designer-modal__success-text {
    font-size: 30px;
    line-height: 1.4;
    color: #222;
  }

  @media (max-width: 600px) {
    .designer-modal__content {
      margin: 20px;
      padding: 40px 24px;
    }

    .designer-modal__title {
      font-size: 24px;
    }

    .designer-modal__success-text {
      font-size: 22px;
    }
  }
