html, body {
    height: 100%;
    margin: 0;
}
body {
    background-color: #EEEEEE;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Lato', sans-serif;
}

/* Lato font-face declarations */
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 300;
    src: url("../vendor/lato/Lato-Light.ttf") format("truetype");
}
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    src: url("../vendor/lato/Lato-Regular.ttf") format("truetype");
}
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 700;
    src: url("../vendor/lato/Lato-Bold.ttf") format("truetype");
}

/* BACKGROUNDS */


/* filter button on archive */
.filter-button {
    background-color: #e0e0e0; /* light grey */
    border: 2px solid #000;   /* black outline */
    color: #000;              /* icon/text color */
}

.filter-button:hover {
    background-color: #d0d0d0; /* slightly darker on hover */
}
.filter-panel {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    border-radius: 8px;
    max-width: 300px;
}

.tag_card_list {
    display: flex;
    justify-content: center;
    align-items: center; /* vertical centering if there's a height */
    height: 100%; /* optional: needed for vertical centering to work */
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}


.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tag-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    width: 74px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(0deg, rgba(255, 227, 154, 0.64) 0%, rgba(163, 145, 97, 0.80) 100%);
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #000;
    text-align: center;
    padding: 0 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bg-gold{
    background-color: #A39161;
}

.bg-grey {
    background-color: #F7F7F8;
}


/* TEXT  */
.text-green {
    color: #044D44;
}

.text-gold {
    color: #A39161;
}

/* BUTTONS */
.btn-grey{
    background: #D9D9D9;
    color: #044D44;
}

.btn-grey:hover{
    background: #A39161;
    color: #D9D9D9;
    border: 1px solid #D9D9D9;
}

.btn-green {
    background: #044D44;
    color: white;
}

.btn-green:hover {
    background: white;
    color: #044D44;
    border: 1px solid #044D44;
}

.btn-gold {
    background: #A39161;
    color: white;
}

.btn-gold:hover {
    background: white;
    color: #A39161;
    border: 1px solid #A39161;
}

/* NAVBAR */
.custom-navbar {
    background-color: #044D44; /* Deep green */
    color: white;
}

.custom-navbar .navbar-nav .nav-link,
.custom-navbar .navbar-brand,
.custom-navbar .navbar-toggler,
.custom-navbar .btn {
    color: white;
}

.custom-navbar .nav-link:hover,
.custom-navbar .btn:hover {
    color: #cccccc;
}

.custom-navbar .navbar-toggler-icon {
    filter: invert(1); 
}

.nav-btn {
    margin-right: 0.5rem;
}

/* Navbar dropdown */
.custom-navbar .dropdown-menu {
    background-color: rgba(4, 77, 68, 1);
    border-radius: 0;
}

.dropdown-menu li {
    margin-bottom: 1rem;
}

.custom-navbar .dropdown-menu .dropdown-item {
    color: #ffffff;
}

.custom-navbar .dropdown-menu .dropdown-item:last-child {
    margin-bottom: 0;
}

.custom-navbar .dropdown-menu .dropdown-item:hover,
.custom-navbar .dropdown-menu .dropdown-item:focus {
    background: none;
    color: #A39161;
    text-decoration: underline;
}

.dropdown-menu[data-bs-popper] {
    top: 150%;
    left: 0;
}

/* CARDS  */
.card {
    background: rgba(163, 145, 97, 0.25);
    border: none;
    border-radius: 0;
}

.image-cards-section {
    padding: 1rem 0;
}

.image-card {
    position: relative;
    height: 300px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.image-card__image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    color: white;
    transition: background-color 0.3s ease;
}

.image-card:hover .image-card__overlay {
    background: rgba(0, 0, 0, 0.7);
}

.image-card__title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.image-card__text {
    color: rgba(255, 255, 255, 0.9);
}
  
.badge {
    padding: 0.5em 0.75em;
    font-size: 0.85rem;
    border-radius: 1rem;
}

.pillar-box,
.document-listing-block-item,
.contract-block-item {
    background-color: white;
    padding: 0.2em 1em;
}

.block-contract_list ul,
.block-document_list ul {
    padding-left: 0;
    display: block;
}

.block-contract_list ul li,
.block-document_list ul li {
    padding-left: 0;
    display: block;
}

.contract-block-item .icon,
.block-document_list .icon {
    height: 1em;
    width: 1em;
    margin: 0 .25em;
}

.hero-section {
    background-color: rgba(4, 77, 68, 0.8);
    color: white;
    padding: 3rem 0;
}

.hero-section a {
    color: #fff;
}

.hero-section a:hover,
.hero-section a:focus {
    color: #A39161;
}

.search-form {
    display: flex;
    width: 100%;
    max-width: 700px;
    border-radius: 8px;
}

.search-input {
    flex-grow: 1;
    border: none;
    border-radius: 0.5em 0 0 0.5em;
    padding: 12px 16px;
    font-size: 16px;
    outline: none;
}

.search-btn {
    background-color: rgba(163, 145, 97, 0.8);
    border: none;
    border-radius: 0 0.5em 0.5em 0;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn i {
    color: #3d3d3d;
    font-size: 16px;
}

.quick-links-section {
    padding: 2em 0 0;
}

.quick-links-href {
    color: #2C55A2;
    display: block;
    margin-bottom: 0.6em;
}

.quick-links-href:hover,
.quick-links-href:focus {
    color: #1e3f7f;
    text-decoration: underline;
}

.richtext-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 6em;
  }


/* FOOTER  */
footer {
    background: rgba(163, 145, 97, 0.5);
    padding: 2em 0;
    color: #044D44;
    margin-top: auto;
}

