/* Use border-box to make sizing and padding predictable */
*, *::before, *::after {
	box-sizing: border-box;
}

/* colour variables allow us to switch theme easily */
:root {
    --bg-color: #ebfff4;
    --text-color: black;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px; /* keep content away from the left edge */
    font-family: Arial, sans-serif;
}

/* dark theme — apply by adding .dark on the <body> */
body.dark {
    --bg-color: #363636;
    --text-color: white;
}

/* theme toggle button */
#theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
}

h1 {
	color: #ff0000;
	text-align: center;
	font-family: Verdana, sans-serif;
}

header {
	position: sticky;
	top: 0;
	background-color: var(--bg-color);
	z-index: 100;
}

h2 {
	color: #ff6701;
	text-align: center;
	font-family: Verdana, sans-serif;
}

h2 a {
	color: inherit;
	text-decoration: none;
}

h3 {
	color: #ffc000;
	text-align: center;
	font-family: Verdana, sans-serif;
}

p {
	font-size: 20px;
}

ol, ul {
	font-size: 18px;
}

.centered-text {
	text-align: center;
}

.button {
	display: inline-flex;
 	align-items: center;
 	gap: 8px;
 	margin: 5px;
 	padding: 6px 10px;
 	background-color: #e53935;
 	border: 2px solid #ffffff;
 	border-radius: 8px;
	transform: scale(1);
	transition: transform 0.15s ease, background-color 0.15s ease;
	box-shadow: 0 2px 0 rgba(0,0,0,0.12);

}
/* Ensure images inside the button sit nicely */
.button img {
 	height: 20px;
 	width: auto;
 	display: block;
}
.button a {
 	color: white;
 	font-size: 16pt;
 	font-family: Verdana, sans-serif;
 	text-decoration: none;
}
/* Preferred: change parent background based on whether the button contains an external link */
.button:has(a[href^="http"]):hover {
	background-color: #ffc000; /* green for external */
	transform: scale(1.05);
}
.button:has(a:not([href^="http"])):hover {
	background-color: orange; /* internal/subpage */
	transform: scale(1.05);
}
/* JS-driven fallback classes for older browsers to avoid text-only highlighting */
.button.hover-external {
	background-color: #ffc000;
	transform: scale(1.05);
}
.button.hover-internal {
	background-color: orange;
	transform: scale(1.05);
}

/* dark mode button styling */
body.dark .button {
	border-color: #000000;
}

.social-row {
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
}

.button.social {
	padding: 14px 18px;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 30pt;
	cursor: pointer;
	background-color: white;
	border-color: #e53935;
	border-width: 4px;
}

.button.social img {
	height: 64px;
	width: auto;
}

.button.social a {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
}

.button.social:has(a[href^="http"]):hover {
	background-color: #F9D0CF;
	transform: scale(1.05);
}

.logo-container {
	text-align: center;
	padding-top: 20px;	
	width: 100%;
}
.main-logo {
	max-width: 725px;
	width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

.image-container {
	text-align: center;
	margin: 20px auto;
	width: 100%;
	max-width: 100%;
}

.image-container img {
	max-width: 100%;
	height: auto;
	display: inline-block;
}

/* allow an image to sit inline with text */
.image-container.left {
	float: left;
	width: auto;
	margin: 0 20px 20px 0; /* space between image and paragraph */
	text-align: left;
}

.image-container.right {
	float: right;
	width: auto;
	margin: 0 0 20px 20px; /* space between image and paragraph */
	text-align: right;
}

/* clear any floated children so sections expand to contain them */
section {
	overflow: auto;
}

/* table styling - text colour follows theme variable */
table, th, td {
    color: var(--text-color);
}

/* optional borders to make tables readable in both themes */
table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}
th, td {
    padding: 4px;
}

body.dark th, body.dark td {
    border-color: #666;
}
.video-container {
	text-align: center;
	margin: 20px 0;
}
/* Navigation bar styles */
.navbar {
	background: transparent;
	padding: 8px 0;
}
.navbar ul {
	display: flex;
	gap: 10px;
	justify-content: center;
	align-items: center;
	padding: 0;
	margin: 8px 0 20px 0;
	flex-wrap: wrap;
}
.navbar li {
	list-style: none;
}
.navbar a {
	display: inline-block;
	background: #e53935;
	color: #fff;
	padding: 10px 14px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	box-shadow: 0 2px 0 rgba(0,0,0,0.12);
}
.navbar a:hover {
	background: orange;
    cursor: pointer;
	transform: scale(1.05);
	transition: 0.15s;
}

