/* Custom styles for ZE-Studio */

/* --- SCROLL TO TOP BUTTON --- */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #23a592;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
  z-index: 999;
  transform: translateY(10px);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: #1a8a7a;
  transform: translateY(-2px);
}

@media (max-width: 576px) {
  .scroll-top-btn {
    width: 36px;
    height: 36px;
    bottom: 16px;
    right: 16px;
    font-size: 16px;
  }
}

/* --- GLOBAL: Prevent horizontal scroll on mobile --- */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

/* Tables scroll horizontally inside their container */
.table-responsive,
.specs-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  min-width: auto;
}

/* On mobile, make specs tables scrollable */
@media (max-width: 576px) {
  .specs-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}


/* --- FAQ ACCORDION --- */
.faq-grid {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid #eee;
}

.faq-item:first-child {
  border-top: 1px solid #eee;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  cursor: pointer;
  user-select: none;
  gap: 20px;
}

.faq-question h5 {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.4;
}

.faq-question .faq-toggle {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 300;
  color: #bbb;
  transition: transform 0.3s, color 0.3s;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
  color: #23a592;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  font-size: 15px;
  color: #8a8a8a;
  line-height: 1.7;
  margin: 0;
  padding-bottom: 24px;
  max-width: 640px;
}


/* --- MATERIAL ROW STYLES --- */
.mat-type-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #bbb;
  margin-bottom: 14px;
}

.mat-stat-inline {
  font-size: 40px;
  font-weight: 700;
  color: #23a592;
  line-height: 1;
  letter-spacing: -1px;
  margin-top: 0;
}

.mat-stat-inline span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
  letter-spacing: 1px;
}

.mat-detail-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #23a592;
  text-decoration: none;
  margin-top: 16px;
  padding: 8px 20px;
  border: 1.5px solid #23a592;
  border-radius: 6px;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
}

.mat-detail-link:hover {
  background: #23a592;
  color: #fff;
  text-decoration: none;
}

.mat-detail-soon {
  border-color: #ddd;
  color: #bbb;
  cursor: default;
}

.mat-detail-soon:hover {
  background: transparent;
  color: #bbb;
}

.mat-detail-soon:hover {
  color: #bbb;
}

/* --- HERO TEXT STYLING --- */
.hero-brand-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #23a592;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 16px;
  max-width: 500px;
  line-height: 1.6;
  font-weight: 400;
}

/* Desktop CTA — скрыт на мобилке */
.hero-cta-desktop {
  display: none;
}

@media only screen and (min-width: 768px) {
  .hero-cta-desktop {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 28px 0;
    background: #ffffff;
    position: relative;
    z-index: 5;
  }

  .hero-desktop-btn {
    display: inline-block;
    padding: 14px 80px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none !important;
    transition: all 0.3s;
  }

  .hero-desktop-btn.filled {
    background: #23a592;
    color: #fff !important;
    border: 2px solid #23a592;
  }

  .hero-desktop-btn.filled:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
  }

  .hero-desktop-btn.filled:active {
    background: #1a1a1a;
    border-color: #1a1a1a;
  }

  .hero-desktop-btn.outline {
    background: transparent;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a;
  }

  .hero-desktop-btn.outline:hover {
    background: #1a1a1a;
    color: #fff !important;
  }

  /* Скрыть мобильные кнопки на десктопе */
  .hero-cta-below-video {
    display: none !important;
  }
}

.hero-btn-primary {
  display: inline-block;
  padding: 14px 40px;
  background: #1a1a1a;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid #1a1a1a;
  border-radius: 8px;
  transition: background 0.3s;
}

.hero-btn-primary:hover {
  background: #1d8a7a;
  color: #fff !important;
  text-decoration: none !important;
}

.hero-btn-secondary {
  display: inline-block;
  padding: 14px 40px;
  background: transparent;
  color: #1a1a1a !important;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 2px solid #1a1a1a;
  border-radius: 0;
  transition: all 0.3s;
}

.hero-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  color: #fff !important;
  text-decoration: none !important;
}

@media (max-width: 768px) {
  .hero-brand-label {
    font-size: 11px;
    margin-bottom: 14px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
  }

  .hero-btn-primary,
  .hero-btn-secondary {
    font-size: 15px;
    padding: 12px 28px;
  }
}

/* Make VK icon lighter (outline style) */
ion-icon[name="logo-vk"] {
  -webkit-text-stroke: 1px currentColor;
  -webkit-text-fill-color: transparent;
  font-weight: normal;
}

/* For better visibility in footer */
.footer ion-icon[name="logo-vk"] {
  -webkit-text-stroke: 1.5px currentColor;
}

