/*
Theme Name: RepairMaster
Theme URI: https://arzpc.ru
Author: Сергей Кулаков
Description: Профессиональная тема для мастера по ремонту компьютеров и ноутбуков
Version: 11.02.26
License: GNU General Public License v2 or later
Text Domain: repairmaster
*/

/* ==============================
   Общие стили
============================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

section {
  margin-bottom: 2rem;
}

h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #2c3e50;
  font-size: 2rem;
}

/* Защита шапки от случайных отступов */
body > header,
body > footer {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

/* ==============================
   Шапка и меню
============================== */

header {
  background: linear-gradient(135deg, #2c3e50, #4a6572);
  color: white;
  padding: 0;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo h1 {
  font-size: 1.8rem;
  margin: 0;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.3s;
}

nav a:hover,
nav .current_page_item > a,
nav .current-menu-item > a,
nav .current-menu-ancestor > a {
  background: rgba(255, 255, 255, 0.25);
}

.claim-btn-header {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}

.claim-btn-header:hover {
  background: #c0392b;
}

/* Мобильное меню */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 768px) {
  .top-bar {
    flex-direction: column;
    text-align: center;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: #2c3e50;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 80px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 1000;
  }

  .main-nav.active {
    right: 0;
  }

  .main-nav ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    padding: 0 2rem;
  }

  .main-nav a {
    color: white;
    text-decoration: none;
    padding: 10px 0;
    border-radius: 4px;
    transition: background 0.3s;
    text-align: left;
  }

  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* ==============================
   Блок "Мои услуги" (8 услуг)
============================== */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 0rem;
}

.service-item {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s;
}

.service-item:hover {
  transform: translateY(-5px);
}

.service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1rem;
  color: #3498db;
}

.service-item h3 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

/* ==============================
   Преимущества
============================== */

.advantages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.advantage {
  text-align: center;
  max-width: 250px;
}

.advantage h3 {
  color: #3498db;
  margin-bottom: 0.5rem;
}

/* ==============================
   Бегущие счётчики
============================== */

.stats-counter {
  padding: 1rem;
}

.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  min-width: 140px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #3498db;
  line-height: 1.2;
}

.stat-label {
  font-size: 1rem;
  color: #000;
  margin-top: 0.5rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .stats-container {
    gap: 1.5rem;
  }
  .stat-number {
    font-size: 2rem;
  }
}

/* ==============================
   Цены
============================== */

.pricing {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.price-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.price-item:last-child {
  border-bottom: none;
}

/* ==============================
   Отзывы клиентов — карусель (стиль ВКонтакте)
============================== */

.vk-reviews-carousel {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  min-height: 130px;
  transition: height 0.3s ease;
}

.vk-review-slide {
  position: absolute;
  top: 0;
  left: 100%;
  width: 100%;
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
  padding: 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 12px;
  flex-direction: column;
}

@media (min-width: 769px) {
  .vk-review-slide {
    flex-direction: row;
  }
}

.vk-review-slide.active {
  opacity: 1;
  left: 0;
  transform: translateX(0);
}

.vk-review-slide .vk-avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.vk-review-slide .vk-content {
  flex: 1;
}

.vk-review-slide .vk-header {
  font-size: 16px;
  color: #2a5885;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vk-review-slide .vk-header strong {
  font-weight: 700;
}

.vk-review-slide .vk-date {
  color: #818c99;
  font-size: 16px;
}

.vk-review-slide .vk-text {
  font-size: 16px;
  line-height: 1.4;
  color: #000;
}

/* Заголовок с логотипом ВК */
.vk-reviews-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1.5rem;
}

.vk-logo {
  width: 50px;
  height: 50px;
}

/* ==============================
   Кнопка заявки в основном контенте
============================== */

.contact {
  text-align: center;
}

.contact h2 {
  color: #e74c3c;
  margin-bottom: 1rem;
}

