/* Стили для маленьких экранов */

@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  .header, .header__container, .footer, .footer__container { overflow-x: hidden; }
  /* Лого не растягивает хедер */
  .logo__img { max-width: 48vw; height: auto; }
  /* Навигация в футере переносится */
  .footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
  .footer__contacts { word-break: break-word; overflow-wrap: anywhere; text-align: center; }
  .page-hero {
    padding: 70px 0 50px 0;
    background-attachment: scroll;
  }
  .page-hero--jewelry {
    background-attachment: scroll;
  }
  .page-hero__title {
    font-size: 3rem;
    margin-bottom: 18px;
    padding: 0 20px;
    line-height: 1.4;
  }
  .page-hero__title br { margin-top: 0.25em; }
  .page-hero__subtitle { font-size: 1.2rem; padding: 0 20px; }
  .page-hero__cta { font-size: 1.1rem; padding: 16px 32px; margin-top: 28px; }
  .hero-jewelry-image { max-height: 350px; }
  .nav { gap: 40px; margin: 0 15px; }
  .nav a { font-size: 0.85rem; }
  .calculator__input-group input[type="text"] { font-size: 1rem; padding: 10px 14px; height: 65px; font-family: inherit; }
  .calculator__input-group .calculator__result-value { height: 65px; padding: 10px 14px; font-size: 1rem; font-family: inherit; color: var(--accent); }
  .calculator__inline { gap: 25px; }
  .calculator__input-group { max-width: 375px; min-width: 270px; }
  .calculator__input-group:first-child { max-width: 410px; min-width: 293px; }
  .calculator__submit { padding: 20px 36px; font-size: 1.2rem; min-width: 203px; max-width: 248px; height: 65px; }
  
  /* Калькулятор золота для больших экранов */
  .calculator__form--gold { width: 100%; }
  .calculator__gold-layout { width: 100%; }
  .calculator__gold-row { width: 100%; }
  .calculator__input-field--weight { width: 100%; }
  .calculator__radio-group { width: 100%; }
  .calculator__weight-input-section { width: 100%; }
  .calculator__weight-input-section input { width: 100%; box-sizing: border-box; }
  .calculator__result { width: 100%; max-width: none; }
  .header__container { min-height: 95px; padding: 18px 0; }
  .container { padding: 0; margin: 0; width: 100%; max-width: 100%; }
  .application__container, .benefits__list { flex-direction: column; gap: 18px; align-items: stretch; }
  .application__image { margin-left: 0; min-height: 300px; }
  .steps__cards, .loan-types__list { flex-direction: column; align-items: center; display: flex; }
  .footer__container { flex-direction: column; gap: 16px; text-align: center; }
  .footer__contacts { text-align: center; }
  .contacts__container { flex-direction: column; gap: 24px; }
  .loan-detailed__content { grid-template-columns: 1fr; gap: 24px; }
  .loan-detailed__btn { align-self: stretch; }
  .map-section__content { flex-direction: column; gap: 24px; }
  .map-section__info { max-width: none; }
  .contacts-page .map-section__info { max-width: none; min-height: auto; }
  .contacts-page .map-section__info h3 { margin-top: 24px; }
  .contacts-page .map-section__map { min-height: 300px; }
  .jewelry-benefits__list { flex-direction: column; align-items: center; }
  .auto-benefits__list { flex-direction: column; align-items: center; }
  .contacts-content { grid-template-columns: 1fr; gap: 0; }
  .contacts-info { border-radius: 0; }
  .contacts-map { border-radius: 0; }
  section { 
    padding-left: 0 !important; 
    padding-right: 0 !important; 
    margin-left: 0 !important; 
    margin-right: 0 !important; 
    width: 100% !important; 
  }
  .container > * { padding-left: 24px; padding-right: 24px; }
  
  /* Плавные переходы для мобильных */
  .loan-types,
  .benefits,
  .application,
  .map-section,
  .reviews,
  .faq {
    margin-top: -10px;
    padding-top: 40px;
  }
}

