:root {
  --primary: #0d6efd;
  --primary-dark: #084298;
  --accent: #ffc107;
  --accent-dark: #e0a800;
  --gray: #6c757d;
  --mid-gray: #adb5bd;
  --light-gray: #dee2e6;
  --background: #f8f9fa;
  --white: #ffffff;
}

/* ========================================
   Global Reset & Defaults
======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-size: inherit;
}

html {
  font-family: Arial, sans-serif;
  font-size: clamp(14px, 1.5vw, 16px); /* Responsive font sizing */
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  html {
    font-size: 93.75%; /* ~15px */
  }
}

@media (max-width: 480px) {
  html {
    font-size: 87.5%; /* ~14px */
  }
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background-color: var(--background);
  color: var(--gray);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ========================================
   Headings
======================================== */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 10px;
  font-weight: bold;
  text-align: center;
  color: var(--primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5, h6 { font-size: 1.25rem; }

/* ========================================
   Lists
======================================== */
li {
  margin: 10px 0;
  text-align: left;
}

/* ========================================
   Links
======================================== */
a {
  color: var(--primary);
  text-decoration: none;
}

a:visited {
  color: var(--mid-gray);
}

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

a.leaf {
  color: #333;
  font-weight: bold;
}

a.leaf:visited {
  color: var(--mid-gray);
}

a.leaf:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

a.nav:visited {
  color: var(--accent);
}

/* ========================================
   Buttons & Submits
======================================== */
button,
input[type="submit"] {
  display: inline-block;
  padding: 12px 24px;
  margin: 10px;
  border: none;
  border-radius: 4px;
  background-color: var(--accent);
  color: #212529;
  cursor: pointer;
  text-align: center;
}

button:hover,
input[type="submit"]:hover {
  background-color: var(--accent-dark);
}

button:focus,
input[type="submit"]:focus {
  outline: 3px solid var(--accent-dark);
  outline-offset: 2px;
}

/* ========================================
   Forms
======================================== */
input[type="text"],
textarea,
select {
  width: 100%;
  max-width: 400px;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
}

/* ========================================
   Tables
======================================== */
table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  height: 60px;
  padding: 12px;
  border: 1px solid var(--light-gray);
  text-align: center;
  word-wrap: break-word;
}

th {
  background-color: var(--primary);
  color: var(--white);
  font-weight: bold;
}

td {
  background-color: var(--white);
  transition: background-color 0.3s ease;
}

/* ✅ CLICKABLE TD FIX */
td.rows {
  padding: 0;
}

td.rows a.leaf {
  font-size: inherit;
  display: block;
  width: 100%;
  height: 100%;
  padding: 12px;
  box-sizing: border-box;
  color: #333;
  text-decoration: none;
}

td.rows a.leaf:hover {
  background-color: #f8f8f8;
  color: white;
  text-decoration: none;
  cursor: pointer;
}

/* Responsive Table Padding */
@media (max-width: 768px) {
  th,
  td {
    padding: 8px;
  }

  td.rows a.leaf {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  th,
  td {
    padding: 6px;
  }

  td.rows a.leaf {
    padding: 6px;
  }
}

/* ========================================
   Layout Containers
======================================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ========================================
   Content & Sections
======================================== */
.title {
  margin-bottom: 20px;
  font-size: 9vw;
  font-weight: bold;
  color: var(--primary);
  text-align: center;
}

.content {
  color: var(--gray);
  text-align: center;
  line-height: 1.5;
}

#bulstonpenny-subscribe,
.contenth2 {
  font-weight: 600;
  color: #333;
  text-align: center;
}

.donate {
  margin-top: 20px;
  text-align: center;
}

.node {
  text-align: left;
}

.nodes {
  color: var(--primary);
}

/* ========================================
   Social Bar
======================================== */
#bulstonpenny-social-bar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 18px;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

#bulstonpenny-social-bar span {
  font-weight: 600;
  color: #333;
}

#bulstonpenny-social-bar a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

#bulstonpenny-social-bar a:hover {
  color: var(--primary-dark);
  transform: scale(1.2);
}

@media (max-width: 480px) {
  #bulstonpenny-social-bar a:hover {
    transform: scale(1.1);
  }
}

/* ========================================
   Navigation Grid (Styled Like Table)
======================================== */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0rem;
  list-style: none;
  padding: 0;
  margin: 0px 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.nav-grid li {
  padding: 12px;
  height: 60px;
  border: 1px solid #ddd;
  background-color: #f8f8f8;
  text-align: center;
  word-wrap: break-word;
}

.nav-grid a {
  display: block;
  font-weight: bold;
  color: #333;
  text-decoration: none;
}

/* ========================================
   Footer
======================================== */
.footer {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 20px 0;
  font-family: sans-serif;
  font-size: inherit;
  color: #333;
}

.footer td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
  background-color: #f8f8f8;
  word-wrap: break-word;
}

.footer td[colspan] {
  text-align: center;
  font-weight: bold;
  background-color: #f0f0f0;
}

.footer a {
  color: #333;
  font-weight: bold;
  text-decoration: none;
}

.footer a:hover {
  color: #0d6efd;
  text-decoration: underline;
}

/* spacing between rows */
.footer tr + tr td {
  border-top: none;
}
