/* first.css — consolidated & final UI tweaks for Amra's Clinic */

/* Reset / base */
:root {
  --brand-blue: #2E86AB;
  --accent: #F26419;
  --adriatic: #2F6FA5;
  --muted: #444;
  --content-max: 900px;
  --site-max: 1200px;
}

html,body {
  height: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #F6F5F5;
  color: #222;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Container used across site (header, main centering etc.) */
.container {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

/* Header (logo + nav + profile). Visual style kept in CSS file only. */
header {
  background: transparent;
  padding: 1rem 0;
}

/* header layout: logo, nav, profile aligned horizontally and wrap on small screens */
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Logo sizing — larger on desktop, slightly larger on mobile for visibility */
.site-logo {
  display: block;
  max-height: 120px; /* desktop size */
  height: auto;
}

/* NAV: white translucent pill with Adriatic-blue links */
nav {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.92);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

nav a {
  color: var(--adriatic);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  display: inline-block;
}

nav a:hover,
nav a:focus {
  color: var(--brand-blue);
  text-decoration: underline;
  outline: none;
}

/* MAIN content card */
main {
  padding: 2rem;
  max-width: var(--content-max);
  margin: 2rem auto;
  background-color: rgba(255, 255, 255, 0.52); /* readable while slightly transparent */
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  border-radius: 10px;
  min-height: 70vh;
  box-sizing: border-box;
  color: #222;
}

/* Headings & intro text */
h2, main h2 {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--brand-blue);
  margin: 0 0 0.75rem 0;
  text-align: center;
}

.intro-text {
  max-width: 600px;
  margin: 0.5rem auto 1.75rem auto;
  text-align: center;
  font-size: 1.15rem;
  color: var(--muted);
}

/* Footer */
footer {
  background-color: rgba(51, 51, 51, 0.85);
  color: #ddd;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  margin-top: 2rem;
}
footer a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
}
footer a:hover { color: var(--accent); text-decoration: underline; }

/* Services boxes */
.service {
  background-color: rgba(238,246,251,0.85);
  border: 1px solid #b0d4f1;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

/* Forms */
form {
  max-width: 420px;
  margin: 1.5rem auto;
  background: rgba(255,255,255,0.95);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: 'Merriweather', serif;
  font-style: italic;
  color: var(--brand-blue);
}
input, textarea, select {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  box-sizing: border-box;
  font-family: inherit;
}
textarea { min-height: 100px; resize: vertical; }

/* Buttons */
button, .btn {
  background-color: var(--brand-blue);
  color: white;
  border: none;
  padding: 0.55rem 1rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
}
button:hover, .btn:hover { background-color: #1f5f72; }

/* ADMIN dashboard — horizontal tabs (compact) */
.admin-sidebar {
  display: flex;
  gap: 1rem;
  background: transparent;
  border-bottom: 2px solid rgba(0,0,0,0.06);
  padding: 0.5rem 0;
  align-items: center;
}
.admin-sidebar a {
  padding: 0.4rem 0.8rem;
  text-decoration: none;
  color: #333;
  border-bottom: 3px solid transparent;
  font-weight: 700;
}
.admin-sidebar a.active {
  border-bottom-color: #2e7d32;
  color: #2e7d32;
}
.admin-main { padding: 1rem 0; background: transparent; }

/* Table styling (consolidated) */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}
table th, table td {
  border: 1px solid #e0e0e0;
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: middle;
}
table th {
  background: var(--brand-blue);
  color: white;
  font-weight: 700;
}

/* Small inline action buttons */
button.edit-btn {
  background-color: #1976d2;
  color: white;
  padding: 0.28rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  margin-right: 0.4rem;
}
button.edit-btn:hover { background-color: #1565c0; }

button.delete-btn {
  background-color: var(--accent);
  color: white;
  padding: 0.28rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
}
button.delete-btn:hover { background-color: #d94a00; }

/* Pagination (simple) */
.pagination a {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  margin-right: 0.25rem;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  border: 1px solid #e0e0e0;
}
.pagination a.active {
  background: var(--brand-blue);
  color: white;
  border-color: var(--brand-blue);
}

/* Profile (user initials + dropdown) */
.profile-dropdown {
  position: fixed;
  top: 18px;
  right: 24px;
  z-index: 12000;
  font-family: inherit;
}
.user-initials {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  padding: 0;
  line-height: 1;
}
.user-initials:focus { outline: 3px solid rgba(46,134,171,0.25); }

.user-dropdown {
  display: none; /* toggled by JS */
  position: absolute;
  top: 52px;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  min-width: 160px;
  overflow: hidden;
}
.user-dropdown a {
  display: block;
  padding: 10px 14px;
  color: var(--brand-blue);
  font-weight: 700;
  text-decoration: none;
}
.user-dropdown a:hover, .user-dropdown a:focus {
  background: var(--accent);
  color: #fff;
}

/* Success / error messages */
.success-message { color: #2e7d32; background: #e8f5e9; border:1px solid #c8e6c9; padding:0.5rem 0.9rem; border-radius:6px; font-weight:700; }
.error-message   { color: #c62828; background: #ffebee; border:1px solid #ffcdd2; padding:0.5rem 0.9rem; border-radius:6px; font-weight:700; }

/* Modal */
.modal { position: fixed; inset:0; background: rgba(0,0,0,0.5); z-index:11000; display:flex; align-items:flex-start; justify-content:center; padding:3rem 1rem; box-sizing:border-box; }
.modal-content { background:#fff; border-radius:8px; padding:1.25rem; width:100%; max-width:420px; position:relative; }

/* Responsive tweaks */
@media (max-width: 992px) {
  :root { --site-max: 1100px; }
  nav a { font-size: 1rem; }
}
@media (max-width: 768px) {
  .site-logo { max-height: 110px; } /* slightly larger on mobile for visibility */
  nav { padding: 0.6rem 0.8rem; border-radius:8px; }
  .container { padding: 0 1rem; }
  .profile-dropdown { right: 12px; top: 12px; }
}
@media (max-width: 480px) {
  main { margin: 1rem; padding: 1rem; }
  .site-logo { max-height: 100px; }
  nav { gap: 0.6rem; }
}

/* === Bigger logo override === */
.site-logo {
  max-height: 180px; /* bigger on desktop */
  height: auto;
}

@media (max-width: 768px) {
  .site-logo {
    max-height: 140px; /* bigger on mobile too */
  }
}