.footer-section {
    padding: 20px 15px;
}

.footer-section h4 {
    margin-bottom: 20px;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-address {
    margin-bottom: 20px;
}

.footer-link {
    margin-top: 10px;
}

.footer-touch {
  display: inline-flex;
  gap: 0.5em;
  color: #044D44;
}

.footer-touch i {
  margin-right: 0.5rem; 
}

.breadcrumb-content {
    padding: 1em 1em 0;
}

.breadcrumb-content li {
    margin-left: .5rem;
}

.breadcrumb-content li::after {
    padding-left: 0.5rem;
    content: "/";
}

.breadcrumb-content li.active::after {
    content: "";
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb-link {
  text-decoration: none;
  color: #A39161;
}

.breadcrumb-link:hover {
  text-decoration: underline;
  color: #A39161;
}

.breadcrumb-current {
  font-weight: bold;
  color: #212529;
}

.archive-search-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem; 
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem; 
}

.archive-search-form {
    flex-grow: 1;
}

@media (min-width: 992px) { 
    .archive-search-wrapper {
        max-width: 50%;
    }

    .archive-search-form {
        flex-grow: 0;
        flex: 1 1 auto;
    }
}

/* Overlay */
.filter-overlay {
    display: none;         
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 998;
}

/* Panel */
.filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 90%;
    max-width: 400px;
    height: 100vh;
    background: linear-gradient(to bottom right, #004d40, #00695c);
    padding: 2rem;
    box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    color: white;
}

.filter-panel.active {
    transform: translateX(0%);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    border: none;
    background-color: #f4f4f4;
    color: #333;
}

.filter-actions {
    margin-top: 2rem;
}

.btn.filter-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: #bfa145;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

.block-with-embeds iframe {
    aspect-ratio: 16 / 9;
    width: 70%;
    height: auto;
    min-width: 40vw;
}

/* Decision Tree Card Grid */
.dt-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(163, 145, 97, 0.10);
    padding: 2rem 1rem 1.5rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #044D44;
    transition: 0.3s, color 0.3s;
    min-height: 180px;
    border: 1px solid #eee;
}
.dt-card:hover {
    background: #A39161;
    color: #fff;
}
.dt-card.answer-card:hover {
    background: #fff;
    color: #044D44;
}
.dt-card-icon {
    font-size: 2.5rem;
    color: #A39161;
    margin-bottom: 0.5rem;
}
.dt-card:hover .dt-card-icon {
    color: #fff;
}
.dt-card-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 0.5rem;
}
 
@media (max-width: 767px) {
  .row-cols-md-3 > .col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* CSO INDICES */
.embed-container  {
    background: white;
    padding: 1em;
    margin-bottom: 2em;
}

.buttons-csv {
    background: #A39161 !important;
    color: white;
    border: 1px solid #A39161 !important;
}

.buttons-csv:hover {
    background: white !important;
    color: #A39161 !important;
    border: 1px solid #A39161 !important;
}

.buttons-print {
    background: #044D44 !important;
    color: white;
    border: 1px solid #044D44 !important;
}

.buttons-print:hover {
    background: white !important;
    color: #044D44 !important;
    border: 1px solid #044D44 !important;
}

th.text-right.text-light.bg-primary.font-weight-bold.sorting {
    background: #A39161 !important;
}

.block-embed_block iframe[src*="youtube.com/embed"] {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
  margin-bottom: 1em;
}

/* Tag pill styles for archive filters */
.selected-filters .selected-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  background-color: #fff; 
  color: #212529;
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  box-shadow: none;
}

.tag-pill .tag-label {
  margin-right: 0.35rem;
}

.tag-pill .tag-remove {
  background: transparent;
  border: none;
  color: #6c757d;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.tag-pill .tag-remove:hover {
  color: #000;
}

.archive-search-wrapper + .selected-filters {
  margin-left: 0.25rem;
}

/* Improved styling for complex tables (Wagtail complex_table block) */
.block-complex_table {
    margin: 1.25rem 0;
}

.block-complex_table .table-wrapper {
    width: 100%;
    overflow-x: auto; /* allow horizontal scroll on small screens */
    -webkit-overflow-scrolling: touch;
    background: transparent;
    border-radius: 6px;
}

.block-complex_table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px; /* give narrow tables some breathing room */
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.block-complex_table caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    color: #044D44;
    padding: .5rem 0;
    font-size: 1rem;
}

.block-complex_table thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #A39161 0%, #8f7a50 100%);
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    vertical-align: middle;
    border-bottom: 2px solid rgba(0,0,0,0.06);
}

.block-complex_table tbody td {
    padding: 12px 14px;
    vertical-align: top;
    border-top: 1px solid rgba(0,0,0,0.04);
    color: #212529;
}

.block-complex_table tbody tr:nth-child(odd) {
    background: #faf9f7; 
}

.block-complex_table tbody tr:hover {
    background: rgba(163,145,97,0.06);
}

.block-complex_table a {
    color: #044D44;
    text-decoration: underline;
}
.block-complex_table a:hover {
    color: #A39161;
}

.block-complex_table td img,
.block-complex_table td .richtext-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: .35rem 0;
    border-radius: 4px;
}

.block-complex_table th, .block-complex_table td {
    word-break: break-word;
}

@media (max-width: 767px) {
    .block-complex_table thead th,
    .block-complex_table tbody td {
        padding: 10px 8px;
        font-size: 0.95rem;
    }
    .block-complex_table table {
        min-width: 420px;
    }
}

.block-complex_table table.table-striped tbody tr:nth-of-type(odd) {
    background-color: transparent; 
}


