/* ===================================
   HospitalSafe — Main Stylesheet
   =================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --primary: #1a6b4a;
  --primary-dark: #0f4a32;
  --primary-light: #e8f5f0;
  --accent: #e85d2f;
  --text: #2c2c2c;
  --text-light: #666;
  --border: #e0e0e0;
  --bg: #ffffff;
  --bg-off: #f8fafb;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1200px;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Merriweather', serif;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ── HEADER ── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.logo-text span { color: var(--accent); }

/* NAV */
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
}
.nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 8px 18px !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; }

/* HAMBURGER */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2d9b6e 100%);
  color: #fff;
  padding: 80px 24px 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.9);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  margin: 0 auto 32px;
  font-weight: 300;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 26px;
  border-radius: 7px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-white {
  background: #fff;
  color: var(--primary-dark);
}
.btn-white:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: #c94d22; }

/* ── TRUST BAR ── */
.trust-bar {
  background: var(--bg-off);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
}
.trust-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 500;
}
.trust-item span { color: var(--primary); font-size: 1rem; }

/* ── LAYOUT ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 64px 0; }
.section-alt { background: var(--bg-off); }
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}
.section-sub {
  color: var(--text-light);
  font-size: 1rem;
  max-width: 560px;
  margin-bottom: 40px;
}

/* ── AD PLACEHOLDER ── */
.ad-slot {
  background: var(--bg-off);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
  text-align: center;
  min-height: 90px;
  margin: 28px 0;
}
.ad-slot-banner { min-height: 90px; }
.ad-slot-rect { min-height: 250px; max-width: 300px; }
.ad-slot-sidebar { min-height: 280px; }

/* ── BLOG CARDS ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.25s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}
.card-thumb {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-light), #d4f0e4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
}
.card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}
.card-body { padding: 20px; }
.card-meta {
  display: flex;
  gap: 14px;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 10px;
}
.card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 10px;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--primary); }
.card-excerpt { font-size: 0.88rem; color: var(--text-light); line-height: 1.6; margin-bottom: 16px; }
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.read-more {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 5px;
}
.read-more:hover { color: var(--primary-dark); }
.read-time { font-size: 0.75rem; color: var(--text-light); }

/* ── ARTICLE PAGE ── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}
.article-main {}
.article-sidebar {}
.article-header { margin-bottom: 32px; }
.article-category {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.article-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  gap: 20px;
  font-size: 0.82rem;
  color: var(--text-light);
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}
.article-body { font-size: 1rem; line-height: 1.85; color: #333; }
.article-body h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}
.article-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 26px 0 10px;
}
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 14px 0 18px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text);
}
.article-body .key-points {
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}
.article-body .key-points h4 {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* AUTHOR BOX */
.author-box {
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin: 40px 0;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
}
.author-name { font-weight: 700; font-size: 1rem; color: var(--text); margin-bottom: 3px; }
.author-role { font-size: 0.8rem; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.author-bio { font-size: 0.85rem; color: var(--text-light); line-height: 1.6; }

/* SIDEBAR */
.sidebar-widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}
.widget-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
}
.related-post {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.related-post:last-child { border-bottom: none; }
.related-post a { color: var(--text); font-weight: 500; }
.related-post a:hover { color: var(--primary); }
.related-meta { font-size: 0.72rem; color: var(--text-light); margin-top: 3px; }

/* ── DISCLAIMER BOX ── */
.disclaimer-box {
  background: #fff8e6;
  border: 1px solid #f0d070;
  border-left: 4px solid #e6a800;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 0.85rem;
  color: #5a4a00;
  line-height: 1.6;
}
.disclaimer-box strong { color: #4a3a00; }

/* ── CTA SECTION ── */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 64px 24px;
  text-align: center;
}
.cta-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 14px;
}
.cta-section p { font-size: 1.05rem; color: rgba(255,255,255,0.8); margin-bottom: 28px; }

/* ── CATEGORIES ── */
.category-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.cat-pill {
  background: var(--bg-off);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── FORMS ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,107,74,0.08); }
textarea.form-input { resize: vertical; min-height: 130px; }

/* ── FOOTER ── */
.site-footer {
  background: #1a2332;
  color: rgba(255,255,255,0.6);
  padding: 56px 24px 28px;
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .site-logo { color: #fff; margin-bottom: 12px; }
.footer-desc { font-size: 0.84rem; line-height: 1.7; margin-bottom: 20px; }
.footer-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: rgba(255,255,255,0.5); font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
}
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: rgba(255,255,255,0.8); }

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--bg-off);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}
.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  gap: 6px;
  align-items: center;
}
.breadcrumb-inner a { color: var(--primary); }

/* ── PAGE HERO ── */
.page-hero {
  background: var(--bg-off);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 40px;
}
.page-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.page-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.page-hero p { color: var(--text-light); font-size: 1rem; }

/* ── TABLE OF CONTENTS ── */
.toc {
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
}
.toc-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 12px; color: var(--text); }
.toc ol { padding-left: 18px; }
.toc li { margin-bottom: 6px; font-size: 0.88rem; }
.toc a { color: var(--primary); }

/* ── SOURCES ── */
.sources {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding-top: 20px;
}
.sources-title { font-size: 0.85rem; font-weight: 700; color: var(--text-light); margin-bottom: 8px; }
.sources ol { padding-left: 18px; }
.sources li { font-size: 0.78rem; color: var(--text-light); margin-bottom: 4px; }

/* ── UTILITIES ── */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── MOBILE MENU ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 999;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}
.mobile-menu a:last-child { border-bottom: none; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { order: -1; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 56px 20px 64px; }
  .section { padding: 44px 0; }
  .blog-grid { grid-template-columns: 1fr; }
  .trust-inner { gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .author-box { flex-direction: column; }
  .article-layout { padding: 32px 20px; }
}
