/* modern.css — Phase 3 Design Modernization
   Подключается ПОСЛЕ style.css и responsive.css для переопределения стилей */

/* ===== Progressive Loading: content-visibility ===== */
#our-offers,
#our-works,
#our-offers-examples,
#services,
#our-works-styles,
#testimonial,
#fun-facts {
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

/* ===== Portfolio Collapse (gradient fade + show more) ===== */
.portfolio-collapse-wrapper {
  position: relative;
  overflow: hidden;
  transition: max-height 0.6s ease;
}

/* Градиент — fade в цвет фона секции */
.portfolio-fade-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(248,249,250,0), var(--color-light));
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.4s ease;
}

/* Кнопка плавает ПОВЕРХ градиента */
.portfolio-collapse-wrapper .btn-show-more {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  white-space: nowrap;
}

/* Expanded — градиент исчезает, кнопка прячется */
.portfolio-collapse-wrapper.expanded .portfolio-fade-overlay {
  opacity: 0;
}
.portfolio-collapse-wrapper.expanded .btn-show-more {
  display: none;
}

.btn-show-more {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: rgba(153, 0, 0, 0.85);
  border: 1.5px solid rgba(153, 0, 0, 0.3);
  padding: 12px 36px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.portfolio-collapse-wrapper .btn-show-more:hover {
  background: rgba(255, 255, 255, 0.9);
  color: rgba(153, 0, 0, 1);
  border-color: rgba(153, 0, 0, 0.5);
  transform: translateX(-50%);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}
.btn-show-more .arrow-down {
  display: inline-block;
  margin-left: 8px;
  transition: transform var(--transition);
}
.btn-show-more:hover .arrow-down {
  transform: none;
}

:root {
  --color-primary: #990000;
  --color-primary-light: #b30000;
  --color-accent: #c0392b;
  --color-dark: #1c1c1c;
  --color-dark-2: #2d2d2d;
  --color-light: #f8f9fa;
  --color-text: #333333;
  --color-text-secondary: #6c757d;
  --color-success: #27ae60;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Bitter', serif;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --transition: 0.3s ease;
}

/* ===== BS3→BS5 Совместимость ===== */

/* Навбар: совместимость с st-navbar из style.css */
.st-navbar .navbar-brand {
  margin-top: 4px;
  margin-bottom: 4px;
  padding: 0;
}
.st-navbar .navbar-toggler {
  margin-top: 7px;
  margin-right: 25px;
  border: none;
  padding: 4px 10px;
}
.st-navbar .navbar-toggler:focus {
  box-shadow: none;
}
.st-navbar .navbar-toggler-icon {
  background-image: none;
  width: 22px;
  height: 2px;
  background-color: #000;
  display: block;
  position: relative;
  transition: background-color 0.3s ease;
}
.st-navbar .navbar-toggler-icon::before,
.st-navbar .navbar-toggler-icon::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background-color: #000;
  left: 0;
  transition: transform 0.3s ease, top 0.3s ease;
}
.st-navbar .navbar-toggler-icon::before { top: -7px; }
.st-navbar .navbar-toggler-icon::after { top: 7px; }
/* Крестик при открытом меню */
.st-navbar .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
  background-color: transparent;
}
.st-navbar .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
  top: 0;
  transform: rotate(45deg);
}
.st-navbar .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.st-navbar .navbar-nav .nav-link {
  text-transform: uppercase;
  font-weight: 600;
  color: #000;
  padding: 8px 15px;
  position: relative;
  transition: color 0.3s ease;
}
.st-navbar .navbar-nav .nav-link:hover,
.st-navbar .navbar-nav .nav-link:focus {
  background-color: transparent;
  color: var(--color-primary);
  text-shadow: 0 0 12px rgba(153, 0, 0, 0.35), 0 0 24px rgba(153, 0, 0, 0.12);
}
/* Desktop: активный пункт — подчёркивание + цвет + glow */
@media (min-width: 992px) {
  .st-navbar .navbar-nav .nav-link.active {
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(153, 0, 0, 0.3), 0 0 20px rgba(153, 0, 0, 0.1);
  }
  .st-navbar .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
  }
  .st-navbar .navbar-nav .nav-link:hover::after,
  .st-navbar .navbar-nav .nav-link.active::after {
    transform: scaleX(1);
  }
}