/* Progress bars animation */
.progress-bar {
  width: 0%;
  -webkit-transition: width 2s ease-in-out;
  -moz-transition: width 2s ease-in-out;
  -o-transition: width 2s ease-in-out;
  transition: width 2s ease-in-out;
}

.progress-bar.animated {
  /* Width will be set by JavaScript */
}

/* Ensure progress bars are visible */
.progress {
  background-color: #e9ecef;
  height: 0.5rem;
}

.progress-bar {
  background-color: #23a592;
}

/* Transparent button with green outline */
.btn-outline {
  background-color: transparent !important;
  border: 2px solid #23a592 !important;
  color: #23a592 !important;
}

.btn-outline:hover {
  background-color: #23a592 !important;
  color: #fff !important;
}

/* Filled teal button (white text, teal background) */
.btn-filled-teal {
  background-color: #23a592 !important;
  border: 2px solid #23a592 !important;
  color: #fff !important;
}

.btn-filled-teal:hover {
  background-color: #1d8a7a !important;
  border-color: #1d8a7a !important;
  color: #fff !important;
}

/* Bootstrap outline primary button override */
.btn-outline-primary {
  background-color: transparent !important;
  border: 2px solid #23a592 !important;
  color: #23a592 !important;
}

.btn-outline-primary:hover {
  background-color: #23a592 !important;
  color: #fff !important;
  border-color: #23a592 !important;
}

/* Quick contact buttons container */
.quick-contact-buttons {
  display: flex;
  gap: 25px;
  align-items: center;
}



/* Individual button animations with delay */
.quick-contact-buttons .btn-icon-circle:first-child {
  animation-delay: 0s;
}

.quick-contact-buttons .btn-icon-circle:last-child {
  animation-delay: 1.5s;
}

/* Phone button icon - constant ringing animation */
.quick-contact-buttons .btn-icon-circle:first-child ion-icon {
  -webkit-animation: phone-ring-constant 2s ease-in-out infinite;
  -moz-animation: phone-ring-constant 2s ease-in-out infinite;
  animation: phone-ring-constant 2s ease-in-out infinite;
  -webkit-animation-delay: 0.5s;
  -moz-animation-delay: 0.5s;
  animation-delay: 0.5s;
}

@-webkit-keyframes phone-ring-constant {
  0%, 10%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
  2%, 6% { -webkit-transform: rotate(-12deg); transform: rotate(-12deg); }
  4%, 8% { -webkit-transform: rotate(12deg); transform: rotate(12deg); }
}

@-moz-keyframes phone-ring-constant {
  0%, 10%, 100% { -moz-transform: rotate(0deg); transform: rotate(0deg); }
  2%, 6% { -moz-transform: rotate(-12deg); transform: rotate(-12deg); }
  4%, 8% { -moz-transform: rotate(12deg); transform: rotate(12deg); }
}

@keyframes phone-ring-constant {
  0%, 10%, 100% { -webkit-transform: rotate(0deg); -moz-transform: rotate(0deg); transform: rotate(0deg); }
  2%, 6% { -webkit-transform: rotate(-12deg); -moz-transform: rotate(-12deg); transform: rotate(-12deg); }
  4%, 8% { -webkit-transform: rotate(12deg); -moz-transform: rotate(12deg); transform: rotate(12deg); }
}

/* Phone button hover - intensified shake */
.quick-contact-buttons .btn-icon-circle:first-child:hover ion-icon {
  -webkit-animation: phone-ring-hover 0.4s ease-in-out infinite;
  -moz-animation: phone-ring-hover 0.4s ease-in-out infinite;
  animation: phone-ring-hover 0.4s ease-in-out infinite;
}

@-webkit-keyframes phone-ring-hover {
  0%, 100% { -webkit-transform: rotate(0deg) scale(1.1); transform: rotate(0deg) scale(1.1); }
  25% { -webkit-transform: rotate(-15deg) scale(1.15); transform: rotate(-15deg) scale(1.15); }
  75% { -webkit-transform: rotate(15deg) scale(1.15); transform: rotate(15deg) scale(1.15); }
}

@-moz-keyframes phone-ring-hover {
  0%, 100% { -moz-transform: rotate(0deg) scale(1.1); transform: rotate(0deg) scale(1.1); }
  25% { -moz-transform: rotate(-15deg) scale(1.15); transform: rotate(-15deg) scale(1.15); }
  75% { -moz-transform: rotate(15deg) scale(1.15); transform: rotate(15deg) scale(1.15); }
}

