/* Стили для страницы ремонта */

.page-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 60px 40px;
  text-align: center;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-subtitle {
  font-size: 18px;
  color: #0090ff;
  font-weight: 600;
  margin-bottom: 15px;
  display: block;
}

.page-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #1a1a1a;
}

.page-description {
  font-size: 18px;
  line-height: 1.6;
  color: #4d4d4d;
  max-width: 800px;
  margin: 0 auto;
}

/* Типы ремонта */
.repair-types {
  padding: 80px 20px;
  background: #1b1d22;
  color: white;
}

.section-title {
  font-size: 36px;
  text-align: center;
  margin-bottom: 15px;
  color: white;
}

.section-subtitle {
  text-align: center;
  color: #ccc;
  margin-bottom: 50px;
  font-size: 18px;
}

.types-grid {
  display: flex;
  justify-content: center;
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

/* Когда карточек меньше 3 - центрируем и ограничиваем ширину */
.examples-grid:has(.example-card:nth-child(1):last-child),
.examples-grid:has(.example-card:nth-child(2):nth-last-child(1)),
.examples-grid:has(.example-card:nth-child(2):nth-last-child(2)) {
  grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
  justify-content: center;
}

.type-card {
  background: #252830;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  width: 350px; /* Фиксированная ширина для всех карточек */
  min-height: 520px;
  box-sizing: border-box;
}

.type-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.type-icon {
  font-size: 42px;
  margin-bottom: 15px;
  flex-shrink: 0;
}

.type-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #0090ff;
  flex-shrink: 0;
  line-height: 1.3;
}

.type-card p {
  color: #a0a0a0;
  margin-bottom: 15px;
  line-height: 1.5;
  flex-shrink: 0;
  font-size: 15px;
}

.type-features {
  list-style: none;
  margin-bottom: 20px;
  text-align: left;
  flex-grow: 1;
  min-height: 180px;
}


.type-features li {
  padding: 6px 0;
  border-bottom: 1px solid #3a3e4a;
  position: relative;
  padding-left: 22px;
  color: #ddd;
  font-size: 14px;
  line-height: 1.4;
}

.type-features li:before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #0090ff;
  font-weight: bold;
  font-size: 14px;
}

.type-features li:last-child {
  border-bottom: none;
}

.type-price {
  font-size: 20px;
  font-weight: 700;
  color: #0090ff;
  margin-bottom: 15px;
  flex-shrink: 0;
}

/* Кнопка всегда внизу */
.type-card .portfolio-button {
  margin-top: auto;
  flex-shrink: 0;
  padding: 12px 20px;
  font-size: 14px;
}
/* Стили для случаев, когда карточек мало */
.types-grid .type-card:only-child {
  max-width: 380px;
  margin: 0 auto;
}

/* Остальные стили остаются без изменений */
.work-stages {
  padding: 80px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.work-stages .section-title {
  color: #1a1a1a;
}

.work-stages .section-subtitle {
  color: #4d4d4d;
}

.stages-timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.stages-timeline:before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30px;
  width: 2px;
  background: #0090ff;
}

.stage {
  display: flex;
  margin-bottom: 40px;
  position: relative;
}

.stage-number {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0090ff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin-right: 30px;
  flex-shrink: 0;
  z-index: 1;
  border: 4px solid white;
  box-shadow: 0 0 0 2px #0090ff;
}

.stage-content {
  flex: 1;
  padding-top: 10px;
}

.stage-content h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: #1a1a1a;
}

.stage-content p {
  color: #4d4d4d;
  line-height: 1.6;
}

/* Преимущества */
.repair-benefits {
  padding: 80px 20px;
  background: #1b1d22;
  color: white;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Уменьшил для benefits */
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.no-types {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #a0a0a0;
  font-size: 18px;
}

.no-types p {
  margin-bottom: 20px;
}

.benefit-card {
  background: #252830;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  transition: transform 0.3s ease;
}

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

.benefit-icon {
  font-size: 36px;
  margin-bottom: 15px;
}

.benefit-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #0090ff;
}