/* Шапка — frosted glass на всех экранах */
.st-navbar {
  background: rgba(255, 255, 255, 0.50) !important;
  backdrop-filter: blur(20px) saturate(1.4) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
}
.st-navbar .navbar-brand img {
  border-radius: 0;
  box-shadow: none;
}

/* Бургер-меню — glassmorphism на мобильных */
@media (max-width: 991px) {
  .st-navbar .navbar-collapse {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0 0 16px 16px;
    margin: 0 -12px;
    padding: 10px 20px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: none;
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      inset 0 -1px 0 rgba(255, 255, 255, 0.1);
  }
  .st-navbar .navbar-nav {
    text-align: right;
  }
  .st-navbar .navbar-nav .nav-link {
    color: var(--color-primary);
    padding: 12px 18px;
    border-radius: 8px;
    margin: 2px 0;
    transition: var(--transition);
    text-align: right;
    transform: translateX(0);
    font-weight: 600;
  }
  .st-navbar .navbar-nav .nav-link:hover,
  .st-navbar .navbar-nav .nav-link:focus {
    background: rgba(153, 0, 0, 0.12);
    color: var(--color-primary-light);
    transform: translateX(-5px);
  }
  .st-navbar .navbar-nav .nav-link.active {
    background: rgba(153, 0, 0, 0.15);
    color: var(--color-primary);
  }
}

/* Карусель: дублирование стилей .item → .carousel-item */
#home-carousel .carousel-item {
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  width: 100%;
  height: 600px;
}
#home-carousel .carousel-item:before {
  background-color: #000;
  content: "";
  height: 100%;
  top: 0;
  left: 0;
  opacity: .45;
  position: absolute;
  width: 100%;
}
#home-carousel .carousel-item h1,
#home-carousel .carousel-item h2,
#home-carousel .carousel-item p {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.5s ease-in-out 0.15s;
}
#home-carousel .carousel-item h2 {
  transition-delay: 0.30s;
}
#home-carousel .carousel-item p {
  transition-delay: 0.45s;
}
#home-carousel .carousel-item.active h1,
#home-carousel .carousel-item.active h2,
#home-carousel .carousel-item.active p {
  opacity: 1;
  transform: scale(1);
}

#office-carousel .carousel-item img {
  width: 100%;
  height: auto;
  margin-top: 10px;
}

/* Responsive carousel-item heights (duplicating responsive.css .item rules) */
@media (min-width: 992px) and (max-width: 1199px) {
  #home-carousel .carousel-item { height: 500px; }
}
@media (min-width: 768px) and (max-width: 991px) {
  #home-carousel .carousel-item { height: 500px; }
}
@media (max-width: 767px) {
  #home-carousel .carousel-item { height: 300px; }

  /* Кнопка карусели — меньше на мобильных */
  #home-carousel .btn.btn-readmore-cost {
    font-size: 14px !important;
    padding: 8px 18px !important;
  }

  /* Уменьшить отступ между каруселью и секцией */
  #slider {
    margin-bottom: 0;
    padding-bottom: 0;
  }
  #our-offers {
    padding-top: 30px;
  }

  /* Portfolio collapse — мобильные корректировки */
  .portfolio-fade-overlay {
    height: 100px;
  }
  .portfolio-collapse-wrapper .btn-show-more {
    padding: 10px 24px;
    font-size: 0.9rem;
    bottom: 12px;
  }
}

/* ===== 3.4 Типографика ===== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px; /* offset для fixed navbar */
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.75rem); }

/* Кнопки */
.btn {
  border-radius: var(--radius);
  transition: var(--transition);
}
.btn:hover {
  transform: translateY(-2px);
}

/* Формы: touch-friendly */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="submit"],
textarea,
select {
  min-height: 44px;
  font-size: 16px; /* предотвращает зум на iOS */
}

/* ===== 3.5 Мобильные фиксы ===== */

/* Стрелки карусели — всегда видимы на тач */
@media (max-width: 991px) {
  .home-carousel-left,
  .home-carousel-right,
  .office-carousel-left,
  .office-carousel-right {
    opacity: 1 !important;
    visibility: visible !important;
    background: rgba(0,0,0,0.3);
    padding: 8px 12px;
    border-radius: 4px;
    color: #fff;
  }
  .home-carousel-left:hover,
  .home-carousel-right:hover,
  .office-carousel-left:hover,
  .office-carousel-right:hover {
    background: rgba(0,0,0,0.5);
  }
}

