/* r227: phones and tablets only (≤1279px, and touch screens of any width); a computer with a mouse from 1280px is not touched */

/* 1. home tile «Веб-приложения»: on a phone the picture goes on top, the text under it (like the other tiles) */
@media (max-width:640px){
 .wa{grid-template-columns:minmax(0,1fr);grid-template-rows:none;gap:16px;padding:14px 14px 18px}
 .wa-vw{width:100%;height:auto;aspect-ratio:270/150;overflow:hidden;border-radius:14px}
 .wa-tx,.wa-st,.wa-bt{grid-column:1;min-width:0;padding:0 4px}
 .wa-tag{margin-bottom:8px}
 .wa-h{font-size:22px}
 .wa-p{font-size:14.5px}
 .wa-st{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;border:0;text-align:left}
 .wa-st b{font-size:24px}
 .wa-st small{margin:0;white-space:normal}
}

/* 2. contact block: the WhatsApp and email cards stay inside the screen; the address shrinks instead of wrapping (r227_mobile.js) */
@media (max-width:760px){
 #contact .nx{grid-template-columns:minmax(0,1fr)}
 #contact .nx>*{min-width:0;max-width:100%}
 #contact .nw__t{min-width:0}
}
@media (max-width:420px){
 #contact .ce5{position:relative;padding-right:14px}
 #contact .ce5 .nm__cp{position:absolute;top:8px;right:8px;width:32px;height:32px}
 #contact .ce5__t{flex:1 1 auto;min-width:0}
 #contact #mail{overflow:hidden}
}
@media (max-width:380px){
 #contact .contact{padding-left:18px;padding-right:18px}
 #contact .ce5__ic{width:34px;height:34px}
 #contact .ce5{gap:10px}
}

/* 3. plan cards: when the button does not fit next to the price it goes under it, full width (class from r227_mobile.js) */
.b43-ft.r227-stk{flex-direction:column;align-items:stretch;gap:14px}
.b43-ft.r227-stk .b43-pr{width:auto}
.b43-ft.r227-stk .b43-go{justify-content:center;width:100%;box-sizing:border-box}

/* 4. design «Бренд под ключ»: phone = picture on top, text under it; tablet = picture left, text, price and buttons in one column right */
@media (max-width:560px){
 #brand-dz .xd-a1-row{grid-template-columns:minmax(0,1fr)}
 #brand-dz .xd-a1-mw{justify-content:center}
 #brand-dz .xd-a1-tx,#brand-dz .xd-a1-pr,#brand-dz .xd-a1-bt{grid-column:1}
}
@media (min-width:561px) and (max-width:1279px){
 #brand-dz .xd-a1-row{grid-template-columns:auto minmax(0,1fr);row-gap:14px}
 #brand-dz .xd-a1-mw{grid-row:1/span 3;align-self:start}
 #brand-dz .xd-a1-tx,#brand-dz .xd-a1-pr,#brand-dz .xd-a1-bt{grid-column:2}
 #brand-dz .xd-a1-pr{text-align:left;border-left:0;padding-left:0;display:flex;align-items:baseline;gap:6px 14px;flex-wrap:wrap}
 #brand-dz .xd-a1-pr .xd-term{margin-top:0}
}

/* 4b. small leftovers found by the check: bonus pill, brand buttons, AI list lines, web apps tile on a tablet */
@media (max-width:760px){
 #services .svg-h .bp{max-width:100%;box-sizing:border-box}
 #services .svg-h .bp *{white-space:normal}
}
@media (max-width:560px){
 #brand-dz .xd-a1-bt{flex-wrap:wrap}
 #brand-dz .xd-a1-bt .xd-btn{flex:1 1 auto;justify-content:center}
}
@media (max-width:1279px),(hover:none) and (pointer:coarse) and (min-width:1280px){
 #services .svc__l li{white-space:normal!important;text-overflow:clip!important}
}
@media (max-width:420px){
 .r115f .st{grid-template-columns:auto auto auto;justify-content:space-between;gap:6px}
 .r115f .st>span{padding-left:10px}
}
@media (max-width:1100px){
 .wa-st{flex-wrap:wrap}
 .wa-st small{white-space:normal}
}

/* 7. terms: tables on a phone (classes from r227_mobile.js) */
@media (max-width:560px){
 .tw table.r227-tk th:last-child,.tw table.r227-tk td:last-child{white-space:nowrap;width:1%}
 .tw table.r227-tb,.tw table.r227-tb tbody,.tw table.r227-tb tr,.tw table.r227-tb td{display:block;width:auto}
 .tw table.r227-tb thead{display:none}
 .tw table.r227-tb tr{padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.06)}
 .tw table.r227-tb tr:last-child{border-bottom:0}
 .tw table.r227-tb td{padding:0;border:0;hyphens:manual}
 .tw table.r227-tb td:first-child{width:auto;margin-bottom:4px}
 .tw table.r227-tb td+td[data-l]::before{content:attr(data-l);display:block;margin-top:6px;font:700 10.5px var(--f-mono,monospace);letter-spacing:.1em;text-transform:uppercase;color:#8d877e}
}