@keyframes phone-ring-hover {
  0%, 100% { -webkit-transform: rotate(0deg) scale(1.1); -moz-transform: rotate(0deg) scale(1.1); transform: rotate(0deg) scale(1.1); }
  25% { -webkit-transform: rotate(-15deg) scale(1.15); -moz-transform: rotate(-15deg) scale(1.15); transform: rotate(-15deg) scale(1.15); }
  75% { -webkit-transform: rotate(15deg) scale(1.15); -moz-transform: rotate(15deg) scale(1.15); transform: rotate(15deg) scale(1.15); }
}

/* Mail button icon - constant gentle float animation */
.quick-contact-buttons .btn-icon-circle:last-child ion-icon {
  -webkit-animation: mail-float-constant 3s ease-in-out infinite;
  -moz-animation: mail-float-constant 3s ease-in-out infinite;
  animation: mail-float-constant 3s ease-in-out infinite;
  -webkit-animation-delay: 2s;
  -moz-animation-delay: 2s;
  animation-delay: 2s;
}

@-webkit-keyframes mail-float-constant {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  50% { -webkit-transform: translateY(-4px); transform: translateY(-4px); }
}

@-moz-keyframes mail-float-constant {
  0%, 100% { -moz-transform: translateY(0); transform: translateY(0); }
  50% { -moz-transform: translateY(-4px); transform: translateY(-4px); }
}

@keyframes mail-float-constant {
  0%, 100% { -webkit-transform: translateY(0); -moz-transform: translateY(0); transform: translateY(0); }
  50% { -webkit-transform: translateY(-4px); -moz-transform: translateY(-4px); transform: translateY(-4px); }
}

/* Mail button hover - bounce animation */
.quick-contact-buttons .btn-icon-circle:last-child:hover ion-icon {
  -webkit-animation: mail-bounce-hover 0.6s ease-in-out;
  -moz-animation: mail-bounce-hover 0.6s ease-in-out;
  animation: mail-bounce-hover 0.6s ease-in-out;
}

@-webkit-keyframes mail-bounce-hover {
  0%, 100% { -webkit-transform: translateY(0) scale(1.1); transform: translateY(0) scale(1.1); }
  25% { -webkit-transform: translateY(-10px) scale(1.15); transform: translateY(-10px) scale(1.15); }
  50% { -webkit-transform: translateY(0) scale(1.1); transform: translateY(0) scale(1.1); }
  75% { -webkit-transform: translateY(-5px) scale(1.12); transform: translateY(-5px) scale(1.12); }
}

@-moz-keyframes mail-bounce-hover {
  0%, 100% { -moz-transform: translateY(0) scale(1.1); transform: translateY(0) scale(1.1); }
  25% { -moz-transform: translateY(-10px) scale(1.15); transform: translateY(-10px) scale(1.15); }
  50% { -moz-transform: translateY(0) scale(1.1); transform: translateY(0) scale(1.1); }
  75% { -moz-transform: translateY(-5px) scale(1.12); transform: translateY(-5px) scale(1.12); }
}

@keyframes mail-bounce-hover {
  0%, 100% { -webkit-transform: translateY(0) scale(1.1); -moz-transform: translateY(0) scale(1.1); transform: translateY(0) scale(1.1); }
  25% { -webkit-transform: translateY(-10px) scale(1.15); -moz-transform: translateY(-10px) scale(1.15); transform: translateY(-10px) scale(1.15); }
  50% { -webkit-transform: translateY(0) scale(1.1); -moz-transform: translateY(0) scale(1.1); transform: translateY(0) scale(1.1); }
  75% { -webkit-transform: translateY(-5px) scale(1.12); -moz-transform: translateY(-5px) scale(1.12); transform: translateY(-5px) scale(1.12); }
}

/* Circular icon button for footer */
.btn-icon-circle {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  border-radius: 50% !important;
  background-color: transparent !important;
  border: 2px solid #23a592 !important;
  color: #23a592 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
  padding: 0 !important;
  text-decoration: none !important;
  position: relative !important;
  overflow: hidden !important;
  animation: breathe 3s ease-in-out infinite !important;
  box-sizing: border-box !important;
}

/* Breathing animation - subtle pulsing border */
@keyframes breathe {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(35, 165, 146, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(35, 165, 146, 0);
  }
}

/* Icon styling with transition */
.btn-icon-circle ion-icon {
  font-size: 24px !important;
  width: 24px !important;
  height: 24px !important;
  color: #ffffff !important;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
  position: relative !important;
  z-index: 2 !important;
  display: block !important;
}

/* Hover effects — only for mouse devices */
@media (hover: hover) {
  .btn-icon-circle:hover {
    background-color: #23a592 !important;
    border-color: #23a592 !important;
    transform: scale(1.15) rotate(5deg);
    animation: none;
    box-shadow: 0 5px 20px rgba(35, 165, 146, 0.4);
  }

  .btn-icon-circle:hover ion-icon {
    color: #ffffff !important;
    transform: scale(1.1) rotate(-5deg);
  }
}