/* .shop — убираем aquamarine и nowrap */
.shop {
  background-color: var(--color-light) !important;
  white-space: normal !important;
}

/* Фильтры портфолио — wrap на мобильных */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
  justify-content: center;
}
.filter li {
  margin: 0;
}

/* Портфолио картинки — адаптивные */
.portfolio-content img {
  width: 100%;
  height: auto;
}

/* Иконки футера — touch-friendly */
.footer-social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

/* Scroll-to-top — показать на мобильных */
@media (max-width: 991px) {
  .scroll-up {
    display: block !important;
  }
  .scroll-up a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
  }
}

/* Карусель — caption поверх slides (BS5 fix: carousel-inner перекрывает caption) */
#home-carousel .carousel-caption {
  z-index: 10;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 30px; /* смещение вниз чтобы компенсировать fixed navbar */
  bottom: auto;
}
#home-carousel .carousel-inner {
  z-index: 1;
}

/* Карусель текст — адаптивные размеры + межстрочное */
.carousel-caption h1,
.carousel-caption h2,
.carousel-caption p {
  line-height: 1.5;
}
.carousel-caption h1 {
  font-size: clamp(1rem, 4vw, 2.5rem);
}
.carousel-caption h2 {
  font-size: clamp(0.9rem, 3vw, 3.25rem);
}

/* Прайсинг на мобильных */
@media (max-width: 767px) {
  .st-pricing {
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
  }
}

/* Контакт-секция на мобильных */
@media (max-width: 767px) {
  .opros {
    width: 100%;
    margin-bottom: 20px;
  }
  .contact-info {
    width: 100%;
  }
}

/* ===== 3.6-3.8 Замена плагинов ===== */

/* Splide testimonials — стили */
.st-testimonials.splide {
  padding: 0;
}
.st-testimonials .splide__pagination {
  bottom: -1.5em;
}
.st-testimonials .splide__pagination__page {
  background: rgba(255,255,255,0.5);
}
.st-testimonials .splide__pagination__page.is-active {
  background: #fff;
}

/* CSS Grid для портфолио — замена Isotope/Masonry */
.portfolio-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}
.portfolio-items .work-grid {
  width: auto;
  padding: 0;
}
/* Плавная анимация фильтрации */
.work-grid {
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.work-grid.filter-hidden {
  opacity: 0;
  transform: scale(0.85);
  position: absolute !important;
  visibility: hidden;
  pointer-events: none;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

/* FitVids замена — CSS aspect-ratio */
.post-video iframe,
.post-video video,
.our-office iframe {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

/* Параллакс testimonial — CSS-only */
#testimonial {
  background-attachment: fixed;
  background-size: cover;
}
@media (max-width: 991px) {
  /* Fixed bg не работает на мобильных iOS */
  #testimonial {
    background-attachment: scroll;
  }
}

/* ===== 3.9-3.10 Визуальная модернизация ===== */

/* Секции — единый ритм */
#our-offers,
#our-offers-rent,
#our-rent,
#about-us-rent,
#our-works,
#services,
#contact {
  padding: 80px 0;
}

/* #our-offers — меньший нижний отступ (кнопка "Акция" уже даёт промежуток) */
#our-offers { padding-bottom: 30px; }

/* Чередование фонов секций */
#our-offers,
#our-rent,
#our-works {
  background-color: var(--color-light);
}

/* Заголовки секций — декоративная линия вместо .st-border */
.section-title h2,
.section-title-about-us h2 {
  position: relative;
  padding-bottom: 20px;
  margin-bottom: 30px;
  color: var(--color-primary);
}
.section-title h2::after,
.section-title-about-us h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  border-radius: 2px;
}
/* Скрываем старый .st-border рядом с заголовками */
.section-title .st-border,
.section-title-about-us .st-border {
  display: none;
}

