     /* ===== Css Swanland u3a ===== */
body {
    font-family: "Helvetica", "Helvetica Neue", Arial, sans-serif;
    color: #222;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}


/* Centre page at 96% and control max width */
.wrapper {
    width: 96%;
    max-width: 1400px;    /* you may change to 1400 or 1600 */
    margin: 0 auto;       /* centers the page */
}

/* Make banner background white and full width */
.box.header,
.banner {
    background: #ffffff;
}

/* Add space under the banner before the menu */
.banner {
    padding-bottom: 20px;     /* adjust 10–40px to taste */
}

/* Ensure banner image fits cleanly */
.banner img {
    display: block;
    height: auto;
}


h1, h2, h3, h4, h5, h6 {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

h1 { color: #003E7E; }
h2 { color: #004E9A; }
h3 { color: #005CB8; }
h4 { color: #0073E6; }
h5 { color: #2F8FFF; }
h6 { color: #5FAAFF; }

/* Automatic section numbering for h3 */
h3::before {
    counter-increment: section;
    content: counter(section) ". ";
    font-weight: bold;
    margin-right: 4px;
}

/* ---------------------------------------------
   3. RESPONSIVE FLOATING IMAGES
---------------------------------------------- */

.floatLeft,
.floatRight {
    max-width: 40%;
}

.banner {
  text-align: center;
  margin: 0 auto;
}
.banner img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

.centre {
  text-align: center;
  margin: 0 auto;
} 

/* ===== Responsive Table Styling ===== */
.center {
  overflow-x: auto; /* Allow scrolling on small screens */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 8px; /* Added for modern look */
    overflow: hidden; /* Ensures borders/shadows apply correctly */
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #000; /* Dark border */
}

/* Table Header */
th {
    background-color: #5064eb; /* UPDATED to requested color */
    color: #000; /* Use the accent color for text */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Alternating Row Shades */
tbody tr:nth-child(odd) {
    background-color: #f9f9f9; /* Very light gray for odd rows */
}

tbody tr:nth-child(even) {
    background-color: #ffffff; /* White for even rows */
}

/* Hover effect for improved UX */
tbody tr:hover {
    background-color: #f0f0f0; 
}

/* ===== Mobile Responsive (Stacked Layout) ===== */
@media (max-width: 768px) {
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead tr {
    display: none; /* Hide the table headers */
  }

  tbody tr {
    margin-bottom: 1rem;
    border: 1px solid #000;
    border-radius: 6px;
    background: #fff;
    padding: 0.5rem;
  }

  td {
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #ccc;
  }

  td::before {
    content: attr(data-title);
    font-weight: bold;
    color: #000;
    margin-right: 1rem;
    flex: 1 1 40%;
  }

  td:last-child {
    border-bottom: none;
  }
}

/* Header */
header {
  background: #004080; /* Blue background */
  color: #ffeb3b;      /* Yellow text */
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
}

/* Logo placeholder */
.logo {
  font-size: 1.25rem;
  font-weight: bold;
  color: #ffeb3b;
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #ffeb3b; /* Yellow bars */
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animate into "X" */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation */
nav {
  background: #004080; /* Blue background */
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

nav li {
  position: relative;
}

nav a {
  color: #ffeb3b; /* Yellow text */
  text-decoration: none;
  padding: 0.8rem 1rem;
  display: block;
  transition: color 0.2s, background 0.2s;
}

nav a:hover {
  color: #ffffff; /* White on hover */
}
/* Sub-Menu Styles (Desktop) */
.sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none; /* Hidden by default on desktop */
    position: absolute;
    top: 100%;
    min-width: 200px;
    background: #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 90;
    right: 0;
    left: auto; /* Ensure left is not set */
}

.sub-menu li a {
  padding: 0.6rem 1rem;
}

nav li:hover > .sub-menu {
  display: block;
}

/* Mobile styles */
@media (max-width: 992px) {
  .hamburger {
    display: flex;
  }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
  }

  nav.open {
    max-height: 600px;
    opacity: 1;
  }

  nav ul {
    flex-direction: column;
  }

  nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  .sub-menu {
    position: static;
    background: #003366;
  }

  nav li:hover > .sub-menu {
    display: none; /* disable hover open on mobile */
  }

  .has-submenu > a::after {
    content: " ";
    font-size: 0.8em;
  }

  /* Show submenu when parent is clicked */
  .has-submenu.open > .sub-menu {
    display: block;
  }
}

.responsive-table {
  width: 90%;
  margin: 1.5rem auto;
  border: 2px solid black;
  border-collapse: collapse;
  display: table;
  background: #fff;
}

.table-row {
  display: table-row;
}

.table-cell {
  display: table-cell;
  vertical-align: top;
  padding: 1rem;
  border: 1px solid black;
}

.table-cell h4 {
  margin-top: 0;
  color: #003a99;
}

.table-cell img {
  display: block;
  margin: 0.5rem auto;
  border-radius: 10px;
}

.centre {
  text-align: center;
}
.bold {
  font-weight: bold;
}

/* Stack cells vertically on mobile */
@media (max-width: 768px) {
  .responsive-table {
    display: block;
  }
  .table-row {
    display: block;
  }
  .table-cell {
    display: block;
    width: 100%;
    border-left: none;
    border-right: none;
    border-bottom: 2px solid black;
  }
  .table-cell:last-child {
    border-bottom: none;
  }
}
.button-center {
    text-align: center;
    margin: 1.5rem 0;
}

.button {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    background-color: #004080;   /* Swanland blue */
    color: #ffeb3b;              /* Yellow text */
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid #003060;
    transition: background 0.2s ease, color 0.2s ease;
}

.button:hover {
    background-color: #003060;
    color: #ffffff;
}

.member-button {
    /* Add custom overrides here if needed */
}
.logo {
    width: 90px;
    height: auto;
    float: left;
}