/*
Theme Name: ТехРекс — Техпомощь на дороге
Theme URI: https://techrex.ru
Author: ТехРекс
Description: Лендинг службы техпомощи на дороге 24/7. Все тексты, телефоны, услуги, отзывы и фотогалерея редактируются из админки WordPress (Внешний вид → Настроить и разделы «Услуги», «Отзывы», «Наши работы»).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: techrex
*/

/* ============ Base ============ */
:root {
  --navy: #0f172a;
  --slate900: #1e293b;
  --slate800: #263449;
  --slate700: #334155;
  --slate500: #64748b;
  --slate400: #94a3b8;
  --slate300: #cbd5e1;
  --blue: #3b82f6;
  --blue600: #2563eb;
  --blue400: #60a5fa;
  --orange: #f97316;
  --orange600: #ea7317;
  --orange400: #fb923c;
  --green: #22c55e;
  --light: #f8fafc;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--navy);
  background: var(--light);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1152px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section--dark { background: var(--navy); }
.section--light { background: var(--light); }
.section--soft { background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%); }

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(59,130,246,.15); color: var(--blue400);
  border: 1px solid rgba(59,130,246,.25); margin-bottom: 16px;
}
.badge--light { background: rgba(59,130,246,.12); color: var(--blue); border-color: transparent; }