/* Карточки портфолио — современный стиль */
.portfolio-content {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  background: #fff;
}
.portfolio-content:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Карточки услуг — grid-layout для родителя */
#services .col-md-12:has(.st-service) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-left: 0;
  padding-right: 0;
}
#services .col-md-12:has(.st-service) .st-service {
  width: 100% !important;
  float: none !important;
}
@media (max-width: 991px) {
  #services .col-md-12:has(.st-service) {
    grid-template-columns: repeat(2, 1fr);
  }
  #services .col-md-12:has(.st-service) .st-service:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
@media (max-width: 575px) {
  #services .col-md-12:has(.st-service) {
    grid-template-columns: 1fr;
  }
}
.st-service {
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  margin-bottom: 20px;
  border-top: 3px solid var(--color-primary);
}
.st-service:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* Скрываемый длинный текст */
.text-collapsible {
  max-height: 400px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.5s ease;
}
.text-collapsible::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.text-collapsible.expanded {
  max-height: 3000px;
}
.text-collapsible.expanded::after {
  opacity: 0;
}
.btn-expand {
  display: block;
  margin: 12px auto 0;
  padding: 8px 24px;
  background: rgba(153, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-expand:hover {
  background: rgba(153, 0, 0, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
}
.st-service h2, .st-service h3 {
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-bottom: 15px;
}
.st-service i {
  color: var(--color-primary);
  margin-right: 8px;
}

/* Кнопки — glassmorphism «жидкое стекло» */
.btn-send,
.btn-readmore,
.btn-readmore-cost {
  background: rgba(153, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 24px;
  border-radius: var(--radius);
  transition: var(--transition);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
.btn-send:hover,
.btn-readmore:hover,
.btn-readmore-cost:hover {
  background: rgba(153, 0, 0, 0.75);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}
.btn-style-order {
  background: rgba(153, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 12px 28px;
  border-radius: var(--radius);
  transition: var(--transition);
  display: inline-block;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
.btn-style-order:hover {
  background: rgba(153, 0, 0, 0.75);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Каталог проектов — overlay glassmorphism */
#stile_foto .portfolio-content {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

#stile_foto .portfolio-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(100, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  padding: 20px;
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#stile_foto .portfolio-content:hover .portfolio-overlay {
  opacity: 1;
  transform: scale(1);
}

#stile_foto .portfolio-overlay .price-label {
  font-size: 20px;
  font-weight: 700;
  margin: 10px 0 4px;
  display: block;
  font-family: sans-serif;
  text-transform: uppercase;
}

#stile_foto .portfolio-overlay p {
  font-size: 12px;
  margin: 0 0 14px;
  opacity: 0.8;
}

#stile_foto .portfolio-overlay > a.iframe-popup {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-size: 18px;
  color: #fff;
  transition: var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin: 0 4px;
}

#stile_foto .portfolio-overlay > a.iframe-popup:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
  color: #fff;
}

#stile_foto .portfolio-overlay > a.iframe-popup i {
  border: none !important;
}

@media (max-width: 991px) {
  #stile_foto .portfolio-content {
    display: flex;
    flex-direction: column;
  }
  #stile_foto .portfolio-overlay {
    position: static;
    opacity: 1;
    height: auto;
    background: rgba(100, 0, 0, 0.75);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 10px 16px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 0 0 var(--radius) var(--radius);
    gap: 4px 12px;
  }
  #stile_foto .portfolio-overlay > a.iframe-popup {
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin: 0 3px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  #stile_foto .portfolio-overlay .price-label {
    font-size: 16px;
    margin: 0;
  }
  #stile_foto .portfolio-overlay p {
    font-size: 11px;
    margin: 0;
    opacity: 0.8;
  }
}

/* Стили домостроения — overlay glassmorphism */
#stile_foto-styles .portfolio-content {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

#stile_foto-styles .portfolio-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(100, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  padding: 20px;
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#stile_foto-styles .portfolio-content:hover .portfolio-overlay {
  opacity: 1;
  transform: scale(1);
}

#stile_foto-styles .portfolio-overlay h5 {
  font-size: 16px;
  font-weight: 700;
  margin: 10px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#stile_foto-styles .portfolio-overlay p {
  font-size: 13px;
  margin: 0 0 14px;
  opacity: 0.9;
  line-height: 1.4;
}

