/* Mobile polish for non-t396 blocks and visual refinements */

@media screen and (max-width: 640px) {
  /* FAQ accordion */
  #rec1051271926 .t668 {
    padding-left: 15px;
    padding-right: 15px;
  }

  #rec1051271926 .t668__col {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  #rec1051271926 .t668__title {
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  #rec1051271926 .t668__accordion {
    margin-bottom: 12px;
  }

  /* Speaker bio text readability on photo */
  #rec1051271916 .tn-elem[data-elem-type="text"] .tn-atom {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
  }

  /* Registration CTA above decorative graphics */
  #rec1051271896 .tn-elem[data-elem-id="1745576016281"] {
    z-index: 2;
  }

  /* Footer legal text */
  #rec1051271956 .tn-elem[data-elem-id="1743589537417"] {
    left: 16px !important;
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
  }

  #rec1051271956 .tn-elem[data-elem-type="text"] .tn-atom {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }

  /* Reviews section title */
  #rec1051271931 .tn-elem[data-elem-id="1736847081951"] {
    left: 16px !important;
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    text-align: center !important;
  }

  /* Gold CTA label centered on button */
  #rec1051271901 .tn-elem[data-elem-id="1736848002149"] {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(273px, calc(100vw - 48px)) !important;
    text-align: center !important;
  }

  #rec1051271901 .tn-elem[data-elem-id="1736850127771"] {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(319px, calc(100vw - 40px)) !important;
  }
}

/* Reviews gallery — centered slider on mobile */
@media screen and (max-width: 980px) {
  #rec1051271941 .tn-elem[data-elem-id="1736857888470"] .tn-atom__gallery,
  #rec1051271941 .tn-elem[data-elem-id="1736857888470"] .t-slds {
    width: 100% !important;
    height: 100% !important;
  }
}

/* Thank-you page: fix broken Tilda mobile left/width values */
@media screen and (max-width: 639px) {
  #rec1051276026 .t396__artboard,
  #rec1051276026 .t396__carrier,
  #rec1051276026 .t396__filter {
    min-height: 100vh !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Stepper image */
  #rec1051276026 .tn-elem[data-elem-id="1736858158481"] {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(303px, calc(100vw - 40px)) !important;
    top: 48px !important;
  }

  /* Druk headline — after stepper */
  #rec1051276026 .tn-elem[data-elem-id="1736858040679"] {
    left: 16px !important;
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    top: 160px !important;
    text-align: center !important;
  }

  #rec1051276026 .tn-elem[data-elem-id="1736858040679"] .tn-atom {
    font-size: 28px !important;
    line-height: 1.15 !important;
  }

  /* Subtitle — below headline */
  #rec1051276026 .tn-elem[data-elem-id="1736858040675"] {
    left: 20px !important;
    width: calc(100vw - 40px) !important;
    max-width: calc(100vw - 40px) !important;
    top: 290px !important;
    text-align: center !important;
  }

  /* CTA button shape + label */
  #rec1051276026 .tn-elem[data-elem-id="1736858040684"] {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(319px, calc(100vw - 40px)) !important;
    top: 410px !important;
  }

  #rec1051276026 .tn-elem[data-elem-id="1736858040686"] {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(273px, calc(100vw - 48px)) !important;
    top: 425px !important;
    text-align: center !important;
  }

  /* Bottom book graphic */
  #rec1051276026 .tn-elem[data-elem-id="1741595916624"] {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(320px, 90vw) !important;
    top: auto !important;
    bottom: 0 !important;
  }

  #rec1051276026 .tn-elem[data-elem-id="1736858213748"] {
    display: none !important;
  }
}

@media screen and (max-width: 479px) {
  #rec1051276026 .tn-elem[data-elem-id="1736858040679"] .tn-atom {
    font-size: 24px !important;
  }
}

/* SEO: сброс браузерных стилей h1/h2 внутри Tilda Zero Block */
#allrecords .t396__elem h1.tn-atom,
#allrecords .t396__elem h2.tn-atom {
  margin: 0;
  padding: 0;
  letter-spacing: inherit;
  text-transform: inherit;
}
