/* Font Settings */
@font-face {
  font-family: 'Atkinson-Hyperlegible';
  src: url(/fonts/Atkinson-Hyperlegible-Regular-102a.woff2) format('woff2'),
       url(/fonts/Atkinson-Hyperlegible-Regular-102.woff) format('woff'),
       url(/fonts/Atkinson-Hyperlegible-Regular-102.ttf) format('truetype');
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: 'Atkinson-Hyperlegible';
  src: url(/fonts/Atkinson-Hyperlegible-Bold-102a.woff2) format('woff2'),
       url(/fonts/Atkinson-Hyperlegible-Bold-102.woff) format('woff'),
       url(/fonts/Atkinson-Hyperlegible-Bold-102.ttf) format('truetype');
  font-style: bold;
  font-weight: 700;
}

html {
  font-family: "Atkinson-Hyperlegible", Arial, sans-serif !important;
}

:root {
  --primary: #072AC8; /* Main Colour - Hyperlinks, H1, H2 */
  --secondary: #F58A07; /* Accent Colour - Borders, Linebreaks, Table Header Backgrounds */
  --tertiary: #333333; /* Extra Colour - H3, H4, H5, Bars, Bar Hyperlinks */
  --white: #FFFFFF; /* White - Background for Body, Header, Cards, Blurbs and Details, Table Header Text, Carousel Buttons */
  --offwhite: #F6F6F6; /* Off-White - Background for Main, Blackquotes, Tables and Bars Hyperlink Hover, and Bars Hyperlinks */
  --grey: #D1D1D1; /* Grey - Box Shadow */
}

/* Text Styling */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  overflow-wrap: break-word;
  margin: 0px;
}

h1, h2 {
  color: var(--primary);
}

h3, h4, h5 {
  color: var(--tertiary);
}

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

p { margin-top: 0px; }

b, strong { padding-bottom: 1px; }

small, sub, sup { font-size: 75%; }

::selection {
  color: var(--white);
  background: var(--primary);
}

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

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

/* Borders */
hr {
  border: 0.5px solid var(--secondary);
  margin-top: 2em;
  margin-bottom: 2em;
  align-items: center;
}

/* Media Handling */
img, video {
  height: auto;
  max-width: 100%;
  padding: 0.5em;
  cursor: pointer; /* Change cursor to a hand when hovering over images */
}

/* Preview Styling */
.preview img {
  width: 100%;
  padding: 4px;
}

.preview h3 {
  margin-bottom: 0.5em;
  text-align: center;
}

/* Global Box Sizing */
* {
  box-sizing: border-box;
}

/* Body Styling */
body {
  padding: 10px;
  background: var(--white);
}

/* Header Styling */
.header {
  padding: 30px;
  text-align: center;
  background: var(--white);
}

.header h1 {
  font-size: 50px;
}

/* Navigation Bars */
.topnav, .topbar, .footer {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--tertiary);
}

.topbar { justify-content: left; }

.topnav ul, .topbar ul, .footer ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.topnav li, .topbar li, .footer li { margin: 0; }

.topnav a, .topbar a {
  display: block;
  color: var(--offwhite);
  text-align: center;
  padding: 1em;
  text-decoration: none;
}

.topnav a:hover, .topbar a:hover, .footer a:hover {
  background-color: var(--offwhite);
  color: var(--tertiary);
  text-decoration: underline;
}

/* Main Container */
.main {
    max-width: 90%;
    margin: 0 auto;
    padding-bottom: 2em;
    background-color: var(--offwhite);
    box-shadow: 0 4px 8px var(--grey);
    border-left: 1px solid var(--secondary);
    border-right: 1px solid var(--secondary);
    border-bottom: 1px solid var(--secondary);
    overflow: hidden;

  }

/* Row Container for Posts */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* Card Style for Articles */
.card {
  flex: 1 1 100%;
  max-width: 400px;
  background-color: var(--white);
  padding: 10px;
  margin-top: 0.5em;
  margin-left: 2.5em;
  margin-right: 2.5em;
  margin-bottom: auto;
  box-shadow: 0 4px 8px var(--grey);
  border: 1px solid var(--secondary);
}

.cardproduct {
  max-width: 100%;
  background-color: var(--white);
  padding: 20px;
  box-shadow: 0 4px 8px var(--grey);
  border: 1px solid var(--secondary);
}

.cardproduct h2 {
  margin-left: 0px;
  border-left: 6px solid var(--secondary);
  padding-left: 10px;
  text-align: left;
}

.cardproduct h3, h4 {
  margin-left: 0px;
  margin-top: 0.5em;
  margin-bottom: -0.5em;
  padding-left: 10px;
  text-align: left;
}

.cardproduct p {
  margin-left: 0px;
  margin-top: 1em;
  padding-left: 10px;
  text-align: left;
}

.blurbcontainer {
    display: flex;
    justify-content: center;
    align-items: center;
}

