/*
 *  All In One Doctor  —  allinonedoctor.com
 *  Author: MD OMAR FARUK | www.faruk.bd | info@faruk.bd | farukmr@gmail.com | (c) 2026
 *
 *  Site-wide styles that are not Tailwind utilities. Loaded on every page right
 *  after tailwind.min.css, before anything is drawn.
 */

/* ── No sideways scrolling on a phone, whatever a page puts in it ── */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video, iframe, table { max-width: 100%; }
iframe { border: 0; }

/* ── Bangla reads better a little taller, in a Bangla face ── */
html[data-lang="bn"] body,
html[data-lang="bn"] input, html[data-lang="bn"] select, html[data-lang="bn"] textarea, html[data-lang="bn"] button {
    font-family: 'Hind Siliguri', 'Noto Sans Bengali', 'Poppins', system-ui, sans-serif;
}
html[data-lang="bn"] body { line-height: 1.65; }
html[data-lang="bn"] .uppercase { letter-spacing: 0; }

/* ── Sliders before Swiper has started: the same widths it will give them,
      so the home page does not open as one giant card and then jump ── */
.swiper:not(.swiper-initialized) { overflow: hidden; }
.swiper:not(.swiper-initialized) .swiper-wrapper { display: flex; gap: 20px; }
.swiper:not(.swiper-initialized) .swiper-slide { flex: 0 0 100%; width: 100%; }
.swiper:not(.swiper-initialized) .swiper-button-next,
.swiper:not(.swiper-initialized) .swiper-button-prev { visibility: hidden; }
@media (min-width: 640px) {
    .swiper:not(.swiper-initialized):not(.testimonialSwiper) .swiper-slide { flex-basis: calc((100% - 20px) / 2); width: calc((100% - 20px) / 2); }
}
@media (min-width: 1024px) {
    .swiper:not(.swiper-initialized):not(.testimonialSwiper) .swiper-slide { flex-basis: calc((100% - 60px) / 4); width: calc((100% - 60px) / 4); }
    .blogSwiper:not(.swiper-initialized) .swiper-slide,
    .sponsoredSwiper:not(.swiper-initialized) .swiper-slide { flex-basis: calc((100% - 40px) / 3) !important; width: calc((100% - 40px) / 3) !important; }
}

/* ── Header: mobile menu, dropdowns that also open on a tap ── */
.aio-nav-drop { position: relative; }
.aio-nav-drop > .aio-nav-menu { display: none; }
.aio-nav-drop:hover > .aio-nav-menu,
.aio-nav-drop:focus-within > .aio-nav-menu,
.aio-nav-drop.is-open > .aio-nav-menu { display: block; }
.mobile-menu { max-height: calc(100vh - 80px); max-height: calc(100dvh - 80px); overflow-y: auto; }

/* ── Language switch: a two-sided pill, the side you are on is lit ── */
.aio-lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: #eef2ff; border: 1px solid #c7d2fe; line-height: 1; white-space: nowrap; }
.aio-lang__globe { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: #4f46e5; font-size: 13px; }
.aio-lang a { display: inline-block; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #4338ca; text-decoration: none; transition: background .15s, color .15s; font-family: 'Hind Siliguri', 'Poppins', sans-serif; }
.aio-lang a:hover { background: #e0e7ff; }
.aio-lang a.is-on { background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; box-shadow: 0 1px 4px rgba(37, 99, 235, .45); }
.aio-lang--footer { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); }
.aio-lang--footer .aio-lang__globe { color: #c7d2fe; }
.aio-lang--footer a { color: #e5e7eb; }
.aio-lang--footer a:hover { background: rgba(255, 255, 255, .12); }
.aio-lang--floating { position: fixed; left: 14px; bottom: 14px; z-index: 9990; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); background: #fff; }
.aio-lang--admin { background: #f1f5f9; border-color: #e2e8f0; }

/* ── Promote: one look everywhere, so people learn to find it ── */
.aio-promote { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff !important; text-decoration: none !important; white-space: nowrap;
    background: linear-gradient(135deg, #f97316, #ea580c 55%, #dc2626); box-shadow: 0 2px 10px rgba(234, 88, 12, .45); transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden; }
.aio-promote:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(234, 88, 12, .55); }
.aio-promote::after { content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); animation: aioShine 3.2s ease-in-out infinite; }
@keyframes aioShine { 0%, 55% { left: -120%; } 100% { left: 160%; } }
.aio-promote--pill { padding: 8px 14px; font-size: 13px; }
.aio-promote--md { padding: 9px 20px; font-size: 15px; border-radius: 10px; }
.aio-promote--lg { padding: 13px 26px; font-size: 15px; border-radius: 12px; }
.aio-promote-banner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 2rem; border-radius: 16px; color: #7c2d12;
    background: linear-gradient(120deg, #fff7ed, #ffedd5 45%, #fed7aa); border: 1px solid #fdba74; box-shadow: 0 4px 18px rgba(234, 88, 12, .12); }
.aio-promote-banner__icon { flex: 0 0 auto; width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #fff; background: linear-gradient(135deg, #f97316, #dc2626); box-shadow: 0 4px 12px rgba(234, 88, 12, .4); }
.aio-promote-banner__text { flex: 1 1 260px; min-width: 0; }
.aio-promote-banner__text h3 { font-weight: 800; font-size: 1.1rem; color: #9a3412; margin: 0 0 2px; }
.aio-promote-banner__text p { font-size: .85rem; margin: 0; color: #9a3412; opacity: .9; }
@media (prefers-reduced-motion: reduce) { .aio-promote::after { animation: none; } }

/* ── Banner slots ── */
.aio-spot { max-width: 100%; overflow: hidden; }
.aio-spot img { max-width: 100%; height: auto; }

/* ── Long names and addresses wrap instead of being cut ── */
.aio-wrap { overflow-wrap: anywhere; word-break: break-word; }

/* ── Medicine text: one line break is one line break ── */
.med-text { white-space: pre-line; overflow-wrap: anywhere; }

/* ── Tables inside cards scroll inside the card on a phone ── */
.aio-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Small-phone safety net for the public pages ── */
@media (max-width: 480px) {
    .container { padding-left: .85rem; padding-right: .85rem; }
    h1 { overflow-wrap: anywhere; }
}

/* The header is tight between 1280 and 1535 px: the switch drops its globe there. */
@media (min-width: 1280px) and (max-width: 1535px) { .aio-lang--header .aio-lang__globe { display: none; } }