/* highlight current page */
.navbar a.active {
    background: white;
    color: black;
 	border: 2px solid #e53935;
}
.navbar a.active:hover {
    background: white;
    color: black;
 	border: 2px solid #e53935;
    transform: scale(1.05);
    transition: 0.15s;
}

@media (max-width: 520px) {
	.navbar a {
		padding: 8px 10px;
		font-size: 14px;
	}
}

/* search bar styling – generic framework for any page */
.search-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto;
    width: 100%;
    max-width: 600px;
}
.search-container input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.15s ease;
}

.search-container input:focus {
    outline: none;
    border-color: red;
}

.search-container select {
    padding: 8px 10px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: white;
    color: black;
    cursor: pointer;
    transition: border-color 0.15s ease;
    flex-shrink: 0;
}

.search-container select:focus {
    outline: none;
    border-color: red;
}

body.dark .search-container input {
    background-color: white;
    color: black;
    border-color: #ccc;
}

body.dark .search-container input:focus {
    border-color: red;
}

body.dark .search-container select {
    background-color: white;
    color: black;
    border-color: #ccc;
}

body.dark .search-container select:focus {
    border-color: red;
}

/* highlighting for search results */
mark {
    background-color: #ffff00;
    padding: 2px;
    border-radius: 2px;
}

body.dark mark {
    background-color: #ffaa00;
    color: #000;
}

/* no results message */
.no-results {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 16px;
}

.small-text {
	text-align: center;
	color: #999;
	font-size: 8px;
}
body.dark .no-results {
    color: #aaa;
}

/* tags are for search only; hide visually but keep in DOM */
.tags {
    display: none;
}

.youtube-box {
  background-color: #f9f9f9; /* Light grey background to make the red pop */
  padding: 15px;
  border-radius: 10px;
  display: inline-block; /* Keeps the box tight around the button */
  margin: 20px 0;
  border: 1px solid #ddd;
}

/* If you are in Dark Mode, use this instead: */
.dark-mode .youtube-box {
  background-color: #222;
  border: 1px solid #444;
} 

/* Style the box */
.collapse {
  background-color: #EBFFF4;
  color: #ff0000;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
  font-size: 24px;
  border: 1px solid red;
}

/* Style the clickable heading */
.collapse summary {
  padding: 15px;
  cursor: pointer;
  font-weight: bold;
  list-style: none; /* Removes the default arrow in some browsers */
  background-color: white;
}

/* Change color on hover */
.collapse summary:hover {
  background-color: #D5FFE8;
}

/* Style the hidden content */
.collapse .content {
  padding: 15px;
  border-top: 1px solid #ff0000;
  line-height: 1.6;
  color: black;
  font-size: 20px;
}

/* Dark Mode Version */
.dark .collapse {
  background-color: #363636; /* Deep charcoal */
  color: red;          /* Brighter red for better contrast on dark */
  border: 1px solid red;
}

.dark .collapse summary {
  background-color: black;
}

.dark .collapse summary:hover {
  background-color: #262626; /* Slightly lighter on hover */
}

.dark .collapse .content {
  border-top: 1px solid red;
  color: #e0e0e0;           /* Off-white for easy reading */
  background-color: #363636;
}

/* ── News page: date and tag styles ── */

/* Row that holds date + tags on one line, centered */
.news-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: -6px 0 14px 0;
}

/* Publication date — muted, small */
.date {
    font-size: 14px;
    color: #888;
    text-align: center;
}

body.dark .date {
    color: #aaa;
}

/* Tag bubble row */
.visible-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.visible-tags .tag,
.tag {
    display: inline-block;
    background-color: #e53935;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    font-family: Arial, sans-serif;
    letter-spacing: 0.02em;
}


/* ── Article anchor / copy-link button ── */
.article-link-btn {
    display: block;
    margin: -8px auto 14px auto;
    padding: 4px 12px;
    font-size: 13px;
    font-family: Arial, sans-serif;
    color: #888;
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    text-align: center;
}

.article-link-btn:hover {
    color: #e53935;
    border-color: #e53935;
    background: rgba(229, 57, 53, 0.06);
}

.article-link-btn--copied {
    color: #2e7d32 !important;
    border-color: #2e7d32 !important;
    background: rgba(46, 125, 50, 0.08) !important;
}

body.dark .article-link-btn {
    color: #aaa;
    border-color: #555;
}

body.dark .article-link-btn:hover {
    color: #ff6b6b;
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.08);
}

body.dark .article-link-btn--copied {
    color: #66bb6a !important;
    border-color: #66bb6a !important;
    background: rgba(102, 187, 106, 0.1) !important;
}