.contact-btn {
  display: inline-block;
  background: #e74c3c;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  margin-top: 1rem;
  cursor: pointer;
}

.contact-btn:hover {
  background: #c0392b;
}

/* ==============================
   Футер
============================== */

footer {
  background: #2c3e50;
  color: white;
  text-align: center;
  padding: 1.5rem;
  margin-top: 2rem;
}

/* ==============================
   Модальное окно заявки
============================== */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: fadeIn 0.3s;
}

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

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
}

.close:hover {
  color: #333;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.submit-btn {
  width: 100%;
  background: #e74c3c;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.submit-btn:hover {
  background: #c0392b;
}

.g-recaptcha {
  transform: scale(0.9);
  transform-origin: center;
}

/* ==============================
   Страница "Контакты"
============================== */

.contact-page {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: flex-start;
}

.contact-image-box {
  flex: 0 0 320px;
  text-align: center;
}

.contact-image-box img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

.contact-image-box img:hover {
  transform: scale(1.02);
}

.contact-content {
  flex: 1;
  min-width: 280px;
}

.contact-content h1 {
  font-size: 2rem;
  margin-bottom: 0rem;
  color: #2c3e50;
}

/* Иконки соцсетей */
.contact-actions {
  display: flex;
  justify-content: flex-start;
  gap: 1.5rem;
  margin: 0.5rem 0;
  flex-wrap: wrap;
}

.social-icon {
  display: inline-block;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.social-icon:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  vertical-align: top;
  border-radius: 8px;
}

.promo {
  background: #f0f8ff;
  padding: 1.4rem;
  border-radius: 10px;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #3498db;
}

.promo h2 {
  margin-bottom: 0.6rem;
  color: #2980b9;
  font-size: 1.4rem;
}

.promo p {
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.promo-code {
  display: inline-block;
  background: #2980b9;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  margin: 0.5rem auto;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.promo-code:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
  .contact-page {
    flex-direction: column;
    text-align: center;
  }
  .contact-actions {
    align-items: center;
  }
}

/* ==============================
   Телефон на странице контактов
============================== */

.contact-phone {
  text-align: left;
  margin-top: 0rem;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2c3e50;
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.2s;
}

.phone-link:hover {
  color: #3498db;
}

.phone-link svg {
  color: #3498db;
}

/* ==============================
   Как мы работаем?
============================== */

.how-we-work {
  padding: 0;
}

.process-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.step {
  text-align: center;
  min-width: 80px;
}

.step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: #3498db;
  color: white;
  border-radius: 50%;
  margin-bottom: 0.5rem;
}

.step-icon svg {
  width: 35px;
  height: 35px;
}

.final-step .step-icon {
  background: #2ecc71;
}

.step-text {
  font-size: 1rem;
  color: #2c3e50;
  line-height: 1.4;
}

.step-arrow {
  font-size: 1.8rem;
  color: #95a5a6;
  font-weight: bold;
}

@media (max-width: 768px) {
  .process-steps {
    flex-direction: column;
    gap: 1rem;
  }
  .step-arrow {
    transform: rotate(90deg);
    font-size: 1.5rem;
  }
}

/* ==============================
   Кнопка "Вверх"
============================== */

.scroll-to-top {
  position: fixed;
  bottom: 20px;
  left: 87%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 30px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 999;
}

.scroll-to-top:hover {
  background: #2980b9;
  transform: translateX(-50%) translateY(-2px);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* Плавная прокрутка */
html {
  scroll-behavior: smooth;
}

/* ==============================
   Блог — сетка записей
============================== */

.blog-posts h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2.0rem;
  margin-bottom: 2.0rem;
}

/* ==============================
   Блог — карточки с изображением на всю ширину
============================== */

.post-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  text-align: left; 
  display: flex;
  flex-direction: column;
  height: 100%; /* растягивает карточку на всю высоту сетки */
}

.post-card:hover {
  transform: translateY(-5px);
}

