* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body { min-width: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.6; color: #333; background: #fafafa; padding-bottom: 60px; overflow-x: hidden; }
a { color: #0066cc; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
header { background: #fff; border-bottom: 1px solid #eaeaea; position: sticky; top: 0; z-index: 1000; }
.nav-container { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 18px 20px; }
.logo { flex: 0 0 auto; font-size: 1.3rem; font-weight: bold; color: #111; white-space: nowrap; }
nav { min-width: 0; }
nav ul { display: flex; list-style: none; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
nav ul li a { display: block; font-size: 0.95rem; font-weight: 500; color: #555; line-height: 1.25; }
nav ul li a.active { color: #0066cc; font-weight: bold; }
main { max-width: 1000px; margin: 40px auto 0; padding: 0 20px; }
section { margin-bottom: 40px; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.01); }
h1 { font-size: 2.3rem; color: #111; margin-bottom: 20px; }
h2 { font-size: 1.7rem; color: #222; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #f0f0f0; }
p { margin-bottom: 15px; font-size: 1.05rem; color: #444; overflow-wrap: anywhere; }
.hero-flex { display: flex; gap: 40px; align-items: center; }
.hero-text { flex: 2; min-width: 0; }
.hero-img { flex: 1; min-width: 220px; text-align: center; }
.hero-img img { width: 100%; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.reviews-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.review-card { background: #fdfdfd; border: 1px solid #eee; padding: 20px; border-radius: 6px; }
.review-card p:first-child { font-style: italic; font-size: 0.95rem; }
.review-card p:last-child { font-weight: bold; margin-top: 10px; font-size: 0.9rem; color: #555; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 25px; margin-top: 20px; }
.portfolio-item { background: #fdfdfd; border: 1px solid #eee; border-radius: 6px; overflow: hidden; }
.portfolio-item img { width: 100%; height: 200px; object-fit: cover; background: #eee; }
.portfolio-desc { padding: 15px; }
.price-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.price-table th, .price-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.price-table th { background: #f7f7f7; }
.client-logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 20px; margin-bottom: 30px; }
.client-card { padding: 20px; background: #f9f9f9; border-radius: 6px; border: 1px solid #eee; text-align: center; }
footer { text-align: center; margin-top: 60px; padding-top: 20px; border-top: 1px solid #eaeaea; font-size: 0.9rem; color: #888; }

@media (max-width: 760px) {
  .nav-container { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px 16px; }
  .logo { font-size: 1.1rem; white-space: normal; }
  nav { width: 100%; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  nav ul { width: max-content; min-width: 100%; flex-wrap: nowrap; justify-content: flex-start; gap: 8px; }
  nav ul li a { padding: 8px 10px; border: 1px solid #e8e8e8; border-radius: 6px; background: #fff; font-size: 0.9rem; white-space: nowrap; }
  nav ul li a.active { background: #eef5ff; border-color: #b9d6ff; }
  main { margin-top: 24px; padding: 0 12px; }
  section { margin-bottom: 24px; padding: 20px 16px; border-radius: 6px; }
  h1 { font-size: 1.75rem; line-height: 1.2; margin-bottom: 16px; }
  h2 { font-size: 1.35rem; line-height: 1.25; margin-bottom: 16px; }
  h3 { line-height: 1.3; }
  p { font-size: 1rem; }
  .hero-flex { flex-direction: column; gap: 22px; align-items: stretch; }
  .hero-img { min-width: 0; max-width: 360px; width: 100%; margin: 0 auto; }
  .reviews-grid { grid-template-columns: 1fr; gap: 14px; }
  .portfolio-grid { gap: 16px; }
  .portfolio-item img { height: 180px; }
  .client-card { padding: 16px; }
  footer { margin: 32px 12px 0; padding-top: 16px; }
}

@media (max-width: 560px) {
  .price-table,
  .price-table thead,
  .price-table tbody,
  .price-table tr,
  .price-table th,
  .price-table td { display: block; width: 100%; }
  .price-table { border-collapse: separate; border-spacing: 0 12px; }
  .price-table thead { display: none; }
  .price-table tr { background: #fdfdfd; border: 1px solid #eee; border-radius: 6px; padding: 12px; }
  .price-table td { border: 0; padding: 4px 0; }
  .price-table td:nth-child(1) { font-size: 1.05rem; }
  .price-table td:nth-child(2)::before { content: "Сроки: "; font-weight: 700; color: #222; }
  .price-table td:nth-child(3)::before { content: "Стоимость: "; font-weight: 700; color: #222; }
}

@media (max-width: 380px) {
  .nav-container { padding-left: 12px; padding-right: 12px; }
  main { padding: 0 8px; }
  section { padding: 16px 12px; }
  h1 { font-size: 1.55rem; }
  h2 { font-size: 1.22rem; }
  .portfolio-item img { height: 160px; }
}
