/* ============================================================
   common.css — общие стили RegMoscow
   Подключайте на всех страницах:
   Корень:    <link rel="stylesheet" href="css/common.css">
   Подпапка:  <link rel="stylesheet" href="../css/common.css">
   ============================================================ */

/* --- ПЕРЕМЕННЫЕ --- */
:root {
  --bg-dark: #060e18;
  --bg-deep: #0b1425;
  --bg-card: rgba(255,255,255,0.03);
  --bg-card-h: rgba(255,255,255,0.06);
  --primary: #10b981;
  --primary-l: #34d399;
  --primary-glow: rgba(16,185,129,0.12);
  --accent: #ffffff;
  --accent-l: #ffffff;
  --accent-glow: rgba(212,168,83,0.1);
  --text: #f0f4f8;
  --text-m: #8fa0b8;
  --text-d: #5b6b80;
  --border: rgba(255,255,255,0.07);
  --border-l: rgba(255,255,255,0.12);
  --r: 12px;
  --rl: 18px;
  --font: 'Manrope', -apple-system, sans-serif;
}

/* --- СБРОС --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { font-family: var(--font); color: var(--text); background: var(--bg-dark); line-height: 1.7; overflow-x: hidden; }
a { color: var(--primary-l); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* --- HEADER --- */
.header {
  background: rgba(6,14,24,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.hdr { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 68px; max-width: 1180px; margin: 0 auto; gap: 16px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
.logo svg { width: 34px; height: 34px; }
.logo em { font-style: normal; color: var(--accent); }
.nav { display: flex; gap: 6px; align-items: center; flex: 1; justify-content: center; }
.nav a { padding: 8px 16px; border-radius: 8px; font-size: 0.92rem; font-weight: 600; color: var(--text); transition: all 0.2s; white-space: nowrap; }
.nav a:hover { background: var(--bg-card-h); color: var(--primary-l); text-decoration: none; }
.nav a.ncta { background: var(--primary); color: var(--bg-dark) !important; font-weight: 700; margin-left: 12px; }
.nav a.ncta:hover { background: var(--primary-l); }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; border-radius: 8px; }
.burger:hover { background: var(--bg-card-h); }
.burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* --- КНОПКИ --- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 10px; font-size: 0.9rem; font-weight: 700; font-family: var(--font); cursor: pointer; border: none; transition: all 0.25s; white-space: nowrap; text-decoration: none; }
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }

/* Скрыть кнопку "Позвонить" — телефон не подключён */
[class_tel="1"] { display: none !important; }

.btn-ghost { background: transparent; color: var(--text) !important; border: 1.5px solid var(--border-l); }
.btn-ghost:hover { background: var(--bg-card-h); border-color: var(--primary); color: var(--primary-l) !important; }

.btn-green { background: var(--primary); color: var(--bg-dark) !important; }
.btn-green:hover { background: var(--primary-l); color: var(--bg-dark) !important; }

.btn-gold { background: linear-gradient(135deg, var(--accent), var(--accent-l)); color: var(--bg-dark) !important; box-shadow: 0 4px 20px rgba(212,168,83,0.25); }
.btn-gold:hover { box-shadow: 0 8px 30px rgba(212,168,83,0.35); color: var(--bg-dark) !important; }

