:root {
  --primary: #00897b;
  --accent: #b2dfdb;
  --bg: #e0f2f1;
  --text: #0a2020;
  --light: #f5f5f5;
  --border: #80cbc4;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Demo Bar */
.demo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: white;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  z-index: 9999;
  text-align: center;
}

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

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

body {
  padding-top: 2.8rem;
}

/* Header */
header {
  background: linear-gradient(135deg, var(--primary), #004d40);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

header p {
  font-size: 0.95rem;
  opacity: 0.95;
}

/* Navigation */
nav {
  background: var(--bg);
  padding: 0;
  position: relative;
  border-bottom: 3px solid var(--border);
}

.nav-toggle {
  display: none;
}

.nav-label {
  display: none;
  cursor: pointer;
  padding: 1rem;
  font-weight: 600;
  color: var(--primary);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav li {
  border-right: 1px solid var(--border);
}

nav li:last-child {
  border-right: none;
}

nav a {
  display: block;
  padding: 1rem 1.2rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.3s, color 0.3s;
}

nav a:hover {
  background: var(--accent);
  color: var(--primary);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-label {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
  }

  nav li {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  nav li:last-child {
    border-bottom: none;
  }

  .nav-toggle:checked ~ ul {
    display: flex;
  }

  .nav-toggle:checked ~ .nav-label::after {
    content: " ✕";
  }

  header h1 {
    font-size: 1.5rem;
  }
}

/* Main Content */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

section {
  margin-bottom: 3rem;
}

h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1rem;
  text-align: justify;
}

/* Cards */
.card {
  background: var(--light);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 137, 123, 0.2);
}

.card h3 {
  margin-top: 0;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.grid-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.grid-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 137, 123, 0.15);
}

.grid-item h3 {
  margin-top: 0.5rem;
}

.icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

svg {
  width: 100%;
  height: 100%;
}

.doctor-card {
  text-align: center;
}

.doctor-name {
  font-weight: 700;
  color: var(--primary);
  margin: 1rem 0 0.5rem;
}

.doctor-spec {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.doctor-info {
  font-size: 0.85rem;
  color: #888;
}

/* Schedule Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
  background: white;
}

th {
  background: var(--primary);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

tr:hover {
  background: var(--light);
}

/* Form */
form {
  background: var(--light);
  padding: 2rem;
  border-radius: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
}

input,
textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
}

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

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

button {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #00695c;
}

.cta-btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.cta-btn:hover {
  background: #00695c;
}

/* Footer */
footer {
  background: var(--primary);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 3rem;
}

footer p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
}

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

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

@media (max-width: 768px) {
  header h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 0.8rem;
  }

  form {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .demo-bar {
    font-size: 0.75rem;
    padding: 0.5rem 0.5rem;
  }

  header {
    padding: 1.5rem 1rem;
  }

  header h1 {
    font-size: 1.3rem;
  }

  header p {
    font-size: 0.85rem;
  }

  main {
    padding: 1.5rem 0.75rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1rem;
  }

  nav a {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }
}