#stile_foto-styles .portfolio-overlay > a:first-child {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-size: 18px;
  color: #fff;
  transition: var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#stile_foto-styles .portfolio-overlay > a:first-child:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
  color: #fff;
}

#stile_foto-styles .btn-style-order {
  padding: 8px 20px;
  font-size: 13px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Мобильные и планшеты — инфо под картинкой (тач-устройства) */
@media (max-width: 991px) {
  #stile_foto-styles .portfolio-content {
    display: flex;
    flex-direction: column;
  }
  #stile_foto-styles .portfolio-overlay {
    position: static;
    opacity: 1;
    height: auto;
    background: rgba(100, 0, 0, 0.75);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 14px 16px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  #stile_foto-styles .portfolio-overlay > a:first-child {
    width: 32px;
    height: 32px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    position: absolute;
    top: -44px;
    right: 8px;
  }
  #stile_foto-styles .portfolio-overlay h5 {
    font-size: 14px;
    margin: 0;
    flex: 1 1 100%;
  }
  #stile_foto-styles .portfolio-overlay p {
    font-size: 12px;
    margin: 4px 0 8px;
    flex: 1 1 100%;
    opacity: 0.85;
  }
  #stile_foto-styles .btn-style-order {
    padding: 6px 16px;
    font-size: 12px;
  }
}

/* Фильтр кнопки — glassmorphism */
.filter a {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  color: var(--color-text);
  border: 1px solid #ddd;
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
}
.filter a:hover,
.filter a.active,
.portfolio-wrapper ul.filter li a:hover,
.portfolio-wrapper ul.filter li a.active {
  background: rgba(153, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

/* Футер — тёмный стиль */
#footer {
  background-color: var(--color-dark) !important;
  color: rgba(255,255,255,0.7);
  padding: 30px 0;
}
#footer .copyright p {
  color: rgba(255,255,255,0.5);
  margin: 0;
}
#footer .footer-social-icons a {
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
}
#footer .footer-social-icons a:hover {
  color: var(--color-primary-light);
}
#footer .footer-social-icons span {
  color: rgba(255,255,255,0.5);
}

/* Testimonial — overlay */
#testimonial .overlay {
  background: rgba(153, 0, 0, 0.85);
}
#testimonial p {
  color: rgba(255,255,255,0.95);
  font-style: italic;
  line-height: 1.8;
}
#testimonial .client-info h5 {
  color: #fff;
}
#testimonial .client-info span {
  color: rgba(255,255,255,0.7);
}

/* Counter секция (#fun-facts) — тёмный стиль */
#fun-facts {
  background-color: var(--color-dark);
  color: #fff;
  padding: 60px 0;
}
#fun-facts .fun-fact h3 {
  color: #fff;
}
#fun-facts .fun-fact .st-counter {
  color: var(--color-success);
  font-weight: 700;
}
#fun-facts .fun-fact i {
  color: var(--color-primary-light);
}
#fun-facts .fun-fact p {
  color: rgba(255,255,255,0.7);
}

/* Контакт-секция — стиль формы */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 10px 15px;
  width: 100%;
  margin-bottom: 15px;
  transition: border-color var(--transition);
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(153, 0, 0, 0.1);
}

/* Ссылки — убираем scale(1.1) при hover */
a:hover {
  transform: none;
}

/* About-us текст */
.about-us {
  line-height: 1.8;
}
.about-us p {
  margin-bottom: 15px;
}

/* Offers описание */
.offers {
  line-height: 1.8;
  margin-bottom: 20px;
}

/* Scroll-up кнопка — glassmorphism */
.scroll-up a {
  background: rgba(153, 0, 0, 0.4) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  line-height: 46px;
  font-size: 22px;
  transition: var(--transition);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15);
}
.scroll-up a:hover,
.scroll-up a:active {
  background: rgba(153, 0, 0, 0.55) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-3px) scale(1.1);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* Кнопка «Проекты по акции» — glassmorphism + пульсация */
