/* /Users/vyacheslavkomarov/Documents/Python/sitediagnostrgs/static/css/mobile.css */

/* =========================================================
   MOBILE.CSS — SINGLE SOURCE OF TRUTH
   - единый фон как на десктопе
   - нормальные секции
   - без двойной рамки у блока заявки (#calc / .lead-section)
   - компактный футер (контакты + ИНН/ОГРН)
   ========================================================= */

@media (max-width: 900px){

  /* =========================================================
     1) TOKENS
     ========================================================= */
    :root{
      --bg: #f5f7ff;
      --surface: #ffffff;
      --text: #0f172a;
      --muted: #475569;
      --line: rgba(15, 23, 42, 0.10);
      --radius: 16px;
      --shadow: 0 14px 42px rgba(2, 6, 23, 0.12);
      --header-h: 120px;

    }

  /* =========================================================
     2) BASE
     ========================================================= */
  html,
  body{
    height: 100%;
  }

  body{
    margin: 0;
    padding-top: var(--header-h);

    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.55;
    overflow-x: hidden;
  }

  main,
  .page,
  .wrapper,
  .container:not(.header-row){
    width: min(680px, calc(100% - 24px));
    margin: 0 auto;
  }

  /* =========================================================
     3) HEADER — fixed + grid 2 rows
     ========================================================= */
  .site-header{
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    z-index: 3000;

    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid rgba(15,23,42,0.08);
    backdrop-filter: blur(10px);
  }

  /* header-row у тебя = "container header-row" */
  .site-header .container.header-row{
    width: 100%;
    max-width: none;
    margin: 0;
  }


  .site-header .header-row{
    height: 100%;
    width: 100%;
    display: grid;

    grid-template-rows: 56px 44px;
    grid-template-columns: 56px 1fr;

    gap: 10px 12px;
    padding: 10px 12px;
    box-sizing: border-box;
    align-items: center;
  }

  /* Burger */
  .site-header .nav-toggle{
    grid-row: 1;
    grid-column: 1;
    justify-self: start;

    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;

    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;

    border: 1px solid rgba(15,23,42,0.12);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(2,6,23,0.10);

    cursor: pointer;
    z-index: 10;
  }

  .site-header .nav-toggle__line{
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: rgba(15,23,42,0.85);
    border-radius: 2px;
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .site-header.nav-open .nav-toggle__line:nth-child(1){
    transform: translateY(8px) rotate(45deg);
  }
  .site-header.nav-open .nav-toggle__line:nth-child(2){
    opacity: 0;
  }
  .site-header.nav-open .nav-toggle__line:nth-child(3){
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Logo */
  .site-header .brand{
    grid-row: 1;
    grid-column: 2;
    justify-self: start;

    display: flex;
    align-items: center;

    height: 56px;
    padding-left: 6px;

    overflow: hidden;
    text-decoration: none;

    min-width: 0;

  }

  .site-header .brand-logo{
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
  }

  /* CTA */
  .site-header .cta{
    grid-row: 2;
    grid-column: 1 / 3;
    justify-self: end;
    align-self: start;

    margin-top: 0;


    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;

    border-radius: 999px;
    text-decoration: none;
    color: #fff;

    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.28);

    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  /* =========================================================
     4) MENU + BACKDROP
     ========================================================= */
  .site-header .nav{
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;

    background: #fff;
    padding: 16px;

    display: none;
    z-index: 2000;
  }

  .site-header.nav-open .nav{
    display: block;
  }

  .site-header .nav a{
    display: block;
    padding: 14px;
    border-radius: 12px;
    background: #f3f4f6;

    text-decoration: none;
    color: #111827;
    font-weight: 600;
  }

  .site-header .nav a + a{
    margin-top: 10px;
  }

  .site-header .nav-backdrop{
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(15,23,42,0.35);
    z-index: 1500;
  }

  .site-header.nav-open .nav-backdrop{
    display: block;
  }

  /* =========================================================
     5) ANCHOR OFFSET
     ========================================================= */
  #mkd,
  #check,
  #price,
  #calc,
  #contacts,
  #lead-form{
    scroll-margin-top: calc(var(--header-h) + 16px);
  }

  /* =========================================================
     6) TYPOGRAPHY
     ========================================================= */
  h1{
    font-size: 30px;
    line-height: 1.15;
    margin: 18px 0 10px;
  }

  h2{
    font-size: 22px;
    margin: 22px 0 14px;
  }

  h3{
    font-size: 18px;
    margin: 16px 0 10px;
  }

  p{
    color: var(--muted);
    margin: 0 0 12px;
  }

  /* =========================================================
     7) SECTIONS
     - важно: НЕ трогаем lead-section, иначе будет "двойная рамка"
     ========================================================= */
  section:not(.lead-section){
    margin: 14px 0;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  /* =========================================================
     8) LEAD SECTION (#calc) — без двойной рамки
     - section.lead-section без бордера/тени/фона
     - рамка/тень только на .lead-card (из lead_form.css)
     ========================================================= */
  section.lead-section{
    margin: 14px 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  /* на всякий случай, если где-то переопределилось */
  section.lead-section > .lead-card{
    margin: 0;
  }

  /* чтобы следующий section не "слипался" и не давал ощущение второй линии */
  section.lead-section + section{
    margin-top: 14px;
  }

  /* форма в мобайле (лёгкая унификация; базовые стили в lead_form.css) */
  .bitrix-form input,
  .bitrix-form select,
  .bitrix-form textarea{
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #d9d9d9;
    background: #f3f3f3;
    font-size: 15px;
    box-sizing: border-box;
  }

  .bitrix-form textarea{
    min-height: 96px;
    resize: vertical;
  }

  .bitrix-submit{
    width: 100%;
    height: 50px;
    background: #00a9f0;
    color: #fff;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
  }

  /* =========================================================
     FOOTER — компактный и аккуратный на мобайле
     ========================================================= */
  .site-footer{
    margin: 14px 0 18px;
    padding: 0;
    background: transparent;
    border: 0;
  }

  .site-footer__inner{
    width: min(680px, calc(100% - 24px));
    margin: 0 auto;

    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    box-sizing: border-box;
  }

  .site-footer__top{
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .site-footer__company{
    font-weight: 800;
    font-size: 16px;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 6px;
  }

  .site-footer__address{
    font-size: 13px;
    color: var(--muted);
    line-height: 1.35;
  }

  .site-footer__requisites{
    margin-top: 6px;
    font-size: 12px;
    color: rgba(71, 85, 105, 0.95);
  }

  .site-footer__region{
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
  }

  .site-footer__right{
    display: grid;
    gap: 8px;
  }

  .site-footer__contact{
    font-size: 14px;
    line-height: 1.35;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }

  .site-footer__contact a{
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px dashed rgba(15, 23, 42, 0.25);
  }

  .site-footer__legal{
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 12px;
    line-height: 1.45;
    color: rgba(71, 85, 105, 0.95);
  }
}

/* =========================================
   TRUST / EXPERIENCE — MOBILE
   ========================================= */
@media (max-width: 768px){

  /* блок proof у тебя внутри <section class="proof"> (который уже карточкой),
     поэтому не делаем огромные внешние паддинги */
  .proof{
    padding: 16px;
  }

  .proof__head h2{
    font-size: 22px;
    line-height: 1.3;
    margin: 0 0 10px;
  }

  .proof__subtitle{
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
  }

  .proof__grid{
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 16px;
  }

  .proof__lead{
    font-size: 15px;
    line-height: 1.6;
  }

  .proof__lead .btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;

    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;

    border-radius: 999px;

    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: #fff;
    text-decoration: none;

    box-shadow: 0 6px 18px rgba(30,64,175,0.25);
  }

  .proof__photos{
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .proof__photo{
    margin: 0;
  }

  .proof__photo img{
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
  }

  .proof__photo figcaption{
    font-size: 13px;
    line-height: 1.4;
    margin-top: 8px;
    color: #64748b;
  }

  /* метрики аккуратно, без "иконок": просто карточки (если они есть на мобайле) */
  .proof__metrics{
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px;
  }

  .metric{
    padding: 14px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.08);
    text-align: left;
  }

  .metric__value{
    font-size: 26px;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 6px;
    color: #1d4ed8;
  }

  .metric__label{
    font-size: 14px;
    color: #64748b;
  }

  .metric--wide{
    text-align: left;
  }

   /* =========================================
     PERSONAL DATA CHECKBOX — MOBILE FIX
     ========================================= */

  .bitrix-agree{
    display: grid;
    grid-template-columns: 20px 1fr;
    column-gap: 10px;
    align-items: start;

    margin: 16px 0 20px;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
  }

  .bitrix-agree input[type="checkbox"]{
    width: 18px;
    height: 18px;
    margin: 3px 0 0 0;
  }

  .bitrix-agree input{
    grid-column: 1;
  }

  .bitrix-agree{
    grid-column: 1 / -1;
  }


}


  /* =========================================
   GLOBAL MEDIA SAFETY
   ========================================= */

img,
video,
iframe{
  max-width: 100%;
  height: auto;
  display: block;
}