/* =========================================
   MediCure - Frontend Stylesheet
   Medical Diagnostic Center Website
   ========================================= */

/* ---- CSS Custom Properties ---- */
:root {
  --primary: #0066cc;
  --primary-dark: #004fa3;
  --primary-light: #e8f1fc;
  --secondary: #00b4d8;
  --secondary-dark: #0096b7;
  --accent: #f72585;
  --success: #2dc653;
  --warning: #f4a261;
  --danger: #e63946;
  --light: #f8fafc;
  --dark: #1e293b;
  --gray: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 102, 204, 0.18);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s ease;
  --font-bn: 'Hind Siliguri', sans-serif;
  --font-en: 'Inter', sans-serif;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-en);
  color: var(--dark);
  background: #ffffff;
  line-height: 1.7;
  overflow-x: hidden;
}

body.lang-bn {
  font-family: var(--font-bn);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
}

/* ---- Utilities ---- */
.x-small { font-size: 0.72rem; }
.text-primary { color: var(--primary) !important; }
.bg-primary-light { background-color: var(--primary-light) !important; }
.bg-success-light { background-color: #e8faf0 !important; }
.bg-warning-light { background-color: #fff4e8 !important; }
.bg-info-light    { background-color: #e6f8fc !important; }
.rounded-xl { border-radius: var(--radius) !important; }

/* ---- Announcement Ticker ---- */
.ticker-strip {
  display: flex;
  align-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
  height: 36px;
  overflow: hidden;
  position: relative;
  z-index: 1050;
}

.ticker-label {
  flex-shrink: 0;
  background: var(--primary-dark);
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.ticker-track-wrapper {
  flex: 1;
  overflow: hidden;
  height: 100%;
  position: relative;
}

.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: ticker-scroll 28s linear infinite;
  will-change: transform;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-track span {
  padding: 0 60px 0 0;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Topbar ---- */
.topbar {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  padding: 7px 0;
}

.topbar a {
  color: rgba(255, 255, 255, 0.75);
}

.topbar a:hover {
  color: #fff;
}

.topbar .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
  transition: var(--transition);
}

.topbar .social-link:hover {
  background: var(--primary);
  color: #fff;
}

/* ---- Navbar ---- */
.site-navbar {
  background: #fff;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}

.site-navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.site-navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--primary);
}

.site-navbar .navbar-brand span {
  color: var(--secondary);
}

.site-navbar .nav-link {
  font-weight: 500;
  color: var(--dark);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  transition: var(--transition);
}

.site-navbar .nav-link:hover,
.site-navbar .nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* ---- Section Utilities ---- */
.section-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 50px;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

.section-subtitle {
  color: var(--gray);
  font-size: 1rem;
  max-width: 540px;
}

/* ---- Hero Section ---- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.88) 0%, rgba(0, 180, 216, 0.70) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-stat-item {
  text-align: center;
  color: #fff;
}

.hero-stat-item .stat-number,
.hero-stat-number {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  display: block;
}

.hero-stat-item .stat-label,
.hero-stat-label {
  font-size: 0.8rem;
  opacity: 0.85;
}

.hero-card-container {
  position: relative;
  z-index: 2;
}

.hero-quick-card,
.quick-book-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* ---- Page Banner ---- */
.page-banner {
  position: relative;
  min-height: 140px;
  display: flex;
  align-items: center;
}
.page-banner.page-banner-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.page-banner.page-banner-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(14, 95, 202, 0.80);
}
.page-banner .container {
  position: relative;
  z-index: 1;
}

/* ---- Doctor Card ---- */
.doctor-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
  overflow: hidden;
}

.doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.doctor-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.doctor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.doctor-avatar-placeholder {
  width: 100%;
  height: 100%;
}

.doctor-avatar-lg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--primary-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.doctor-avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.doctor-card-photo {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* ---- Service Card ---- */
.service-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
  padding: 1.5rem;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.service-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
  flex-shrink: 0;
}

.service-icon-banner {
  height: 180px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--primary);
  border-radius: var(--radius) var(--radius) 0 0;
  transition: var(--transition);
}

.service-card:hover .service-icon-banner {
  background: var(--primary);
  color: #fff;
}

/* ---- Package Card ---- */
.package-card {
  background: #fff;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.package-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.package-featured {
  border-color: var(--primary);
}

.package-badge {
  position: absolute;
  top: 16px;
  right: -10px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 18px 4px 12px;
  border-radius: 4px 0 0 4px;
  letter-spacing: 0.04em;
}

.package-badge::after {
  content: '';
  position: absolute;
  right: 0;
  top: 100%;
  border-style: solid;
  border-width: 0 10px 6px 0;
  border-color: transparent var(--primary-dark) transparent transparent;
}

.package-price-original {
  font-size: 0.85rem;
  color: var(--gray);
  text-decoration: line-through;
}

.package-price-new {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

/* ---- Testimonial Card ---- */
.testimonial-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-hover);
}

.testimonial-quote-icon {
  font-size: 2.5rem;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* ---- Blog Card ---- */
.blog-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
  overflow: hidden;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.blog-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-thumb-placeholder {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light) 0%, #dbeafe 100%);
  font-size: 2.5rem;
  color: var(--primary);
}

/* ---- Quick Action Tile ---- */
.quick-action-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--dark);
  display: block;
}

.quick-action-tile:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.quick-action-tile .tile-icon,
.quick-action-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 0.75rem;
}

/* ---- Why Us Section ---- */
.why-item {
  text-align: center;
  padding: 1.5rem;
}

.why-icon-wrap {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
}

/* ---- Patient Portal ---- */
.patient-portal-sidebar .nav-link {
  color: var(--dark);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-weight: 500;
  transition: var(--transition);
}

.patient-portal-sidebar .nav-link:hover,
.patient-portal-sidebar .nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

.patient-portal-sidebar .nav-link .nav-icon {
  width: 20px;
  text-align: center;
  margin-right: 0.5rem;
}

/* ---- Status Badges ---- */
.badge-pending   { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #d1e7dd; color: #0f5132; }
.badge-completed { background: #cfe2ff; color: #084298; }
.badge-cancelled { background: #f8d7da; color: #842029; }

/* ---- Footer ---- */
.site-footer,
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.75);
}

.site-footer h5,
.site-footer h6,
.footer h5,
.footer h6 {
  color: #fff;
  font-weight: 600;
}

.site-footer a,
.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.site-footer a:hover,
.footer a:hover {
  color: var(--secondary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---- Back To Top Button ---- */
#backToTop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(0, 102, 204, 0.35);
  cursor: pointer;
  z-index: 999;
  transition: var(--transition);
}

#backToTop:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

#backToTop.visible {
  display: flex;
}

/* ---- Flash Messages ---- */
.alert {
  border-radius: var(--radius-sm);
  border-left: 4px solid transparent;
}

.alert-success { border-left-color: var(--success); }
.alert-danger   { border-left-color: var(--danger); }
.alert-warning  { border-left-color: var(--warning); }
.alert-info     { border-left-color: var(--secondary); }

/* ---- Forms ---- */
.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  padding: 0.55rem 0.9rem;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}

/* ---- Buttons ---- */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .section-title {
    font-size: 1.6rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    gap: 1.2rem;
  }
}

@media (max-width: 767.98px) {
  .topbar .d-none-sm {
    display: none !important;
  }

  .hero-section {
    min-height: auto;
    padding: 60px 0;
  }

  .hero-stat-item .stat-number,
  .hero-stat-number {
    font-size: 1.5rem;
  }

  #backToTop {
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }
}
