/*
Theme Name: Mir-eng
Theme URI: https://mir-eng.ru/
Author: Alex361
Author URI: https://vk.com/bezdnyakov_361
Description: Тема для wordoress
Requires at least: WordPress 4.9.6
Version: 0.1
*/

/*
! tailwindcss v3.4.10 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

/* ==== HEADER: мобильное меню и бургер ==== */

/* Плавное раскрытие мобильного меню */
.mobile-menu {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.mobile-menu--open {
  max-height: 400px; /* достаточно для списка и кнопки */
  opacity: 1;
}

/* Бургер → крестик */
.burger__line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background-color: black;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    top 0.2s ease,
    bottom 0.2s ease;
}

.burger__line--top {
  top: 0;
}

.burger__line--middle {
  top: 50%;
  transform: translateY(-50%);
}

.burger__line--bottom {
  bottom: 0;
}

.burger--open .burger__line--top {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.burger--open .burger__line--middle {
  opacity: 0;
}

.burger--open .burger__line--bottom {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* Логика появления CTA: текстовая vs SVG-иконка
   - по умолчанию: текстовая видна, иконка скрыта
   - на очень узких экранах (<= 480px): наоборот
*/
.cta-main {
  display: inline-flex;
}

.cta-icon {
  display: none;
}

@media (max-width: 480px) {
  .cta-main {
    display: none;
  }
  .cta-icon {
    display: inline-flex;
  }
}

/* ==== FAQ (аккордеон) ==== */

/* Плюс/минус по центру кружка */
.faq-icon-line {
  position: absolute;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background-color: #ffffff;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.faq-icon-line-h {
  transform: rotate(0deg);
}

.faq-icon-line-v {
  transform: rotate(90deg);
}

/* Плавное открытие панели */
.faq-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.faq-item.is-open .faq-panel {
  max-height: 400px; /* достаточно для текста */
  opacity: 1;
}

/* Плюс → минус */
.faq-item.is-open .faq-icon-line-v {
  opacity: 0;
  transform: rotate(90deg) scaleX(0.4);
}

/* ==== Галерея: активный таб ==== */

.gallery-tab--active {
  background-color: #232c4b !important;
  color: #ffffff !important;
  border-color: #232c4b !important;
}

/* Когда открыт квиз — скрываем нижние кнопки и кнопку "вверх" */
html.mr-quiz-open #mobile-fab-bar,
body.mr-quiz-open #mobile-fab-bar,
html.mr-quiz-open #back-to-top,
body.mr-quiz-open #back-to-top {
  display: none !important;
}

#caret-icon{
  display: inline-block;   
  will-change: transform;
  animation: mrCaretFloat 1.2s ease-in-out infinite;
}

@keyframes mrCaretFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* если у пользователя reduced motion */
@media (prefers-reduced-motion: reduce){
  #caret-icon{ animation: none; }
}


 @keyframes caretBump { 0%{transform:translateY(0)} 40%{transform:translateY(-3px)} 100%{transform:translateY(0)} }
  .caret-bump { animation: caretBump .35s ease; }