:root{
  --bg:#f4f6fb;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --line:#e5e7eb;
  --accent:#1d86ff;
  --accent2:#19b7ff;
  --shadow: 0 18px 45px rgba(17,24,39,.08);
  --shadow2: 0 10px 26px rgba(17,24,39,.10);
  --radius:18px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Arial,sans-serif;
  color:var(--text);
  background:var(--bg);
}

a{color:inherit}
.container{max-width:1100px;margin:0 auto;padding:0 18px}

/* Header */
.header{
  background:#fff;
  border-bottom:1px solid var(--line);
  padding:16px 0 12px;
}
.header-inner{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}
.nav{
  display:flex;
  align-items:center;
  gap:22px;
  margin-left:6px;
}
.nav a{
  text-decoration:none;
  color:var(--muted);
  font-weight:600;
}
.nav a:hover{color:var(--text)}
.nav a.active{
  color:var(--text);
  position:relative;
}
.nav a.active::after{
  content:"";
  position:absolute;
  left:0; right:0;
  height:2px;
  bottom:-8px;
  background:var(--text);
  border-radius:2px;
  opacity:.7;
}

/* Hero */
.hero{
  padding:26px 0 8px;
}
.hero-image{
  width:100%;
  border-radius:20px;
  overflow:hidden;
  box-shadow: var(--shadow);
  background:#fff;
  border:1px solid var(--line);
}
.hero-image img{
  width:100%;
  height:auto;
  display:block;
}

/* Hero title + buttons below image (как на макете) */
.hero-text{
  text-align:center;
  padding:22px 0 6px;
}
.hero-h1{
  font-size:34px;
  margin:0 0 10px;
  font-weight:900;
  color:#334155;
}
.hero-h2{
  margin:0 0 18px;
  font-weight:900;
  color:#f08a29;
  font-size:20px;
}

.btn-row{
  display:flex;
  gap:14px;
  justify-content:center;
  flex-wrap:wrap;
  margin: 0 0 6px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:14px 18px;
  min-width:220px;
  border-radius:14px;
  text-decoration:none;
  font-weight:800;
  color:#fff;
  background: linear-gradient(180deg, var(--accent), #0f6ce6);
  box-shadow: 0 12px 22px rgba(29,134,255,.25);
}
.btn:hover{filter:brightness(1.03)}
.btn.tg{
  background: linear-gradient(180deg, var(--accent2), #0a9fe0);
  box-shadow: 0 12px 22px rgba(25,183,255,.22);
}
.btn span.icon{
  font-size:18px;
  line-height:1;
}

/* Section title with lines */
.section{
  padding:26px 0;
}
.section-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  margin: 14px 0 18px;
  color:#334155;
  font-size:26px;
  font-weight:900;
}
.section-title::before,
.section-title::after{
  content:"";
  height:2px;
  flex:1;
  max-width:240px;
  background:var(--line);
}
.section-subline{
  display:block;
  width:86px;
  height:4px;
  border-radius:999px;
  background: #f08a29;
  margin: 8px auto 0;
}

/* Services cards */
.grid-3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:18px;
}
@media (max-width: 900px){
  .grid-3{grid-template-columns:1fr}
  .btn{min-width: 0; width:100%;}
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  overflow:hidden;
}
.card-media{
  height:140px;
  background: linear-gradient(180deg, #eef6ff, #ffffff);
  display:flex;
  align-items:center;
  justify-content:center;
}
.card-media img{
  max-width:78%;
  max-height:78%;
  object-fit:contain;
  display:block;
}
.card-body{
  padding:16px 16px 18px;
  text-align:center;
}
.card-title{
  margin:0 0 8px;
  font-size:18px;
  font-weight:900;
  color:#334155;
}
.card-text{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.45;
}

/* Contacts block */
.contacts{
  display:grid;
  grid-template-columns: 1fr 1.25fr;
  gap:18px;
  align-items:stretch;
}
@media (max-width: 900px){
  .contacts{grid-template-columns:1fr}
}

.contact-list{
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  padding:18px;
}
.contact-item{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:10px 0;
  border-bottom:1px dashed var(--line);
}
.contact-item:last-child{border-bottom:none}
.c-ic{
  width:40px;height:40px;border-radius:999px;
  display:flex;align-items:center;justify-content:center;
  background:#eef6ff;
  color:#1d86ff;
  font-size:18px;
  flex:0 0 auto;
}
.contact-item a{
  color:#334155;
  font-weight:800;
  text-decoration:none;
}
.contact-item a:hover{text-decoration:underline}
.contact-item .muted{
  color:var(--muted);
  font-weight:700;
}

.mapbox{
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  overflow:hidden;
  min-height:260px;
}
.mapbox img{
  width:100%;
  height:100%;
  min-height:260px;
  object-fit:cover;
  display:block;
}
.map-placeholder{
  padding:18px;
  color:var(--muted);
}

/* Footer */
.footer{
  text-align:center;
  color:var(--muted);
  padding:26px 0 36px;
  font-size:13px;
}

/* ===== Animations ===== */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}

