* {
  font-family: 'Poppins', sans-serif !important;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: white;
  color: #2d3748;
}

a { text-decoration: none; }

/* ── INLINE SVG ICONS ── */
.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  flex-shrink: 0;
  display: inline-block;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 1.5rem;
}


/* ── HEADER ── */
header {
  background: white;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1.5px solid #e5e7eb;
  box-shadow: 0 2px 12px rgba(30, 64, 175, 0.07);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
}

.flex {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e40af;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.title-row {
  text-align: center;
}

.title-row--1 {
  letter-spacing: 0.22em;  /* widen "Rapti Dental" via letter-spacing */
  padding-left: 0.22em;    /* counter trailing letter-spacing for centering */
}

.title-row--2 {
  letter-spacing: 0.05em;  /* "Care Pvt. Ltd." is naturally wider */
  padding-left: 0.05em;
}

nav {
  display: flex;
  gap: 0.1rem;
}

nav a.nav-link {
  position: relative;
  padding: 0.45rem 0.9rem;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.2s;
  border-radius: 0.4rem;
}

nav a.nav-link:hover {
  color: #1e40af;
}

nav a.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0.9rem;
  height: 2px;
  width: 0;
  background: #1e40af;
  border-radius: 2px;
}

nav a.nav-link.active {
  color: #1e40af;
}

nav a.nav-link.active::after {
  animation: underline-ltr 0.35s ease forwards;
}

@keyframes underline-ltr {
  from { width: 0; }
  to   { width: calc(100% - 1.8rem); }
}


/* ── HERO ── */
section.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  padding: 5rem 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  text-align: center;
  padding-right: 3rem; /* nudges visual center slightly left */
}

.hero-text {
  text-align: center;
}

.hero-logo-box {
  background: white;
  border-radius: 1.25rem;
  padding: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}

.hero-logo-box img {
  height: 110px;
  width: auto;
  display: block;
}

.hero-text h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #facc15;
  margin-bottom: 0.85rem;
  line-height: 1.2;
}

.hero-text p {
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  opacity: 0.9;
}