/* WhatsApp и Telegram — !important чтобы не перебивался глобальный a { color } */
.btn-wa { background: #25d366; color: #fff !important; }
.btn-wa:hover { background: #1fb855; color: #fff !important; transform: translateY(-2px); }

.btn-tg { background: #229ed9; color: #fff !important; }
.btn-tg:hover { background: #1a8bbf; color: #fff !important; transform: translateY(-2px); }

/* --- СЕКЦИИ (общее) --- */
section { padding: 84px 0; position: relative; }
.stag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--primary-l); background: var(--primary-glow); padding: 5px 14px; border-radius: 100px; margin-bottom: 14px; }
.stitle { font-size: 2.2rem; font-weight: 800; color: var(--text); margin-bottom: 14px; letter-spacing: -0.03em; line-height: 1.15; }
.ssub { font-size: 0.98rem; color: var(--text-m); max-width: 540px; margin: 0 auto 52px; line-height: 1.7; }
.sep { height: 1px; background: linear-gradient(90deg, transparent, var(--border-l) 20%, var(--border-l) 80%, transparent); max-width: 1180px; margin: 0 auto; }

/* --- ПОЛЯ ФОРМЫ --- */
.fg { margin-bottom: 13px; }
.fg label { display: block; font-size: 0.73rem; font-weight: 700; color: var(--text-m); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.fg input,
.fg select,
.fg textarea { width: 100%; padding: 11px 15px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 0.9rem; font-family: var(--font); background: var(--bg-card); color: var(--text); transition: border-color 0.2s, box-shadow 0.2s; }
.fg select { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238fa0b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.fg select::-ms-expand { display: none; }
.fg select option { background: var(--bg-deep); color: var(--text); padding: 8px; }
.fg textarea { resize: vertical; min-height: 80px; }
.fg input:focus,
.fg select:focus,
.fg textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

/* --- МОДАЛЬНОЕ ОКНО --- */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg-deep); border: 1px solid var(--border-l); border-radius: var(--rl); padding: 40px 36px; max-width: 460px; width: 100%; position: relative; animation: modalIn 0.3s ease-out; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: var(--rl) var(--rl) 0 0; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; background: var(--bg-card-h); border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-m); font-size: 1.1rem; transition: all 0.2s; }
.modal-close:hover { background: var(--primary); color: var(--bg-dark); border-color: var(--primary); }
.modal h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.modal .msub { font-size: 0.82rem; color: var(--text-d); margin-bottom: 24px; }
.modal .btn { width: 100%; margin-top: 8px; }
.modal .mnote { text-align: center; font-size: 0.68rem; color: var(--text-d); margin-top: 12px; }

/* --- ФУТЕР --- */
.footer { background: var(--bg-deep); border-top: 1px solid var(--border); padding: 56px 0 28px; }
.ftgrid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.ftb h3 { font-size: 1.25rem; color: var(--text); margin-bottom: 12px; font-weight: 800; }
.ftb h3 em { font-style: normal; color: var(--accent); }
.ftb p { font-size: 0.82rem; color: var(--text-d); line-height: 1.7; margin-bottom: 14px; }
.ftsoc { display: flex; gap: 8px; }
.ftsoc a { width: 36px; height: 36px; background: var(--bg-card-h); border: 1px solid var(--border); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; transition: all 0.2s; text-decoration: none; }
.ftsoc svg { display: block; flex-shrink: 0; }
.ftsoc a.soc-tg { color: #229ed9 !important; border-color: rgba(34,158,217,0.4); }
.ftsoc a.soc-tg:hover { background: #229ed9; color: #fff !important; border-color: #229ed9; }
.ftsoc a.soc-wa { color: #25d366 !important; border-color: rgba(37,211,102,0.4); }
.ftsoc a.soc-wa:hover { background: #25d366; color: #fff !important; border-color: #25d366; }
.footer h4 { color: var(--text); font-size: 0.75rem; margin-bottom: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul li a { color: var(--text-d); font-size: 0.82rem; text-decoration: none; transition: color 0.2s; }
.footer ul li a:hover { color: var(--primary-l); }
.ftbot { border-top: 1px solid var(--border); padding-top: 24px; text-align: center; font-size: 0.76rem; color: var(--text-d); line-height: 1.8; }

/* --- КНОПКА НАВЕРХ --- */
.stop { position: fixed; bottom: 24px; right: 24px; width: 42px; height: 42px; background: var(--primary); color: var(--bg-dark); border: none; border-radius: 50%; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,0.3); opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 99; }
.stop.vis { opacity: 1; visibility: visible; }
.stop:hover { background: var(--primary-l); transform: translateY(-2px); }

/* --- ДЕКОР SVG --- */
.svgdec { position: absolute; pointer-events: none; opacity: 0.035; z-index: 0; }
.svgdec1 { top: 40px; right: -40px; width: 450px; height: 450px; }
.svgdec2 { bottom: -100px; left: -50px; width: 350px; height: 350px; }

/* --- АНИМАЦИЯ ПОЯВЛЕНИЯ --- */
@keyframes fu { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.fu { opacity: 0; animation: fu 0.45s ease-out forwards; }
.fu:nth-child(2) { animation-delay: 0.06s; }
.fu:nth-child(3) { animation-delay: 0.12s; }
.fu:nth-child(4) { animation-delay: 0.18s; }
.fu:nth-child(5) { animation-delay: 0.24s; }
.fu:nth-child(6) { animation-delay: 0.3s; }

/* --- МЕДИАЗАПРОСЫ --- */
@media (max-width: 860px) {
  .ftgrid { grid-template-columns: 1fr 1fr; }
  .stitle { font-size: 1.8rem; }
}
@media (max-width: 680px) {
  .nav { display: none; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg-deep); padding: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); border-radius: 0 0 14px 14px; gap: 4px; border-bottom: 1px solid var(--border); }
  .nav.open a { border-radius: 8px; }
  .burger { display: flex; }
  .ftgrid { grid-template-columns: 1fr; gap: 28px; }
  .svgdec { display: none; }
}
@media (max-width: 480px) {
  .hbtns, .cbtns { flex-direction: column; align-items: center; }
}