.benefit-card p {
  color: #a0a0a0;
  line-height: 1.5;
  font-size: 14px;
}

/* Примеры работ */
.repair-examples {
  padding: 80px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.repair-examples .section-title {
  color: #1a1a1a;
}

.repair-examples .section-subtitle {
  color: #4d4d4d;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 380px)); /* Ограничиваем максимальную ширину */
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto 40px;
  justify-content: center; /* Центрируем карточки */
}

.example-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  width: 100%; /* Занимает всю доступную ширину в grid-ячейке */
  max-width: 380px; /* Максимальная ширина как у карточек услуг */
}

.example-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.example-image {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.example-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.example-card:hover .example-image img {
  transform: scale(1.05);
}

.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0090ff;
  font-weight: 500;
}

.example-info {
  padding: 20px;
}

.example-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #1a1a1a;
}

.example-info p {
  color: #4d4d4d;
  margin-bottom: 12px;
  line-height: 1.5;
  font-size: 14px;
}

/* Ограничение описания */
.example-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4.5em;
  line-height: 1.5;
}
.example-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
}

.example-details span {
  color: #666;
  font-size: 13px;
}

.example-category {
  margin-top: 12px;
}

.category-badge {
  display: inline-block;
  background: #0090ff;
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}

.no-works {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 18px;
  max-width: 380px; /* Ограничиваем ширину для случая когда работ нет */
  margin: 0 auto;
}

.no-works p {
  margin-bottom: 20px;
}

.examples-cta {
  text-align: center;
  margin-top: 40px;
}

.examples-cta p {
  font-size: 18px;
  margin-bottom: 20px;
  color: #4d4d4d;
}
/* Призыв к действию */
.cta-section {
  background: linear-gradient(135deg, #252830 0%, #252830 100%);
  padding: 80px 20px;
  text-align: center;
  color: white;
}

.cta-content h2 {
  font-size: 36px;
  margin-bottom: 15px;
}

.cta-content p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.9;
}

/* Стили для пагинации */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid #0090ff;
    border-radius: 8px;
    color: #0090ff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-item:hover {
  background: #0090ff;
  color: white;
}

.pagination-item.active {
    background: #0090ff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 144, 255, 0.3);
}

.pagination-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #666;
  color: #666;
}

.pagination-item.disabled:hover {
  background: #f8f9fa;
  color: #6c757d;
}

/* Адаптивность */
@media (max-width: 1200px) {
  .types-grid {
    gap: 20px;
  }
  .type-card {
    width: 320px; /* Немного уменьшаем ширину на планшетах */
  }  
}

@media (max-width: 768px) {
  .page-header {
    padding: 40px 20px;
  }
  
  .page-title {
    font-size: 32px;
  }
  
  .types-grid {
    gap: 20px;
    padding: 0 15px;
  }
  
  /* На мобильных всегда одна колонка */
  .types-grid:has(.type-card:nth-child(1):last-child),
  .types-grid:has(.type-card:nth-child(2):nth-last-child(1)),
  .types-grid:has(.type-card:nth-child(2):nth-last-child(2)) {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  
  .type-card {
    width: 100%; /* На мобильных занимает всю ширину */
    max-width: 400px;
    min-height: 480px;
    padding: 20px;
  }
  
  .type-features {
    min-height: 160px;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }
  
  .examples-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
  }
  /* На мобильных всегда одна колонка */
  .examples-grid:has(.example-card:nth-child(1):last-child),
  .examples-grid:has(.example-card:nth-child(2):nth-last-child(1)),
  .examples-grid:has(.example-card:nth-child(2):nth-last-child(2)) {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  
  .example-card {
    max-width: 100%;
  }  
}
@media (max-width: 480px) {
  .type-card {
    min-height: 450px;
  }
  
  .type-features {
    min-height: 140px;
  }
}
@media (max-width: 768px) {
  .types-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 15px;
  }
  
  .type-card {
    width: 100%;
    max-width: 400px;
    min-height: 480px;
    padding: 20px;
  }
  
  .examples-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 15px;
  }
  
  .example-card {
    width: 100%;
    max-width: 400px;
  }
}