/* ==========================================================================
   Smile Care Dental Hospital - main stylesheet
   Public site + patient / doctor / admin portals
   Fonts: Poppins (headings), Nunito Sans (body), Noto Sans Telugu (Telugu text)
   ========================================================================== */

:root {
  --brand: #0a8f9c;
  --brand-dark: #066a75;
  --brand-soft: #e6f6f7;
  --accent: #ff7a59;
  --ink: #16323a;
  --muted: #5c747b;
  --line: #dbe8ea;
  --bg: #f6fafb;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(6, 106, 117, .10);
  --shadow-lg: 0 20px 50px rgba(6, 106, 117, .18);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito Sans', 'Noto Sans Telugu', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .font-head {
  font-family: 'Poppins', 'Noto Sans Telugu', system-ui, sans-serif;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}
html[lang="te"] body { line-height: 1.85; }
html[lang="te"] h1, html[lang="te"] h2, html[lang="te"] h3, html[lang="te"] h4, html[lang="te"] h5 { line-height: 1.5; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }
img { max-width: 100%; }

/* Full-width wrapper (replaces the fixed-width Bootstrap container) */
.wrap {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 72px);
  padding-right: clamp(16px, 4vw, 72px);
}
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section-alt { background: var(--bg); }
.section-brand { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; }
.section-brand h1, .section-brand h2, .section-brand h3 { color: #fff; }

/* Buttons */
.btn { border-radius: 50rem; font-weight: 600; padding: .6rem 1.4rem; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline-brand { border: 2px solid var(--brand); color: var(--brand-dark); background: transparent; }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: #ee633f; border-color: #ee633f; color: #fff; }
.btn-light-outline { border: 2px solid rgba(255, 255, 255, .8); color: #fff; }
.btn-light-outline:hover { background: #fff; color: var(--brand-dark); }
.text-brand { color: var(--brand) !important; }
.bg-brand-soft { background: var(--brand-soft); }

/* Top bar + navigation */
.topbar { background: var(--brand-dark); color: #d9f2f4; font-size: .875rem; }
.topbar a { color: #fff; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; justify-content: space-between; align-items: center; padding-top: .45rem; padding-bottom: .45rem; }
.topbar i { color: #7fe0e8; margin-right: .35rem; }
.lang-switch a { padding: .1rem .55rem; border-radius: 50rem; color: #d9f2f4; font-weight: 600; }
.lang-switch a.active { background: #fff; color: var(--brand-dark); }

.navbar-main { background: #fff; transition: box-shadow .25s; z-index: 1030; }
.navbar-main.scrolled { box-shadow: 0 6px 24px rgba(6, 106, 117, .12); }
.navbar-main .navbar-brand { display: flex; align-items: center; gap: .6rem; font-family: 'Poppins', 'Noto Sans Telugu', sans-serif; font-weight: 700; color: var(--brand-dark); font-size: 1.15rem; line-height: 1.15; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.navbar-main .nav-link { color: var(--ink); font-weight: 600; padding: .6rem .85rem !important; border-radius: 10px; }
.navbar-main .nav-link:hover, .navbar-main .nav-link.active { color: var(--brand); background: var(--brand-soft); }
.dropdown-menu { border: 0; box-shadow: var(--shadow-lg); border-radius: 14px; padding: .5rem; }
.dropdown-item { border-radius: 8px; font-weight: 600; }
.dropdown-item:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* Hero */
.hero {
  position: relative; color: #fff; min-height: min(86vh, 760px); display: flex; align-items: center;
  background-color: var(--brand-dark); background-size: cover; background-position: center;
}
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(4, 52, 60, .93) 0%, rgba(6, 106, 117, .78) 48%, rgba(6, 106, 117, .25) 100%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 3rem; padding-bottom: 3rem; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 700; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: #e2f6f8; max-width: 40rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.6rem; color: #d3f1f4; font-weight: 600; }
.hero-badges i { color: #7fe0e8; margin-right: .35rem; }
.eyebrow { display: inline-block; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; color: var(--brand); background: var(--brand-soft); padding: .3rem .85rem; border-radius: 50rem; margin-bottom: .8rem; }
.hero .eyebrow { background: rgba(255, 255, 255, .16); color: #fff; }
html[lang="te"] .eyebrow { letter-spacing: 0; text-transform: none; }

.quick-card { background: #fff; color: var(--ink); border-radius: 22px; padding: 1.6rem; box-shadow: var(--shadow-lg); }
.quick-card h3 { font-size: 1.25rem; }

/* Page banner for inner pages */
.page-hero { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; padding: clamp(36px, 5vw, 64px) 0; position: relative; overflow: hidden; }
.page-hero::after { content: ''; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.page-hero h1 { color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-bottom: .4rem; }
.page-hero .breadcrumb { margin: 0; }
.page-hero .breadcrumb a, .page-hero .breadcrumb-item.active, .page-hero .breadcrumb-item + .breadcrumb-item::before { color: #d3f1f4; }

/* Section headings */
.section-head { max-width: 46rem; margin: 0 auto clamp(28px, 4vw, 52px); text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: .6rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* Cards */
.card-soft { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); height: 100%; }
.feature { text-align: center; padding: 1.8rem 1.2rem; }
.feature .ico, .service-card .ico { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; font-size: 1.7rem; background: var(--brand-soft); color: var(--brand); margin: 0 auto 1rem; transition: .25s; }
.service-card { padding: 1.6rem; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.service-card .ico { margin: 0 0 1rem; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-card:hover .ico { background: var(--brand); color: #fff; }
.service-card h3 { font-size: 1.15rem; }
.service-card p { color: var(--muted); flex: 1; }
.more-link { font-weight: 700; color: var(--brand); }
.more-link i { transition: transform .2s; }
.more-link:hover i { transform: translateX(4px); }

.stats { margin-top: -56px; position: relative; z-index: 2; }
.stat { text-align: center; padding: 1.4rem .5rem; }
.stat .num { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--brand); }
.stat .lbl { color: var(--muted); font-weight: 600; }

/* Doctors */
.doctor-card { overflow: hidden; transition: transform .25s, box-shadow .25s; }
.doctor-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.doctor-card .photo { aspect-ratio: 4 / 4.4; background: var(--brand-soft); overflow: hidden; }
.doctor-card .photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .5s; }
.doctor-card:hover .photo img { transform: scale(1.05); }
.doctor-card .body { padding: 1.2rem 1.3rem 1.4rem; }
.doctor-card h3 { font-size: 1.1rem; margin-bottom: .15rem; }
.doctor-card .spec { color: var(--brand); font-weight: 700; font-size: .92rem; }
.chip { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); font-size: .8rem; font-weight: 700; padding: .2rem .7rem; border-radius: 50rem; margin: 0 .3rem .3rem 0; }

/* Steps */
.step { text-align: center; padding: 1rem; position: relative; }
.step .n { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: #fff; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.3rem; display: grid; place-items: center; margin: 0 auto 1rem; box-shadow: 0 0 0 8px var(--brand-soft); }

/* Testimonials */
.testimonial { padding: 1.8rem; }
.testimonial .stars { color: #f5a623; letter-spacing: 2px; }
.testimonial blockquote { margin: .6rem 0 1rem; font-size: 1.05rem; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }

/* Gallery */
.gallery-item { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--brand-soft); cursor: zoom-in; border: 0; padding: 0; width: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .cap { position: absolute; inset: auto 0 0 0; padding: 1.6rem 1rem .8rem; color: #fff; font-weight: 700; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.filter-btn { border: 2px solid var(--line); background: #fff; border-radius: 50rem; padding: .35rem 1.1rem; font-weight: 700; color: var(--muted); }
.filter-btn.active, .filter-btn:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Blog */
.blog-card { overflow: hidden; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.blog-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.blog-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--brand-soft); }
.blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card .body { padding: 1.3rem; flex: 1; display: flex; flex-direction: column; }
.blog-card .meta { color: var(--muted); font-size: .85rem; }
.prose { font-size: 1.08rem; }
.prose h2, .prose h3 { margin: 1.6rem 0 .7rem; }
.prose img { border-radius: 12px; height: auto; }
.prose ul, .prose ol { padding-left: 1.3rem; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--brand-dark), var(--brand)); color: #fff; border-radius: 26px; padding: clamp(28px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; }
.cta-band h2 { color: #fff; margin: 0 0 .3rem; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.cta-band p { margin: 0; color: #d7f3f5; }

/* Forms */
.form-control, .form-select { border-radius: 12px; border: 1.5px solid var(--line); padding: .65rem .9rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .22rem rgba(10, 143, 156, .15); }
.form-label { font-weight: 700; font-size: .92rem; }
.req::after { content: ' *'; color: #d93a3a; }
.slot-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.slot { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: .4rem .85rem; font-weight: 700; color: var(--ink); min-width: 92px; }
.slot:hover { border-color: var(--brand); color: var(--brand-dark); }
.slot.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.slot-msg { color: var(--muted); font-size: .92rem; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Contact */
.contact-item { display: flex; gap: .9rem; margin-bottom: 1.2rem; }
.contact-item .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.map-frame { border: 0; width: 100%; height: 100%; min-height: 340px; border-radius: var(--radius); }

/* Accordion (FAQ) */
.accordion-item { border: 1px solid var(--line); border-radius: 14px !important; margin-bottom: .8rem; overflow: hidden; }
.accordion-button { font-weight: 700; font-family: 'Poppins', 'Noto Sans Telugu', sans-serif; font-size: 1rem; }
.accordion-button:not(.collapsed) { background: var(--brand-soft); color: var(--brand-dark); box-shadow: none; }

/* Footer */
.footer { background: #0b2b31; color: #a9c3c8; padding-top: clamp(40px, 6vw, 72px); }
.footer h5 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.footer a { color: #a9c3c8; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .45rem; }
.footer .social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: inline-grid; place-items: center; margin-right: .4rem; color: #fff; }
.footer .social a:hover { background: var(--brand); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 2.4rem; padding: 1.1rem 0; font-size: .9rem; }

/* Floating buttons */
.float-wa, .to-top { position: fixed; right: 18px; z-index: 1040; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.6rem; box-shadow: 0 8px 22px rgba(0, 0, 0, .25); border: 0; }
.float-wa { bottom: 18px; background: #25d366; }
.float-wa:hover { color: #fff; transform: scale(1.07); }
.to-top { bottom: 84px; background: var(--brand-dark); font-size: 1.2rem; opacity: 0; pointer-events: none; transition: .25s; }
.to-top.show { opacity: 1; pointer-events: auto; }
.emergency-strip { background: #fff3ef; border-bottom: 1px solid #ffd9cf; color: #a63a1d; font-weight: 700; font-size: .92rem; text-align: center; padding: .4rem 1rem; }
.emergency-strip a { color: #a63a1d; text-decoration: underline; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Tracking / success */
.ref-box { background: var(--brand-soft); border: 2px dashed var(--brand); border-radius: 16px; padding: 1.2rem; text-align: center; }
.ref-box .code { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.8rem; letter-spacing: .08em; color: var(--brand-dark); }

/* ==========================================================================
   Portals (patient, doctor, admin)
   ========================================================================== */
body.portal { background: #f2f7f8; }
.portal-shell { display: flex; min-height: 100vh; }
.portal-side { width: 260px; flex: none; background: #0b2b31; color: #b9d0d4; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.portal-side .brand { padding: 1.2rem 1.2rem 1rem; color: #fff; font-family: 'Poppins', sans-serif; font-weight: 700; display: flex; gap: .6rem; align-items: center; }
.portal-side .role-tag { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #7fe0e8; padding: 0 1.2rem .8rem; font-weight: 700; }
.portal-side nav a { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.2rem; color: #b9d0d4; font-weight: 600; border-left: 3px solid transparent; }
.portal-side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.portal-side nav a.active { background: rgba(10, 143, 156, .25); color: #fff; border-left-color: #2fd1de; }
.portal-side .side-foot { margin-top: auto; padding: 1rem 1.2rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .9rem; }
.portal-main { flex: 1; min-width: 0; }
.portal-top { background: #fff; border-bottom: 1px solid var(--line); padding: .8rem clamp(14px, 3vw, 32px); display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: sticky; top: 0; z-index: 20; }
.portal-top h1 { font-size: 1.25rem; margin: 0; }
.portal-body { padding: clamp(14px, 3vw, 32px); }
.stat-card { background: #fff; border-radius: 16px; padding: 1.2rem 1.3rem; box-shadow: 0 4px 16px rgba(6, 106, 117, .07); display: flex; align-items: center; gap: 1rem; height: 100%; border: 1px solid #e6eff1; }
.stat-card .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; flex: none; }
.stat-card .v { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.6rem; line-height: 1.1; }
.stat-card .l { color: var(--muted); font-size: .88rem; font-weight: 600; }
.panel { background: #fff; border-radius: 16px; border: 1px solid #e6eff1; box-shadow: 0 4px 16px rgba(6, 106, 117, .06); }
.panel-head { padding: 1rem 1.3rem; border-bottom: 1px solid #edf3f4; display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.panel-head h2 { font-size: 1.05rem; margin: 0; }
.panel-body { padding: 1.3rem; }
.table > :not(caption) > * > * { padding: .7rem .9rem; vertical-align: middle; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f7fafb; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 2.4rem 1rem; }
.empty i { font-size: 2.4rem; color: #b4cfd3; display: block; margin-bottom: .4rem; }
.thumb-sm { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; background: var(--brand-soft); }
.photo-preview { width: 120px; height: 120px; object-fit: cover; border-radius: 14px; background: var(--brand-soft); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(135deg, var(--brand-soft), #fff 60%); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); padding: clamp(24px, 4vw, 38px); }
.auth-card.wide { max-width: 640px; }

@media (max-width: 991.98px) {
  .portal-side { position: fixed; z-index: 1050; left: -270px; transition: left .25s; }
  .portal-side.open { left: 0; }
  .portal-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 1045; display: none; }
  .portal-backdrop.show { display: block; }
  .stats { margin-top: 0; padding-top: 2rem; }
}
@media (max-width: 575.98px) {
  .slot { min-width: 80px; padding: .4rem .6rem; }
  .hero { min-height: auto; }
}

/* Print: prescription / visit summary */
.print-only { display: none; }
@media print {
  .no-print, .topbar, .navbar-main, .footer, .float-wa, .to-top, .portal-side, .portal-top, .emergency-strip { display: none !important; }
  .print-only { display: block; }
  body, body.portal { background: #fff !important; }
  .portal-shell { display: block; }
  .portal-body { padding: 0; }
  .panel { box-shadow: none; border: 1px solid #999; }
}
