/* Выкуп-Такси.РФ - Static Site CSS */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

a { color: #1e73be; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 15px 0;
}
.site-header-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.site-logo img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}
.site-title {
  font-size: 1.2em;
  font-weight: 700;
  color: #dd3333;
  margin: 0;
}
.site-description {
  font-size: 0.8em;
  color: #666;
  margin: 0;
}

/* Navigation */
.site-nav {
  background: #f8f9fa;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
}
.site-nav ul {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
  list-style: none;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.site-nav li a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333;
  padding: 10px 20px;
  font-size: 0.9em;
  font-weight: 600;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.site-nav li a:hover {
  background: #1e73be;
  color: #fff;
  border-color: #1e73be;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(30,115,190,0.3);
}
.site-nav li a::before {
  font-size: 1.1em;
}
.site-nav li:nth-child(1) a::before { content: "🚗"; }
.site-nav li:nth-child(2) a::before { content: "📋"; }
.site-nav li:nth-child(3) a::before { content: "💳"; }

/* Main content */
.content {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  font-size: 1.8em;
  margin: 0.5em 0;
  line-height: 1.3;
}
h2 {
  font-size: 1.5em;
  margin: 1em 0 0.5em;
}
h3 {
  font-size: 1.2em;
  margin: 1em 0 0.5em;
}

p { margin: 0.8em 0; }

.center-text { text-align: center; }

/* Blockquotes */
.quote {
  border-left: 4px solid #1e73be;
  padding: 15px 20px;
  margin: 1em 0;
  background: #f8f9fa;
  border-radius: 0 4px 4px 0;
}
.quote p { margin: 0.3em 0; }
.quote cite {
  display: block;
  margin-top: 10px;
  font-size: 0.85em;
  color: #666;
  font-style: normal;
}

/* Buttons */
.btn-box {
  text-align: center;
  margin: 15px 0;
}
.btn {
  display: inline-block;
  padding: 14px 35px;
  font-size: 1.1em;
  font-weight: 700;
  color: #fff !important;
  border-radius: 5px;
  text-decoration: none !important;
  transition: opacity 0.2s;
}
.btn:hover { opacity: 0.85; }

/* Separator */
.sep {
  border: none;
  border-top: 1px solid #ddd;
  margin: 25px 0;
  opacity: 0.6;
}

/* Spacer */
.spacer { height: 30px; }

/* Gallery */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}
.gallery-item {
  flex: 1 1 calc(20% - 8px);
  min-width: 120px;
  overflow: hidden;
  border-radius: 4px;
}
.gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.2s;
}
.gallery-item img:hover { transform: scale(1.05); }
/* Single image in gallery — show full, no crop */
.gallery-item:only-child { flex: 0 1 auto; max-width: 500px; }
.gallery-item:only-child img { height: auto; object-fit: contain; }

/* Available cars gallery — 3 per row, no crop */
.gallery-available .gallery-item { flex: 1 1 calc(33.33% - 8px); min-width: 150px; }
.gallery-available .gallery-item img { height: 200px; object-fit: cover; }

/* Galleries with 2-3 items (reviews) — show full, no crop */
.gallery-item:first-child:nth-last-child(2),
.gallery-item:first-child:nth-last-child(2) ~ .gallery-item,
.gallery-item:first-child:nth-last-child(3),
.gallery-item:first-child:nth-last-child(3) ~ .gallery-item {
  flex: 0 1 auto; max-width: 300px;
}
.gallery-item:first-child:nth-last-child(2) img,
.gallery-item:first-child:nth-last-child(2) ~ .gallery-item img,
.gallery-item:first-child:nth-last-child(3) img,
.gallery-item:first-child:nth-last-child(3) ~ .gallery-item img {
  height: auto; object-fit: contain;
}
.gallery-item a { display: block; }

/* Hero image (first figure, not in gallery) */
.hero-img {
  border-radius: 8px;
  overflow: hidden;
  margin: 15px 0;
}
.hero-img img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Ordered list (conditions) */
ol {
  margin: 1em 0;
  padding-left: 1.5em;
}
ol li {
  margin: 0.5em 0;
  padding-left: 0.3em;
}
ol li::marker {
  color: #1e73be;
  font-weight: 700;
}

/* Videos */
video {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 10px 0;
}

/* Phone block */
.phone-block {
  text-align: center;
  font-size: 1.5em;
  margin: 20px 0;
}
.phone-block a { color: #1e73be; font-weight: 700; }

/* Comments section */
.comments-section {
  margin-top: 30px;
}

/* Footer */
.site-footer {
  background: #333;
  color: #aaa;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 0.85em;
}
.site-footer a { color: #fff; }

/* Responsive */
@media (max-width: 600px) {
  h1 { font-size: 1.4em; }
  h2 { font-size: 1.2em; }
  .site-header-inner { flex-direction: column; text-align: center; }
  .site-nav ul { flex-wrap: wrap; gap: 8px; }
  .site-nav li a { padding: 8px 14px; font-size: 0.85em; flex: 1; justify-content: center; white-space: nowrap; }
  .gallery-item {
    flex: 1 1 calc(50% - 8px);
  }
  .gallery-item img { height: 130px; }
  .gallery-item:last-child:nth-child(odd) img { height: 180px; }
  .phone-block { font-size: 1.1em; }
  .btn { padding: 12px 25px; font-size: 1em; }
}