.hero-btn {
  background: white;
  color: #1e40af;
  padding: 0.75rem 2.25rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 1rem;
  display: inline-block;
  transition: background 0.25s, color 0.25s, transform 0.2s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.hero-btn:hover {
  background: #facc15;
  color: #1a202c;
  transform: scale(1.04);
}


/* ── SECTION TITLES ── */
.sec-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 2rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.sec-title .icon {
  width: 1.5rem;
  height: 1.5rem;
  color: #2563eb;
}

.contact-title {
  color: white !important;
}

.contact-title .icon {
  color: #facc15 !important;
}


/* ── SERVICES CAROUSEL ── */
section.services {
  padding: 4rem 0 3rem;
  background: #f8faff;
  overflow: hidden;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.5rem 0 1.75rem;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card {
  background: white;
  border-radius: 1.1rem;
  padding: 2rem 1.75rem;
  width: 256px;
  flex-shrink: 0;
  box-shadow: 0 2px 14px rgba(30, 64, 175, 0.08);
  border: 1px solid #e5e7eb;
  text-align: center;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, background-color 0.25s, border-color 0.25s;
}

.service-card:hover {
  transform: translateY(-5px);
  background: #1e40af;
  border-color: #1e40af;
  box-shadow: 0 12px 32px rgba(30, 64, 175, 0.35);
}

.svc-icon {
  font-size: 2rem;
  margin-bottom: 0.85rem;
  color: #1e40af;
  transition: color 0.25s;
}

.service-card:hover .svc-icon {
  color: #facc15;
}

.service-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 0.5rem;
  transition: color 0.25s;
}

.service-card p {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.55;
  transition: color 0.25s;
}

.service-card:hover h4 { color: white; }
.service-card:hover p  { color: rgba(255,255,255,0.85); }


/* ── TEAM ── */
section.team {
  padding: 4rem 0;
  background: white;
  text-align: center;
}

.team-grid {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.team-card {
  background: #f8faff;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  padding: 2rem 1.75rem;
  width: 255px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.12);
}

.doctor-avatar {
  width: 76px;
  height: 76px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.doctor-photo {
  width: 76px;
  height: 76px;
  border-radius: 9999px;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  border: 3px solid #1e40af;
}

.team-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 0.3rem;
}

.doctor-role {
  font-size: 0.72rem;
  font-weight: 700;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.doctor-desc {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.5;
}


/* ── CONTACT / BOOKING ── */
section.contact {
  padding: 4rem 0;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.booking-layout {
  display: flex;
  gap: 1.75rem;
  align-items: stretch;
}

/* LEFT — details on top, map below */
.contact-info-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.contact-details {
  background: rgba(15, 23, 60, 0.92);
  padding: 1.75rem;
  color: white;
}

.contact-details p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.contact-details p:last-of-type {
  margin-bottom: 0;
}

.contact-details a {
  color: white;
  text-decoration: underline;
}

.contact-details > p > .icon {
  width: 1.05rem;
  height: 1.05rem;
  color: #facc15;
  flex-shrink: 0;
}

.social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  justify-content: center;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: transform 0.2s, filter 0.2s;
  flex-shrink: 0;
}

.social-btn:hover {
  transform: translateY(-3px) scale(1.1);
  filter: brightness(1.15);
}

.social-btn--fb    { background: #1877F2; }
.social-btn--wa    { background: #25D366; }
.social-btn--email { background: #EA4335; }

.map-wrap {
  flex: 1;
  min-height: 200px;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* RIGHT — form */
.booking-form {
  flex: 1.15;
  background: white;
  border-radius: 1rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.form-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-row {
  display: flex;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group--full {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group--full textarea {
  flex: 1;
  resize: none;
}

.form-group label,
.form-group--full label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.form-group label .icon,
.form-group--full label .icon {
  color: #2563eb;
  width: 0.85rem;
  height: 0.85rem;
}

.form-group input,
.form-group select,
.form-group--full textarea {
  border: 1.5px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  color: #1f2937;
  outline: none;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group--full textarea:focus {
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.submit-btn {
  width: 100%;
  background: #25D366;
  color: white;
  border: none;
  padding: 0.8rem 1rem;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.25s, transform 0.15s;
  margin-top: auto;
}

.submit-btn:hover {
  background: #128C7E;
  transform: translateY(-1px);
}

.form-note {
  font-size: 0.73rem;
  color: #9ca3af;
  text-align: center;
  margin-top: 0.6rem;
}


/* ── FOOTER ── */
footer {
  background: #0f172a;
  padding: 1.25rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  color: white;
  font-size: 0.83rem;
  font-weight: 400;
}

.footer-credit {
  color: white;
  font-weight: 400;
  transition: color 0.2s;
}

.footer-credit:hover {
  color: #facc15;
}

.credit-mobile { display: none; }

.back-to-top {
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.back-to-top svg {
  transition: transform 0.2s;
}

.back-to-top:hover {
  color: #facc15;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
}


/* ── SERVICE SELECT FLASH ── */
@keyframes flash-select {
  0%   { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,0.35); background: #eff6ff; }
  50%  { border-color: #facc15; box-shadow: 0 0 0 5px rgba(250,204,21,0.4);  background: #fefce8; }
  100% { border-color: #2563eb; box-shadow: 0 0 0 4px rgba(37,99,235,0.35); background: #eff6ff; }
}

.service-flash {
  animation: flash-select 0.5s ease 3;
}


/* ── RESPONSIVE ── */

/* Tablet / smaller laptop */
@media (max-width: 900px) {
  .flex { gap: 0.7rem; }
  .title { font-size: 0.9rem; }
  .title-row { width: 7rem; }
  nav a.nav-link { padding: 0.4rem 0.65rem; font-size: 0.85rem; }
  .hero-inner { padding-right: 0; gap: 1.5rem; }
  .hero-logo-box img { height: 95px; }
  .hero-text h2 { font-size: 2rem; }
}

/* Tablet portrait */
@media (max-width: 768px) {
  .hero-inner { flex-direction: column; gap: 1.75rem; }
  .hero-text h2 { font-size: 1.8rem; }
  .hero-logo-box { padding: 1rem; }
  .hero-logo-box img { height: 100px; }
  .booking-layout { flex-direction: column; }
  .form-row { flex-direction: column; }
  .team-grid { flex-direction: column; align-items: center; }
  .contact-info-panel { min-height: 340px; }
  .sec-title { font-size: 1.45rem; }
  .carousel-viewport { max-width: 540px; }
}

/* Stacked header — small phones */
@media (max-width: 560px) {
  .nav-container {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.65rem 0;
    align-items: center;
  }
  /* Dissolve .flex so logo and title sit as independent rows */
  .flex { display: contents; }

  header img[alt="Logo"] {
    height: 50px !important;
    width: auto;
  }

  .title {
    width: 100%;
    max-width: 280px;
    font-size: 0.85rem;
    line-height: 1.3;
    text-align: justify;
    text-align-last: justify;
  }
  .title-row,
  .title-row--1,
  .title-row--2 {
    display: inline;
    letter-spacing: 0.01em;
    padding: 0;
  }
  .title-row--1::after { content: " "; }
  nav {
    width: 100%;
    max-width: 280px;
    justify-content: space-between;
    gap: 0;
    flex-wrap: nowrap;
  }
  nav a.nav-link { padding: 0.3rem 0; font-size: 0.82rem; }

  .hero-text h2 { font-size: 1.55rem; }
  .hero-logo-box img { height: 85px; }
  section.hero { padding: 3.5rem 0; }
  section.services, section.team, section.contact { padding: 3rem 0; }

  /* Carousel: 1 card centered */
  .carousel-viewport { max-width: 256px; }
  .booking-form, .contact-details { padding: 1.25rem; }

  /* Footer: back-to-top on top of copyright */
  .footer-inner { flex-direction: column-reverse; gap: 0.6rem; text-align: center; }
  .credit-desktop { display: none; }
  .credit-mobile { display: inline; }
}

/* Very small phones */
@media (max-width: 400px) {
  .title { font-size: 0.78rem; max-width: 260px; }
  nav { max-width: 260px; }
  nav a.nav-link { padding: 0.3rem 0; font-size: 0.78rem; }
  .hero-text h2 { font-size: 1.4rem; }
  .hero-text p { font-size: 0.92rem; }
  .sec-title { font-size: 1.25rem; }
  .sec-title .icon { width: 1.2rem; height: 1.2rem; }
  .carousel-viewport { max-width: 240px; }
  .service-card { width: 240px; padding: 1.5rem 1.25rem; }
  .footer-copy { font-size: 0.75rem; }
}
