
/* =====================================================
   ЧАСТЬ 1. ОСНОВНЫЕ СТИЛИ САЙТА
   ===================================================== */

/* Общие настройки страницы */
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  margin: 0;
  padding: 0;
  background: #f8f9fb;
  color: #222;
}

/* Шапка сайта */
header {
  background: linear-gradient(135deg, #0057b7, #00b7ff);
  color: #fff;
  text-align: center;
  padding: 25px 15px;
  border-bottom: 4px solid #004d99;
}

header h1 {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
}

header p {
  margin: 6px 0 15px;
  font-size: 16px;
  opacity: 0.9;
}

/* Контейнеры сайта */
.container,
main {
  max-width: 900px;
  margin: 20px auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Блок информации о мастере */
.about-master {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 20px 0;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.about-master img {
  max-width: 200px;
  border-radius: 8px;
  margin-left: 15px;
}

/* Список услуг */
.services {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.service {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 14px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Подвал сайта */
footer {
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 20px 10px;
  font-size: 13px;
}

footer a {
  color: #66b3ff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Универсальные кнопки */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  margin: 6px;
  cursor: pointer;
}

.call {
  background: #007bff;
  color: #fff;
}

.whatsapp {
  background: #25d366;
  color: #fff;
}

.order {
  background: #ffa000;
  color: #fff;
}

.btn:hover {
  opacity: 0.9;
}

/* =====================================================
   ШАПКА: КНОПКИ СВЯЗИ
   ===================================================== */

header .contacts,
.contacts {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

header .contacts a,
.contacts a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  color: #fff;
  position: relative;
  transition: all 0.2s ease;
}

/* Кнопка телефона */
.btn-phone {
  background: #ff6b00;
}

.btn-phone:hover {
  background: #ff832f;
}

/* WhatsApp */
.contacts a[href*="wa.me"] {
  background: #25d366;
}

.contacts a[href*="wa.me"]:hover {
  background: #1ebe57;
}

/* Telegram */
.contacts a[href*="t.me"] {
  background: #229ed9;
}

.contacts a[href*="t.me"]:hover {
  background: #1b8ec3;
}

/* Иконки */
.icon {
  width: 22px;
  height: 22px;
}

header .contacts a img.icon {
  width: 20px;
  height: auto;
}

/* Особое оформление кнопок шапки */
header .contacts a.btn-phone {
  background: #ff6b00;
  border: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

header .contacts a.btn-phone:hover {
  background: #ff7f24;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

header .contacts a:not(.btn-phone) {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
}

header .contacts a:not(.btn-phone):hover {
  background: #fff;
  color: #0057b7;
}

/* =====================================================
   СЕЗОННОЕ ОФОРМЛЕНИЕ
   ===================================================== */

/* Зимний фон */
.winter {
  background-color: #f0f8ff;
}

/* Летний фон */
.summer {
  background: linear-gradient(135deg, #ffdd00, #ff6600);
  color: #000;
}

/* =====================================================
   НОВОГОДНЯЯ ГИРЛЯНДА
   ===================================================== */

#garland {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: hidden;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  max-width: 100%;
}

.lamp {
  width: 12px;
  height: 20px;
  border-radius: 50% 50% 5px 5px;
  margin: 0 4px;
  animation: blink 1.2s infinite alternate;
  transform-origin: top center;
}

.lamp.red {
  background: #ff4d4d;
}

.lamp.green {
  background: #4dff4d;
}

.lamp.blue {
  background: #4d4dff;
}

.lamp.yellow {
  background: #fff84d;
}

/* =====================================================
   СНЕЖИНКИ
   ===================================================== */

.snowflake {
  font-size: 12px;
  color: #66ccff;
  position: fixed;
  top: -20px;
  pointer-events: none;
  z-index: 8;
  animation: fall linear infinite;
}

@keyframes fall {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(15px, 25vh) rotate(10deg);
  }
  50% {
    transform: translate(-15px, 50vh) rotate(-10deg);
  }
  75% {
    transform: translate(10px, 75vh) rotate(5deg);
  }
  100% {
    transform: translate(-10px, 110vh) rotate(-5deg);
  }
}

/* =====================================================
   СОЛНЦЕ И ЛУНА
   ===================================================== */

.sun,
.moon {
  position: fixed;
  top: 20px;
  left: 20px;
  font-size: 60px;
  opacity: 0.4;
  z-index: 5;
}

.moon {
  display: none;
}

.night .moon {
  display: block;
}

.day .sun {
  display: block;
}



/* =====================================================
   ЧАСТЬ 2. БЕГУЩАЯ СТРОКА
   ===================================================== */

.marquee-container {
  background-color: #ffd700;
  overflow: hidden;
  width: 100%;
  padding: 10px 0;
  border-top: 2px solid #e6c200;
  border-bottom: 2px solid #e6c200;
  box-sizing: border-box;
}

.marquee {
  display: flex;
  width: 100%;
}

.marquee-track {
  display: flex;
  flex-shrink: 0;
  min-width: max-content;
  animation: marquee 90s linear infinite;
  will-change: transform;
  transform: translate3d(0,0,0);
}

.marquee-track span {
  display: inline-block;
  margin: 0 30px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  color: #000;
  position: relative;
  padding-right: 20px;
}

.marquee-track span::after {
  content: "•";
  position: absolute;
  right: 0;
  top: 0;
  color: #000;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* =====================================================
   ДЕЖУРНЫЙ МАСТЕР
   ===================================================== */

.duty-master {
  text-align: center;
  margin: 20px auto;
  padding: 20px 15px;
  background: #fffae6;
  border-radius: 10px;
  font-weight: 600;
  max-width: 700px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-size: 16px;
}

/* Статусная мигающая точка */
.duty-master .status {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #28a745;
  border-radius: 50%;
  margin-right: 6px;
  animation: blink 1s infinite;
  vertical-align: middle;
}

/* Кнопка звонка мастеру */
.duty-master a.call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ff6b00;
  color: #fff;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  margin-top: 15px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.duty-master a.call-btn:hover {
  background: #ff7f24;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.duty-master a.call-btn img.icon {
  width: 20px;
  height: auto;
}

/* =====================================================
   ВСПЛЫВАЮЩАЯ ПОДСКАЗКА
   ===================================================== */

.tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  right: 105%;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  text-align: center;
  width: 200px;
  transition: opacity 0.3s;
  z-index: 10;
}

.btn-phone:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(0,0,0,0.85);
}

/* =====================================================
   ВЫПАДАЮЩЕЕ МЕНЮ КОНТАКТОВ
   ===================================================== */

.contact-wrapper {
  display: inline-block;
  position: relative;
}

/* Главная кнопка */
.contact-main-btn {
  background-color: #17417a;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: background 0.3s, transform 0.2s;
}

.contact-main-btn:hover {
  background-color: #0f2d5c;
  transform: translateY(-1px);
}

.contact-text {
  white-space: nowrap;
}

.contact-icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Выпадающее окно */
.contact-popup {
  display: none;
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #f8f8f8;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}

.contact-wrapper.active .contact-popup {
  display: flex;
}

/* Кнопки внутри меню */
.contact-popup .option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.contact-popup .option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Цвета контактов */
.phone {
  background-color: #ff6b00;
}

.whatsapp {
  background-color: #25d366;
}

.telegram {
  background-color: #0088cc;
}

.max {
  background-color: #0055aa;
}

.contact-popup img {
  filter: invert(1);
}


/* =====================================================
   КНОПКА ЗАКАЗА
   ===================================================== */

.order-button-container {
  text-align: center;
  margin: 20px 0;
}

.order-button {
  display: inline-block;
  background-color: #ff6600;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  padding: 15px 30px;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.order-button:hover {
  background-color: #e05500;
}

/* =====================================================
   ПЛАВАЮЩИЕ КНОПКИ СВЯЗИ
   ===================================================== */

.contact-buttons-wrapper {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  gap: 8px;
  justify-content: center;
  background: transparent;
}

.contact-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  user-select: none;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 60px;
  position: relative;
}

/* Подсказки плавающих кнопок */
.contact-button .tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 6px;
  white-space: pre-line;
  text-align: center;
  z-index: 10;
  transition: opacity 0.3s, transform 0.3s;
}

.contact-button:hover .tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-12px);
}

/* Плавающая кнопка звонка */
.call-button {
  background-color: #ff6b00;
  color: white;
  box-shadow: 0 0 10px rgba(255,107,0,0.7);
}

.call-button:hover {
  background-color: #ff832f;
  box-shadow: 0 0 12px rgba(255,107,0,0.9);
}

/* Плавающая WhatsApp */
.whatsapp-button {
  background-color: #25d366;
  color: white;
  box-shadow: 0 0 10px rgba(37,211,102,0.7);
}

.whatsapp-button:hover {
  background-color: #1ebe57;
  box-shadow: 0 0 12px rgba(37,211,102,0.9);
}

/* Плавающая MAX */
.max-button {
  background: linear-gradient(90deg, #0078ff, #00c3ff);
  color: white;
}

.max-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(0,180,255,0.8);
}

/* Плавающая Telegram */
.telegram-button {
  background-color: #0088cc;
  color: white;
  box-shadow: 0 0 10px rgba(0,136,204,0.7);
}

.telegram-button:hover {
  background-color: #006699;
  box-shadow: 0 0 12px rgba(0,136,204,0.9);
}

/* Эффект блика на кнопках */
.glow {
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.5),
    transparent
  );
  animation: shine 2.5s infinite linear;
  pointer-events: none;
}

