/* ==========================================================
   Health Officer Orders Page
   Bootstrap Lite Replacement
   Safe with Slick Carousel
   ========================================================== */

#resources {
  margin-top: -3rem !important;
}

/* Base */
.banner {
  text-align: center;
}

.text-color {
  color: #fff !important;
}

.intro {
  font-size: 1.1rem;
}

.content-grid {
  width: 100%;
}

/* ==========================================================
   Bootstrap-like Grid
   ========================================================== */

.row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: -0.5rem;
}

.row>* {
  padding-inline: 0.5rem;
}

.col,
.col-12 {
  width: 100%;
}

.g-3 {
  gap: 0.75rem 0;
}

.g-4 {
  gap: 1rem 0;
}

.row-cols-1>* {
  width: 100%;
}

@media (min-width: 576px) {
  .row-cols-sm-2>* {
    width: 50%;
  }
}

@media (min-width: 768px) {
  .row-cols-md-3>* {
    width: 33.3333%;
  }
}

@media (min-width: 992px) {
  .row-cols-lg-3>* {
    width: 33.3333%;
  }

  .row-cols-lg-4>* {
    width: 25%;
  }
}

/* ==========================================================
   Spacing Utilities
   ========================================================== */

.p-2 {
  padding: 0.5rem;
}

.py-2 {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.px-3 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.4rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.ms-2 {
  margin-left: 0.5rem;
}

.mt-auto {
  margin-top: auto;
}

.mx-auto {
  margin-inline: auto;
}

/* ==========================================================
   Display / Flex Utilities
   ========================================================== */

.d-block {
  display: block;
}

.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

.h-100 {
  height: 100%;
}

.w-100 {
  width: 100%;
}

/* ==========================================================
   Text Utilities
   ========================================================== */

.text-white {
  color: #fff !important;
}

.text-dark {
  color: #212529 !important;
}

.text-muted {
  color: #6c757d !important;
}

.text-secondary {
  color: #5d6773 !important;
}

.text-primary {
  color: #0a53be !important;
}

.text-center {
  text-align: center;
}

.text-uppercase {
  text-transform: uppercase;
}

.fw-bold {
  font-weight: 700;
}

.fw-semibold {
  font-weight: 600;
}

.text-decoration-none {
  text-decoration: none !important;
}

/* ==========================================================
   Section Spacing
   ========================================================== */

#resources {
  padding-top: 0.5rem;
  padding-bottom: 1rem;
}

#resources .padding-content {
  padding-top: 0.5rem;
  padding-bottom: 0.75rem;
}

#resources>.padding-content>.row {
  margin-bottom: 1rem;
}

#resources>.padding-content>.row:last-child {
  margin-bottom: 0;
}

/* ==========================================================
   Section Headers
   ========================================================== */

