/* ===========================
   MediConnect Global Styles
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Playfair+Display:wght@700&display=swap');

:root {
  --primary: #0057b8;
  --primary-dark: #003d82;
  --primary-light: #e8f1fb;
  --secondary: #00a86b;
  --secondary-dark: #007a4d;
  --secondary-light: #e6f7f1;
  --accent: #ff6b35;
  --text-dark: #1a1a2e;
  --text-muted: #6c757d;
  --white: #ffffff;
  --bg-light: #f4f8ff;
  --bg-section: #f0f5ff;
  --border: #dee2e6;
  --shadow: 0 4px 24px rgba(0, 87, 184, 0.10);
  --shadow-hover: 0 8px 40px rgba(0, 87, 184, 0.18);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: all 0.3s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }

a { text-decoration: none; color: inherit; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* ===== NAVBAR ===== */
.navbar-brand img { height: 52px; }

.navbar {
  background: var(--white) !important;
  box-shadow: 0 2px 16px rgba(0,87,184,0.08);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-nav .nav-link {
  font-weight: 700;
  color: var(--text-dark) !important;
  padding: 8px 16px !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 0.95rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-light);
}

.btn-nav-login {
  background: var(--primary);
  color: var(--white) !important;
  border-radius: 30px;
  padding: 8px 22px !important;
}
.btn-nav-login:hover { background: var(--primary-dark); }

/* ===== HERO SECTION ===== */
.hero-section {
  background: linear-gradient(135deg, #0057b8 0%, #003d82 40%, #00a86b 100%);
  min-height: 88vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 420px; height: 420px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -120px; left: -60px;
  width: 320px; height: 320px;
  background: rgba(0,168,107,0.13);
  border-radius: 50%;
}

.hero-title {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.15;
  font-weight: 900;
}

.hero-title span { color: #7effd4; }

.hero-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  margin: 1.2rem 0 2rem;
  font-weight: 600;
}

.hero-img {
  border-radius: 20px;
  max-width: 100%;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,0.25));
}

/* ===== SEARCH BOX ===== */
.search-mega-box {
  background: var(--white);
  border-radius: 20px;
  padding: 28px 30px;
  box-shadow: 0 8px 50px rgba(0,87,184,0.2);
  margin-top: 2rem;
}

.search-mega-box .nav-tabs { border: none; gap: 8px; margin-bottom: 16px; }
.search-mega-box .nav-tabs .nav-link {
  border: 2px solid var(--border);
  border-radius: 30px;
  font-weight: 700;
  color: var(--text-muted);
  padding: 6px 18px;
  font-size: 0.9rem;
  transition: var(--transition);
}
.search-mega-box .nav-tabs .nav-link.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.search-input-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.search-input-group input,
.search-input-group select {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 1rem;
  font-family: 'Nunito', sans-serif;
  flex: 1;
  min-width: 160px;
  outline: none;
  transition: var(--transition);
}
.search-input-group input:focus,
.search-input-group select:focus { border-color: var(--primary); }

.btn-search {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 28px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-search:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ===== SECTION TITLES ===== */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--text-dark);
}
.section-title span { color: var(--primary); }
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-top: 6px;
}
.section-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 14px;
  border-radius: 30px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  height: 100%;
}
.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.service-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
  font-size: 2rem;
}
.service-card h5 { font-weight: 800; font-size: 1.1rem; color: var(--text-dark); margin-bottom: 8px; }
.service-card p { color: var(--text-muted); font-size: 0.92rem; }

/* ===== DOCTOR CARDS ===== */
.doctor-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 2px solid transparent;
}
.doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}
.doctor-img {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}
.doctor-rating { color: #f59e0b; font-size: 0.85rem; }
.badge-available {
  background: var(--secondary-light);
  color: var(--secondary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 40px 0;
}
.stat-item { text-align: center; color: var(--white); }
.stat-number {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
}
.stat-label { font-size: 0.95rem; opacity: 0.88; margin-top: 4px; }

/* ===== TESTIMONIALS ===== */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--primary);
}
.testimonial-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: var(--primary); font-size: 1.3rem;
}
.quote-icon { color: var(--primary); font-size: 2rem; opacity: 0.2; }

/* ===== BUTTONS ===== */
.btn-primary-mc {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 30px;
  padding: 12px 30px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary-mc:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,87,184,0.3); color: var(--white); }

