/* === RESET === */
.mg-wrapper,
.mg-wrapper *,
.mg-wrapper *::before,
.mg-wrapper *::after,
.mg-overlay,
.mg-overlay *,
.mg-overlay *::before,
.mg-overlay *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
 
.mg-wrapper {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1A1A2E;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  background: #F5F0E8;
}
 
.mg-wrapper a {
  text-decoration: none;
  color: inherit;
}
 
/* === CONTAINER === */
.mg-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 36px;
}
 
/* === BUTTONS === */
.mg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  padding: 15px 32px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  position: relative;
}
 
.mg-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
 
.mg-btn-primary {
  background: #1D9E75;
  color: #fff;
  border-color: #1D9E75;
}
 
.mg-btn-primary:hover {
  background: #178A65;
  border-color: #178A65;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(29, 158, 117, 0.35);
}
 
.mg-btn-outline {
  background: transparent;
  color: #1D9E75;
  border-color: #1D9E75;
}
 
.mg-btn-outline:hover {
  background: rgba(29, 158, 117, 0.08);
  transform: translateY(-1px);
}
 
.mg-btn-ghost {
  background: transparent;
  color: #1A1A2E;
  border-color: transparent;
}
 
.mg-btn-ghost:hover {
  background: rgba(0,0,0,0.06);
}
 
.mg-btn-sm {
  padding: 12px 24px;
  font-size: 14px;
  border-radius: 10px;
}
 
.mg-btn-lg {
  padding: 21px 42px;
  font-size: 18px;
  border-radius: 16px;
}
 
.mg-btn-full {
  width: 100%;
  padding: 18px 32px;
  font-size: 16px;
  border-radius: 12px;
}
 
.mg-btn-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #229ED9;
  color: #fff;
  padding: 18px 48px;
  font-size: 18px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
 
.mg-btn-telegram:hover {
  background: #1A8BC4;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
  color: #fff;
}
 
/* Loading spinner */
.mg-btn-loading {
  color: transparent !important;
  pointer-events: none;
}
 
.mg-btn-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mg-spin 0.6s linear infinite;
  top: 50%;
  left: 50%;
  margin-top: -9px;
  margin-left: -9px;
}
 
.mg-btn-outline.mg-btn-loading::after {
  border-color: rgba(29, 158, 117, 0.2);
  border-top-color: #1D9E75;
}
 
@keyframes mg-spin {
  to { transform: rotate(360deg); }
}
 
/* === NAVBAR === */
.mg-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
 
.mg-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
 
.mg-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
 
.mg-logo-mark {
  flex-shrink: 0;
}
 
.mg-logo-text {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #1A1A2E;
}
 
.mg-navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
 
/* === HERO === */
.mg-hero {
  padding: 120px 0 90px;
  background: #F5F0E8;
}
 
.mg-hero-content {
  text-align: center;
  max-width: 1080px;
  margin: 0 auto;
  animation: mg-fadeUp 0.7s ease-out both;
}
 
@keyframes mg-fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
 
.mg-hero-title {
  font-size: 84px;
  font-weight: 800;
  line-height: 1.08;
  color: #1A1A2E;
  margin-bottom: 30px;
  letter-spacing: -1.8px;
}
 
.mg-hero-subtitle {
  font-size: 27px;
  color: #5C5A52;
  line-height: 1.65;
  margin-bottom: 60px;
  max-width: 810px;
  margin-left: auto;
  margin-right: auto;
}
 
.mg-hero-cta {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}
 
/* === SECTIONS === */
.mg-section {
  padding: 120px 0;
  background: #F5F0E8;
}
 
.mg-section-gray {
  background: #EDE8DF;
}
 
.mg-section-title {
  font-size: 54px;
  font-weight: 800;
  color: #1A1A2E;
  text-align: center;
  margin-bottom: 72px;
  letter-spacing: -0.8px;
}
 
/* === CATEGORIES === */
.mg-categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
 
.mg-category-card {
  background: #F5F0E8;
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  border: 1px solid rgba(0,0,0,0.1);
}
 
.mg-category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  border-color: #1D9E75;
}
 
