:root {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-soft: #64748b;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1e4fcc;
  --accent-green: #10b981;
  --border-soft: rgba(0,0,0,0.05);
  --radius-lg: 1rem;
  --radius-full: 999px;
  --container-max: 1280px;
  --header-height: 64px;
  --transition-fast: .16s ease;
}

* { box-sizing:border-box; }

body {
  margin:0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height:1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width:100%; display:block; }
a { color:inherit; text-decoration:none; }

.container {
  max-width: var(--container-max);
  padding-left:1rem;
  padding-right:1rem;
  margin-left:auto;
  margin-right:auto;
  width:100%;
}

/* HEADER */
header {
  background-color:#ffffff;
  border-bottom:1px solid var(--border-soft);
  position:sticky;
  top:0;
  z-index:1000;
}

.nav-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:var(--header-height);
  gap:1rem;
  flex-wrap:nowrap;
}

.brand {
  display:flex;
  align-items:center;
  gap:.75rem;
  min-width:0;
  font-weight:600;
  color:var(--text-main);
}

.brand-logo {
  width:40px;
  height:40px;
  background: radial-gradient(circle at 30% 30%, var(--accent-blue) 0%, #0a1a4f 70%);
  border-radius:.75rem;
  position:relative;
  flex-shrink:0;
}
.brand-logo::after{
  content:"MG";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.7rem;
  font-weight:700;
  color:#fff;
  letter-spacing:-0.03em;
  font-family:"Inter",system-ui,sans-serif;
}

.brand-texts {
  display:flex;
  flex-direction:column;
  min-width:0;
}
.brand-name {
  font-size:.9rem;
  font-weight:600;
  color:var(--text-main);
  line-height:1.2;
  white-space:nowrap;
}
.brand-sub {
  font-size:.7rem;
  font-weight:500;
  line-height:1.2;
  color:var(--accent-green);
  white-space:nowrap;
}

/* MAIN MENU (desktop) */
nav.main-menu {
  display:flex;
  align-items:center;
  gap:1rem;
  flex-wrap:nowrap;
}

.main-menu a {
  font-size:.9rem;
  font-weight:500;
  color:var(--text-main);
  padding:.5rem .75rem;
  border-radius: var(--radius-full);
  transition: background-color var(--transition-fast),
              color var(--transition-fast);
  line-height:1.2;
  white-space:nowrap;
}

.main-menu a.active,
.main-menu a:hover {
  background-color: rgba(37,99,235,0.08);
  color:var(--accent-blue);
}

/* DROPDOWN (desktop "Услуги") */
.menu-group {
  position:relative;
  display:flex;
  align-items:center;
}
.menu-parent {
  background:transparent;
  border:0;
  cursor:pointer;
  font-size:.9rem;
  font-weight:500;
  color:var(--text-main);
  padding:.5rem .75rem;
  border-radius: var(--radius-full);
  display:flex;
  align-items:center;
  gap:.4rem;
  transition: background-color var(--transition-fast),
              color var(--transition-fast);
  line-height:1.2;
}
.menu-parent:hover,
.menu-group:hover .menu-parent {
  background-color: rgba(37,99,235,0.08);
  color:var(--accent-blue);
}
.caret {
  font-size:.7rem;
  line-height:1;
  opacity:.7;
}
.menu-dropdown {
  position:absolute;
  top:100%;
  left:0;
  min-width:200px;
  background-color:#fff;
  border:1px solid var(--border-soft);
  border-radius:var(--radius-lg);
  padding:.5rem 0;
  display:none;
}
.menu-group:hover .menu-dropdown {
  display:block;
}
.menu-dropdown a {
  display:block;
  padding:.6rem .9rem;
  font-size:.85rem;
  font-weight:500;
  color:var(--text-main);
  text-decoration:none;
  line-height:1.3;
}
.menu-dropdown a:hover {
  background-color: rgba(37,99,235,0.06);
  color:var(--accent-blue);
}
.menu-dropdown-head {
  font-weight:600;
  color:var(--accent-blue);
}

/* LANGUAGE SWITCH desktop */
.lang-switch {
  display:flex;
  align-items:center;
  gap:.5rem;
  flex-wrap:nowrap;
}
.lang-btn {
  font-size:.7rem;
  font-weight:600;
  line-height:1;
  padding:.5rem .6rem;
  border-radius: var(--radius-full);
  border:1px solid var(--border-soft);
  background-color:#fff;
  color:var(--text-main);
  cursor:pointer;
  min-width:2.5rem;
  text-align:center;
}
.lang-btn.active,
.lang-btn:hover {
  background-color: var(--accent-blue);
  color:#fff;
  border-color: var(--accent-blue);
}

/* BURGER (mobile trigger) */
.burger {
  display:none;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  width:40px;
  height:40px;
  border-radius: var(--radius-lg);
  border:1px solid var(--border-soft);
  background-color:#fff;
  cursor:pointer;
  flex-shrink:0;
}
.burger span{
  width:20px;
  height:2px;
  background-color:var(--text-main);
  border-radius:1px;
  margin-left:auto;
  margin-right:auto;
}

/* MOBILE DRAWER */
.mobile-drawer {
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  width:280px;
  background-color:#fff;
  border-left:1px solid var(--border-soft);
  padding:1.5rem;
  transform:translateX(100%);
  transition: transform var(--transition-fast);
  display:flex;
  flex-direction:column;
  gap:1rem;
  z-index:1500;
}
.mobile-drawer.open {
  transform:translateX(0);
}
.mobile-close {
  align-self:flex-end;
  width:36px;
  height:36px;
  background:#fff;
  border:1px solid var(--border-soft);
  border-radius:var(--radius-lg);
  font-size:0.8rem;
  font-weight:600;
  color:var(--text-main);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.mobile-links {
  display:flex;
  flex-direction:column;
  gap:.5rem;
}
.mobile-links a{
  font-size:1rem;
  font-weight:500;
  padding:.75rem 1rem;
  border-radius:var(--radius-lg);
  border:1px solid var(--border-soft);
  background-color:#fff;
  color:var(--text-main);
  line-height:1.3;
}

/* MOBILE SERVICES GROUP (внутри бургер-меню) */
.mobile-group {
  display:flex;
  flex-direction:column;
  border-radius: var(--radius-lg);
  border:1px solid var(--border-soft);
  background:#fff;
  overflow:hidden;
}
.mobile-parent {
  width:100%;
  text-align:left;
  background:none;
  border:0;
  padding:.75rem 1rem;
  font-size:1rem;
  font-weight:500;
  color:var(--text-main);
  display:flex;
  align-items:center;
  justify-content:space-between;
  line-height:1.3;
  cursor:pointer;
  background-color:#fff;
}
.mobile-sub {
  display:none;
  flex-direction:column;
  padding:.5rem 0 .75rem 0;
  border-top:1px solid var(--border-soft);
  background-color:#fff;
}
.mobile-sub.open {
  display:flex;
}
.mobile-sub a {
  display:block;
  padding:.6rem 1rem;
  font-size:.9rem;
  font-weight:500;
  color:var(--text-main);
  text-decoration:none;
  line-height:1.35;
}
.mobile-sub-head {
  color:var(--accent-blue);
  font-weight:600;
}

/* MOBILE LANGUAGE SWITCH */
.mobile-lang {
  border-top:1px solid var(--border-soft);
  padding-top:1rem;
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
}
.mobile-lang .lang-btn {
  flex:1 1 calc(50% - .5rem);
  text-align:center;
}

/* HERO */
.hero-wrap{
  padding-top:3rem;
  padding-bottom:3rem;
}
@media(min-width:768px){
  .hero-wrap{padding-top:4rem;padding-bottom:4rem;}
}
.hero-grid{
  display:grid;
  gap:2rem;
}
@media(min-width:768px){
  .hero-grid{
    grid-template-columns:1fr 1fr;
    align-items:center;
  }
}
.hero-text-block{
  display:flex;
  flex-direction:column;
  gap:1.25rem;
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  width:max-content;
  background-color:#fff;
  border-radius:var(--radius-full);
  padding:.4rem .75rem;
  font-size:.7rem;
  font-weight:600;
  color:var(--accent-blue);
  border:1px solid rgba(37,99,235,.15);
}
.eyebrow-badge{
  display:inline-block;
  background-color:var(--accent-green);
  color:#fff;
  font-size:.6rem;
  font-weight:600;
  padding:.2rem .5rem;
  line-height:1.2;
  border-radius:var(--radius-full);
}
.hero-title{
  font-size:1.6rem;
  font-weight:700;
  line-height:1.2;
  color:var(--text-main);
  letter-spacing:-0.04em;
}
@media(min-width:768px){
  .hero-title{font-size:2rem;}
}
@media(min-width:1024px){
  .hero-title{font-size:2.3rem;}
}
.hero-desc{
  font-size:1rem;
  color:var(--text-soft);
  line-height:1.5;
  max-width:46ch;
}
.hero-cta-row{
  display:flex;
  flex-wrap:wrap;
  gap:.75rem;
}
.btn-primary{
  background-color:var(--accent-blue);
  color:#fff;
  font-size:.9rem;
  font-weight:600;
  padding:.8rem 1rem;
  border-radius:var(--radius-full);
  border:none;
  cursor:pointer;
  transition: background-color var(--transition-fast),
              transform var(--transition-fast);
}
.btn-primary:hover{
  background-color:var(--accent-blue-hover);
  transform:translateY(-1px);
}
.btn-ghost{
  background-color:#fff;
  color:var(--text-main);
  font-size:.9rem;
  font-weight:600;
  padding:.8rem 1rem;
  border-radius:var(--radius-full);
  border:1px solid var(--border-soft);
  cursor:pointer;
  transition: transform var(--transition-fast);
}
.btn-ghost:hover{
  transform:translateY(-1px);
}

/* hero card */
.hero-card{
  background: radial-gradient(circle at 20% 20%, rgba(37,99,235,.12) 0%, rgba(16,185,129,.08) 60%, rgba(255,255,255,0) 80%), #fff;
  border-radius: var(--radius-lg);
  border:1px solid var(--border-soft);
  padding:1.5rem;
  position:relative;
  overflow:hidden;
  min-height:220px;
}
@media(min-width:768px){
  .hero-card{min-height:260px;}
}
.hero-card-inner{
  position:relative;
  z-index:2;
  display:flex;
  flex-direction:column;
  gap:1rem;
}
.hero-card-title{
  font-size:1rem;
  font-weight:600;
  color:var(--text-main);
  display:flex;
  align-items:center;
  gap:.5rem;
}
.dot-green{
  width:10px;
  height:10px;
  border-radius:50%;
  background-color:var(--accent-green);
}
.hero-card-desc{
  font-size:.9rem;
  color:var(--text-soft);
  line-height:1.4;
  max-width:44ch;
}
.hero-card-list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.75rem .5rem;
  font-size:.8rem;
}
.hero-card-item{
  background-color:#fff;
  border:1px solid var(--border-soft);
  border-radius:.75rem;
  padding:.6rem .75rem;
  font-weight:500;
  color:var(--text-main);
  line-height:1.3;
}
.hero-card-item small{
  display:block;
  font-size:.7rem;
  font-weight:400;
  color:var(--text-soft);
}
.hero-card-blur{
  position:absolute;
  width:240px;
  height:240px;
  right:-40px;
  bottom:-40px;
  background: radial-gradient(circle at 50% 50%, rgba(37,99,235,.4) 0%, rgba(37,99,235,0) 70%);
  filter:blur(60px);
  opacity:.4;
  z-index:1;
}

/* SERVICES PREVIEW */
.services-preview{
  padding-top:2rem;
  padding-bottom:2rem;
}
@media(min-width:768px){
  .services-preview{padding-top:3rem;padding-bottom:3rem;}
}
.section-head{
  display:flex;
  flex-direction:column;
  gap:.5rem;
  text-align:left;
  max-width:800px;
}
.section-eyebrow{
  font-size:.7rem;
  font-weight:600;
  color:var(--accent-blue);
  display:inline-flex;
  align-items:center;
  gap:.5rem;
}
.section-eyebrow .line{
  width:28px;
  height:2px;
  background-color:var(--accent-blue);
  border-radius:1px;
}
.section-title{
  font-size:1.3rem;
  font-weight:600;
  color:var(--text-main);
  letter-spacing:-0.03em;
  line-height:1.2;
}
@media(min-width:768px){
  .section-title{font-size:1.5rem;}
}
.section-desc{
  font-size:.95rem;
  color:var(--text-soft);
  max-width:60ch;
  line-height:1.4;
}

.cards-grid{
  margin-top:1.5rem;
  display:grid;
  gap:1rem;
}
@media(min-width:600px){
  .cards-grid{
    grid-template-columns:repeat(2,1fr);
  }
}
@media(min-width:1024px){
  .cards-grid{
    grid-template-columns:repeat(4,1fr);
  }
}

.service-card{
  background-color:var(--bg-card);
  border:1px solid var(--border-soft);
  border-radius:var(--radius-lg);
  padding:1rem 1rem 1.25rem;
  min-height:160px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  transition: transform var(--transition-fast);
}
.service-card:hover{
  transform:translateY(-2px);
}
.service-icon{
  width:36px;
  height:36px;
  border-radius:.75rem;
  background: radial-gradient(circle at 30% 30%, var(--accent-blue) 0%, #0a1a4f 70%);
  color:#fff;
  font-size:.7rem;
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
  letter-spacing:-0.03em;
}
.service-head{
  font-size:.95rem;
  font-weight:600;
  color:var(--text-main);
  line-height:1.3;
  margin-top:.75rem;
}
.service-desc{
  font-size:.8rem;
  color:var(--text-soft);
  line-height:1.4;
  margin-top:.5rem;
  flex-grow:1;
}
.service-link{
  margin-top:1rem;
  font-size:.8rem;
  font-weight:600;
  color:var(--accent-blue);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:.4rem;
}

/* WHY US */
.whyus{
  padding-top:2rem;
  padding-bottom:3rem;
}
@media(min-width:768px){
  .whyus{
    padding-top:3rem;
    padding-bottom:4rem;
  }
}
.whyus-grid{
  display:grid;
  gap:1rem;
}
@media(min-width:768px){
  .whyus-grid{
    grid-template-columns:repeat(3,1fr);
  }
}
.why-card{
  background-color:var(--bg-card);
  border:1px solid var(--border-soft);
  border-radius:var(--radius-lg);
  padding:1.25rem 1rem 1.25rem;
  min-height:140px;
  transition: transform var(--transition-fast);
}
.why-card:hover{
  transform:translateY(-2px);
}
.why-title{
  font-size:.9rem;
  font-weight:600;
  color:var(--text-main);
  display:flex;
  align-items:flex-start;
  gap:.5rem;
  line-height:1.3;
}
.why-dot{
  width:10px;
  height:10px;
  background-color:var(--accent-green);
  border-radius:50%;
  flex-shrink:0;
  margin-top:.4rem;
}
.why-desc{
  margin-top:.5rem;
  font-size:.8rem;
  color:var(--text-soft);
  line-height:1.4;
}

/* FOOTER */
footer{
  background-color:#ffffff;
  border-top:1px solid var(--border-soft);
  padding-top:2rem;
  padding-bottom:2rem;
  font-size:.8rem;
  color:var(--text-soft);
}
.footer-grid{
  display:grid;
  gap:1.5rem;
}
@media(min-width:768px){
  .footer-grid{
    grid-template-columns:2fr 1fr 1fr;
  }
}
.footer-brand{
  display:flex;
  flex-direction:column;
  gap:.5rem;
  max-width:360px;
}
.footer-title{
  font-size:.8rem;
  font-weight:600;
  color:var(--text-main);
  line-height:1.3;
}
.footer-sub{
  font-size:.75rem;
  line-height:1.4;
  color:var(--text-soft);
}
.footer-col-title{
  font-size:.75rem;
  font-weight:600;
  color:var(--text-main);
  margin-bottom:.5rem;
}
.footer-links{
  display:flex;
  flex-direction:column;
  gap:.4rem;
}
.footer-links a{
  color:var(--text-soft);
  text-decoration:none;
  font-size:.75rem;
  line-height:1.3;
}
.footer-links a:hover{
  color:var(--accent-blue);
}
.footer-bottom{
  margin-top:2rem;
  font-size:.7rem;
  color:var(--text-soft);
  text-align:center;
}

/* RESPONSIVE HIDES */
@media(max-width:1023px){
  nav.main-menu{ display:none; }
  .lang-switch{ display:none; }
  .burger{ display:flex; }
}

@media(max-width:1023px){
  .menu-group { display:none; } /* десктопный дропдаун не нужен на мобилке */
}

/* ==== NEWS PAGE ==== */

.news-wrap {
  background: var(--bg-grad, linear-gradient(180deg,#e6f7f5 0%,#d9f1ef 100%));
  padding: clamp(32px,2vw,48px) 0 64px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 24px;
}

@media (max-width:900px){
  .news-grid {
    grid-template-columns: 1fr;
  }
}

.news-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, rgba(0,0,0,.12));
  border-radius: 16px;
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-dim, #4a5b5b);
}

.news-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(106,167,255,.1); /* голубоватый фон */
  color: var(--accent-blue, #4a77ff);
  border: 1px solid rgba(0,0,0,.08);
}

.news-date {
  color: var(--text-dim, #4a5b5b);
  font-weight: 400;
}

.news-head {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main, #1e2a2a);
  line-height: 1.3;
  margin: 0;
}

.news-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim, #4a5b5b);
  margin: 0;
}

.news-link {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-blue, #4a77ff);
  text-decoration: none;
}

.news-link:hover {
  text-decoration: underline;
}

/* ==== SERVICES PAGE ==== */

.services-wrap {
  background: var(--bg-grad, linear-gradient(180deg,#e6f7f5 0%,#d9f1ef 100%));
  padding: clamp(32px,2vw,48px) 0 80px;
}

.services-grid-page {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 24px;
  margin-top: 32px;
}

@media (max-width:900px){
  .services-grid-page {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: var(--card-bg,#fff);
  border: 1px solid var(--border-color,rgba(0,0,0,.12));
  border-radius:16px;
  padding:20px 20px 24px;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.service-icon-circle {
  width:36px;
  height:36px;
  border-radius:10px;
  border:1px solid var(--border-color,rgba(0,0,0,.12));
  background: rgba(106,167,255,.12);
  color:#4a77ff;
  font-weight:600;
  font-size:14px;
  line-height:36px;
  text-align:center;
}

.service-head {
  font-size:18px;
  font-weight:700;
  line-height:1.3;
  color:var(--text-main,#1e2a2a);
  margin:0;
}

.service-text {
  font-size:14px;
  line-height:1.6;
  color:var(--text-dim,#4a5b5b);
  margin:0;
}

.service-list {
  margin:0;
  padding-left:20px;
  font-size:14px;
  line-height:1.5;
  color:var(--text-dim,#4a5b5b);
}
.service-list li {
  margin-bottom:6px;
}


/* process block */
.process-block {
  margin-top:48px;
  background: var(--card-bg,#fff);
  border:1px solid var(--border-color,rgba(0,0,0,.12));
  border-radius:16px;
  padding:24px;
}

.process-head {
  font-size:18px;
  font-weight:700;
  line-height:1.3;
  color:var(--text-main,#1e2a2a);
  margin:0 0 20px 0;
}

.process-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:20px;
}

@media (max-width:900px){
  .process-grid {
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width:500px){
  .process-grid {
    grid-template-columns:1fr;
  }
}

.process-step {
  background: rgba(106,167,255,.06);
  border:1px solid rgba(0,0,0,.07);
  border-radius:12px;
  padding:16px;
}

.process-num {
  font-size:13px;
  font-weight:600;
  color:#4a77ff;
  background:rgba(106,167,255,.18);
  border:1px solid rgba(0,0,0,.08);
  border-radius:8px;
  display:inline-block;
  line-height:1;
  padding:4px 8px;
  margin-bottom:10px;
}

.process-step-head {
  font-size:15px;
  font-weight:600;
  color:var(--text-main,#1e2a2a);
  line-height:1.4;
  margin-bottom:6px;
}

.process-step-text {
  font-size:13px;
  line-height:1.5;
  color:var(--text-dim,#4a5b5b);
  margin:0;
}
