/*
Theme Name: КранМастер
Theme URI: https://kranmaster.com.ua
Author: КранМастер
Description: Тема для сайта сервиса и ремонта автокранов КранМастер. Одностраничный лендинг с прайсом, кейсами, формой заявки и FAQ.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: kranmaster
*/

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1a1f2e;
  line-height: 1.6;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.btn { display: inline-block; padding: 14px 28px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 15px; transition: all .2s; border: none; cursor: pointer; }
.btn-primary { background: #ff6b1a; color: #fff; }
.btn-primary:hover { background: #e85a0c; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-secondary:hover { background: #fff; color: #1a1f2e; }
.btn-dark { background: #1a1f2e; color: #fff; }
.btn-dark:hover { background: #000; }

.topbar { background: #1a1f2e; color: #cfd6e4; font-size: 13px; padding: 8px 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; margin-left: 16px; }
.topbar a:hover { color: #ff6b1a; }

.site-header { background: #fff; border-bottom: 1px solid #e6eaf2; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }
.logo { font-size: 22px; font-weight: 800; color: #1a1f2e; text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: #ff6b1a; }
nav ul { list-style: none; display: flex; gap: 28px; }
nav a { color: #1a1f2e; text-decoration: none; font-size: 15px; font-weight: 500; }
nav a:hover { color: #ff6b1a; }
.header-cta { display: flex; align-items: center; gap: 16px; }

.hero { background: linear-gradient(135deg, #1a1f2e 0%, #2a3447 100%); color: #fff; padding: 90px 0; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: 0; right: 0; width: 50%; height: 100%; background: radial-gradient(circle at 70% 50%, rgba(255,107,26,0.15) 0%, transparent 70%); }
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.hero h1 { font-size: 46px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; letter-spacing: -1px; }
.hero p.lead { font-size: 19px; color: #cfd6e4; margin-bottom: 36px; max-width: 720px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

section { padding: 70px 0; }
.section-tag { display: inline-block; font-size: 13px; font-weight: 700; color: #ff6b1a; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 12px; }
.section-title { font-size: 32px; font-weight: 800; margin-bottom: 16px; color: #1a1f2e; letter-spacing: -0.5px; }
.section-subtitle { font-size: 17px; color: #5a6478; max-width: 780px; margin-bottom: 40px; }

.services-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.service-row { display: grid; grid-template-columns: 1fr 200px 160px; gap: 24px; padding: 22px 28px; background: #fff; border: 1px solid #e6eaf2; border-radius: 8px; align-items: center; transition: all .2s; }
.service-row:hover { border-color: #ff6b1a; }
.service-name { font-weight: 600; font-size: 16px; color: #1a1f2e; }
.service-name small { display: block; font-weight: 400; color: #5a6478; margin-top: 4px; font-size: 13px; }
.service-time { color: #5a6478; font-size: 14px; }
.service-price { font-weight: 700; font-size: 16px; color: #ff6b1a; text-align: right; }

.capabilities { background: #f7f9fc; }
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; align-items: start; }
.cap-list { list-style: none; }
.cap-list li { padding: 14px 0 14px 32px; border-bottom: 1px solid #e6eaf2; position: relative; font-size: 16px; color: #2a3447; }
.cap-list li::before { content: "✓"; position: absolute; left: 0; top: 14px; color: #ff6b1a; font-weight: 800; font-size: 18px; }
.cap-list li:last-child { border-bottom: none; }
.cap-models { background: #1a1f2e; color: #fff; padding: 36px; border-radius: 8px; }
.cap-models h3 { color: #ff6b1a; font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 20px; }
.cap-models .model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.model-pill { background: rgba(255,255,255,0.06); padding: 12px; border-radius: 6px; text-align: center; font-weight: 600; font-size: 14px; border: 1px solid rgba(255,255,255,0.08); }

.cases { background: #fff; }
.cases-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.case-card { border: 1px solid #e6eaf2; border-radius: 8px; padding: 28px; background: #fff; }
.case-card h3 { font-size: 17px; margin-bottom: 12px; color: #1a1f2e; }
.case-card .meta { font-size: 13px; color: #ff6b1a; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.case-card p { color: #5a6478; font-size: 14px; }

.process { background: #f7f9fc; }
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.process-step { background: #fff; border: 1px solid #e6eaf2; border-radius: 8px; padding: 28px 24px; }
.process-num { display: inline-flex; width: 40px; height: 40px; background: #ff6b1a; color: #fff; border-radius: 50%; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; margin-bottom: 16px; }
.process-step h4 { font-size: 16px; margin-bottom: 8px; color: #1a1f2e; }
.process-step p { color: #5a6478; font-size: 14px; }

.faq-section { padding: 70px 0; background: #fff; }
.faq-grid { display: grid; gap: 12px; margin-top: 28px; }
.faq-item { background: #f7f9fc; border: 1px solid #e6eaf2; border-radius: 8px; padding: 18px 24px; }
.faq-item summary { font-weight: 600; font-size: 16px; cursor: pointer; color: #1a1f2e; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin-top: 12px; color: #5a6478; font-size: 15px; line-height: 1.7; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid #e6eaf2; }
.contact-info { padding: 44px; background: linear-gradient(135deg, #1a1f2e 0%, #2a3447 100%); color: #fff; }
.contact-info h3 { font-size: 22px; margin-bottom: 24px; }
.contact-item { margin-bottom: 18px; }
.contact-item .label { font-size: 12px; color: #ff6b1a; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.contact-item .value { font-size: 16px; font-weight: 600; color: #fff; }
.contact-item a { color: #fff; text-decoration: none; }
.contact-form { padding: 44px; background: #fff; }
.contact-form h3 { font-size: 22px; margin-bottom: 8px; color: #1a1f2e; }
.contact-form p { color: #5a6478; margin-bottom: 24px; font-size: 15px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #2a3447; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 14px; border: 1px solid #cfd6e4; border-radius: 6px; font-size: 15px; font-family: inherit; transition: border-color .2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #ff6b1a; }
.form-group textarea { min-height: 90px; resize: vertical; }
.form-submit { width: 100%; padding: 15px; font-size: 16px; }
.form-note { font-size: 12px; color: #5a6478; margin-top: 12px; text-align: center; }

.site-footer { background: #0d111c; color: #8a93a8; padding: 32px 0 20px; font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-inner a { color: #8a93a8; text-decoration: none; }
.footer-inner a:hover { color: #ff6b1a; }

.page-content { max-width: 760px; margin: 0 auto; padding: 60px 24px; }
.page-content h1 { font-size: 32px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; }
.page-content h2 { font-size: 20px; font-weight: 700; margin-top: 32px; margin-bottom: 12px; }
.page-content p { margin-bottom: 12px; color: #2a3447; font-size: 16px; line-height: 1.7; }
.page-content ul { margin: 12px 0 12px 24px; }
.page-content li { margin-bottom: 6px; color: #2a3447; }
.page-content a { color: #ff6b1a; text-decoration: none; }
.page-content a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .hero h1 { font-size: 32px; }
  .hero p.lead { font-size: 17px; }
  .cap-grid, .contact-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .service-row { grid-template-columns: 1fr; gap: 8px; padding: 20px; }
  .service-time, .service-price { text-align: left; }
  .section-title { font-size: 26px; }
  nav ul { display: none; }
  .contact-info, .contact-form { padding: 30px 24px; }
}
@media (max-width: 600px) {
  .topbar { font-size: 12px; }
  .topbar a { margin-left: 8px; }
  .process-steps { grid-template-columns: 1fr; }
  .cap-models .model-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ===== GALLERY & LIGHTBOX ===== */
.case-gallery-btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 8px 16px;
  background: rgba(255,107,26,0.1); color: #ff6b1a;
  border: 1px solid rgba(255,107,26,0.3); border-radius: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .2s; text-decoration: none;
}
.case-gallery-btn:hover { background: #ff6b1a; color: #fff; }
.case-gallery-btn svg { flex-shrink: 0; }

.case-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.case-photo-thumb {
  width: 80px; height: 60px; border-radius: 6px;
  object-fit: cover; cursor: pointer;
  border: 2px solid transparent; transition: all .2s;
}
.case-photo-thumb:hover { border-color: #ff6b1a; transform: scale(1.05); }

/* Lightbox */
.km-lightbox {
  display: none; position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.92); align-items: center; justify-content: center;
}
.km-lightbox.active { display: flex; }
.km-lightbox-inner {
  position: relative; max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.km-lightbox img {
  max-width: 90vw; max-height: 75vh;
  border-radius: 8px; object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.km-lightbox-caption {
  color: #fff; font-size: 14px; text-align: center; max-width: 600px;
}
.km-lightbox-close {
  position: fixed; top: 20px; right: 24px;
  background: rgba(255,255,255,.15); border: none; border-radius: 50%;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 20px; transition: background .2s;
}
.km-lightbox-close:hover { background: rgba(255,255,255,.3); }
.km-lightbox-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.15); border: none; border-radius: 50%;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 22px; transition: background .2s;
}
.km-lightbox-nav:hover { background: rgba(255,255,255,.3); }
.km-lightbox-prev { left: 16px; }
.km-lightbox-next { right: 16px; }
.km-lightbox-counter {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.6); font-size: 13px;
}
.km-thumbs {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.km-thumb {
  width: 60px; height: 45px; border-radius: 4px; object-fit: cover;
  cursor: pointer; opacity: .5; transition: opacity .2s;
  border: 2px solid transparent;
}
.km-thumb.active, .km-thumb:hover { opacity: 1; border-color: #ff6b1a; }

.upload-hint {
  display: inline-block; margin-top: 8px; padding: 6px 12px;
  background: #f8f9fa; border: 1px dashed #ccc; border-radius: 6px;
  font-size: 12px; color: #888; cursor: default;
}