/* Qadim Yard — мобильная версия главной страницы. Подключается отдельным файлом, на компьютере ничего не меняет. */
html{-webkit-text-size-adjust:100%;}
/* переключатель «Style 1/2/3» — служебный, гостям не нужен */
#top > div:has(> button){display:none !important;}
.qy-bg,.qy-bg-i{display:none;}

@media (max-width:1000px){
  /* ---------- шапка + бургер ---------- */
  header{padding:10px 16px !important;gap:12px;}
  header > a{gap:10px !important;min-width:0;}
  header > a > span:first-child{width:38px !important;height:38px !important;border-radius:11px !important;}
  header > a > span:last-child > span:first-child{font-size:15px !important;letter-spacing:.08em !important;white-space:nowrap;}
  header > a > span:last-child > span:last-child{font-size:7px !important;letter-spacing:.26em !important;margin-top:4px !important;white-space:nowrap;}
  .qy-bg-i{display:block;position:absolute;opacity:0;pointer-events:none;width:0;height:0;}
  .qy-bg{display:flex;align-items:center;justify-content:center;position:relative;flex-shrink:0;margin-left:auto;width:44px;height:44px;border-radius:12px;background:rgba(58,33,23,.06);border:1px solid rgba(58,33,23,.12);cursor:pointer;-webkit-tap-highlight-color:transparent;}
  .qy-bg i,.qy-bg i::before,.qy-bg i::after{display:block;width:18px;height:2px;background:#3A2117;border-radius:2px;transition:transform .25s,top .25s,background .25s;}
  .qy-bg i{position:relative;}
  .qy-bg i::before,.qy-bg i::after{content:"";position:absolute;left:0;}
  .qy-bg i::before{top:-6px;}
  .qy-bg i::after{top:6px;}
  .qy-bg-i:checked + .qy-bg i{background:transparent;}
  .qy-bg-i:checked + .qy-bg i::before{top:0;transform:rotate(45deg);}
  .qy-bg-i:checked + .qy-bg i::after{top:0;transform:rotate(-45deg);}
  header > nav{display:none !important;position:absolute;top:calc(100% + 8px);left:12px;right:12px;flex-direction:column;align-items:stretch !important;gap:0 !important;background:rgba(253,246,231,.99);border:1px solid rgba(58,33,23,.12);border-radius:20px;padding:6px 18px 18px;box-shadow:0 30px 60px -20px rgba(58,33,23,.4);max-height:calc(100vh - 90px);overflow:auto;}
  .qy-bg-i:checked ~ nav{display:flex !important;}
  header > nav > a{padding:15px 4px !important;font-size:16px !important;border-bottom:1px solid rgba(58,33,23,.08);}
  header > nav > span{display:none !important;}
  header > nav > div{align-self:flex-start;margin:16px 0 4px !important;}
  header > nav > a:last-child{justify-content:center;margin-top:14px;padding:15px 22px !important;border-bottom:none !important;}

}

@media (max-width:860px){
  /* ---------- первый экран ---------- */
  #top h1{font-size:clamp(34px,10.5vw,46px) !important;line-height:1.02 !important;}
  #top [style*="width: 322px"],#top [style*="width:322px"]{width:100% !important;}
  #top > div:first-of-type{height:auto !important;min-height:100svh;}
  #top > div:first-of-type > div:last-child{height:auto !important;min-height:100svh;padding-top:104px !important;padding-bottom:112px !important;}
  #top [style*="width: 322px"] > div:first-child,#top [style*="width:322px"] > div:first-child{padding:16px 18px !important;}
  #top [style*="width: 322px"] > div:last-child,#top [style*="width:322px"] > div:last-child{padding:4px 18px 10px !important;}
  #top > a[href="#booking"]{display:none !important;}
  #top a[href="#booking"],#top a[href="#apartments"]{padding:15px 24px !important;}

  /* ---------- панель выбора дат ---------- */
  #booking{margin-top:-60px !important;}
  #booking > div:first-child{grid-template-columns:1fr 1fr !important;gap:8px !important;padding:10px !important;}
  #booking > div:first-child > button{border-left:none !important;border-radius:14px !important;padding:12px 14px !important;background:rgba(58,33,23,.04);}
  #booking > div:first-child > button:nth-of-type(3),#booking > div:first-child > button:nth-of-type(4){grid-column:1 / -1;}
  #booking > div:first-child > button:nth-of-type(4){min-height:54px;}
  #booking > div:first-child > div[style*="position: absolute"] [style*="grid-template-columns"]{grid-template-columns:1fr !important;}
  #booking > div:first-child > div[style*="position: absolute"] [style*="grid-template-columns"] > div:nth-child(n+2){display:none;}
  #booking > div:first-child > div[style*="position: absolute"] > div:first-child > div > span:nth-child(2){display:none;}
  #booking > div:first-child > div[style*="position: absolute"]{left:0 !important;right:0 !important;width:auto !important;max-width:none !important;}

  /* ---------- секции ---------- */
  #about > div{grid-template-columns:1fr !important;}
  #about [style*="repeat(4, 1fr)"],#about [style*="repeat(4,1fr)"]{grid-template-columns:repeat(2,1fr) !important;gap:22px 18px !important;}
  section[data-screen-label="History"] > div{grid-template-columns:1fr !important;}
  section[data-screen-label="Muslim Friendly"] > div > div{padding:34px 22px !important;border-radius:24px !important;}
  section[data-screen-label="Muslim Friendly"] > div > div > div{grid-template-columns:1fr !important;gap:26px !important;}
  section[data-screen-label="Muslim Friendly"] > div > div > div > div:last-child{grid-template-columns:1fr !important;}
  section[data-screen-label="Reviews"] > div{grid-template-columns:1fr !important;gap:34px !important;}
  section[data-screen-label="Reviews"] > div > div:first-child{position:static !important;}
  section[data-screen-label="Check-in steps"] .steps-grid,.steps-grid{grid-template-columns:1fr !important;gap:14px !important;}
  section[data-screen-label="Final CTA"] > div{min-height:0 !important;}
  section[data-screen-label="Final CTA"] > div > div:last-child{padding:40px 24px !important;}

  /* ---------- подвал ---------- */
  footer > div:first-child{grid-template-columns:1fr 1fr !important;gap:34px 20px !important;}
  footer > div:first-child > div:first-child{grid-column:1 / -1;}
  footer > div:first-child > div:first-child > div:last-child{flex-wrap:wrap;}
  footer > div:last-child > div{flex-direction:column;align-items:flex-start !important;gap:10px !important;}
}

@media (max-width:420px){
  section h2{font-size:clamp(27px,8vw,34px) !important;}
}

/* узкие ноутбуки и планшеты в альбомной ориентации: шапка без переносов */
@media (min-width:1001px) and (max-width:1240px){
  header a[href="#booking"]{white-space:nowrap !important;padding-left:18px !important;padding-right:18px !important;}
  header nav{gap:12px !important;}
  header a[href="#top"] span span{white-space:nowrap !important;}
  header a[href="#top"] span span:last-child{letter-spacing:0.14em !important;font-size:8px !important;}
}
