/*
 * Unified stylesheet: styles.css + style4.css
 * Both navigation systems and both table systems are retained.
 * Where the original files conflicted, the styles.css values are the
 * defaults; optional alternatives are provided through theme classes.
 */

/* Global reset */
* {
  box-sizing: border-box;
  border-radius: 12px;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 5px 20px;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
  background-color: #efe3fd;
}

/* Optional pale-green background from style4.css.
   Apply class="theme-green" to the body to use it. */
body.theme-green {
  background-color: #e2f0d8;
}

/* Headings and typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

p,
h1,
h2,
h3 {
  text-align: center;
  margin: 15px 0;
}

p {
  font-size: 1.125rem;
  line-height: 1.6;
  padding: 5px;
}

p.justified,
p.jus,
.jus {
  text-align: justify;
}

p.r {
  text-align: right;
  padding: 5px;
}

h2,
h3,
h4 {
  text-align: center;
}

h2 {
  font-size: 1.5rem;
  font-weight: bold;
}

.s3 {
  font-size: 1rem;
}

.s4 {
  font-size: 1.125rem;
}

.s5 {
  font-size: 1.25rem;
}

.s6 {
  font-size: 1.75rem;
}

.i {
  font-style: italic;
}

.comi {
  font-family: "Comic Sans MS", Tahoma, sans-serif;
}

/* Header and images */
.header {
  background-image: url("./bratslogo2.gif");
  background-size: cover;
  background-position: center;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.responsive {
  display: block;
  width: 100%;
  max-width: 28.125rem;
  height: auto;
}

img {
  vertical-align: middle;
  display: block;
  max-width: 100%;
  height: auto;
  border: 0;
}

table td img {
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* Original top navigation */
.topnav {
  display: flex;
  justify-content: space-around;
  background-color: #6a5acd;
  padding: 0.9rem;
  margin: 20px auto;
  width: 85%;
}

.topnav a {
  color: #fff;
  text-align: center;
  padding: 0.5rem;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 1.5625rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.topnav a:hover {
  background-color: #ddd;
  color: green;
}

.topnav a.active {
  background-color: #04aa6a;
  color: #fff;
}

/* Alternate navbar system from style4.css */
.navbar,
.navbar2,
.navbar3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: lightblue;
  padding: 10px;
  line-height: 2;
  transition: background-color 0.3s ease;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  padding-right: 0.5rem;
  height: 3rem;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin-left: 0;
}

.nav-list.active {
  height: 600px;
  z-index: 1;
}

.nav-list li {
  margin: 10px 12px;
}

.nav-list a {
  color: #000080;
  text-decoration: none;
  padding: 8px;
  transition: background 0.3s;
}

.nav-list a:hover {
  background-color: #00ff00;
  border-radius: 4px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 20px;
}

.menu-toggle .bar {
  height: 3px;
  width: 25px;
  background-color: darkblue;
  margin: 3px 0 3px auto;
}

.nav-list .dropdown-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  z-index: 1000;
}

.nav-list .dropdown.active .dropdown-menu {
  display: block;
}

/* Content and alignment helpers */
.content {
  margin-top: 30px;
}

.centre {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

#f1 {
  padding-left: 12px;
}

#f2 {
  text-align: center;
}

#f3 {
  text-align: right;
}

hr.new1 {
  border: 0;
  border-top: 2px dashed;
}

/* Links */
a {
  color: #6a5acd;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #04aa6a;
}

/* Buttons */
.button {
  background-color: #04aa6a;
  border: none;
  color: #fff;
  padding: 8px 30px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 1rem;
  margin: 4px 2px;
  cursor: pointer;
  transition: background-color 0.5s ease;
}

.button:hover {
  background-color: #808000;
  color: #fff;
}

/* Optional alternate button colour from style4.css */
.button.button-alt {
  background-color: #4caf50;
}

.button.button-alt:hover {
  background-color: #555;
}

/* Tables */
table {
  margin-left: auto;
  margin-right: auto;
  border-collapse: collapse;
  width: 85%;
  padding: 3px;
  text-align: center;
  vertical-align: middle;
}

table.b,
table.e {
  width: 85%;
}

table.c {
  width: 25%;
}

table.b td,
table.e td {
  padding: 10px;
}

table.b td.b {
  background-color: #000;
  color: #fff;
}

table,
th,
td {
  border: 1px solid #000;
  padding: 10px;
  text-align: center;
  vertical-align: middle;
}

th {
  width: 33%;
  overflow-wrap: break-word;
}

