/* ============================================================
   Dental Chamber PP — public site theme
   Fresh Teal & Mint identity. Signature motif: the "smile-curve".
   ============================================================ */
:root {
    --dc-primary: #0E9F8E;
    --dc-primary-dark: #0c8678;
    --dc-accent: #5AD1C4;
    --dc-dark: #0B3B36;
    --dc-bg: #F4FBF9;
    --dc-surface: #FFFFFF;
    --dc-ink: #173F3A;
    --dc-muted: #5E7B76;
    --dc-border: #DCEDE9;
    --dc-radius: 18px;
    --dc-sans: 'Inter', system-ui, "Segoe UI", Roboto, sans-serif;
    --dc-display: 'Poppins', 'Inter', system-ui, sans-serif;
    --dc-bengali: "Hind Siliguri", "Noto Sans Bengali", sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--dc-sans);
    color: var(--dc-ink);
    background: var(--dc-bg);
    margin: 0;
    /* Overflow safety net at ALL widths — use clip not hidden so position:sticky still works (#66). */
    overflow-x: clip;
}
:lang(bn), :lang(bn) body { font-family: var(--dc-bengali); }
:lang(bn) h1, :lang(bn) h2, :lang(bn) h3, :lang(bn) h4, :lang(bn) h5, :lang(bn) .display-head { font-family: var(--dc-bengali); }

h1, h2, h3, h4, h5, .display-head { font-family: var(--dc-display); color: var(--dc-dark); font-weight: 700; }
a { color: var(--dc-primary); text-decoration: none; }
a:hover { color: var(--dc-primary-dark); }
img { max-width: 100%; height: auto; }