/* Active/Click state */
.btn-icon-circle:active {
  transform: scale(0.95);
  background-color: #23a592 !important;
  border-color: #23a592 !important;
}

.btn-icon-circle:active ion-icon {
  color: #ffffff !important;
}

/* Focus state */
.btn-icon-circle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(35, 165, 146, 0.3);
  animation: none;
  background-color: transparent !important;
}

/* Ripple effect on click */
.btn-icon-circle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-icon-circle:active::before {
  width: 100px;
  height: 100px;
}

/* Desktop specific styles to override Bootstrap */
@media (min-width: 769px) {
  .btn-icon-circle {
    background-color: transparent !important;
    border: 2px solid #23a592 !important;
    width: 50px !important;
    height: 50px !important;
    line-height: normal !important;
  }
  
  .btn-icon-circle ion-icon {
    color: #ffffff !important;
    font-size: 24px !important;
  }
}

/* Mobile specific styles for icon button */
@media (max-width: 768px) {
  .btn-icon-circle {
    background-color: transparent !important;
    border: 2px solid #23a592 !important;
    width: 50px !important;
    height: 50px !important;
  }
  
  .btn-icon-circle ion-icon {
    color: #ffffff !important;
    font-size: 24px !important;
  }
}

/* Gold stars for testimonials */
.stars .fa-star {
  color: #FFD700;
  font-size: 24px;
  margin: 0 2px;
}

/* Testimonials styling */
.col-testimonial {
  padding: 40px 30px;
}

.col-testimonial p {
  font-size: 18px;
  line-height: 1.8;
  color: #666;
  font-weight: 300;
  margin-bottom: 0;
}

.col-testimonial .text-dark {
  font-size: 16px;
  font-weight: 600;
  color: #333 !important;
  margin-top: 30px !important;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .col-testimonial {
    padding: 30px 20px;
  }
  
  .col-testimonial p {
    font-size: 16px;
    line-height: 1.7;
  }
  
  .stars .fa-star {
    font-size: 20px;
  }
}

/* Partner logos alignment */
.col-partner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 20px;
}