#resources h2,
section h2 {
  width: 100%;
  margin-bottom: 0.5rem !important;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: linear-gradient(to right, #002454, #00439e);
  color: #fff;
  font-size: clamp(1.05rem, 3vw, 1.85rem);
  font-weight: 700;
  line-height: 1.3;
}

#resources h2.other-bckgrndColor,
.other-bckgrndColor {
  background: linear-gradient(to right, #2e88d8, #002454);
}

#resources h2.darkbckgrndColor,
.darkbckgrndColor {
  background: linear-gradient(to right, #002454, #00439e);
}

/* ==========================================================
   Cards
   ========================================================== */

.card {
  position: relative !important;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  overflow: visible !important;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card-body {
  flex: 1 1 auto;
  padding: 1rem;
}

.card-title {
  margin-top: 0;
  color: #1f2933;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

#resources a:hover .card,
#resources a:focus-visible .card,
#resources .card:hover,
#resources .card:focus-within {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2) !important;
  z-index: 10;
}

#resources a {
  border-radius: 8px;
}

#resources a:focus-visible {
  outline: 3px solid #d6a439;
  outline-offset: 4px;
}

/* ==========================================================
   Dropdowns
   ========================================================== */

.dropdown {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.dropdown-menu {
  left: 50%;
  transform: translateX(-50%);
  text-align: left;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid #6c757d;
  border-radius: 6px;
  background: #5d6773;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.dropdown-toggle::after {
  content: "▼";
  font-size: 0.65rem;
  line-height: 1;
}

/* Hide Bootstrap-style dropdown arrow */
.dropdown {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
}

.dropdown-menu {
  left: 50%;
  transform: translateX(-50%);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-toggle::after {
  display: none !important;
  content: none !important;
}

.btn {
  border: 0;
  text-decoration: none;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.875rem;
}

.btn-secondary {
  background: #5d6773;
  color: #fff;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: #48525b;
  color: #fff;
}

.dropdown-menu {
  position: absolute;
  z-index: 9999 !important;
  display: none;
  min-width: 12rem;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.35rem 0;
  margin: 0.25rem 0 0;
  list-style: none;
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 32, 91, 0.18);
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.55rem 0.9rem;
  clear: both;
  color: #002454 !important;
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: 0;
  font-weight: 600;
}

.dropdown-item:hover,
.dropdown-item:focus-visible,
.dropdown-menu li:hover .dropdown-item {
  background: #eef4fb;
  color: #000 !important;
}

/* Keep dropdowns visible inside cards */
#resources .row,
#resources .col,
#resources [class*="row-cols"]>* {
  overflow: visible !important;
}

/* ==========================================================
   Collapse / Accordion
   ========================================================== */

.collapse {
  display: none;
}

.collapse.show {
  display: block;
}

#resources .collapse {
  margin-top: 0.5rem !important;
}

h2[data-bs-toggle="collapse"] {
  user-select: none;
  cursor: pointer;
}

.accordion-icon,
h2[data-bs-toggle="collapse"] .accordion-icon {
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

h2[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

/* ==========================================================
   Footnote
   ========================================================== */

.footnote-container {
  background-color: #f9f6f2;
  color: #333;
  padding: 1rem 1.25rem;
  border-left: 4px solid #9c7e5c;
  border-radius: 6px;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0.75rem 0 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.footnote-container h3 {
  margin-top: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #9c7e5c;
}

.footnote-container ul {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.footnote-container li {
  margin-bottom: 0.8rem !important;
  padding-bottom: 0 !important;
}

/* ==========================================================
   Images / Misc
   ========================================================== */

img.d-block.w-100,
.w-100 {
  max-width: 100%;
  height: auto;
}

.column3alt-1 img {
  width: 100%;
}

.resource-card {
  transition: transform 0.2s ease;
}

.resource-card:hover {
  transform: scale(1.02);
}

.width-btn {
  max-width: 250px;
  width: 100%;
  margin: 0 auto;
}

.bg-dark-primary {
  background: rgb(0 36 84);
}

#langToggleBtn {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease-in-out;
}

#langToggleBtn:hover {
  transform: scale(1.05);
  background-color: #ffc107 !important;
  color: #000 !important;
}

.modal i {
  color: white !important;
}

.modal-dialog {
  max-height: 90vh;
  margin: 1.75rem auto;
}

.modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

.m-backtotop:hover,
.m-backtotop {
  background: #061c60 !important;
}

/* Fade transition */
.fade-transition {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.fade-transition.hidden {
  opacity: 0;
}

/* ==========================================================
   Mobile
   ========================================================== */

@media (max-width: 768px) {

  #resources h2,
  section h2 {
    font-size: 1.15rem;
  }
}

@media (max-width: 650px) {
  .banner>div.position-absolute {
    padding: 0.5rem 1rem;
  }

  .banner a.btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
  }

  .padding-content,
  .page-container {
    padding-inline: 0.75rem;
  }
}

@media (max-width: 600px) {
  #resources h2 {
    align-items: flex-start;
    font-size: 1rem;
  }

  .card-title {
    font-size: 1rem;
  }

  .footnote-container {
    font-size: 0.8rem;
    padding: 0.85rem 1rem;
  }

  .dropdown-menu {
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 480px) {

  #resources h2,
  section h2,
  .padding-content h2 {
    font-size: 1rem;
  }
}

@media (max-width: 320px) {

  #resources h2,
  section h2,
  .padding-content h2 {
    font-size: 0.95rem;
  }
}