:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #58c3b9;
  --success: #16a34a;
  --danger: #dc2626;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--text);
  background: var(--bg);
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  overflow: auto;
}

.header h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
}
.header p { margin: 0; color: var(--muted); }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.label { display: block; margin-bottom: 8px; color: var(--muted); }
.select, .input {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 12px;
}
.button {
  margin-top: 12px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
}
.button[disabled] { opacity: .6; cursor: not-allowed; }

.controls-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.legend { margin-top: 8px; color: var(--muted); display: flex; gap: 16px; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-free { background: var(--success); }
.dot-booked { background: var(--danger); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.slot {
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--surface);
}
.slot.free { outline: 2px solid rgba(34,197,94,.35); }
.slot.booked { outline: 2px solid rgba(239,68,68,.35); }
.slot.free .time { color: var(--success); }
.slot.booked .time { color: var(--danger); }
.slot .time { font-weight: 700; }
.slot .action { margin-top: 8px; }
.slot .book-btn { background: var(--success); border: none; color: white; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.slot .book-btn[disabled] { opacity: .6; cursor: not-allowed; }

.footer { margin-top: 28px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.link { color: var(--primary); text-decoration: none; }
.muted { color: var(--muted); }

/* Doctors list */
.doctors-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.doctor-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}
.doctor-card:hover { transform: translateY(-1px); }
.doctor-card:focus { outline: 2px solid var(--primary); }
.doctor-avatar { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; border: 2px solid var(--border); background: #1c2440; }
.doctor-name { font-weight: 700; font-size: 16px; }
.doctor-spec { color: var(--muted); margin-top: 4px; font-style: italic; }

/* Navigation */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 100px;
}

.nav-logo h2 {
  margin: 0;
  color: var(--primary);
  font-size: 20px;
}

.nav-logo img,
.site-logo {
  display: block;
  max-height: 100px;
  width: auto;
  border-radius: 10px;
}

.nav-menu {
  display: flex;
  gap: 24px;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bar::before {
  top: -5px;
}

.nav-toggle-bar::after {
  top: 5px;
}

.nav-toggle.open .nav-toggle-bar {
  transform: rotate(45deg);
}

.nav-toggle.open .nav-toggle-bar::before {
  transform: rotate(-90deg) translateX(-5px);
}

.nav-toggle.open .nav-toggle-bar::after {
  opacity: 0;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

/* Large doctor grid for homepage */
.doctors-grid-large {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.doctor-card-large {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.doctor-card-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.doctor-image-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.doctor-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.doctor-details {
  padding: 20px;
  text-align: center;
}

.doctor-name-large {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 700;
}

.doctor-specialty {
  margin: 0 0 16px 0;
  color: var(--muted);
  font-style: italic;
}

.book-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.book-btn:hover {
  background: #3c9b92;
}

@media (min-width: 640px) {
  .controls-row { grid-template-columns: 200px 1fr; }
}

/* Site Footer */
.site-footer {
  background: #f8f9fa;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  color: var(--text);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-footer .footer-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding: 40px 16px;
}

.footer-section h3 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

.footer-section h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.footer-section p {
  margin: 0 0 12px 0;
  color: var(--muted);
  line-height: 1.5;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

.contact-info a {
  color: var(--primary);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

.footer-bottom {
  background: rgba(0,0,0,0.02);
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 768px) {
  .nav-container {
    position: relative;
  }

  .nav-menu {
    position: absolute;
    right: 16px;
    top: 60px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 200px;
    display: none;
    z-index: 150;
  }

  .nav-menu.nav-menu-open {
    display: flex;
  }

  .nav-menu .nav-link,
  .nav-menu .dropdown-toggle {
    width: 100%;
    padding: 8px 16px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 4px 16px 8px;
  }

  .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .site-footer .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 16px;
  }
  
  .footer-bottom .footer-container {
    flex-direction: column;
    text-align: center;
  }
}




