/* Promed-inspired styling for Norme metodologice pages.
   Colors and tokens lifted from promed.ro:
   - primary green:  #a2c617
   - hover green:    #7cbf35 / #4a9a2a
   - dark green:     #1a5e1a
   - teal accent:    #22577a
   - text:           #1a1a1a / slate
*/

:root {
  --pm-primary: #a2c617;
  --pm-primary-hover: #7cbf35;
  --pm-primary-dark: #4a9a2a;
  --pm-primary-50: #f2f8f2;
  --pm-accent: #22577a;
  --pm-text: #1a1a1a;
  --pm-text-muted: #5f6368;
  --pm-border: #e2e8f0;
  --pm-border-strong: #cbd5e1;
  --pm-bg: #ffffff;
  --pm-bg-soft: #f8fafc;
  --pm-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --pm-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --pm-radius: 12px;
  --pm-radius-sm: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--pm-text);
  background: var(--pm-bg);
}

.norme-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.norme-header {
  background: linear-gradient(135deg, var(--pm-primary-50) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--pm-border);
  padding: 28px 0;
  margin-bottom: 32px;
}

.norme-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.norme-header__brand img {
  height: 40px;
}

.norme-header__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pm-primary-dark);
  background: rgba(162, 198, 23, 0.15);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.norme-header h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 8px 0;
  color: var(--pm-text);
}

.norme-header p.lead {
  font-size: 16px;
  color: var(--pm-text-muted);
  margin: 0;
}

.norme-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.norme-meta__chip {
  background: #fff;
  border: 1px solid var(--pm-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--pm-text-muted);
}

.norme-breadcrumb {
  font-size: 14px;
  color: var(--pm-text-muted);
  margin: 0 0 16px;
}

.norme-breadcrumb a {
  color: var(--pm-accent);
  text-decoration: none;
}

.norme-breadcrumb a:hover {
  text-decoration: underline;
}

h2.norme-h2 {
  font-size: 22px;
  margin: 32px 0 12px;
  color: var(--pm-text);
  border-left: 4px solid var(--pm-primary);
  padding-left: 12px;
}

h3.norme-h3 {
  font-size: 18px;
  margin: 24px 0 8px;
  color: var(--pm-accent);
}

article.norme-content p {
  margin: 0 0 14px;
}

article.norme-content ol,
article.norme-content ul {
  padding-left: 22px;
  margin: 0 0 14px;
}

article.norme-content li { margin-bottom: 6px; }

/* Article cards (one per Articolul X) */
.norme-article {
  background: var(--pm-bg);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  padding: 20px 24px;
  margin: 16px 0;
  box-shadow: var(--pm-shadow-sm);
}

.norme-article__num {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pm-primary-dark);
  background: rgba(162, 198, 23, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.norme-article h3 {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--pm-text);
}

/* Table of contents card */
.norme-toc {
  background: var(--pm-bg-soft);
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.norme-toc h2 {
  margin-top: 0;
  font-size: 18px;
}

.norme-toc ol { padding-left: 22px; }

.norme-toc a {
  color: var(--pm-accent);
  text-decoration: none;
  font-weight: 500;
}

.norme-toc a:hover { color: var(--pm-primary-dark); text-decoration: underline; }

/* Quick chips on landing */
.norme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 28px;
}

.norme-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--pm-border-strong);
  color: var(--pm-text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}

.norme-chip:hover {
  border-color: var(--pm-primary);
  background: var(--pm-primary-50);
  color: var(--pm-primary-dark);
}

/* Buttons */
.norme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pm-primary);
  color: #fff;
  border: none;
  border-radius: var(--pm-radius-sm);
  padding: 10px 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

.norme-btn:hover { background: var(--pm-primary-hover); color: #fff; }

.norme-btn--ghost {
  background: transparent;
  color: var(--pm-accent);
  border: 1px solid var(--pm-border-strong);
}

.norme-btn--ghost:hover {
  background: var(--pm-primary-50);
  border-color: var(--pm-primary);
  color: var(--pm-primary-dark);
}

/* Tables */
.norme-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  margin: 16px 0;
  background: #fff;
}

table.norme-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.norme-table thead th {
  background: var(--pm-primary-50);
  color: var(--pm-text);
  text-align: left;
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 2px solid var(--pm-primary);
  position: sticky;
  top: 0;
  z-index: 1;
}

table.norme-table tbody td {
  padding: 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--pm-border);
  color: var(--pm-text);
}

table.norme-table tbody tr:hover td { background: var(--pm-bg-soft); }

table.norme-table tbody td.nr {
  text-align: center;
  font-weight: 700;
  color: var(--pm-primary-dark);
  width: 56px;
}

table.norme-table tbody td.spec {
  font-weight: 600;
  color: var(--pm-text);
  min-width: 180px;
}

/* Search box for Anexa 4 */
.norme-search {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
}

.norme-search input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--pm-border-strong);
  border-radius: var(--pm-radius-sm);
  font-size: 15px;
  font-family: inherit;
}

.norme-search input[type="search"]:focus {
  outline: none;
  border-color: var(--pm-primary);
  box-shadow: 0 0 0 3px rgba(162, 198, 23, 0.18);
}

.norme-search__count {
  font-size: 14px;
  color: var(--pm-text-muted);
  white-space: nowrap;
}

/* Specialty card grid (Anexa 4 hub) */
.norme-spec-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

.norme-spec-card {
  display: block;
  background: #fff;
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
  box-shadow: var(--pm-shadow-sm);
}

.norme-spec-card:hover {
  border-color: var(--pm-primary);
  background: var(--pm-primary-50);
  transform: translateY(-1px);
  box-shadow: var(--pm-shadow-md);
}

.norme-spec-card h3 {
  margin: 0;
  font-size: 16px;
  color: var(--pm-text);
  line-height: 1.3;
}

/* Footer */
.norme-footer {
  margin: 60px 0 30px;
  padding: 24px 0;
  border-top: 1px solid var(--pm-border);
  font-size: 13px;
  color: var(--pm-text-muted);
  text-align: center;
}

.norme-footer a { color: var(--pm-accent); text-decoration: none; }
.norme-footer a:hover { text-decoration: underline; }

/* Article-list bullets inside dotare cells */
.dotare-cell ul {
  margin: 0;
  padding-left: 18px;
}

.dotare-cell ul li { margin-bottom: 3px; }

/* Page navigation (prev/next) */
.norme-pagenav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 36px 0 0;
}

.norme-pagenav a {
  flex: 1;
  background: #fff;
  border: 1px solid var(--pm-border);
  border-radius: var(--pm-radius);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--pm-text);
  transition: all 0.15s;
}

.norme-pagenav a:hover {
  border-color: var(--pm-primary);
  background: var(--pm-primary-50);
}

.norme-pagenav a.next { text-align: right; }

.norme-pagenav small {
  display: block;
  color: var(--pm-text-muted);
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.norme-pagenav strong { color: var(--pm-primary-dark); }

.norme-product-link {
  color: var(--pm-accent);
  text-decoration: underline dotted;
  text-decoration-color: rgba(34, 87, 122, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.norme-product-link:hover {
  color: var(--pm-primary-dark);
  text-decoration-style: dotted;
  text-decoration-color: currentColor;
}

@media (max-width: 720px) {
  .norme-header h1 { font-size: 22px; }
  h2.norme-h2 { font-size: 19px; }
  .norme-pagenav { flex-direction: column; }
  .norme-pagenav a.next { text-align: left; }
}
