.header {
  background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url("../images/header-background.jpg") center center no-repeat;
  background-size: cover;
  flex: 1 0 auto; /* grow to fill available space, don't shrink below content */
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
}

.templatepage {
  flex-grow: 1;
}

.templatepage,
.bg-primary {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  max-width: 100vw;
  overflow-x: hidden;
}

.longshortpage {
  flex: 1 0 auto; /* grow to fill available space, don't shrink below content */
  min-height: 0; /* allow proper scrolling inside when content overflows */
}

.longshortpage,
.bg-primary {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  max-width: 100vw;
  overflow-x: hidden;
}

.mypools-page {
  flex: 1 0 auto; /* grow to fill available space, don't shrink below content */
  min-height: 0; /* allow proper scrolling inside when content overflows */
  overflow-x: auto;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

.show-description {
  width: 370px;
  height: 500px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
  color: #000000;
}

.show-title {
  font-weight: bold;
  color: #000000;
}

.show-details {
  margin-top: 15px;
}

.show-announcement {
  width: 370px;
  height: 100px;
  border-radius: 8px;
  color: #000000;
  box-sizing: border-box;
  text-align: center;
  flex-shrink: 0; /* prevent it from collapsing in flex context */
}

.wrap-text {
  white-space: normal !important;
  word-wrap: normal;
  overflow-wrap: normal;
}

.font-90 {
  font-size: 90% !important;
}

.btn-xs {
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
}

.g-recaptcha {
  margin: 0 auto;
}

.fw-medium {
  font-weight: 500;
}

.modal-dialog {
  max-width: 90%;
}

th,
td {
  white-space: nowrap;
}

th.sticky-col,
td.sticky-col {
  position: -webkit-sticky; /* for Safari */
  position: sticky;
  left: 0;
  background-color: white;
  z-index: 1;
  border-right: 1px solid #dee2e6;
}

th.sticky-col {
  z-index: 2;
}

.big-wide-table {
  table-layout: fixed;
  width: 100%;
}
.big-wide-table th,
.big-wide-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 150px;
}

.about-section {
  padding: 20px 20px !important;
  background-color: #f9f9f9;
  color: #333;
  text-align: left;
}

.story-text {
  line-height: 1.6;
  margin-bottom: 30px;
}

.content-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 30px;
}

.content-text {
  flex: 1;
  min-width: 300px;
  padding-right: 20px;
}

.content-image {
  flex-shrink: 0;
}

th.vertical-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  padding: 5px;
  width: 20px;
  white-space: nowrap;
  vertical-align: bottom;
  text-align: center;
}

/* iPhone horizontal header styling */
/* .big-wide-table header */
.ios-header {
  width: 140px; /* set the exact width you want per column */
  min-width: 140px; /* prevent columns from shrinking */
  max-width: 140px; /* enforce uniformity */
  display: table-cell; /* keep table behavior */
  vertical-align: bottom;
  text-align: center;
  padding: 4px;
  box-sizing: border-box;
  white-space: nowrap; /* prevent wrapping */
  overflow: hidden; /* hide overflow */
  text-overflow: ellipsis; /* add ellipsis for long text */
  font-size: 12px; /* adjust for readability */
}

/* Deep Navy */
.bg-deep-navy {
  background-color: #002244;
  color: #fff5e1;
  transition: background-color 0.3s ease;
}
.bg-deep-navy:hover, .bg-deep-navy:focus {
  background-color: #001833;
  color: #fff5e1;
}

/* Deep Maroon */
.bg-deep-maroon {
  background-color: #660000;
  color: #fff5e1;
  transition: background-color 0.3s ease;
}
.bg-deep-maroon:hover, .bg-deep-maroon:focus {
  background-color: #4d0000;
  color: #fff5e1;
}

/* Deep Pale Beige */
.bg-pale-beige {
  background-color: #f4e1c1;
  color: #222222;
  transition: background-color 0.3s ease;
}
.bg-pale-beige:hover, .bg-pale-beige:focus {
  background-color: #d7c3a3;
  color: #222222;
}

/* Soft Maroon */
.bg-soft-maroon {
  background-color: #802b2b;
  color: #fff5e1;
  transition: background-color 0.3s ease;
}
.bg-soft-maroon:hover, .bg-soft-maroon:focus {
  background-color: #661f1f;
  color: #ffffff;
}

/* Muted Rosewood */
.bg-muted-rosewood {
  background-color: #aa4a44;
  color: #222222;
  transition: background-color 0.3s ease;
}
.bg-muted-rosewood:hover, .bg-muted-rosewood:focus {
  background-color: #8f3f3a;
}

/* Warm Brick */
.bg-warm-brick {
  background-color: #b85750;
  color: #222222;
  transition: background-color 0.3s ease;
}
.bg-warm-brick:hover, .bg-warm-brick:focus {
  background-color: #9e4a45;
}

.text-deep-maroon {
  color: #660000;
}

.text-deep-navy {
  color: #002244;
}

/* Extra Small screens (max-width: 576px) */
@media (max-width: 576px) {
  /* Global extra-small screen table adjustments */
  table th,
  table td {
    font-size: 80%;
    padding: 0.2rem;
  }
  /* Make form controls and buttons match table font size */
  input,
  select,
  select option,
  button,
  .btn-xs,
  .form-label,
  .form-check-label {
    font-size: 80%;
  }
  .btn-sm {
    font-size: 90%;
  }
  /* Optional: keep other tweaks */
  .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
  /* Modal styles */
  .modal-dialog {
    max-width: 95%;
    margin: 0.5rem;
  }
  /* Navbar toggler - 10% smaller than default */
  .navbar-toggler {
    padding: 0.225rem 0.675rem;
    font-size: 1.125rem;
    border-width: 0.9px;
  }
  .navbar-toggler-icon {
    width: 27px;
    height: 27px;
    background-size: 27px 27px;
  }
  .mypools-page {
    overflow-x: hidden !important;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
}
/* Small to Medium screens (max-width: 768px) */
@media (max-width: 768px) {
  /* Big wide table styles */
  .big-wide-table th.vertical-text,
  .big-wide-table td {
    width: 30px !important;
    padding: 2px;
  }
  .big-wide-table th.sticky-col,
  .big-wide-table td.sticky-col {
    width: 120px !important;
    padding: 2px;
  }
}
/* Medium screens (769px to 992px) */
@media (min-width: 769px) and (max-width: 992px) {
  /* Big wide table styles */
  .big-wide-table th.vertical-text,
  .big-wide-table td {
    width: 40px !important;
    padding: 3px;
  }
  .big-wide-table th.sticky-col,
  .big-wide-table td.sticky-col {
    width: 160px !important;
    padding: 3px;
  }
}
/* Large screens and below (max-width: 992px) */
@media (max-width: 992px) {
  /* Navbar styles */
  .navbar {
    background: var(--bs-dark);
  }
}