.sec-head { text-align: center; margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 700; margin: 0 0 16px; }
.sec-head p { max-width: 560px; margin: 0 auto; font-size: 16px; }
.section--dark .sec-head h2 { color: #fff; }
.section--dark .sec-head p { color: var(--slate400); }
.section--light .sec-head p, .section--soft .sec-head p { color: var(--slate500); }
.grad-text { background: linear-gradient(135deg, #60a5fa, #fb923c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.blue-text { color: var(--blue); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 16px 32px; border-radius: 12px; font-weight: 600; font-size: 16px;
  border: none; transition: all .25s; color: #fff;
}
.btn--orange { background: linear-gradient(135deg, #f97316, #d95f0e); box-shadow: 0 0 24px rgba(249,115,22,.45); }
.btn--orange:hover { transform: translateY(-2px); }
.btn--ghost { background: transparent; border: 1px solid rgba(255,255,255,.25); }
.btn--ghost:hover { background: rgba(255,255,255,.1); }

/* ============ Hero ============ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .25; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(15,23,42,.97) 0%, rgba(15,23,42,.75) 55%, rgba(15,23,42,.4) 100%); }
.hero__status { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); z-index: 20; }
.hero__inner { position: relative; z-index: 10; width: 100%; padding: 112px 20px; max-width: 1152px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 16px; margin-bottom: 40px; }
.logo__mark { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #3b82f6, #f97316); }
.logo__name { color: #fff; font-weight: 800; font-size: 24px; line-height: 1; margin: 0; }
.logo__sub { color: var(--slate400); font-size: 14px; margin: 4px 0 0; }
.hero h1 { font-size: clamp(32px, 5vw, 62px); font-weight: 800; line-height: 1.1; color: #fff; margin: 0 0 24px; }
.hero__lead { font-size: 18px; color: #cbd5e1; max-width: 620px; margin: 0 0 24px; }
.hero__feats { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 32px; color: #cbd5e1; font-size: 14px; }
.hero__feats span { display: inline-flex; align-items: center; gap: 8px; }
.hero__phones { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 32px; }
.hero__phone { display: inline-flex; align-items: center; gap: 12px; font-size: clamp(20px, 3vw, 32px); font-weight: 700; color: #fff; }
.hero__phone:hover { opacity: .8; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 56px; }
.hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.1); }
.hero__stats div { text-align: center; }
.hero__stats b { display: block; font-size: 30px; font-weight: 800; color: #fff; }
.hero__stats small { font-size: 14px; color: var(--slate400); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; display: inline-block; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .4 } }

/* ============ Services ============ */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.card-service {
  background: rgba(30,41,59,.5); border: 1px solid var(--slate700);
  border-radius: 20px; padding: 32px; transition: all .3s;
}
.card-service:hover { transform: translateY(-4px); border-color: rgba(59,130,246,.5); box-shadow: 0 10px 40px rgba(59,130,246,.1); }
.card-service__icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; background: linear-gradient(135deg, rgba(59,130,246,.2), rgba(249,115,22,.2)); color: var(--blue400); }
.card-service h3 { color: #fff; font-size: 18px; margin: 0 0 8px; }
.card-service p { color: var(--slate400); font-size: 14px; margin: 0 0 20px; }
.card-service__price { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-service__price span { color: var(--slate500); font-size: 14px; }
.card-service__price b { color: var(--orange400); font-size: 24px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag { padding: 4px 12px; border-radius: 999px; font-size: 12px; background: rgba(51,65,85,.5); color: var(--slate300); }
.btn-order { width: 100%; padding: 12px; border-radius: 12px; font-weight: 500; font-size: 14px; background: transparent; border: 1px solid var(--slate700); color: var(--slate300); transition: all .2s; }
.btn-order:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ============ Why us ============ */
.card-adv { background: #fff; border-radius: 20px; padding: 32px; box-shadow: 0 4px 20px rgba(0,0,0,.05); transition: all .3s; }
.card-adv:hover { transform: translateY(-4px); box-shadow: 0 10px 40px rgba(59,130,246,.1); }
.card-adv__icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; }
.card-adv b { display: block; font-size: 36px; font-weight: 800; color: var(--blue); margin-bottom: 8px; }
.card-adv h3 { font-size: 16px; margin: 0 0 8px; }
.card-adv p { font-size: 14px; color: var(--slate500); margin: 0; }
.guarantee { background: var(--navy); border-radius: 20px; padding: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-top: 48px; }
.guarantee h3 { color: #fff; font-size: 24px; margin: 0 0 16px; }
.guarantee > div > p { color: var(--slate400); font-size: 14px; margin: 0 0 24px; }
.guarantee ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.guarantee li { color: #4ade80; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.guarantee__box { border-radius: 14px; min-height: 240px; background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; text-align: center; }
.guarantee__box .big { font-size: 48px; font-weight: 800; color: var(--orange400); }
.guarantee__box .t { color: #fff; font-weight: 600; font-size: 18px; }
.guarantee__box .s { color: var(--slate400); font-size: 14px; }

/* ============ How we work ============ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; margin-bottom: 64px; }
.steps__line { position: absolute; top: 40px; left: 12.5%; right: 12.5%; height: 2px; background: linear-gradient(90deg, #3b82f6, #f97316, #22c55e, #a855f7); }
.step { text-align: center; position: relative; z-index: 2; }
.step__num { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: #fff; }
.step h3 { color: #fff; font-size: 16px; margin: 0 0 8px; }
.step p { color: var(--slate400); font-size: 14px; margin: 0; }

/* ============ Gallery ============ */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure { position: relative; margin: 0; border-radius: 16px; overflow: hidden; cursor: pointer; aspect-ratio: 4/3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 16px; background: linear-gradient(transparent, rgba(15,23,42,.92)); color: #fff; }
.gallery figcaption b { display: block; font-size: 15px; }
.gallery figcaption span { font-size: 12px; color: var(--slate300); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 12px; }
.lightbox__btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none; width: 48px; height: 48px; border-radius: 50%; font-size: 22px; }
.lightbox__btn:hover { background: rgba(255,255,255,.24); }
.lightbox__prev { left: 24px; } .lightbox__next { right: 24px; } .lightbox__close { top: 24px; right: 24px; }
.lightbox__cap { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; }

/* ============ Reviews ============ */
.card-review { background: #fff; border-radius: 20px; padding: 32px; box-shadow: 0 4px 20px rgba(0,0,0,.05); position: relative; }
.card-review__top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #f97316); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.card-review b { display: block; font-size: 15px; }
.card-review small { color: var(--slate500); font-size: 12px; }
.stars { color: #facc15; font-size: 15px; margin-bottom: 12px; }
.card-review p { font-size: 14px; color: var(--slate500); margin: 0 0 16px; }
.card-review .svc { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; background: #eff6ff; color: var(--blue); }

/* ============ Location ============ */
.map-visual { position: relative; border-radius: 20px; overflow: hidden; min-height: 480px; background: var(--navy); display: flex; align-items: center; justify-content: center; }
.map-visual .ring { position: absolute; border-radius: 50%; }
.map-visual .r1 { width: 200px; height: 200px; border: 1px solid rgba(249,115,22,.35); }
.map-visual .r2 { width: 300px; height: 300px; border: 1px solid rgba(249,115,22,.2); }
.map-visual .r3 { width: 400px; height: 400px; border: 1px solid rgba(59,130,246,.1); }
.map-visual__c { text-align: center; position: relative; z-index: 2; color: #fff; }
.map-visual__c h4 { font-size: 24px; margin: 8px 0 4px; }
.map-visual__c p { color: var(--slate400); font-size: 14px; margin: 0; }
.info-card { background: #fff; border-radius: 20px; padding: 24px; box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.info-card h3 { font-size: 16px; margin: 0 0 16px; }
.chip { padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; background: #eff6ff; color: var(--blue); }
.chip--muted { background: #e2e8f0; color: #475569; font-weight: 400; }
.cta-card { border-radius: 20px; padding: 24px; background: linear-gradient(135deg, #f97316, #d95f0e); color: #fff; }
.cta-card a { color: #fff; font-size: 24px; font-weight: 700; }

/* ============ Footer ============ */
.site-footer { background: var(--navy); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding: 64px 0; }
.footer-phone { display: block; font-size: 30px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.footer-contacts { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; color: var(--slate300); font-size: 14px; }
.footer-contacts div { display: flex; align-items: center; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; color: #fff; }
.pill--orange { background: var(--orange); } .pill--green { background: #16a34a; } .pill--blue { background: var(--blue); }
.form-box { background: rgba(30,41,59,.5); border: 1px solid var(--slate700); border-radius: 20px; padding: 32px; }
.form-box h3 { color: #fff; font-size: 20px; margin: 0 0 8px; }
.form-box > p { color: var(--slate400); font-size: 14px; margin: 0 0 24px; }
.field { width: 100%; padding: 14px 16px; border-radius: 12px; font-size: 14px; background: rgba(51,65,85,.5); border: 1px solid var(--slate700); color: #fff; caret-color: #fff; outline: none; margin-bottom: 16px; font-family: inherit; }
.field::placeholder { color: #94a3b8; }
.field:focus { border-color: var(--blue); }
.form-note { text-align: center; font-size: 12px; color: var(--slate500); margin: 12px 0 0; }
.form-success { text-align: center; color: #4ade80; padding: 12px 0; }
.footer-bottom { border-top: 1px solid var(--slate700); padding: 24px 0; color: var(--slate500); font-size: 13px; text-align: center; }

/* ============ Floating widgets ============ */
.fab-wa { position: fixed; right: 24px; bottom: 24px; width: 56px; height: 56px; border-radius: 50%; background: #16a34a; display: flex; align-items: center; justify-content: center; z-index: 60; box-shadow: 0 4px 20px rgba(34,197,94,.4); transition: transform .2s; }
.fab-wa:hover { transform: scale(1.1); }
.mobile-bar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 12px 16px; gap: 8px; background: rgba(15,23,42,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--slate700); }
.mobile-bar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 12px; font-weight: 600; font-size: 14px; color: #fff; }

/* ============ Modal ============ */
.modal { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.is-open { display: flex; }
.modal__box { width: 100%; max-width: 460px; border-radius: 20px; overflow: hidden; background: #15202f; border: 1px solid var(--slate700); box-shadow: 0 25px 60px rgba(0,0,0,.5); }
.modal__head { padding: 24px 28px; border-bottom: 1px solid var(--slate700); background: linear-gradient(135deg, rgba(59,130,246,.1), rgba(249,115,22,.08)); display: flex; justify-content: space-between; align-items: flex-start; }
.modal__head h3 { color: #fff; margin: 0 0 4px; font-size: 20px; }
.modal__head p { color: var(--slate400); font-size: 14px; margin: 0; }
.modal__close { width: 32px; height: 32px; border-radius: 8px; border: none; background: rgba(255,255,255,.08); color: var(--slate400); font-size: 16px; }
.modal__body { padding: 24px 28px; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .grid3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps__line { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .guarantee, .grid2, .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .grid3, .steps, .gallery { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: 1fr; gap: 20px; }
  .mobile-bar { display: flex; }
  .fab-wa { bottom: 96px; }
  .site-footer { padding-bottom: 80px; }
  .guarantee, .form-box { padding: 24px; }
}