@keyframes shine {
  0% {
    left: -75%;
  }
  100% {
    left: 125%;
  }
}

/* Подписи и иконки плавающих кнопок */
.icon-img {
  width: 12px;
  height: 12px;
}

.text {
  line-height: 1;
  text-align: center;
}


/* =====================================================
   ЧАСТЬ 3. МОДАЛЬНОЕ ОКНО ОШИБОК
   ===================================================== */

#error-report-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  font-family: Arial, sans-serif;
}

#error-report-modal.active {
  display: flex;
}

/* Окно сообщения */
.error-modal-box {
  background: #fff;
  padding: 20px 25px;
  border-radius: 10px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  text-align: left;
  position: relative;
}

.error-modal-box h3 {
  margin-top: 0;
  color: #333;
  font-size: 18px;
}

/* Выделенный текст ошибки */
.error-selected {
  background: #f6f6f6;
  padding: 8px 10px;
  border-left: 3px solid #ff6600;
  margin: 10px 0;
  font-style: italic;
  color: #444;
  white-space: pre-line;
}

/* Поле ввода */
.error-modal-box textarea {
  width: 100%;
  height: 70px;
  margin-top: 5px;
  border-radius: 6px;
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

/* Кнопки окна */
.error-modal-box button {
  margin-top: 10px;
  background-color: #ff6600;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.error-modal-box button:hover {
  background-color: #e05500;
}

/* Закрытие окна */
.error-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 22px;
  color: #777;
  cursor: pointer;
}