@media (max-width: 700px) {
  /* Глобально: убираем горизонтальный скролл */
  html, body { overflow-x: hidden; }

  /* Контейнер даёт боковые отступы сам, дети не добавляют свои */
  .container { padding: 0 16px; }
  .container > * { padding-left: 0; padding-right: 0; }

  .page-hero { padding: 60px 0 40px 0; background-attachment: scroll; }
  .page-hero--jewelry { background-attachment: scroll; }
  .page-hero__title { font-size: 2.5rem; margin-bottom: 16px; padding: 0 16px; line-height: 1.4; }
  .page-hero__title br { margin-top: 0.25em; }
  .page-hero__subtitle { font-size: 1.1rem; padding: 0 16px; }
  .page-hero__cta { font-size: 0.95rem; padding: 14px 24px; margin-top: 20px; }
  .calculator__input-group input[type="text"] { font-size: 0.95rem; padding: 8px 12px; }
  .calculator__input-hint { font-size: 0.8rem; margin-top: 6px; }
  .calculator__result { max-width: 260px; padding: 12px 16px; }
  .calculator__result-value { font-size: 1.2rem; }
  .calculator__inline { gap: 20px; }
  .calculator__input-group { max-width: 330px; min-width: 240px; }
  .calculator__input-group:first-child { max-width: 360px; min-width: 260px; }
  .calculator__submit { padding: 18px 30px; font-size: 1.1rem; min-width: 180px; max-width: 220px; }
  .calculator__input-group .calculator__result-value { padding: 14px 18px; font-size: 1.5rem; }
  
  /* Калькулятор золота для средних экранов */
  .calculator__form--gold { width: 100%; }
  .calculator__gold-layout { width: 100%; }
  .calculator__gold-row { width: 100%; }
  .calculator__input-field--weight { width: 100%; }
  .calculator__radio-group { width: 100%; }
  .calculator__weight-input-section { width: 100%; }
  .calculator__weight-input-section input { width: 100%; box-sizing: border-box; }
  .calculator__result { width: 100%; max-width: none; }
  .burger { display: flex; position: absolute; top: 18px; right: 18px; z-index: 1002; }
  .nav { position: fixed; top: 0; right: 0; height: 100vh; width: 80vw; max-width: 320px; background: #222; flex-direction: column; align-items: flex-start; gap: 0; padding: 80px 24px 24px 24px; transform: translateX(110%); transition: transform 0.3s, opacity 0.3s, visibility 0.3s; z-index: 1001; border-radius: 0; box-sizing: border-box; box-shadow: none; opacity: 0; visibility: hidden; pointer-events: none; }
  .nav.open { transform: translateX(0); opacity: 1; visibility: visible; pointer-events: auto; box-shadow: -2px 0 16px rgba(0,0,0,0.12); border-radius: 12px 0 0 12px; }
  .nav a, .nav .header__login { width: 100%; text-align: left; font-size: 0.95rem; padding: 16px 0; border-bottom: 1px solid #333; background: none; margin: 0; border-radius: 0; color: #fff; display: block; }
  .nav .header__login { margin-top: 12px; border: 1px solid #444; border-radius: 8px; background: #333; color: #fff; font-weight: 500; text-align: center; padding: 12px 0; border-bottom: none; }
  .header__container { position: relative; flex-direction: row; align-items: center; justify-content: space-between; min-height: 60px; padding: 8px 0; padding-right: 80px; }
  .logo { margin-bottom: 0; flex: 1; max-width: 200px; }
  .logo__img { height: 70px; }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; width: 100%; max-width: 100%; box-sizing: border-box; }
  .header, .features, .about, .contact, .hero, .calculator, .application, .benefits, .steps, .loan-types, .cta, .reviews, .faq, .footer, .map-section, .jewelry-calculator, .jewelry-benefits, .auto-calculator, .auto-benefits, .contacts-main, .contacts-content, .contacts-info, .contacts-map, .loans-contacts, .jewelry-contacts { padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; width: 100%; box-sizing: border-box; }
  .logo { font-size: 1.3rem; }
  .hero-jewelry-image { max-height: 200px; }
  section { padding-left: 0 !important; padding-right: 0 !important; margin-left: 0 !important; margin-right: 0 !important; width: 100% !important; }
  .container > * { padding-left: 0; padding-right: 0; }
  .page-hero { padding: 50px 0 30px 0; }
  .page-hero__title { font-size: 2.2rem; margin-bottom: 14px; padding: 0 12px; line-height: 1.4; }
  .page-hero__subtitle { font-size: 1rem; padding: 0 12px; }
  .page-hero__cta { font-size: 0.85rem; padding: 10px 18px; margin-top: 16px; }
  .calculator__input-group input[type="text"] { font-size: 0.9rem; padding: 8px 10px; height: 55px; font-family: inherit; }
  .calculator__input-group .calculator__result-value { height: 55px; padding: 8px 10px; font-size: 0.9rem; font-family: inherit; color: var(--accent); }
  .calculator__input-hint { font-size: 0.75rem; margin-top: 4px; }
  .calculator__inline { flex-direction: column; gap: 22px; align-items: center; }
  .calculator__input-group { max-width: 100%; min-width: auto; }
  .calculator__submit { width: 100%; max-width: 450px; min-width: auto; height: 80px; }
  
  /* Калькулятор золота на всю ширину */
  .calculator__form--gold { width: 100%; }
  .calculator__gold-layout { width: 100%; }
  .calculator__gold-row { width: 100%; }
  .calculator__input-field--weight { width: 100%; }
  .calculator__radio-group { width: 100%; justify-content: space-between; }
  .calculator__radio { flex: 1; min-width: 0; }
  .calculator__weight-input-section { width: 100%; }
  .calculator__weight-input-section input { width: 100%; box-sizing: border-box; }
  .calculator__result { width: 100%; max-width: none; }
  /* Мобильная карта */
  .map-section__map { min-height: 300px !important; height: 350px !important; max-height: 400px !important; margin-top: 20px; width: 100% !important; border-radius: 0 !important; }
  #map { min-height: 300px !important; height: 350px !important; max-height: 400px !important; width: 100% !important; border-radius: 0 !important; }
  .map-section__content { flex-direction: column; gap: 24px; width: 100%; }
  .map-section__info { max-width: 100%; order: 2; width: 100%; }
  .map-section__map { order: 1; width: 100%; }
  /* Login мобильные */
  .login-container { padding: 32px 24px; margin: 0 16px; }
  .phone-input { flex-direction: column; gap: 16px; }
  .send-code-btn { width: 100%; }
  .code-input { gap: 8px; }
  .code-digit { width: 50px; height: 50px; font-size: 1.3rem; }
  .nav { gap: 20px; margin: 0 5px; }
  .nav a { font-size: 0.75rem; }
  .header__login { padding: 12px 20px; font-size: 0.9rem; }
  .header__login-text { display: none; }
  .header__login-icon { display: inline; font-size: 1.4rem; }
  .header__container { min-height: 80px; padding: 10px 0; }
  .application__image { min-height: 200px; }
  .promo-line { font-size: 1.8rem; }
  .promo-offer { padding: 35px 18px; }
}

@media (max-width: 800px) {
  .features-list { flex-direction: column; gap: 20px; }
  .hero h1 { font-size: 2.1rem; }
  .nav { gap: 30px; margin: 0 10px; }
  .nav a { font-size: 0.8rem; }
  .header__login { padding: 14px 24px; font-size: 1rem; }
  .header__container { min-height: 90px; padding: 15px 0; }
  .application__image { min-height: 250px; }
  .promo-line { font-size: 2.2rem; }
  .promo-offer { padding: 45px 22px; }
  .page-hero__title { font-size: 2.8rem; line-height: 1.4; }
  .page-hero__title br { margin-top: 0.25em; }
  .page-hero__cta { font-size: 1rem; padding: 14px 28px; margin-top: 24px; }
  .hero-jewelry-image { max-height: 300px; }
  .calculator__input-group input[type="text"] { height: 60px; font-family: inherit; }
  .calculator__input-group .calculator__result-value { height: 60px; font-size: 0.95rem; font-family: inherit; color: var(--accent); }
  .calculator__submit { height: 78px; }
}