/* 8. home price tiles: when a title does not fit next to the price, «от» goes above the number (class from r227_mobile.js) */
.r227-r93s .r93__p small{display:block;margin:0 0 3px;font-size:11px;line-height:1;text-align:right}

/* 9. «Подробнее / Что входит» on a phone: a panel from the bottom of the screen (r227_mobile.js) */
.r227-sh{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;justify-content:flex-end}
.r227-sh[hidden]{display:none}
.r227-bd{position:absolute;inset:0;background:rgba(8,8,8,.62);opacity:0;transition:opacity .28s ease;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
.r227-pn{position:relative;max-height:min(86vh,calc(100% - 48px));display:flex;flex-direction:column;background:#1b1a19;border:1px solid rgba(255,255,255,.09);border-bottom:0;border-radius:22px 22px 0 0;box-shadow:0 -18px 50px -10px rgba(0,0,0,.7);transform:translateY(100%);transition:transform .34s cubic-bezier(.2,.9,.25,1);padding-bottom:env(safe-area-inset-bottom,0px);overflow:hidden}
.r227-sh.on .r227-bd{opacity:1}
.r227-sh.on .r227-pn{transform:none}
.r227-tp{flex:none;position:relative;height:30px;touch-action:none;cursor:grab}
.r227-tp::before{content:"";position:absolute;left:50%;top:10px;width:40px;height:5px;margin-left:-20px;border-radius:3px;background:rgba(255,255,255,.22)}
.r227-x{position:absolute;top:10px;right:12px;z-index:2;width:36px;height:36px;border-radius:50%;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.06);color:#EEEBE6;display:grid;place-items:center;padding:0;cursor:pointer}
.r227-x svg{width:16px;height:16px}
.r227-x:focus-visible{outline:2px solid #E0A04A;outline-offset:2px}
.r227-ct{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:0 4px 14px}
.r227-ct>.b5-pop,.r227-ct>.bx-pop,.r227-ct .b5-pop,.r227-ct .bx-pop{position:static!important;inset:auto!important;transform:none!important;opacity:1!important;visibility:visible!important;pointer-events:auto!important;max-height:none!important;overflow:visible!important;width:auto!important;max-width:none!important;margin:0!important;background:transparent!important;border:0!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;display:block!important;animation:none!important}
.r227-ct .b5-pop::after,.r227-ct .bx-pop::after{display:none!important}
.r227-ct .hd{padding-right:48px!important}
.r227-cw.a7-card{all:unset;display:block}
html.r227-lock,html.r227-lock body{overflow:hidden!important}
html.r227-lock .wa-fab{opacity:0!important;pointer-events:none!important}
@media (prefers-reduced-motion:reduce){.r227-bd,.r227-pn{transition:none}}

/* 10. floating WhatsApp button: always on screen; over text or a button it tucks into a small tab at the right edge */
@media (max-width:820px){
 .wa-fab{transition:right .28s cubic-bezier(.2,.9,.25,1),width .28s cubic-bezier(.2,.9,.25,1),height .28s,border-radius .28s,opacity .25s,transform .25s;right:calc(14px + env(safe-area-inset-right,0px))}
 .wa-fab.wa-fab--off{opacity:1;transform:none;pointer-events:auto}
 .wa-fab.r227-dk{right:0;width:38px;height:46px;border-radius:23px 0 0 23px;box-shadow:-6px 8px 20px -8px rgba(0,0,0,.55)}
 .wa-fab.r227-dk svg{width:21px;height:21px;margin-left:3px}
}

/* 11. less empty space between sections on a phone (about half) and a bit less on a tablet */
@media (max-width:760px){
 #prices,#why,#faq{padding-top:26px;padding-bottom:26px}
 #sites,#shops,#extras,#services{padding-top:28px;padding-bottom:28px}
 #how{padding-top:28px;padding-bottom:12px}
 #contact{padding-top:12px;padding-bottom:28px}
 html.r11-why body #contact{padding-top:26px}
 html body footer.xft{margin-top:30px}
 .hero{padding-bottom:16px}
 .p-hero{padding-top:36px}
 .dzh{margin-top:24px}
 section.ap{padding-bottom:44px}
}
@media (min-width:761px) and (max-width:1279px),(hover:none) and (pointer:coarse) and (min-width:1280px){
 #prices,#why,#faq{padding-top:38px;padding-bottom:38px}
 #sites,#shops,#extras,#services{padding-top:40px;padding-bottom:40px}
 #how{padding-top:40px;padding-bottom:18px}
 #contact{padding-top:18px;padding-bottom:40px}
 html.r11-why body #contact{padding-top:38px}
}
