:root {
  --primary: #1b5e20;
  --accent: #a5d6a7;
  --bg: #f1f8f1;
  --text: #0a1f0a;
  --light-gray: #e8f5e9;
  --border: #c8e6c9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Demo Bar */
.demo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  font-size: 13px;
  z-index: 1000;
  text-align: center;
}

.demo-bar a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.demo-bar a:hover {
  text-decoration: underline;
}

/* Header & Nav */
header {
  background: white;
  border-bottom: 1px solid var(--border);
  margin-top: 36px;
  position: sticky;
  top: 36px;
  z-index: 100;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  color: white;
  font-weight: 700;
}

header > div {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Checkbox Nav Hack */
#menu-toggle {
  display: none;
}

nav {
  display: none;
}

#menu-toggle:checked ~ nav {
  display: block;
}

nav ul {
  list-style: none;
  flex-direction: column;
}

nav ul li {
  border-top: 1px solid var(--light-gray);
}

nav ul li a {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

nav ul li a:hover,
nav ul li a.active {
  background: var(--light-gray);
  color: var(--primary);
}

.menu-btn {
  display: block;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary);
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#menu-toggle:checked ~ .menu-btn::before {
  content: "✕";
}

.menu-btn::before {
  content: "☰";
}

/* Desktop Nav */
@media (min-width: 768px) {
  header > div {
    padding: 16px 32px;
  }

  .menu-btn {
    display: none;
  }

  nav {
    display: block;
  }

  nav ul {
    display: flex;
    flex-direction: row;
    gap: 0;
  }

  nav ul li {
    border: none;
  }

  nav ul li a {
    padding: 8px 16px;
    border-bottom: 3px solid transparent;
  }

  nav ul li a:hover,
  nav ul li a.active {
    background: transparent;
    color: var(--primary);
    border-bottom-color: var(--primary);
  }
}

/* Main Content */
main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}

section {
  margin-bottom: 40px;
}

h1 {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1.2;
}

h2 {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 12px;
  margin-top: 24px;
}

h3 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 8px;
}

p {
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.7;
}

/* Cards */
.cards {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(27, 94, 32, 0.1);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.card h3 {
  margin: 0;
}

.card p {
  margin: 0;
  color: #555;
  font-size: 14px;
}

/* Doctor Grid */
.doctors {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

@media (min-width: 640px) {
  .doctors {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .doctors {
    grid-template-columns: repeat(3, 1fr);
  }
}

.doctor-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doctor-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
}

.doctor-card h3 {
  margin: 0;
}

.doctor-specialty {
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
}

.doctor-info {
  color: #666;
  font-size: 13px;
}

/* Schedule Table */
.schedule {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.schedule thead {
  background: var(--light-gray);
}

.schedule th,
.schedule td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.schedule th {
  font-weight: 600;
  color: var(--primary);
}

.schedule tbody tr:hover {
  background: var(--bg);
}

.status-available {
  display: inline-block;
  background: #c8e6c9;
  color: var(--primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.status-full {
  display: inline-block;
  background: #ffcccc;
  color: #c62828;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* Form */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--primary);
}

input,
textarea,
select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: white;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #0d3a15;
}

/* Footer */
footer {
  background: var(--primary);
  color: white;
  padding: 32px 16px;
  text-align: center;
  margin-top: auto;
}

footer p {
  margin: 8px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

footer a:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary), #2e7d32);
  color: white;
  padding: 40px 16px;
  border-radius: 12px;
  margin-bottom: 32px;
  text-align: center;
}

.hero h1 {
  color: white;
  font-size: 36px;
  margin-bottom: 12px;
}

.hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  margin-bottom: 0;
}

/* CTA Button */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(165, 214, 167, 0.4);
}

/* Responsive Desktop */
@media (min-width: 768px) {
  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }

  main {
    padding: 32px;
  }

  .hero {
    padding: 60px 32px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero p {
    font-size: 20px;
  }
}

/* Utility */
.text-center {
  text-align: center;
}

.text-muted {
  color: #666;
  font-size: 14px;
}