.col-partner img {
  max-width: 100%;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

.col-partner img:hover {
  opacity: 0.6;
}

/* Specific logo size adjustments */
.logo-rayno {
  max-height: 100px !important;
}

.logo-3m {
  max-height: 50px !important;
}

.logo-suntek {
  max-height: 55px !important;
}

/* Mobile partner logos */
@media (max-width: 768px) {
  .col-partner {
    min-height: 100px;
    padding: 15px;
  }
  
  .col-partner img {
    max-height: 60px;
    opacity: 0.35;
  }
  
  .col-partner img:hover {
    opacity: 0.6;
  }
  
  .logo-rayno {
    max-height: 80px !important;
  }
  
  .logo-3m {
    max-height: 40px !important;
  }
  
  .logo-suntek {
    max-height: 45px !important;
  }
}

/* Film Showcase Styles */

/* Применяем правильные шрифты ко всем элементам карточек */
.project-item h3 {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 700 !important;
}

.project-item figure p {
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 400 !important;
}

.film-stat-value {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 700 !important;
}

.film-stat-label {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
}

/* Стили для легенды аббревиатур */
.legend-item strong {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 700 !important;
  color: #343434 !important;
}

.legend-item .legend-english {
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 400 !important;
  color: #767676 !important;
  font-size: 0.875rem !important;
}

.legend-item .legend-russian {
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 400 !important;
  color: #767676 !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 767px) {
  /* Заголовок карточки на мобильных */
  .project-item h3 {
    font-size: 16px !important;
    padding: 0.15rem 0.4rem !important;
    white-space: nowrap;
  }
  
  /* Подзаголовок карточки на мобильных */
  .project-item figure p {
    font-size: 11px !important;
    padding-left: 0.4rem !important;
  }
  
  /* Уменьшаем отступы заголовка */
  .film-card-title {
    top: 1rem !important;
    left: 1rem !important;
  }
  
  /* Статистика внизу карточки - уменьшаем размеры */
  .film-stats-container {
    padding: 30px 10px 15px !important;
  }
  
  .film-stat-value {
    font-size: 28px !important;
  }
  
  .film-stat-label {
    font-size: 8px !important;
    margin-top: 5px !important;
  }
  
  .film-stat-divider {
    height: 35px !important;
  }
  
  /* Скрываем стрелки навигации карусели на мобильных */
  .carousel-project-2.owl-carousel .owl-nav button.owl-prev,
  .carousel-project-2.owl-carousel .owl-nav button.owl-next {
    display: none !important;
  }
}

@media (max-width: 480px) {
  /* Еще более компактно для очень маленьких экранов */
  .film-stat-value {
    font-size: 24px !important;
  }
  
  .film-stat-label {
    font-size: 7px !important;
  }
  
  .film-stat-divider {
    height: 30px !important;
  }
}

/* Hover эффект для карточек */
.project-item figure {
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-item:hover figure {
  transform: scale(1.02);
}

/* Анимированный блик при наведении */
.film-shine-overlay {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.project-item:hover .film-shine-overlay {
  left: 100%;
}

/* Стили для модальных окон */
.modal-content-wrapper {
  display: flex;
  flex-direction: column;
}

.modal-description {
  order: 1;
}

.modal-characteristics {
  order: 2;
}

/* На мобильном меняем порядок: сначала характеристики, потом описание */
@media (max-width: 767px) {
  .modal-description {
    order: 2;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .modal-characteristics {
    order: 1;
  }
  
  /* Характеристики в одну колонку на мобильном */
  .modal-characteristics div[style*="grid"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Поднять заголовок "Елена Захарова" на главном экране только на мобильных */
  .masthead h1 {
    margin-top: -3rem;
  }
}

/* Крестик закрытия модальных окон - ВНУТРИ карточки слева вверху */
.mfp-close {
  position: absolute !important;
  right: auto !important;
  left: 15px !important;
  top: 15px !important;
  z-index: 1 !important;
  background: rgba(240, 240, 240, 0.9) !important;
  color: #666 !important;
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  font-size: 28px !important;
  font-weight: 300 !important;
  border-radius: 50% !important;
  opacity: 1 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.mfp-close:hover,
.mfp-close:focus,
.mfp-close:active {
  background: rgba(224, 224, 224, 1) !important;
  transform: rotate(90deg) !important;
  -webkit-transform: rotate(90deg) !important;
  color: #333 !important;
}

/* На мобильных крестик немного больше */
@media (max-width: 767px) {
  .mfp-close {
    width: 46px !important;
    height: 46px !important;
    line-height: 46px !important;
    font-size: 30px !important;
  }
}

/* Make phone icon same size as other icons */
.social-icons ion-icon[name="call"] {
  font-size: 1.2rem !important;
}

.navbar-mobile .social-icons ion-icon[name="call"] {
  font-size: 1.2rem !important;
}

/* Custom WhatsApp SVG icon styling */
.social-icons .whatsapp-icon {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
  vertical-align: middle;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Gray background for services section - more welcoming than black */
/* Применяется ТОЛЬКО к секции #services */
section#services.bg-gray {
  background: #f5f5f5 !important;
  color: #343434;
}

section#services.bg-gray h6 {
  color: #343434 !important;
}

section#services.bg-gray p {
  color: #666666 !important;
}

section#services.bg-gray .text-primary {
  color: #23a592 !important;
}

/* Mobile video background */
.masthead-video {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* Адаптивная загрузка главного фото */
/* Базовый fallback для всех браузеров */
.masthead.jarallax {
  background-image: url('../img/bg/personal2-hd.jpg?v=7');
}

.webp .masthead.jarallax {
  background-image: url('../img/bg/personal2-hd.webp?v=7');
}

/* Мобильные устройства (до 768px) — видео вместо фото */
@media only screen and (max-width: 767px) {
  .masthead-video {
    display: block;
  }

  .masthead.jarallax,
  .webp .masthead.jarallax {
    background-image: none !important;
  }
}

/* Фоновые картинки отключены — используем видео на всех экранах */
/* Планшеты, десктопы, большие экраны — видео вместо фото */
.masthead.jarallax {
  background-image: none !important;
}
.webp .masthead.jarallax {
  background-image: none !important;
}

/* Поднять текст на главном экране вверх для центрирования по перчатке */
.masthead .opener {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-top: 5rem;
}

.masthead .opener .container {
  margin-top: -16rem;
}

/* Фоновое изображение для цифры 18 в блоке "О себе" */
.experience-number {
  background: url('../img/bg/text-parallax.jpg') 50% 50% no-repeat;
  background-size: cover;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Красный ярлык для новой новости */
.date.red {
  background-color: #E63946 !important;
}

/* Улучшение читаемости текста на десктопе */
@media only screen and (min-width: 768px) {
  .masthead::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 50%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    z-index: 0;
    pointer-events: none;
  }
  
  .masthead .opener {
    position: relative;
    z-index: 1;
  }
  
  .masthead .lead {
    font-size: 1.375rem !important;
    font-weight: 300 !important;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4), 
                 0px 0px 8px rgba(0, 0, 0, 0.3) !important;
    line-height: 1.8 !important;
    color: rgba(255, 255, 255, 0.9) !important;
  }
}

/* === ДЕСКТОП: Lexus-style — белая шапка, видео, кнопки снизу === */
@media only screen and (min-width: 768px) {
  .navbar-desctop {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff !important;
    z-index: 100;
    border-bottom: 1px solid #f0f0f0 !important;
  }

  .navbar-brand {
    color: #1a1a1a !important;
  }

  .navbar-brand:hover,
  .navbar-brand:focus {
    color: #1a1a1a !important;
  }

  .navbar-nav-desctop li a.nav-link {
    color: #343434 !important;
  }

  .masthead {
    margin-top: 0;
    position: relative !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    background-image: none !important;
    background: #000 !important;
    display: block !important;
    overflow: hidden;
    padding: 0 !important;
  }

  .masthead-video {
    position: relative !important;
    width: 100%;
    height: 72vh;
    object-fit: cover;
    display: block;
  }

  /* Градиент для читаемости текста поверх видео — сверху */
  .masthead::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
    z-index: 0;
    pointer-events: none;
  }

  .masthead .opener {
    position: absolute !important;
    top: 0 !important;
    bottom: auto !important;
    left: 0;
    right: 0;
    z-index: 1;
    min-height: auto !important;
    display: block !important;
    padding: 100px 0 0 0 !important;
  }

  .masthead .opener .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 48px !important;
    padding-right: 24px !important;
    margin: 0 !important;
  }

  /* Текст — в левом верхнем углу, выровнен с логотипом в шапке */
  .masthead .opener .row {
    margin: 0;
  }

  .masthead .opener .col-md-6,
  .masthead .opener .col-lg-5 {
    max-width: 500px;
    flex: none;
    padding-left: 0;
  }

  .masthead .opener h1 {
    font-size: 36px !important;
    color: #fff !important;
  }

  .masthead .opener h1 .mark,
  .masthead .opener h1 .mark span {
    background: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  .masthead .opener h1 .mark:before {
    display: none !important;
  }

  .masthead .opener .hero-subtitle {
    font-size: 16px !important;
    color: rgba(255,255,255,0.75) !important;
    line-height: 1.8 !important;
    max-width: 450px;
    font-weight: 400 !important;
    letter-spacing: 0.2px;
  }

  .masthead .opener .hero-brand-label {
    display: none !important;
  }

  /* Кнопки стилизуются вне этого блока (они теперь за пределами .masthead) */

  .hero-btn-primary {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border: 2px solid #1a1a1a !important;
    padding: 14px 40px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 13px !important;
  }

  .hero-btn-secondary {
    background: transparent !important;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a !important;
    padding: 14px 40px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 13px !important;
  }
}

/* Шапка — статичная, уходит при скролле */
#scrollspy.navbar-desctop {
  position: absolute !important;
  background: #ffffff !important;
  z-index: 1000 !important;
}

/* Мобильная версия */
@media only screen and (max-width: 767px) {

  .navbar-brand {
    color: #1a1a1a !important;
  }

  .toggler-icon {
    background: #1a1a1a !important;
  }

  .masthead {
    margin-top: 0;
    padding-top: 0;
    background-size: cover !important;
    background-position: center center !important;
    position: relative;
    overflow: hidden;
    aspect-ratio: 9 / 13;
    min-height: auto !important;
    height: auto !important;
  }

  .masthead-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 0% 0%;
    z-index: 0;
  }

  .masthead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 30%, rgba(0,0,0,0.1) 60%, transparent 100%);
    z-index: 0;
    pointer-events: none;
  }

  .masthead::before {
    display: none !important;
  }

  .masthead .opener {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    min-height: auto !important;
    display: block;
    padding-top: 0;
  }

  .masthead .opener .container {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
    padding-top: 0;
    padding-bottom: 20px;
  }

  /* Заголовок на мобильной */
  .masthead h1,
  .masthead .masthead-title {
    color: #ffffff !important;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5) !important;
    font-size: 2.2rem !important;
    line-height: 1.15 !important;
  }

  /* Убрать чёрную подложку у .mark на мобилке */
  .masthead h1 .mark,
  .masthead .masthead-title .mark {
    color: #ffffff !important;
    text-shadow: none !important;
    background: none !important;
    background-color: transparent !important;
    transform: none !important;
  }

  .masthead h1 .mark:before,
  .masthead .masthead-title .mark:before {
    display: none !important;
  }

  /* Описание */
  .masthead .lead,
  .masthead .masthead-description {
    color: #d0d0d0 !important;
  }

  .masthead .hero-subtitle {
    color: rgba(255,255,255,0.8) !important;
    font-size: 13px !important;
  }

  /* Скрыть описание на мобильных */
  .masthead .desktop-only-description {
    display: none !important;
  }

  /* Скрыть лейбл бренда на мобилке — мало места */
  .masthead .hero-brand-label {
    display: none;
  }

  /* Заголовок на мобильных */
  .masthead h1 {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
  }

  /* Кнопки — вынести под видео на белый фон */
  .hero-cta-row {
    position: relative;
  }

  /* Выравнивание текста в секции services по левому краю на мобильных */
  section#services .text-center {
    text-align: left !important;
  }
}