@keyframes glow {
  0%,100% { box-shadow: 0 12px 22px rgba(29,134,255,.18); }
  50%     { box-shadow: 0 16px 30px rgba(25,183,255,.26); }
}

/* Плавное появление (через JS добавим .in) */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Кнопки — лёгкий “пружинящий” hover */
.btn {
  transition: transform .14s ease, filter .14s ease, box-shadow .14s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); filter: brightness(.98); }

/* Карточки — поднимаем и усиливаем тень */
.card {
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(17,24,39,.14);
}

/* Баннер — мягкое “дыхание” (только картинка внутри) 
.hero-image img {
  animation: floaty 4.2s ease-in-out infinite;
}

*/

/* Подсветка кнопок */
.btn { animation: glow 3.5s ease-in-out infinite; }
.btn.tg { animation-delay: .8s; }

/* Уважение к пользователям, которые отключают анимации */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { transition: none; transform: none; opacity: 1; }
  .hero-image img, .btn { animation: none; }
}

/* Parallax hero (scroll-based) */
.hero-image {
  overflow: hidden;
}

.hero-image img {
  display: block;
  width: 100%;
  height: auto;
  transform: translate3d(0, 0, 0) scale(1.04); /* легкий запас для смещения */
  will-change: transform;
}

/* Если пользователь отключил анимации */
@media (prefers-reduced-motion: reduce) {
  .hero-image img { transform: none !important; }
}



/* ===== 3D Tilt for services cards ===== */
#services .grid-3 { perspective: 900px; }

#services .card{
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .18s ease, box-shadow .18s ease;
}

#services .card:hover{
  box-shadow: 0 20px 50px rgba(17,24,39,.18);
}

/* чуть “выталкиваем” картинку и заголовок в 3D */
#services .card-media,
#services .card-title{
  transform: translateZ(18px);
}

@media (prefers-reduced-motion: reduce) {
  #services .card { transition: none; }
}

.mapbox iframe {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
  border-radius: 16px;
}


/* ===== LOGO ===== */

.brand{
  display:flex;
  align-items:center;
  text-decoration:none;
}

.brand-logo{
  height:56px;          /* можно 48–64 */
  width:auto;
  max-width:200px;
  object-fit:contain;
  display:block;
}

@media (max-width: 768px){
  .brand-logo{ 
    height:40px; 
  }
}


/* ===== Smart header ===== */

.header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(6px);
  transition: all .25s ease;
}

.header.scrolled{
  padding: 8px 0 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.header.scrolled .brand-logo{
  height: 46px;
}

.header .brand-logo{
  transition: height .25s ease;
}


/* ===== Weather ===== */

/* ===== Weather widget ===== */
.weather{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  border-radius:18px;
  background:linear-gradient(135deg,#e8f3ff,#ffffff);
  box-shadow:0 6px 18px rgba(0,0,0,.08);
  border:1px solid rgba(15,92,255,.10);
  color:#1e293b;
}

.weather-main{ display:flex; flex-direction:column; gap:6px; min-width:160px; }

.weather-row{
  display:flex;
  align-items:baseline;
  gap:10px;
  line-height:1;
}

.weather-temp{
  font-weight:900;
  font-size:18px;
  color:#0f5cff;
}

.weather-city{
  font-size:12px;
  color:#64748b;
  font-weight:700;
}

.weather-meta{
  font-size:11px;
  color:#94a3b8;
}

/* icon + animation */
.weather-icon{
  font-size:22px;
  display:inline-block;
  transform-origin:50% 60%;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.10));
}

/* лёгкая "пружинка" */
@keyframes icon-bob{
  0%   { transform: translateY(0) rotate(0deg) scale(1); }
  50%  { transform: translateY(-3px) rotate(-2deg) scale(1.03); }
  100% { transform: translateY(0) rotate(0deg) scale(1); }
}
.weather-icon.animate{
  animation: icon-bob 1.4s ease-in-out infinite;
}

/* thermometer */
.thermo{
  height:8px;
  width:100%;
  border-radius:999px;
  background:rgba(148,163,184,.25);
  overflow:hidden;
  position:relative;
}

.thermo-bar{
  display:block;
  height:100%;
  width:0%;
  border-radius:999px;
  background:linear-gradient(90deg,#2dd4bf,#60a5fa,#f59e0b,#ef4444);
  transition: width .6s ease;
}

/* mobile */
@media (max-width: 768px){
  .weather{ padding:7px 10px; }
  .weather-main{ min-width:140px; }
  .weather-temp{ font-size:16px; }
}