.responsive-table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  text-align: center;
}

.responsive-table th {
  background-color: #4caf50;
  color: #fff;
  padding: 12px;
  text-align: center;
}

.responsive-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
}

.responsive-table tr:hover {
  background-color: #f5f5f5;
}

.table-container {
  max-width: 100%;
  overflow-x: auto;
}

/* Lists */
ul.nb {
  list-style: none;
  margin-left: 24px;
}

ol,
ul {
  margin-left: 80px;
}

/* Colour utility classes */
.red {
  color: red;
}

.blu {
  color: blue;
}

.bro {
  color: brown;
}

.gre {
  color: green;
}

.dg {
  color: darkgreen;
}

.yel {
  color: yellow;
}

.bla {
  color: #0f0f0f;
}

.whi {
  color: #fff;
}

.go {
  color: gold;
}

.sil {
  color: silver;
}

/* Highlighted imported text */
.highlight {
  color: #000;
  font-family: "Times New Roman", serif;
  font-size: medium;
  font-style: normal;
  font-variant-ligatures: normal;
  font-variant-caps: normal;
  font-weight: 400;
  letter-spacing: normal;
  orphans: 2;
  text-indent: 0;
  text-transform: none;
  white-space: normal;
  widows: 2;
  word-spacing: 0;
  -webkit-text-stroke-width: 0;
  background-color: #fff;
  text-decoration-thickness: initial;
  text-decoration-style: initial;
  text-decoration-color: initial;
}

/* Footer and article layout */
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background-color: #45a5ff;
  color: #fff;
  text-align: center;
}

footer div {
  font-size: 0.875rem;
  margin: 5px;
}

article {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* Keyboard accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #ff6600;
  outline-offset: 2px;
}

/* Responsive layouts */
@media (max-width: 768px) {
  .topnav {
    flex-direction: column;
    padding: 10px;
  }

  .topnav a {
    width: 100%;
    padding: 1rem;
  }

  .responsive {
    max-width: 100%;
  }

  .nav-list {
    position: absolute;
    top: 190px;
    right: 0;
    background-color: lightgrey;
    flex-direction: column;
    flex-wrap: wrap;
    width: 100%;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
  }

  .nav-list.active {
    height: 485px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-list li {
    margin: 15px 0;
    text-align: center;
    justify-content: center;
  }

  .responsive-table th,
  .responsive-table td {
    padding: 8px;
  }

  .responsive-table {
    display: block;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    display: block;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    text-align: center;
  }

  .responsive-table td {
    display: block;
    position: relative;
    text-align: left;
    padding-left: 5px;
    justify-content: center;
  }

  .responsive-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    font-weight: bold;
  }
}


/* =========================================
   BRATS LANDING PAGE LINKS TABLE
   FINAL VERSION
   ========================================= */

.brats-links-container {
    width: 85%;
    max-width: 850px;
    margin: 35px auto;
    padding: 20px;
    background-color: #faf8f0 !important;
    border: 1px solid #d8d0bd;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Remove all table and cell borders */
.brats-links-container table,
.brats-links-container table tbody,
.brats-links-container table tr,
.brats-links-container table td,
.brats-links-container table th {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background-color: #faf8f0 !important;
}

.brats-links-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

.brats-links-table td {
    padding: 18px 15px;
    vertical-align: middle;
}

.brats-links-table .link-image {
    width: 35%;
    text-align: center;
}

.brats-links-table .link-image img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    transition: transform 0.25s ease;
}

.brats-links-table .link-description {
    text-align: left;
}

.brats-links-table .link-description a {
    display: block;
    color: #333;
    text-decoration: none;
}

.brats-links-table .link-description strong {
    display: block;
    color: #483d8b;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.brats-links-table .link-description span {
    display: block;
    color: #666;
    font-size: 0.9rem;
}

/* Hover effect */
.brats-links-table tr:hover td {
    background-color: #f0ebdc !important;
}

.brats-links-table tr:hover img {
    transform: scale(1.04);
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .brats-links-container {
        width: 96%;
        padding: 6px;
    }

    .brats-links-table td {
        padding: 12px 8px;
    }

    .brats-links-table .link-description strong {
        font-size: 0.95rem;
    }

    .brats-links-table .link-description span {
        font-size: 0.8rem;
    }
}

/* TEST - REMOVE AFTERWARDS */
/*
body {
    outline: 8px solid lime !important;
}

.brats-links-container {
    background-color: yellow !important;
}

.brats-links-container table td {
    border: none !important;
    background-color: #faf8f0 !important;
}*/