/* Custom styles for ZE-Studio */

/* 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 */
.btn-icon-circle:hover {
  background-color: #ffffff !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: #23a592 !important;
  transform: scale(1.1) rotate(-5deg);
}

/* Active/Click state */
.btn-icon-circle:active {
  transform: scale(0.95);
}

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

/* 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;
}

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

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

/* Мобильные устройства (до 768px) - WebP с fallback */
@media only screen and (max-width: 767px) {
  .masthead.jarallax {
    background-image: url('../img/bg/personal2-mobile.jpg?v=final8') !important;
  }
  
  .webp .masthead.jarallax {
    background-image: url('../img/bg/personal2-mobile.webp?v=final8') !important;
  }
}

/* Планшеты (768px - 1279px) - WebP с fallback */
@media only screen and (min-width: 768px) and (max-width: 1279px) {
  .masthead.jarallax {
    background-image: url('../img/bg/personal2-hd.jpg?v=6') !important;
  }
  
  .webp .masthead.jarallax {
    background-image: url('../img/bg/personal2-hd.webp?v=6') !important;
  }
}

/* Десктопы (1280px - 1919px) - WebP с fallback */
@media only screen and (min-width: 1280px) and (max-width: 1919px) {
  .masthead.jarallax {
    background-image: url('../img/bg/personal2-fullhd.jpg?v=6') !important;
  }
  
  .webp .masthead.jarallax {
    background-image: url('../img/bg/personal2-fullhd.webp?v=6') !important;
  }
}

/* Большие экраны (1920px+) - WebP с fallback */
@media only screen and (min-width: 1920px) {
  .masthead.jarallax {
    background-image: url('../img/bg/personal2.jpg?v=6') !important;
  }
  
  .webp .masthead.jarallax {
    background-image: url('../img/bg/personal2.webp?v=6') !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;
  }
}

/* Мобильная версия - градиент снизу до текста */
@media only screen and (max-width: 767px) {
  .masthead {
    background-size: cover !important;
    background-position: center center !important;
  }
  
  .masthead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    z-index: 0;
    pointer-events: none;
  }
  
  .masthead::before {
    display: none !important;
  }
  
  .masthead .opener {
    position: relative;
    z-index: 1;
    min-height: auto !important;
  }
  
  .masthead .opener .container {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
    padding-top: 8rem;
    padding-bottom: 4rem;
  }
  
  /* Заголовок на мобильной - оба имени белые */
  .masthead h1,
  .masthead .masthead-title {
    color: #ffffff !important;
    text-shadow: none !important;
  }
  
  /* ЗАХАРОВА тоже белая */
  .masthead h1 .mark,
  .masthead .masthead-title .mark {
    color: #ffffff !important;
    text-shadow: none !important;
  }
  
  /* Описание серое */
  .masthead .lead,
  .masthead .masthead-description {
    color: #d0d0d0 !important;
  }
  
  /* Скрыть описание на мобильных */
  .masthead .desktop-only-description {
    display: none !important;
  }
  
  /* Опустить заголовок ниже на мобильных */
  .masthead h1 {
    margin-top: 8rem !important;
  }
  
  /* Выравнивание текста в секции services по левому краю на мобильных */
  section#services .text-center {
    text-align: left !important;
  }
}

/* Выравнивание текста в секции 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;
  }
  
  .news-card {
    flex: 0 0 85vw;
    min-width: 85vw;
    padding-top: 28px;
  }
  
  .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);
}