.btn-secondary-mc {
  background: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: 30px;
  padding: 12px 30px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-secondary-mc:hover { background: var(--secondary-dark); transform: translateY(-2px); color: var(--white); }

.btn-outline-mc {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 30px;
  padding: 10px 28px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline-mc:hover { background: var(--primary); color: var(--white); }

/* ===== FOOTER ===== */
footer {
  background: #0f1b35;
  color: rgba(255,255,255,0.82);
  padding: 60px 0 0;
}
footer h5 { color: var(--white); font-weight: 800; margin-bottom: 18px; }
footer a { color: rgba(255,255,255,0.72); transition: var(--transition); }
footer a:hover { color: var(--secondary); }
.footer-brand img { height: 48px; }
.footer-bottom {
  background: rgba(0,0,0,0.3);
  padding: 18px 0;
  margin-top: 40px;
  font-size: 0.88rem;
  text-align: center;
}
.social-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  transition: var(--transition);
  color: var(--white);
}
.social-icon:hover { background: var(--primary); color: var(--white); }

/* ===== FORM CONTROLS ===== */
.form-control-mc {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 1rem;
  font-family: 'Nunito', sans-serif;
  width: 100%;
  outline: none;
  transition: var(--transition);
  background: var(--white);
}
.form-control-mc:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,87,184,0.1); }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 70px 0 50px;
  color: var(--white);
}
.page-header h1 { font-size: 2.6rem; font-weight: 900; }
.page-header p { opacity: 0.85; font-size: 1.1rem; }
.breadcrumb-mc { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.breadcrumb-mc a { color: rgba(255,255,255,0.75); font-weight: 600; }
.breadcrumb-mc span { color: rgba(255,255,255,0.5); }
.breadcrumb-mc .active { color: #7effd4; font-weight: 700; }

/* ===== CARDS GENERIC ===== */
.mc-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.mc-card:hover { box-shadow: var(--shadow-hover); }

/* ===== BADGE COLORS ===== */
.badge-blue { background: var(--primary-light); color: var(--primary); padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; }
.badge-green { background: var(--secondary-light); color: var(--secondary-dark); padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; }
.badge-orange { background: #fff3ed; color: var(--accent); padding: 4px 12px; border-radius: 20px; font-weight: 700; font-size: 0.8rem; }

/* ===== MODAL ===== */
.modal-mc .modal-content { border-radius: var(--radius); border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-mc .modal-header { background: var(--primary); color: var(--white); border-radius: var(--radius) var(--radius) 0 0; }
.modal-mc .modal-title { font-weight: 800; }

/* ===== LOADING SPINNER ===== */
.mc-spinner {
  width: 40px; height: 40px;
  border: 4px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 20px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ALERTS ===== */
.alert-mc-success {
  background: var(--secondary-light);
  border-left: 4px solid var(--secondary);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--secondary-dark);
  font-weight: 600;
}
.alert-mc-error {
  background: #fff0f0;
  border-left: 4px solid #e53e3e;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: #c53030;
  font-weight: 600;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fadeup { animation: fadeUp 0.6s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-section { min-height: auto; padding: 50px 0 40px; }
  .search-mega-box { padding: 18px 14px; }
  .search-input-group { flex-direction: column; }
  .stats-bar .stat-number { font-size: 2rem; }
}

/* ===== EMERGENCY BUTTON ===== */
.emergency-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #e53e3e;
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: 14px 22px;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 24px rgba(229,62,62,0.4);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulse 2s ease-in-out infinite;
  transition: var(--transition);
}
.emergency-btn:hover { background: #c53030; transform: scale(1.05); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(229,62,62,0.4); }
  50% { box-shadow: 0 4px 40px rgba(229,62,62,0.7); }
}

/* ===== RECEIPT ===== */
.receipt-box {
  max-width: 600px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 40px;
}
.receipt-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 30px;
  text-align: center;
  margin: -40px -40px 30px -40px;
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.receipt-row:last-child { border: none; }
.receipt-row .label { color: var(--text-muted); font-weight: 600; }
.receipt-row .value { font-weight: 800; }
.receipt-total {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary);
}

/* Dashboard Sidebar */
.dashboard-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 0;
  height: fit-content;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--primary);
  background: var(--primary-light);
  border-left-color: var(--primary);
}

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-dot { position: absolute; left: -24px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 2px solid white; box-shadow: 0 0 0 2px var(--primary); }
.logo-box{
    display:flex;
    align-items:center;
    gap:10px;
}

.logo-img{
    width:40px;
    height:40px;
    object-fit:contain;
}

.logo-box h2{
    font-size:1.2rem;
    color:#38bdf8;
    font-weight:800;
    margin:0;
}
/* ===== MOBILE IMPROVEMENTS ===== */
@media (max-width: 576px) {
  .navbar-brand span { font-size:1rem !important; }
  .page-header h1 { font-size:1.8rem; }
  .page-header { padding:40px 0 30px; }
  .mc-card { padding:16px; }
  .btn-primary-mc, .btn-secondary-mc, .btn-outline-mc { padding:10px 20px; font-size:.9rem; }
  .receipt-box { padding:20px; }
  .receipt-header { margin:-20px -20px 20px -20px; padding:20px; }
  .stat-number { font-size:1.8rem !important; }
  .search-mega-box { padding:14px 12px; }
  .dashboard-sidebar { margin-bottom:20px; }
  .sidebar-nav a { padding:10px 16px; font-size:.85rem; }
  .form-row, .form-row-3 { grid-template-columns:1fr !important; }
  .modal-box { padding:16px; }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns:repeat(2,1fr) !important; }
  .item-grid { grid-template-columns:repeat(2,1fr) !important; }
  .main { margin-left:0 !important; padding:16px !important; }
  .sidebar {
    position:relative !important;
    width:100% !important;
    height:auto !important;
    flex-direction:row !important;
    flex-wrap:wrap !important;
  }
  .sidebar .nav-section { display:none; }
  .sidebar .nav-item { padding:8px 12px; font-size:.8rem; border-left:none; border-bottom:3px solid transparent; }
  .sidebar .nav-item.active { border-bottom-color:#38bdf8; border-left:none; }
  body { flex-direction:column !important; }
  .search-input-group { flex-direction:column; }
  .search-input-group input,
  .search-input-group select { min-width:100%; }
}