/* ---- Bootstrap overrides ---- */
.btn-primary { background: var(--dc-primary); border-color: var(--dc-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--dc-primary-dark); border-color: var(--dc-primary-dark); }
.btn-accent { background: var(--dc-accent); border-color: var(--dc-accent); color: #06322c; font-weight: 600; }
.btn-accent:hover { filter: brightness(.96); color: #06322c; }
.btn-outline-primary { color: var(--dc-primary); border-color: var(--dc-primary); }
.btn-outline-primary:hover { background: var(--dc-primary); border-color: var(--dc-primary); color: #fff; }
.text-primary { color: var(--dc-primary) !important; }
.bg-primary { background: var(--dc-primary) !important; }
.badge.bg-soft { background: #E2F4F0; color: var(--dc-primary-dark); }

/* ---- Top bar ---- */
.topbar { background: var(--dc-dark); color: #cdeae4; font-size: .85rem; padding: .4rem 0; }
.topbar a { color: #cdeae4; }
.topbar a:hover { color: #fff; }

/* ---- Header / nav ---- */
.site-header { background: rgba(255,255,255,.96); backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 1030; box-shadow: 0 2px 14px rgba(11,59,54,.06); transition: padding .25s ease, box-shadow .25s ease; }
.site-header.scrolled { box-shadow: 0 4px 18px rgba(11,59,54,.12); }
.site-header .navbar { padding: .85rem 0; transition: padding .25s ease; }
.site-header.scrolled .navbar { padding: .5rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .5rem; font-family: var(--dc-display); font-weight: 700; color: var(--dc-dark); min-width: 0; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100vw - 150px); }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--dc-primary), var(--dc-accent)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; flex: 0 0 auto; }
.site-header .nav-link { color: var(--dc-ink); font-weight: 500; padding: .4rem .9rem; border-radius: 8px; }
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--dc-primary); }
.hotline-pill { display: inline-flex; align-items: center; gap: .4rem; background: #E2F4F0; color: var(--dc-primary-dark); font-weight: 600; padding: .35rem .8rem; border-radius: 999px; font-size: .85rem; }

/* ---- Hero ---- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--dc-dark); }
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; background-size: cover; background-position: center; }
.hero-slide.active { opacity: 1; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11,59,54,.82) 0%, rgba(11,59,54,.5) 45%, rgba(12,134,120,.25) 100%); }
.hero-inner { position: relative; z-index: 2; padding: clamp(4rem, 10vw, 8rem) 0 clamp(5rem, 11vw, 9rem); }
.hero-content { max-width: 640px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; }
.hero p.lead { color: #d9efe9; font-size: clamp(1rem, 2vw, 1.2rem); }
.hero .hotline-pill { background: rgba(255,255,255,.14); color: #fff; }
/* Smile-curve mask at the bottom of the hero */
.hero-curve { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; line-height: 0; }
.hero-curve svg { display: block; width: 100%; height: clamp(40px, 6vw, 90px); }
.hero-curve path { fill: var(--dc-bg); }

/* ---- Sections + smile motif ---- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: #ECF7F4; }
.section-head { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; }
.section-head .eyebrow { color: var(--dc-primary); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-top: .35rem; }
.section-head p { color: var(--dc-muted); }
.smile-underline { display: block; width: 84px; height: 10px; margin: .75rem auto 0; border-radius: 0 0 84px 84px; background: linear-gradient(90deg, var(--dc-primary), var(--dc-accent)); }
.section-head.text-start .smile-underline { margin-left: 0; }
.smile-divider { line-height: 0; }
.smile-divider svg { display: block; width: 100%; height: 56px; }

/* ---- Cards ---- */
.treatment-card, .dentist-card, .tip-card, .testi-card, .price-card, .feature-card, .cat-card {
    background: var(--dc-surface); border: 1px solid var(--dc-border); border-radius: var(--dc-radius);
    overflow: hidden;
}
.treatment-card { box-shadow: 0 6px 20px rgba(11,59,54,.05); }
.treatment-card .tc-media, .dentist-card .dc-media, .tip-card .tip-media { aspect-ratio: 4 / 3; overflow: hidden; background: #e9f5f2; }
.treatment-card .tc-media img, .dentist-card .dc-media img, .tip-card .tip-media img { width: 100%; height: 100%; object-fit: cover; }
.treatment-card .tc-body, .dentist-card .dc-body, .tip-card .tip-body { padding: 1.1rem 1.2rem 1.3rem; }
.treatment-card .tc-icon { width: 46px; height: 46px; border-radius: 12px; background: #E2F4F0; color: var(--dc-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.card-price { color: var(--dc-primary-dark); font-weight: 700; }
.cat-card { display: block; padding: 1.4rem 1.2rem; text-align: center; color: var(--dc-ink); }
.cat-card:hover { color: var(--dc-primary); }
.cat-card .cat-icon { font-size: 2rem; color: var(--dc-primary); }

/* feature / why-us */
.feature-card { padding: 1.5rem; text-align: center; }
.feature-card .f-icon { width: 60px; height: 60px; border-radius: 16px; background: linear-gradient(135deg, var(--dc-primary), var(--dc-accent)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: .9rem; }

/* dentist */
.dentist-card { text-align: center; }
.dentist-card .dc-media { aspect-ratio: 1 / 1; border-radius: 50%; width: 130px; height: 130px; margin: 1.4rem auto .4rem; }
.dentist-card .quals { color: var(--dc-muted); font-size: .85rem; }
.dentist-social a { color: var(--dc-muted); margin: 0 .35rem; }
.dentist-social a:hover { color: var(--dc-primary); }

/* testimonial */
.testi-card { padding: 1.6rem; }
.testi-card .stars { color: #F5B301; }
.testi-card .who { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; }
.testi-card .who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }

/* stats */
.stat-item { text-align: center; padding: 1.2rem .5rem; }
.stat-item .num { font-family: var(--dc-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; color: var(--dc-primary); line-height: 1; }
.stat-item .stat-ico { font-size: 1.6rem; color: var(--dc-accent); }
.stat-item .stat-label { color: var(--dc-muted); margin-top: .35rem; }

/* price table */
.price-card { padding: 1.4rem 1.4rem 1rem; }
.price-row { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px dashed var(--dc-border); }
.price-row:last-child { border-bottom: 0; }

/* gallery */
.gallery-item { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #e9f5f2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* page hero (interior pages) */
.page-hero { background: linear-gradient(120deg, var(--dc-dark), var(--dc-primary-dark)); color: #fff; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.page-hero h1 { color: #fff; }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: #bfe3dc; margin-bottom: 0; }
.page-hero .breadcrumb a { color: #d9efe9; }
.page-hero .breadcrumb-item.active { color: #fff; }

/* prose content */
.prose { line-height: 1.8; color: var(--dc-ink); }
.prose img { border-radius: 12px; }
.prose h2, .prose h3 { margin-top: 1.5rem; }

/* ---- Footer ---- */
.site-footer { background: var(--dc-dark); color: #b9d8d2; padding-top: 0; }
.site-footer .footer-top-accent { height: 4px; background: linear-gradient(90deg, var(--dc-primary) 0%, var(--dc-primary) 60%, var(--dc-accent) 60%, var(--dc-accent) 100%); }
.site-footer .footer-main { padding: 3rem 0 1.5rem; }
.site-footer h5 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.site-footer a { color: #b9d8d2; }
.site-footer a:hover { color: var(--dc-accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: .5rem; }
.site-footer .footer-contact li { display: flex; gap: .6rem; align-items: flex-start; min-width: 0; }
.site-footer .footer-contact li span { min-width: 0; overflow-wrap: anywhere; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1rem 0; display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; font-size: .85rem; }
.footer-bottom a { color: var(--dc-accent); }

/* ---- Floating actions + back-to-top ---- */
.float-actions { position: fixed; right: 1rem; bottom: 1rem; z-index: 1040; display: flex; flex-direction: column; gap: .6rem; }
.float-actions a { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.3rem; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.fa-whatsapp { background: #25D366; }
.fa-call { background: var(--dc-primary); }
.fa-top { position: fixed; left: 1rem; bottom: 1rem; z-index: 1040; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--dc-dark); color: #fff; display: none; align-items: center; justify-content: center; font-size: 1.1rem; box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.fa-top.show { display: flex; }

/* ---- Forms ---- */
.form-control:focus, .form-select:focus { border-color: var(--dc-accent); box-shadow: 0 0 0 .2rem rgba(90,209,196,.25); }
.card-soft { background: var(--dc-surface); border: 1px solid var(--dc-border); border-radius: var(--dc-radius); }

/* ============================================================
   §12.1 Mobile responsive safety-net (FULL block — gotcha #29)
   ============================================================ */
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
table { max-width: 100%; }
.container, .container-fluid { overflow-wrap: break-word; }
h1, h2, h3, h4, p, a, span, li { overflow-wrap: break-word; }
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }

/* Bootstrap g-5 gutter overflow guard (#66) */
@media (max-width: 1199.98px) {
    .row.g-5, .row.gx-5 { --bs-gutter-x: 1.5rem; }
}

/* Breakpoints */
@media (max-width: 991.98px) {
    .section, .page-hero { padding: clamp(2.5rem, 7vw, 3.5rem) 0; }
    .navbar-collapse { background: #fff; border-radius: 12px; padding: .75rem 1rem; margin-top: .5rem; box-shadow: 0 8px 20px rgba(11,59,54,.1); }
}
@media (max-width: 767px) {
    .section, .page-hero { padding: 40px 0; }
    .section-head { margin-bottom: 1.75rem; }
    .float-actions a { width: 46px; height: 46px; font-size: 1.2rem; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .dentist-card .dc-media { width: 110px; height: 110px; }
}

@media print {
    .topbar, .site-header, .float-actions, .fa-top, .site-footer { display: none !important; }
}
