/* =========================================================
   Joomla 5 (Cassiopeia-friendly) Typography + Color System
   - No custom classes
   - Uses Joomla defaults and plain HTML elements
   - Palette:
     Links/Primary: #0072c4
     Highlight:     Green (set below)
     Text:          #333333
   ========================================================= */

/* 1) Palette + font stack */
:root {
  --brand-primary: #0072c4;
  --brand-text: #333333;

  /* Choose a readable, accessible green highlight */
  --brand-accent: #2e7d32;

  /* Headings: darkened primary (good contrast on white) */
  --brand-heading: #0b4f88;

  /* Neutrals */
  --brand-muted: #555555;
  --brand-border: #d7dbe0;

  /* Joomla-friendly fonts (Roboto / Noto Sans as you noted) */
  --font-sans: "Roboto", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Helvetica, Arial, sans-serif;
}

/* 2) Base text */
html { font-size: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--brand-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 3) Links (Joomla default) */
a, a:visited {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover, a:focus {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 2px;
}

/* 4) Accessible keyboard focus */
:focus-visible {
  outline: 3px solid rgba(0, 114, 196, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 5) Headings (H1–H2) */
h1, h2 {
  font-family: var(--font-sans);
  color: var(--brand-heading);
  line-height: 1.25;
  font-weight: 500;
  margin: 0 0 0.6rem 0;
  letter-spacing: -0.01em;
}
/* 5) Headings (H1–H5) */
h3, h4, h5 {
  font-family: var(--font-sans);
  color: var(--brand-heading);
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 0.6rem 0;
  letter-spacing: -0.01em;
}

/* Scale tuned for social/community content */
h1 { font-size: 2.0rem; }   /* ~32px */
h2 { font-size: 1.6rem; }   /* ~25.6px */
h3 { font-size: 1.3rem; }   /* ~20.8px */
h4 { font-size: 1.1rem; }   /* ~17.6px */
h5 { font-size: 1.0rem; }   /* 16px */

/* Slightly smaller headings on mobile */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.45rem; }
  h3 { font-size: 1.2rem; }
}

/* 6) Paragraphs and lists */
p { margin: 0 0 1rem 0; }

ul, ol { margin: 0 0 1rem 1.25rem; }

li { margin: 0.25rem 0; }

/* 7) Default muted text behavior */
small {
  font-size: 0.875rem; /* 14px */
  color: var(--brand-muted);
}

/* 8) Blockquotes (Joomla articles often use these) */
blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--brand-border);
  color: var(--brand-muted);
}

/* 9) Horizontal rule */
hr {
  border: 0;
  border-top: 1px solid var(--brand-border);
  margin: 1.25rem 0;
}

/* 10) Forms (Joomla core outputs) */
input, select, textarea, button {
  font-family: var(--font-sans);
  font-size: 1rem;
}

label {
  font-weight: 600;
}

/* 11) Buttons (Joomla commonly uses .btn) */
.btn, button, input[type="submit"], input[type="button"] {
  font-family: var(--font-sans);
  font-weight: 700;
}

/* Primary buttons (Joomla: .btn-primary) */
.btn-primary {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
  filter: brightness(0.95);
  color: #ffffff;
}

/* Secondary buttons (keep neutral) */
.btn-secondary {
  background-color: #f2f4f7;
  border-color: var(--brand-border);
  color: var(--brand-text);
}

/* 12) Text selection (nice touch) */
::selection {
  background: rgba(0, 114, 196, 0.18);
}

/* 13) “Green highlighting” using standard HTML elements only
   Use <mark> in content for highlights */
mark {
  background: rgba(46, 125, 50, 0.18);
  color: var(--brand-text);
  padding: 0 0.15em;
  border-radius: 6px;
}

/* 14) Tables (Joomla articles sometimes output tables) */
table {
  border-collapse: collapse;
}

th {
  text-align: left;
  color: var(--brand-heading);
  font-weight: 700;
}

th, td {
  border-bottom: 1px solid var(--brand-border);
  padding: 0.6rem 0.5rem;
}