.shop {
  background: transparent !important;
  padding: 10px 0 0 !important;
  margin: 10px 0 0 !important;
  text-align: center !important;
  display: flex !important;
  justify-content: center !important;
}
.btn-readmore-shop {
  display: inline-block !important;
  padding: 16px 40px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  color: #fff !important;
  background: rgba(153, 0, 0, 0.65) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  box-shadow:
    0 4px 20px rgba(153, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  animation: pulseGlow 3.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.btn-readmore-shop:hover {
  background: rgba(153, 0, 0, 0.85) !important;
  color: #fff !important;
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 8px 30px rgba(153, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2);
  animation: none;
}
@keyframes pulseGlow {
  0% {
    box-shadow:
      0 4px 20px rgba(153, 0, 0, 0.2),
      0 0 0 rgba(153, 0, 0, 0),
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  }
  25% {
    box-shadow:
      0 4px 25px rgba(153, 0, 0, 0.35),
      0 0 10px rgba(153, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.22),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow:
      0 4px 35px rgba(153, 0, 0, 0.5),
      0 0 25px rgba(153, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.25),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  }
  75% {
    box-shadow:
      0 4px 25px rgba(153, 0, 0, 0.35),
      0 0 10px rgba(153, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.22),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  }
  100% {
    box-shadow:
      0 4px 20px rgba(153, 0, 0, 0.2),
      0 0 0 rgba(153, 0, 0, 0),
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  }
}

/* Секция «Что входит в проект» — заголовок + карточки PDF-образцов */
.examples-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.4;
}

#stile_foto-examples .examples-row .portfolio-content {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
#stile_foto-examples .examples-row .portfolio-content img {
  width: 100%;
  height: auto;
  display: block;
}
#stile_foto-examples .examples-row .portfolio-overlay {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(100, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.35s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
#stile_foto-examples .examples-row .portfolio-content:hover .portfolio-overlay {
  opacity: 1;
}
#stile_foto-examples .examples-row .portfolio-overlay h5 {
  font-size: 18px;
  font-weight: 700;
  margin: 10px 0 4px;
}
#stile_foto-examples .examples-row .portfolio-overlay p {
  font-size: 13px;
  margin: 0;
  opacity: 0.85;
}
#stile_foto-examples .examples-row .portfolio-overlay a.iframe-popup {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-size: 18px;
  color: #fff;
  transition: var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#stile_foto-examples .examples-row .portfolio-overlay a.iframe-popup:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

/* Мобильные — инфо под картинкой */
@media (max-width: 991px) {
  #stile_foto-examples .examples-row .portfolio-content {
    display: flex;
    flex-direction: column;
  }
  #stile_foto-examples .examples-row .portfolio-overlay {
    position: static;
    opacity: 1;
    height: auto;
    background: rgba(100, 0, 0, 0.75);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 12px 16px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 12px;
    border-radius: 0 0 var(--radius) var(--radius);
  }
  #stile_foto-examples .examples-row .portfolio-overlay h5 {
    font-size: 15px;
    margin: 0;
  }
  #stile_foto-examples .examples-row .portfolio-overlay p {
    font-size: 12px;
    margin: 0;
  }
  #stile_foto-examples .examples-row .portfolio-overlay a.iframe-popup {
    width: 32px;
    height: 32px;
    font-size: 14px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* ===== Scroll-up button — скрыт (заменён Telegram виджетом) ===== */
.scroll-up {
  display: none !important;
}

/* ===== Telegram Widget Button ===== */
#tg-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, rgba(140, 210, 255, 0.62), rgba(0, 90, 160, 0.55));
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 30px rgba(0, 100, 180, 0.55),
    0 3px 8px rgba(0, 0, 0, 0.25),
    inset 0 4px 8px rgba(255, 255, 255, 0.42),
    inset 0 -6px 12px rgba(0, 0, 0, 0.38),
    inset 2px 0 5px rgba(255, 255, 255, 0.16),
    inset -2px 0 5px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.8s ease;
}
#tg-widget:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow:
    0 16px 40px rgba(0, 100, 180, 0.65),
    0 5px 12px rgba(0, 0, 0, 0.28),
    inset 0 4px 8px rgba(255, 255, 255, 0.50),
    inset 0 -6px 12px rgba(0, 0, 0, 0.42),
    inset 2px 0 5px rgba(255, 255, 255, 0.18),
    inset -2px 0 5px rgba(0, 0, 0, 0.18);
}
#tg-tooltip {
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 9998;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #333;
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  border-left: 3px solid rgba(0, 136, 204, 0.7);
  font-size: 14px;
  max-width: 220px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