/* Кнопки под видео на мобилке */
.hero-cta-below-video {
  display: none;
}

@media only screen and (max-width: 767px) {
  /* Скрыть кнопки внутри видео на мобилке */
  .masthead .hero-cta-row {
    display: none !important;
  }

  /* Показать кнопки под видео */
  .hero-cta-below-video {
    display: flex;
    gap: 12px;
    padding: 20px;
    justify-content: center;
    background: #fff;
  }

  .hero-cta-below-video a {
    padding: 14px 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-align: center;
    flex: 1;
    max-width: 200px;
  }

  .hero-cta-below-video .btn-below-primary {
    background: #23a592;
    color: #fff;
    border: 2px solid #23a592;
  }

  .hero-cta-below-video .btn-below-primary:active {
    background: #1a1a1a;
    border-color: #1a1a1a;
  }

  .hero-cta-below-video .btn-below-secondary {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
  }
}

/* Выравнивание текста в секции services по левому краю на десктопе */
@media only screen and (min-width: 768px) {
  section#services .text-center {
    text-align: left !important;
  }
}

/* Убрать белое пространство после футера на мобильной */
@media (max-width: 767px) {
  html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
  }
  
  footer {
    margin-bottom: 0 !important;
  }
  
  .footer-copy {
    margin-bottom: 0 !important;
    padding-bottom: 2rem !important;
  }
  
  /* Кнопка меню слева на мобильных */
  .toggler {
    margin-right: 1rem !important;
    order: -1; /* Перемещаем в начало flexbox */
  }
  
  /* Логотип справа на мобильных */
  .navbar-brand {
    margin-left: auto !important;
    margin-right: 0 !important;
  }
  
  /* Мобильное меню выезжает СЛЕВА */
  .navbar-mobile {
    left: 0 !important;
    right: auto !important;
    -webkit-transform: translateX(-100%) !important;
    -ms-transform: translateX(-100%) !important;
    -o-transform: translateX(-100%) !important;
    transform: translateX(-100%) !important;
  }
  
  /* Когда меню открыто */
  .menu-is-open .navbar-mobile {
    -webkit-transform: translateX(0) !important;
    -ms-transform: translateX(0) !important;
    -o-transform: translateX(0) !important;
    transform: translateX(0) !important;
  }
  
  /* Кнопка закрытия меню слева */
  .navbar-mobile .close {
    left: 1rem !important;
    right: auto !important;
  }
}
/* =================================
   НОВОСТИ С ИЗОБРАЖЕНИЯМИ - КАРУСЕЛЬ
   Добавить в конец custom.css
   ================================= */