/* =====================================================
   ПЛАВАЮЩАЯ КНОПКА MAX
   ===================================================== */

.max-fixed-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  transition: all 0.3s ease;
}

.max-fixed-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 14px;
  text-decoration: none;
  color: white;
  font-weight: bold;
  font-size: 1.05rem;
  background: linear-gradient(
    270deg,
    #ff006a,
    #ff7a00,
    #ff00d4,
    #ffae00
  );
  background-size: 800% 800%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  animation: pulse 1.8s infinite, gradientMove 6s ease infinite;
  transition: transform 0.2s, box-shadow 0.2s;
}

.max-text {
  display: inline-block;
}

.max-fixed-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

/* Свернутое состояние MAX */
.max-fixed-container.minimized .max-text {
  display: none;
}

.max-fixed-container.minimized .max-fixed-btn {
  padding: 12px;
  border-radius: 50%;
}

/* =====================================================
   АНИМАЦИИ
   ===================================================== */

/* Общая пульсация */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Перелив цвета MAX */
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Мигание гирлянды и индикатора */
@keyframes blink {
  0%, 50%, 100% {
    opacity: 1;
  }
  25%, 75% {
    opacity: 0;
  }
}

/* Дополнительное свечение */
@keyframes emgPulse {
  0% {
    box-shadow: 0 10px 20px rgba(255,77,109,0.25);
  }
  50% {
    box-shadow: 0 10px 32px rgba(255,77,109,0.55);
  }
  100% {
    box-shadow: 0 10px 20px rgba(255,77,109,0.25);
  }
}

/* =====================================================
   АДАПТАЦИЯ ДЛЯ ПЛАНШЕТОВ И ТЕЛЕФОНОВ
   ===================================================== */

/* Экраны до 768px */
@media (max-width: 768px) {

  .marquee-track span {
    margin: 0 15px;
    font-size: 14px;
  }

  .no-spam-warning {
    font-size: 13px;
    padding: 14px 16px;
    line-height: 1.5;
  }
}

/* Экраны до 650px */
@media (max-width: 650px) {

  .max-fixed-btn {
    font-size: 0.95rem;
    padding: 10px 16px;
  }
}

/* Экраны до 600px */
@media (max-width: 600px) {

  header h1 {
    font-size: 20px;
  }

  header .contacts a {
    width: 100%;
    justify-content: center;
    font-size: 16px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 15px;
  }

  .services {
    display: block;
  }

  .service {
    margin-bottom: 10px;
  }

  .about-master {
    flex-direction: column;
  }

  .about-master img {
    margin: 15px 0 0;
  }

  .duty-master a.call-btn {
    width: 90%;
    font-size: 16px;
  }

  .tooltip {
    right: auto;
    left: 50%;
    top: -10px;
    transform: translate(-50%, -100%);
    width: 220px;
    font-size: 11px;
  }

  .tooltip::after {
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-color: rgba(0,0,0,0.85) transparent transparent transparent;
  }
}

/* Экраны до 480px */
@media (max-width: 480px) {

  .order-button {
    font-size: 14px;
    padding: 8px 16px;
  }

  .contact-buttons-wrapper {
    bottom: 60px;
    gap: 6px;
  }

  .contact-button {
    padding: 3px 5px;
    font-size: 10px;
    min-width: 50px;
  }

  .contact-button .tooltip {
    font-size: 9px;
    padding: 3px 5px;
  }

  .icon,
  .icon-img {
    width: 10px;
    height: 10px;
  }
}
