/* Phone and tablet refinements: compact header, smaller type and buttons, floating quick-action bar, swipe lists. */

.icon-btn { display: none; }
.swipe { position: relative; }
.swipe__btn { display: none; }

@media (max-width: 1099px) {
    body.site { padding-bottom: 92px; }
    .whatsapp-fab { display: none; }

    .mobile-bar { left: 10px; right: 10px; bottom: 10px; border: 0; border-radius: 22px; grid-template-columns: 1fr 1fr 1.1fr 1fr 1fr; align-items: end; padding: 0 4px; box-shadow: 0 10px 34px rgba(17, 48, 58, .22); background: #fff; }
    .mobile-bar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 10px 2px 9px; min-height: 58px; font-size: .64rem; font-weight: 600; color: var(--text); text-align: center; }
    .mobile-bar__item i { font-size: 1.12rem; color: var(--brand); }
    .mobile-bar__item--alert i { color: #c8372d; }
    .mobile-bar__item--wa i { color: #25d366; }
    .mobile-bar__book { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 62px; height: 62px; margin: -22px auto 0; border-radius: 50%; background: linear-gradient(145deg, var(--brand), var(--brand-dark)); color: #fff; font-size: .62rem; font-weight: 700; box-shadow: 0 10px 22px -6px var(--brand); border: 4px solid #fff; }
    .mobile-bar__book i { font-size: 1.25rem; }
    .mobile-bar__book:hover { color: #fff; }
}

@media (min-width: 1100px) {
    .mobile-bar { display: none; }
}

@media (max-width: 639px) {
    body.site { font-size: 14.5px; line-height: 1.6; }
    h1 { font-size: 1.55rem; }
    h2 { font-size: 1.28rem; }
    h3 { font-size: 1rem; }
    .container { padding: 0 16px; }
    .lead { font-size: 1rem; }

    .btn { padding: .55rem 1.05rem; font-size: .84rem; border-radius: 8px; gap: .45rem; }
    .btn--sm { padding: .4rem .8rem; font-size: .78rem; }
    .btn--lg { padding: .7rem 1.2rem; font-size: .9rem; }

    /* Top strip: one slim line */
    .topbar { font-size: .72rem; }
    .topbar__inner { min-height: 30px; justify-content: center; }
    .topbar__meta { gap: 10px; }
    .topbar__meta li:not(:first-child) { display: none; }

    /* Header: logo left, call / book / menu icons right */
    .site-header__inner { min-height: 60px; gap: 8px; }
    .brand__logo { height: calc(var(--logo-h, 48px) * .72); max-width: 190px; }
    .brand__mark { width: 38px; height: 38px; font-size: 1.05rem; border-radius: 10px; }
    .brand__text strong { font-size: 1rem; max-width: 160px; }
    .site-header.is-scrolled .site-header__inner { min-height: 54px; }
    .site-header__actions { gap: 8px; }
    .icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: .95rem; }
    .icon-btn--call { background: var(--brand-soft); color: var(--brand-dark); }
    .icon-btn--book { background: var(--brand); color: #fff; box-shadow: 0 6px 14px -6px var(--brand); }
    .icon-btn--book:hover { color: #fff; }
    .burger { width: 38px; height: 38px; border-radius: 12px; gap: 4px; }
    .burger span { width: 17px; }
    .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    /* Hero slider and action strip */
    .banner-slide { min-height: 270px; }
    .banner-slide__content { padding-top: 24px; padding-bottom: 76px; }
    .banner-slide h2 { font-size: 1.35rem; margin-bottom: .3em; }
    .banner-slide p { font-size: .84rem; margin-bottom: 1em; max-width: 30ch; }
    .banner-slider__dots { bottom: 62px; }
    .action-strip { margin-top: -44px; }
    .action-strip__item { padding: 12px 4px; font-size: .68rem; gap: 4px; }
    .action-strip__item i { font-size: 1.15rem; }

    /* Sections and cards */
    .section { padding: 38px 0; }
    .section-heading { margin-bottom: 22px; }
    .section-title-row { margin-bottom: 18px; }
    .section-title-row p { font-size: .82rem; }
    .section-title-row .link-arrow { font-size: .8rem; }
    .eyebrow { font-size: .68rem; }
    .card__body, .card-image__body { padding: 24px 14px 16px; }
    .card__body { padding: 14px; }
    .card-image__body p, .card__body p { font-size: .8rem; }
    .card-image__icon { width: 40px; height: 40px; font-size: 1rem; bottom: -18px; }
    .card-doctor__body { padding: 14px; }
    .card-doctor__meta { font-size: .76rem; }
    .card-package { padding: 18px; }
    .card-package__price strong { font-size: 1.6rem; }
    .card-feedback { padding: 18px; }
    .card-feedback blockquote { font-size: .9rem; }
    .stat strong { font-size: 1.7rem; }
    .stat span { font-size: .78rem; }
    .stats-band { padding: 30px 0; }
    .founder__quote { font-size: 1.15rem; }
    .founder__text p { font-size: .9rem; }

    /* Inner pages */
    .page-header { padding: 28px 0 26px; }
    .page-header h1 { font-size: 1.45rem; }
    .page-header p { font-size: .84rem; }
    .breadcrumbs ol { font-size: .74rem; padding: 5px 14px; }
    .block-title { font-size: 1.15rem; margin: 30px 0 16px; }
    .widget { padding: 18px; }
    .price strong { font-size: 2.1rem; }
    .form-card { padding: 20px 16px; border-radius: 16px; }
    .form__title { font-size: 1.3rem; }
    .field label, .field .label { font-size: .8rem; }
    .field input, .field select, .field textarea { font-size: 16px; padding: 10px 12px; }
    .accordion__item summary { padding: 14px 16px; font-size: .9rem; }
    .pagination__item { min-width: 36px; height: 36px; font-size: .84rem; }

    /* Footer */
    .cta-band { padding: 30px 0; }
    .cta-band h2 { font-size: 1.2rem; }
    .cta-band p { font-size: .85rem; }
    .site-footer { padding-top: 38px; font-size: .86rem; }
    .site-footer__grid { gap: 26px; }

    /* Listing grids become swipe rows with arrows */
    .grid--swipe { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; padding: 4px 2px 10px; }
    .grid--swipe::-webkit-scrollbar { display: none; }
    .grid--swipe > * { flex: 0 0 78%; scroll-snap-align: start; min-width: 0; }
    .grid--swipe > .card-image, .grid--swipe > a, .grid--swipe > article { height: auto; }
    .swipe__btn { display: grid; place-items: center; position: absolute; top: 38%; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #fff; color: var(--brand-dark); box-shadow: 0 4px 14px rgba(17, 48, 58, .25); cursor: pointer; font-size: .8rem; }
    .swipe__btn--prev { left: -6px; }
    .swipe__btn--next { right: -6px; }
    .swipe__btn[disabled] { opacity: 0; pointer-events: none; }
    .swipe__count { display: block; text-align: center; font-size: .72rem; color: var(--muted); margin-top: 2px; }
}

.mobile-bar .mobile-bar__book, .mobile-bar .mobile-bar__book i, .mobile-bar .mobile-bar__book span { color: #fff; }
@media (max-width: 639px) {
    .founder__photo { max-width: 250px; }
    .founder { gap: 28px; }
}

@media (max-width: 639px) {
    .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 20px; padding-bottom: 4px; }
    .filters::-webkit-scrollbar { display: none; }
    .filter { padding: 6px 14px; font-size: .76rem; white-space: nowrap; flex-shrink: 0; }
    .search-bar { padding: 10px; gap: 8px; }
    .search-bar input, .search-bar select { padding: 9px 12px; font-size: 16px; }
}

/* Home carousels (specialities, doctors): show arrows on phones and tablets too */
@media (max-width: 1099px) {
    .carousel__btn { display: grid; place-items: center; width: 34px; height: 34px; font-size: .8rem; top: 36%; border: 0; box-shadow: 0 4px 14px rgba(17, 48, 58, .25); }
    .carousel__btn--prev { left: -4px; }
    .carousel__btn--next { right: -4px; }
}
@media (max-width: 639px) {
    .carousel__item { flex-basis: 78%; }
}

@media (max-width: 639px) {
    .banner-slide .btn, .banner-slide .btn--lg { padding: .45rem .95rem; font-size: .76rem; border-radius: 7px; gap: .4rem; }
    .banner-slide .btn i { font-size: .7rem; }
    .banner-slide h2 { font-size: 1.2rem; }
    .banner-slide p { font-size: .78rem; margin-bottom: .8em; }
}

/* Mobile header v2: menu left, logo centred, call and book on the right, quick-link chips underneath */
.header-chips { display: none; }

@media (max-width: 639px) {
    .site-header__inner { display: flex; align-items: center; gap: 10px; min-height: 58px; }
    .site-header__actions { display: contents; }
    .burger { order: 0; }
    .brand { order: 1; flex: 1; justify-content: center; min-width: 0; }
    .brand__logo { height: calc(var(--logo-h, 48px) * .66); max-width: 100%; }
    .icon-btn--call { order: 2; }
    .icon-btn--book { order: 3; }
    .site-header__actions .hide-lg, .site-header__actions .hide-sm { display: none !important; }

    .header-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px 10px; border-top: 1px solid var(--line); background: #fff; scrollbar-width: none; }
    .header-chips::-webkit-scrollbar { display: none; }
    .header-chips a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .74rem; font-weight: 600; white-space: nowrap; }
    .header-chips a i { font-size: .7rem; color: var(--brand); }
    .header-chips a:active { background: var(--brand); color: #fff; }
    .header-chips a:active i { color: #fff; }
    .site-header.is-scrolled .header-chips { display: none; }
}
@media (max-width: 639px) { .is-home .header-chips { display: none; } }

/* Mobile top strip: Emergency on the left, top-menu links on the right */
@media (max-width: 639px) {
    .topbar__inner { justify-content: space-between; gap: 10px; padding: 0 14px; min-height: 34px; }
    .topbar__meta { flex-wrap: nowrap; }
    .topbar__meta li:first-child { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: .72rem; }
    .topbar__meta li:first-child a { color: #fff; }
    .topbar__links { display: flex !important; flex-wrap: nowrap; gap: 0; align-items: center; }
    .topbar__links li { white-space: nowrap; font-size: .7rem; }
    .topbar__links li + li { margin-left: 10px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .3); }
    .topbar__links .topbar__social { display: none; }
}

/* Phones: pairs of buttons sit side by side instead of stacking */
@media (max-width: 639px) {
    .cta-band__actions { display: flex; flex-wrap: nowrap; gap: 8px; width: 100%; }
    .cta-band__actions .btn { flex: 1 1 0; min-width: 0; padding: .55rem .5rem; font-size: .76rem; white-space: normal; text-align: center; line-height: 1.2; }
    .footer-buttons { grid-template-columns: 1fr 1fr; gap: 8px; }
    .footer-buttons .btn { padding: .55rem .5rem; font-size: .76rem; white-space: normal; text-align: center; line-height: 1.2; }
    .widget--cta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
    .widget--cta h3, .widget--cta p { flex: 0 0 100%; }
    .widget--cta .btn { flex: 1 1 0; min-width: 0; padding: .55rem .5rem; font-size: .76rem; white-space: normal; text-align: center; line-height: 1.2; width: auto; }
    .hero__actions { flex-wrap: nowrap; gap: 8px; }
    .hero__actions .btn { flex: 1 1 0; min-width: 0; padding: .55rem .5rem; font-size: .76rem; white-space: normal; text-align: center; }
    .nav__cta-mobile { grid-template-columns: 1fr 1fr; }
    .nav__cta-mobile .btn { padding: .55rem .4rem; font-size: .75rem; white-space: normal; text-align: center; line-height: 1.2; }
    .nav__cta-mobile .nav__emergency { grid-column: 1 / -1; }
}

/* Phones: smaller card photos so a card and the hint of the next one fit the screen */
@media (max-width: 639px) {
    .card-image__media, .card__media { aspect-ratio: 16 / 10; }
    .card__media--wide { aspect-ratio: 16 / 9; }
    .card-doctor__photo { aspect-ratio: 4 / 3; }
    .card-doctor__initials { font-size: 2.4rem; }
    .card-package__media { aspect-ratio: 16 / 9; }
    .card-image__body { padding: 22px 12px 12px; }
    .card-image__body h3 { font-size: .92rem; }
    .card-image__body p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 4px; }
    .card__body { padding: 11px 12px 13px; }
    .card__body h3 { font-size: .92rem; }
    .card__body p:not(.card__meta) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .card-doctor__body { padding: 11px 11px 13px; }
    .card-doctor__body h3 { font-size: .95rem; }
    .card-doctor__spec { font-size: .8rem; }
    .card-doctor__meta { margin: 4px 0 10px; }
    .card-package__body h3 { font-size: .92rem; }
    .card-feedback { padding: 16px; gap: 10px; }
    .card-feedback blockquote { font-size: .84rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
    .video-card__body { display: none; }
    .video-card { border-radius: 14px; }
    .gallery-strip { gap: 8px; }
    .gallery-strip__item { aspect-ratio: 4 / 3; border-radius: 10px; }
    .carousel__btn, .swipe__btn { width: 30px; height: 30px; font-size: .7rem; }
}

/* Phones: slimmer top area on inner pages */
@media (max-width: 639px) {
    .page-header { padding: 20px 0 18px; }
    .page-header--image { min-height: 120px; }
    .page-header h1 { font-size: 1.3rem; margin-bottom: .2em; }
    .page-header p { display: none; }
    .breadcrumbs ol { margin-top: 6px; }
    .header-chips { padding: 6px 14px 8px; }
    .header-chips a { padding: 5px 11px; font-size: .7rem; }
    .section:first-of-type { padding-top: 26px; }
    .search-bar { margin-bottom: 20px; }
    .search-bar .btn { padding: .5rem; }
    .search-bar input, .search-bar select { padding: 8px 11px; }
    .form-card, .widget, .doctor-profile { border-radius: 14px; }
    .cover { max-height: 220px; margin-bottom: 18px; border-radius: 12px; }
    .block-title { margin: 26px 0 14px; }
    .prose { font-size: .92rem; }
    .layout { gap: 26px; }
}