.mg-category-icon {
  width: 84px;
  height: 84px;
  background: rgba(29, 158, 117, 0.12);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  transition: background 0.2s ease, transform 0.2s ease;
}
 
.mg-category-card:hover .mg-category-icon {
  background: rgba(29, 158, 117, 0.2);
  transform: scale(1.06);
}
 
.mg-category-label {
  font-size: 18px;
  font-weight: 600;
  color: #1A1A2E;
}
 
/* === STEPS === */
.mg-steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
 
.mg-step {
  text-align: center;
  flex: 1;
  max-width: 420px;
  padding: 0 36px;
}
 
.mg-step-number {
  width: 78px;
  height: 78px;
  background: #1D9E75;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
 
.mg-step-title {
  font-size: 24px;
  font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 12px;
}
 
.mg-step-desc {
  font-size: 18px;
  color: #5C5A52;
  line-height: 1.65;
}
 
.mg-step-connector {
  width: 72px;
  height: 2px;
  background: rgba(0,0,0,0.1);
  margin-top: 39px;
  flex-shrink: 0;
}
 
/* === TELEGRAM === */
.mg-telegram-card {
  background: #F5F0E8;
  border-radius: 28px;
  padding: 72px 64px;
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
 
.mg-telegram-icon { margin-bottom: 30px; }
 
.mg-telegram-title {
  font-size: 32px;
  font-weight: 700;
  color: #1A1A2E;
  margin-bottom: 15px;
}
 
.mg-telegram-desc {
  font-size: 20px;
  color: #5C5A52;
  margin-bottom: 36px;
  line-height: 1.65;
}
 
/* === FOOTER === */
.mg-footer {
  padding: 48px 0;
  border-top: 1px solid rgba(0,0,0,0.1);
  background: #EDE8DF;
}
 
.mg-footer-inner {
  text-align: center;
  font-size: 16px;
  color: #8C8A80;
}
 
/* === MODAL OVERLAY === */
.mg-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(26, 26, 46, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
 
.mg-overlay.mg-visible {
  opacity: 1;
  visibility: visible;
}
 
/* === MODAL === */
.mg-modal {
  background: #F5F0E8;
  border-radius: 24px;
  padding: 42px 40px 36px;
  width: 100%;
  max-width: 480px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0,0,0,0.08);
}
 
.mg-overlay.mg-visible .mg-modal {
  transform: translateY(0) scale(1);
}
 
.mg-modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.07);
  border: none;
  border-radius: 50%;
  font-size: 26px;
  color: #5C5A52;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1;
  font-family: sans-serif;
}
 
.mg-modal-close:hover {
  background: rgba(0,0,0,0.12);
  color: #1A1A2E;
}
 
/* === MODAL TABS === */
.mg-modal-tabs {
  display: flex;
  margin-bottom: 30px;
  border-bottom: 2px solid rgba(0,0,0,0.1);
}
 