.post-image-link {
  display: block;
  flex-shrink: 0; /* изображение не сжимается */
}

.post-thumbnail {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px 10px 0 0;
}

/* Блок с датой, заголовком и анонсом — центрируем и ограничиваем ширину */
.post-content {
  padding: 1.2rem 1rem;
  flex-grow: 1; /* занимает всё оставшееся пространство */
  display: flex;
  flex-direction: column;
}

/* Контейнер для даты и просмотров — в одну строку */
.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Распределяет элементы по краям */
  margin-bottom: 0.5rem;
}

.post-date {
  color: #7f8c8d;
  font-size: 1.0rem;
}

.post-views {
  display: inline-flex;
  align-items: center;
  color: #7f8c8d;
  font-size: 1.0rem;
}

.post-views svg {
  margin-right: 3px;
  color: #95a5a6;
}

.post-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  color: #2c3e50;
  line-height: 1.4;
}

.post-card h3 a {
  color: inherit;
  text-decoration: none;
}

.post-card h3 a:hover {
  color: #3498db;
}

.post-excerpt {
  line-height: 1.6;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* максимум 3 строк */
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Удалили flex-grow и добавили фиксированную высоту */
  max-height: 4.8rem; /* 1.6 * 3 = 4.8 */
  min-height: 4.8rem; /* чтобы короткие тексты не сжимались */
}

.read-more-btn {
  display: inline-block;
  background: #3498db;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s;
}

.read-more-btn:hover {
  background: #2980b9;
}

.pagination {
  text-align: center;
  margin-top: 2rem;
}

.pagination ul {
  display: inline-flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination li {
  margin: 0 4px;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 12px;
  text-decoration: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
}

.pagination .current {
  background: #3498db;
  color: white;
  border-color: #3498db;
}

/* ==============================
   Промо-блок в блоге
============================== */

.promo-quiz {
  background: #f0f8ff;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  margin-top: 3rem;
  margin-bottom: 3rem;
  border-left: 4px solid #3498db;
}

.promo-quiz h3 {
  color: #2980b9;
  margin-bottom: 1rem;
}

.promo-quiz p {
  margin-bottom: 1.2rem;
  line-height: 1.5;
}

.telegram-promo-btn {
  display: inline-block;
  background: #0088cc;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 1rem;
  transition: background 0.2s;
}

.telegram-promo-btn:hover {
  background: #006699;
}

/* ==============================
   Одиночная статья — чистый макет
============================== */

.single-post-wrapper {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  margin-bottom: 0rem;
  color: inherit !important;
  text-decoration: none !important;
  font-weight: 400 !important;
}

.entry-header {
  margin-bottom: 1.5rem;
}

.entry-title {
  font-size: 2rem;
  color: #2c3e50 !important; /* ← ЯВНО УКАЗАТЬ ЦВЕТ */
  margin: 0;
  text-decoration: none !important;
  font-weight: 700 !important;
}

.entry-meta {
  color: #7f8c8d;
  font-size: 1.0rem;
}

.entry-content {
  line-height: 1.6;
  color: #333;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: #2c3e50;
  margin: 1.5rem 0 1rem;
}

.entry-content h2 {
  font-size: 1.5rem;
}

.entry-content h3 {
  font-size: 1.3rem;
}

.entry-content p {
  margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content a {
  color: #3498db;
  text-decoration: none;
}

.entry-content a:hover {
  text-decoration: underline;
}

.post-divider {
  border: 0;
  border-top: 1px solid #eee;
  margin: 2rem 0;
}

.post-taxonomies {
  margin-top: 1.5rem;
  color: #555;
}

.post-taxonomies a {
  color: #3498db;
  text-decoration: none;
}

.post-taxonomies a:hover {
  text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
  .single-post-wrapper {
    padding: 1.5rem;
  }
  .entry-title {
    font-size: 1.6rem;
  }
}