/* FAQ Mobile Styles - Only for .faq--mobile template */

/* Принудительное использование мобильного шаблона */
body.page-template-page-faq-mobile {
  /* Сброс любых десктопных стилей */
  overflow-x: hidden;
}

/* Исправление зависания - скрытие hero overlay и фиксация z-index */
body.page-template-page-faq-mobile .hero-bg,
body.page-template-page-faq-mobile .hero-bg-overlay,
body.page-template-page-faq-mobile .header__overlay,
body.page-template-page-faq-mobile .ticker {
  display: none !important;
}

body.page-template-page-faq-mobile .header__menu {
  position: relative;
  z-index: 3;
}

body.page-template-page-faq-mobile .faq--mobile, 
body.page-template-page-faq-mobile main {
  position: relative;
  z-index: 10;
}

/* FAQ contacts: vertical layout (mobile) */
.faq--mobile .faq__contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.faq--mobile .faq-contact--link {
  padding: 10px 12px;
  font-size: 14px;
}

.faq--mobile .faq-contact--text {
  font-size: 14px;
}

/* Сброс любых фиксированных элементов, которые могут перекрывать контент */
body.page-template-page-faq-mobile .ticker,
body.page-template-page-faq-mobile .fixed-overlay,
body.page-template-page-faq-mobile .modal-backdrop {
  z-index: 1;
}

.faq--mobile {
  /* Reset any desktop overrides */
  max-width: none;
  margin: 0;
  padding: 0;
}

.faq--mobile .faq-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  background: #fff;
}

.faq--mobile .faq-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  margin: 0 0 24px 0;
  color: var(--Gray-900, #1a1a1a);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.faq--mobile .faq-section {
  margin-bottom: 32px;
}

.faq--mobile .faq-section:last-child {
  margin-bottom: 0;
}

.faq--mobile .faq-section-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 16px 0;
  color: var(--Gray-900, #1a1a1a);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding-bottom: 8px;
  border-bottom: 2px solid #ff69b4;
}

.faq--mobile .faq-item {
  margin-bottom: 12px;
  border: 1px solid #ff69b4;
  border-radius: 8px;
  background: #fff;
  transition: all 0.2s ease;
}

.faq--mobile .faq-item:last-child {
  margin-bottom: 0;
}

.faq--mobile .faq-item[open] {
  background: var(--Gray-50, #f9f9f9);
  border-color: #ff1493;
  box-shadow: 0 2px 8px rgba(255, 105, 180, 0.15);
}

.faq--mobile .faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  color: var(--Gray-900, #1a1a1a);
  transition: color 0.2s ease;
  position: relative;
}

.faq--mobile .faq-question::-webkit-details-marker {
  display: none;
}

.faq--mobile .faq-question::marker {
  display: none;
}

.faq--mobile .faq-question::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--Gray-600, #666);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq--mobile .faq-item[open] .faq-question::after {
  content: '−';
  transform: rotate(0deg);
  color: var(--Gray-800, #333);
}

.faq--mobile .faq-question:hover {
  color: var(--Gray-700, #4a4a4a);
}

.faq--mobile .faq-question:focus {
  outline: 2px solid var(--Primary-500, #007bff);
  outline-offset: 2px;
  border-radius: 4px;
}

.faq--mobile .faq-question h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: inherit;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.faq--mobile .faq-answer {
  padding: 0 16px 16px 16px;
  color: var(--Gray-700, #4a4a4a);
  font-size: 14px;
  line-height: 1.6;
}

.faq--mobile .faq-answer p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--Gray-700, #4a4a4a);
}

.faq--mobile .faq-answer p:last-child {
  margin-bottom: 0;
}

.faq--mobile .faq-answer ul {
  margin: 12px 0 0 0;
  padding-left: 20px;
  list-style: none;
}

.faq--mobile .faq-answer ul li {
  position: relative;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--Gray-700, #4a4a4a);
}

.faq--mobile .faq-answer ul li:last-child {
  margin-bottom: 0;
}

.faq--mobile .faq-answer ul li::before {
  content: '•';
  color: var(--Primary-500, #007bff);
  font-weight: bold;
  position: absolute;
  left: -16px;
}

/* Smooth animations for mobile */
.faq--mobile .faq-item {
  overflow: hidden;
}

.faq--mobile .faq-answer {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus styles for accessibility */
.faq--mobile .faq-question:focus-visible {
  outline: 2px solid var(--Primary-500, #007bff);
  outline-offset: 2px;
  border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .faq--mobile .faq-item {
    border-color: #000;
  }
  
  .faq--mobile .faq-item[open] {
    background: #fff;
    border-color: #000;
  }
  
  .faq--mobile .faq-question {
    color: #000;
  }
  
  .faq--mobile .faq-answer {
    color: #000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .faq--mobile .faq-item,
  .faq--mobile .faq-question,
  .faq--mobile .faq-question::after,
  .faq--mobile .faq-answer {
    transition: none;
    animation: none;
  }
}

/* Dark mode support (if theme supports it) */
@media (prefers-color-scheme: dark) {
  .faq--mobile {
    background: var(--Gray-900, #1a1a1a);
    color: var(--Gray-100, #f5f5f5);
  }
  
  .faq--mobile .faq-container {
    background: var(--Gray-800, #2a2a2a);
  }
  
  .faq--mobile .faq-title,
  .faq--mobile .faq-section-title,
  .faq--mobile .faq-question h3 {
    color: var(--Gray-100, #f5f5f5);
  }
  
  .faq--mobile .faq-item {
    background: var(--Gray-800, #2a2a2a);
    border-color: var(--Gray-600, #666);
  }
  
  .faq--mobile .faq-item[open] {
    background: var(--Gray-700, #4a4a4a);
    border-color: var(--Gray-500, #888);
  }
  
  .faq--mobile .faq-answer {
    color: var(--Gray-300, #ccc);
  }
  
  .faq--mobile .faq-answer p,
  .faq--mobile .faq-answer ul li {
    color: var(--Gray-300, #ccc);
  }
}