/* Wrapper для карусели */
.news-carousel-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding-left: 100px;
  padding-right: 50px;
  max-width: 100vw;
}

/* Сама карусель */
.news-carousel {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0 20px 40px 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
  scroll-snap-type: x mandatory;
}

.news-carousel::-webkit-scrollbar {
  display: none;
}

/* Стрелки навигации */
.news-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.news-carousel-arrow:hover {
  background: #23a592;
  color: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 15px rgba(35, 165, 146, 0.4);
}

.news-carousel-arrow ion-icon {
  font-size: 24px;
}

.news-carousel-arrow-left {
  left: 20px;
}

.news-carousel-arrow-right {
  right: 20px;
}

/* Карточка новости */
.news-card {
  flex: 0 0 430px;
  min-width: 430px;
  padding-top: 30px;
  position: relative;
  transition: all 0.4s ease;
  cursor: pointer;
  scroll-snap-align: start;
}

/* Карточки "дышат" - поднимаются при hover */
.news-card:hover {
  transform: translateY(-8px);
}

/* Карточка - изображение на всю высоту */
.news-card figure {
  position: relative;
  height: 600px;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  transition: all 0.4s ease;
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 3px solid transparent;
}

.news-card:hover figure {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2), 0 0 30px rgba(35, 165, 146, 0.3);
}

/* Закладка в ПРАВОМ ВЕРХНЕМ УГЛУ */
.news-tab {
  position: absolute;
  top: -15px;
  right: 8px;
  z-index: 1;
}