.blurb {
  max-width: 90%;
  background-color: var(--white);
  padding: 20px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2em;
  margin-bottom: 2em;
  box-shadow: 0 4px 8px var(--grey);
  border: 1px solid var(--secondary);
}

.blurb h2 {
  margin-left: 0px;
  border-left: 6px solid var(--secondary);
  padding-left: 10px;
  text-align: left;
}

.blurb h1 {
  margin-left: 0px;
  border-left: 6px solid var(--secondary);
  padding-left: 10px;
  text-align: left;
}


.blurb p {
  margin-top: 0.5em;
  text-align: left;
}

.title {
  margin-left: 2.5em;
  margin-right: 2.5em;
  margin-top: 2.5em;
  margin-bottom: 10px;
  max-width: 100%;
  background-color: var(--white);
  padding: 20px;
  box-shadow: 0 4px 8px var(--grey);
  border: 1px solid var(--secondary);
}

.order p {
  text-align: center;
  font-size: 2.5em;
  font-weight: 700;
  margin: 0;
}

p.button-link {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid  var(--secondary);
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  color: var(--primary);
  font-weight: bold;
  margin: 10px 0;
  transition: background-color 0.3s ease;
}

p.button-link:hover {
  background-color: var(--secondary);
  border: 1px solid  var(--secondary);
  color: var(--white);
}

p.button-link a {
  color: inherit;
  text-decoration: none;
}


/* Responsive Layout for Cards */
@media screen and (min-width: 600px) {
  .card { flex: 1 1 calc(50% - 40px); }
}

@media screen and (min-width: 900px) {
  .card { flex: 1 1 calc(33.33% - 40px); }
}

/* Carousel and Infobox Layout */
.container {
    display: flex;

    justify-content: space-between;
    margin: 20px;
}

.column {
    padding: 10px;
    flex: 1; /* Grow to fill space */
    margin: 0 10px; /* Margin between columns */
}

.left {
    /* Additional styles for left column if needed */
}

.right {
    /* Additional styles for right column if needed */
}

/* Carousel Styling */
.carousel {
  position: relative;
  width: 100%; /* Full width of the parent */
  overflow: hidden; /* Prevent overflow */
}

.carousel-slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-slide {
  flex: 0 0 100%;
  background-size: contain; /* Adjusted to contain to show the full image */
  background-position: center; /* Center the image */
  background-repeat: no-repeat; /* Prevent image from repeating */
  aspect-ratio: 16 / 9; /* Maintain the aspect ratio */
  width: 100%;
  height: auto; /* Ensure height adjusts based on the content */
}

/* Adjust Button Positioning */
.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 18px;
  z-index: 10; /* Ensure buttons are on top */
}

.carousel-button.prev {
  left: 10px;
}

.carousel-button.next {
  right: 10px;
}

/* Details */

.detailsbox {
  flex: 0 1 auto; /* Take only necessary space */
  max-width: 600px; /* Maximum width */
  width: 100%; /* Full width */
  background-color: var(--white);
  padding: 1em; /* Remove padding to avoid layout push */
  margin-top: 2.5em;
  box-shadow: 0 4px 8px var(--grey);
  border: 1px solid var(--secondary);
  overflow: hidden; /* Keeps overflow hidden, if necessary */
}

/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  display: block;
  margin: auto;
  max-width: 80%; /* Change this for the desired size */
  max-height: 80%; /* Change this for the desired size */
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: var(--white);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

/* Stacking on Smaller Screens */
@media screen and (max-width: 1080px) {
  .container {
    flex-direction: column; /* Stack items on smaller screens */
  }

  .carouselimage, .infobox {
    flex: 1 1 100%; /* Full width on smaller screens */
    max-width: 100%; /* Prevents overflow */
    padding: 10px 0; /* Vertical padding for alignment */
  }
}

/* Pagination */
.pagination {
  text-align: center;
  padding: 1em;
  margin: 1em;
}

/* Blockquote Styling */
blockquote {
  border-left: 5px solid var(--secondary); /* Border to the left */
  padding: 10px 20px; /* Padding around text */
  margin: 20px 0; /* Margin for spacing */
  background-color: var(--offwhite); /* Light background to distinguish */
}

blockquote p {
  margin: 0; /* Remove margin from paragraphs inside blockquotes */
}

/* Table Styling */
table {
  width: 100%; /* Full width */
  border-collapse: collapse; /* Collapse borders */
  margin: 20px 0; /* Margin for spacing */
}

th, td {
  border: 1px solid var(--secondary); /* Border for cells */
  padding: 10px; /* Padding for cells */
  text-align: left; /* Left align text */
}

th {
  background-color: var(--secondary); /* Header background color */
  color: var(--white); /* Header text color */
  font-weight: 700; /* Bold text for headers */
}

tr:nth-child(even) {
  background-color: var(--offwhite); /* Zebra striping for rows */
}

/* Footer */
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--tertiary);
}

.footer a {
  color: var(--offwhite);
  padding: 1em;
}

.footer a:hover {
  background-color: var(--offwhite);
}