.mg-tab {
  flex: 1;
  padding: 18px 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #8C8A80;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
 
.mg-tab:hover { color: #5C5A52; }
 
.mg-tab.mg-tab-active {
  color: #1D9E75;
  border-bottom-color: #1D9E75;
}
 
/* === MODAL ERROR === */
.mg-modal-error {
  background: #FEF2F2;
  color: #DC2626;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  display: none;
  line-height: 1.5;
  border: 1px solid #FECACA;
}
 
.mg-modal-error.mg-error-visible { display: block; }
 
/* === FORMS === */
.mg-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
 
.mg-field { width: 100%; }
 
.mg-input {
  width: 100%;
  padding: 16px 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  color: #1A1A2E;
  background: rgba(255,255,255,0.6);
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
 
.mg-input::placeholder { color: #8C8A80; }
 
.mg-input:focus {
  border-color: #1D9E75;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 0 3px rgba(29, 158, 117, 0.12);
}
 
/* === ROLE SELECTOR === */
.mg-role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 6px;
}
 
.mg-role-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #5C5A52;
  background: rgba(255,255,255,0.5);
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
 
.mg-role-btn:hover {
  border-color: #1D9E75;
  color: #1D9E75;
}
 
.mg-role-btn.mg-role-active {
  background: rgba(29, 158, 117, 0.1);
  border-color: #1D9E75;
  color: #1D9E75;
}
 
/* === UTILITIES === */
.mg-hidden { display: none !important; }
 
/* === RESPONSIVE === */
@media (max-width: 768px) {
  .mg-hero { padding: 78px 0 60px; }
  .mg-hero-title { font-size: 48px; letter-spacing: -1px; margin-bottom: 20px; }
  .mg-hero-subtitle { font-size: 18px; margin-bottom: 40px; }
  .mg-hero-cta {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .mg-categories-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .mg-category-card { padding: 32px 20px; border-radius: 16px; }
  .mg-section { padding: 80px 0; }
  .mg-section-title { font-size: 36px; margin-bottom: 48px; }
  .mg-steps-row { flex-direction: column; align-items: center; gap: 12px; }
  .mg-step { max-width: 100%; padding: 20px 0; }
  .mg-step-connector { width: 2px; height: 30px; margin: 0; }
  .mg-telegram-card { padding: 48px 32px; border-radius: 20px; }
  .mg-modal { padding: 32px 28px 28px; border-radius: 20px; max-width: 100%; }
  .mg-navbar-inner { height: 70px; }
  .mg-btn-ghost { font-size: 14px; padding: 10px 16px; }
}
 
@media (max-width: 480px) {
  .mg-container { padding: 0 20px; }
  .mg-hero-title { font-size: 36px; }
  .mg-hero-subtitle { font-size: 16px; }
  .mg-categories-grid { grid-template-columns: 1fr; gap: 12px; }
  .mg-category-card { padding: 24px 16px; }
}
/* === GOOGLE SIGN-IN === */
.mg-google-wrap { margin-bottom: 20px; }
#mg-google-btn { display: flex; justify-content: center; min-height: 44px; }
#mg-google-btn[data-busy="1"] { opacity: 0.5; pointer-events: none; }
.mg-divider {
  display: flex; align-items: center; text-align: center;
  color: #8C8A80; font-size: 14px; margin: 18px 0 4px;
}
.mg-divider::before, .mg-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.12);
}
.mg-divider span { padding: 0 14px; }
.mg-google-role { text-align: center; padding: 6px 0 2px; }
.mg-google-role-title {
  font-size: 17px; font-weight: 600; color: #1A1A2E; margin-bottom: 16px;
}
.mg-auth-head { text-align: center; margin-bottom: 22px; }
.mg-auth-title { font-size: 24px; font-weight: 800; color: #1A1A2E; margin-bottom: 6px; }
.mg-auth-subtitle { font-size: 15px; color: #5C5A52; }
.mg-google-wrap { display: flex; flex-direction: column; align-items: center; }
.mg-lang-switcher { display: inline-flex; gap: 4px; margin-right: 4px; }
.mg-lang-btn {
  padding: 7px 11px; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px;
  font-weight: 600; color: #5C5A52; background: transparent;
  border: 1.5px solid rgba(0,0,0,0.12); border-radius: 9px; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.mg-lang-btn:hover { border-color: #1D9E75; color: #1D9E75; }
.mg-lang-btn.active { background: rgba(29,158,117,0.1); border-color: #1D9E75; color: #1D9E75; }
@media (max-width: 480px) {
  .mg-lang-btn { padding: 6px 8px; font-size: 12px; }
}
/* === LEGAL LINKS (footer + consent under Google button) === */
.mg-footer-links { margin-bottom: 8px; }
.mg-footer-links a { color: #5C5A52 !important; margin: 0 10px; font-size: 14px; }
.mg-footer-links a:hover { color: #1D9E75 !important; }
.mg-auth-consent { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 20px !important; text-align: left; }
.mg-auth-consent a { color: #1D9E75 !important; text-decoration: underline !important; }
.mg-check { display: flex !important; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; line-height: 1.45; color: #5C5A52; }
.mg-check input[type="checkbox"] {
  -webkit-appearance: checkbox !important; appearance: checkbox !important;
  width: 18px !important; height: 18px !important; min-width: 18px; margin: 1px 0 0 !important;
  accent-color: #1D9E75; cursor: pointer; flex-shrink: 0; opacity: 1 !important; position: static !important;
}
.mg-check-text { flex: 1; }
.mg-auth-consent.mg-consent-error .mg-check input:not(:checked) { outline: 2px solid #DC2626; outline-offset: 2px; }
/* Кнопка Google заблокирована, пока не отмечены обе галочки */
.mg-google-wrap.mg-locked { cursor: not-allowed; }
.mg-google-wrap.mg-locked #mg-google-btn { opacity: 0.45; pointer-events: none !important; filter: grayscale(1); }

/* === MOBILE POLISH (Creatium: внутри @media нужен !important) === */
@media (max-width: 480px) {
  .mg-container { padding: 0 16px !important; }
  .mg-navbar-inner { height: 60px !important; }
  .mg-logo { gap: 8px !important; }
  .mg-logo-mark { width: 30px !important; height: 30px !important; }
  .mg-logo-text { font-size: 19px !important; }
  .mg-navbar-right { gap: 6px !important; }
  .mg-lang-switcher { gap: 3px !important; margin-right: 0 !important; }
  .mg-lang-btn { padding: 5px 7px !important; font-size: 11px !important; }
  .mg-btn-sm { padding: 9px 12px !important; font-size: 13px !important; }

  .mg-hero { padding: 48px 0 44px !important; }
  .mg-hero-title { font-size: 32px !important; letter-spacing: -0.6px !important; margin-bottom: 16px !important; }
  .mg-hero-subtitle { font-size: 16px !important; margin-bottom: 28px !important; }
  .mg-hero-cta { flex-direction: column !important; align-items: stretch !important; max-width: 100% !important; gap: 12px !important; }
  .mg-btn-lg { white-space: normal !important; font-size: 16px !important; padding: 16px 20px !important; border-radius: 14px !important; line-height: 1.3 !important; }

  .mg-section { padding: 56px 0 !important; }
  .mg-section-title { font-size: 28px !important; margin-bottom: 28px !important; letter-spacing: -0.4px !important; }

  .mg-categories-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .mg-category-card { padding: 20px 10px !important; border-radius: 14px !important; }
  .mg-category-icon { width: 56px !important; height: 56px !important; border-radius: 14px !important; margin-bottom: 12px !important; }
  .mg-category-label { font-size: 15px !important; }

  .mg-steps-row { flex-direction: column !important; align-items: center !important; gap: 4px !important; }
  .mg-step { padding: 12px 0 !important; max-width: 100% !important; }
  .mg-step-number { width: 56px !important; height: 56px !important; font-size: 24px !important; margin-bottom: 14px !important; }
  .mg-step-title { font-size: 20px !important; }
  .mg-step-desc { font-size: 16px !important; }
  .mg-step-connector { width: 2px !important; height: 20px !important; margin: 0 !important; }

  .mg-telegram-card { padding: 32px 20px !important; border-radius: 18px !important; }
  .mg-telegram-title { font-size: 24px !important; }
  .mg-telegram-desc { font-size: 16px !important; margin-bottom: 24px !important; }
  .mg-btn-telegram { width: 100% !important; padding: 16px 20px !important; font-size: 16px !important; }

  .mg-footer { padding: 28px 0 !important; }
  .mg-footer-inner { font-size: 14px !important; }
  .mg-footer-links a { display: inline-block !important; margin: 4px 8px !important; }

  .mg-overlay { padding: 12px !important; }
  .mg-modal { padding: 28px 18px 22px !important; border-radius: 18px !important; }
  .mg-modal-close { width: 34px !important; height: 34px !important; top: 12px !important; right: 12px !important; font-size: 22px !important; }
  .mg-auth-title { font-size: 20px !important; }
  .mg-auth-subtitle { font-size: 14px !important; }
  .mg-check { font-size: 13px !important; }
}

/* === ЛОГОТИП: только надпись Manugo === */
.mg-logo-mark, .mg-op-logo-mark, .mg-legal-logo svg { display: none !important; }
.mg-logo-text, .mg-op-logo-text, .mg-legal-logo-text { display: inline !important; }
.mg-logo, .mg-op-logo, .mg-legal-logo { gap: 0 !important; }