.news-tab mark.date {
  display: inline-block;
  background: #23a592;
  color: white;
  padding: 12px 20px 18px 20px;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2),
              4px 0 10px rgba(0, 0, 0, 0.15),
              -4px 0 10px rgba(0, 0, 0, 0.15);
}

/* Контейнер изображения */
.news-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Полупрозрачный тёмный оверлей поверх видео для унификации визуального стиля */
.news-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 1;
  pointer-events: none;
  transition: background 0.4s ease;
}

/* При наведении оверлей становится светлее - видео ярче */
.news-card:hover .news-image::before {
  background: rgba(0, 0, 0, 0.05);
}

/* Изображение новости */
.news-image img,
.news-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  opacity: 0.85;
  filter: saturate(0.8);
  pointer-events: none; /* Видео не блокирует клики на карточке */
  will-change: transform; /* Оптимизация для GPU */
  backface-visibility: hidden; /* Сглаживание на мобильных */
  -webkit-backface-visibility: hidden;
}

/* Зум изображения/видео при hover */
.news-card:hover .news-image img,
.news-card:hover .news-image video {
  transform: scale(1.1) !important;
}

/* Градиент внизу для читаемости текста */
.news-card figure::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, 
    rgba(0, 0, 0, 0.85) 0%, 
    rgba(0, 0, 0, 0.4) 50%, 
    transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* Текст новости */
.news-card figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  color: white;
  z-index: 3;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
}

.news-card figcaption h5 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.news-card figcaption h5 a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-card figcaption h5 a:hover {
  color: #23a592;
}

.news-card figcaption p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
}

/* =================================
   АДАПТИВНОСТЬ
   ================================= */

/* Планшеты */
@media (max-width: 991px) {
  .news-carousel-wrapper {
    padding-left: 60px;
    padding-right: 30px;
  }
  
  .news-card {
    flex: 0 0 380px;
    min-width: 380px;
    padding-top: 28px;
  }
  
  .news-card figure {
    height: 620px;
  }
  
  .news-carousel-arrow {
    width: 45px;
    height: 45px;
  }
  
  .news-carousel-arrow ion-icon {
    font-size: 22px;
  }
}

/* Мобильные устройства */
@media (max-width: 767px) {
  .news-carousel-wrapper {
    padding: 0;
  }
  
  .news-carousel {
    gap: 20px;
    padding: 0 7.5vw 40px 7.5vw;
    scroll-snap-type: none; /* Отключаем автоматическое примагничивание на мобильных */
  }
  
  .news-card {
    flex: 0 0 85vw;
    min-width: 85vw;
    padding-top: 28px;
    scroll-snap-align: none; /* Отключаем выравнивание элемента */
  }
  
  .news-card figure {
    height: 620px;
  }
  
  .news-tab {
    right: 8px;
    top: -12px;
  }
  
  .news-tab mark.date {
    padding: 10px 16px 14px 16px;
    font-size: 12px;
  }
  
  .news-card figcaption {
    padding: 24px;
  }
  
  .news-card figcaption h5 {
    font-size: 19px;
    margin-bottom: 10px;
  }
  
  .news-card figcaption p {
    font-size: 14px;
    line-height: 1.5;
  }
  
  /* Скрываем стрелки на мобильных */
  .news-carousel-arrow {
    display: none;
  }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
  .news-card figure {
    height: 520px;
  }
  
  .news-card figcaption h5 {
    font-size: 17px;
  }
  
  .news-card figcaption p {
    font-size: 13px;
  }
}

/* Оптимизация модальных окон - ТОЛЬКО ДЛЯ МОБИЛЬНЫХ! */
@media (max-width: 767px) {
  .mfp-bg {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
  }
  
  .mfp-container {
    padding: 15px !important;
    box-sizing: border-box !important;
  }
  
  .zoom-anim-dialog {
    padding: 4.5rem 1.5rem 1.5rem 1.5rem !important;
    margin: 0 auto !important;
    max-width: 90% !important;
    width: calc(100% - 30px) !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: white !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
  }
  
  /* Делаем контент модалки более responsive */
  .modal-characteristics > div {
    grid-template-columns: 1fr !important;
  }
}

/* Ускорение анимации модалки для лучшего отклика */
.my-mfp-zoom-in .zoom-anim-dialog {
  transition: all 0.2s ease-out !important;
  transform: translate3d(0, 0, 0); /* GPU ускорение */
  backface-visibility: hidden;
}

.my-mfp-zoom-in.mfp-ready .zoom-anim-dialog {
  transform: translate3d(0, 0, 0) scale(1);
}


