html {
  background: #12121b;
  min-height: 100vh;
  /* Hide scrollbar for Chrome, Safari and Opera */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

body { 
  padding-top: 50px; 
  background: #12121b;
  min-height: 100vh;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}
.left-aligned { margin-left: auto; }
.bg-dark { background-color: #e3d4ad !important; }
.bg-hero { background-color: #e3d4ad; }

/* Navigation styling - make navbar thinner */
.navbar {
    padding: 0.25rem 0 !important;
    min-height: 40px !important;
}

.navbar-brand {
    font-size: 1.1rem !important;
    padding: 0.25rem 0 !important;
    font-weight: 700 !important; /* Make navbar brand text thicker */
}

.navbar-nav .nav-link {
    padding: 0.25rem 0.75rem !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important; /* Make navbar links thicker */
}

.navbar-toggler {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.9rem !important;
}

/* Navigation text color for beige background */
.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link {
    color: #132666 !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ea3231 !important;
}

.navbar-dark .navbar-toggler {
    border-color: #132666;
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2819, 38, 102, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Dropdown menu styling for beige background */
.dropdown-menu {
    background-color: #e3d4ad !important;
    border: 1px solid #132666;
}

.dropdown-item {
    color: #132666 !important;
}

.dropdown-item:hover {
    background-color: rgba(19, 38, 102, 0.1) !important;
    color: #132666 !important;
}

/* Header text color for beige background */
.bg-hero h1,
.bg-hero p {
    color: #132666 !important;
}

/* Content area text colors */
.container {
    color: #ffffff;
}

.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6 {
    color: #ffffff;
}

.container p {
    color: #ffffff;
}

.container li {
    color: #ffffff;
}

.container a {
    color: #66b3ff;
}

.container a:hover {
    color: #99ccff;
    text-decoration: underline;
}

/* CALLOUT */
.bd-callout { 
    padding:1.25rem; 
    margin-top:1.25rem; 
    margin-bottom:1.25rem; 
    border:1px solid rgba(19, 38, 102, 0.2); 
    border-left-width:.25rem; 
    border-radius:.5rem;
    background-color: #e3d4ad; /* beige */
    color: #132666; /* dark text for contrast */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.bd-callout h4 { 
    margin-bottom: 1.0rem;
    color: #132666;
}
.bd-callout p { 
    color: #132666;
}
.bd-callout a {
    color: #132666;
    text-decoration: underline;
}
.bd-callout a:hover {
    color: #ea3231;
}

/* Ensure callout colors win over template.css on results page */
.template-section .bd-callout { 
    background-color: #e3d4ad !important; /* beige */
    color: #132666 !important;            /* dark navy */
}
.template-section .bd-callout h4,
.template-section .bd-callout p,
.template-section .bd-callout li,
.template-section .bd-callout a {
    color: #132666 !important;
}
.template-section .bd-callout a:hover {
    color: #ea3231 !important;
}

/* Force dark navy title within this callout (overrides strong color) */
.template-section .bd-callout h4 strong {
    color: #132666 !important;
}
.bd-callout p:last-child { margin-bottom:0 }
.bd-callout code { 
    border-radius:.25rem;
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    padding: 2px 4px;
}
.bd-callout+.bd-callout { margin-top:-.25rem }
.bd-callout-info { border-left-color:#ea3231 }
.bd-callout-warning { border-left-color:#f0ad4e }
.bd-callout-danger { border-left-color:#d9534f }

/* footer */

footer { 
    color: #132666 !important; 
    background-color: #e3d4ad !important;
    position: relative !important;
    z-index: 1002 !important;
    margin-top: auto !important;
    width: 100% !important;
    clear: both !important;
}
footer h4, footer h5 { 
    color: #132666 !important; 
    font-weight: 600;
    font-size: 1rem !important;
}
footer p { 
    color: #132666 !important; 
    font-size: 0.85rem !important;
    margin-bottom: 0.25rem !important;
}
footer a { 
    color: #132666 !important; 
    font-weight: bold; 
    text-decoration: none; 
}
footer a:hover { 
    color: #ea3231 !important; 
    text-decoration: underline; 
}
footer .subfoot { 
    color: #132666 !important; 
}
footer li {
    color: #132666 !important;
}
footer small {
    color: #132666 !important;
}
footer * {
    color: #132666 !important;
}

/* Table of Contents Sidebar */
.toc-sidebar {
    position: fixed;
    top: 56px;
    right: -300px;
    width: 300px;
    height: calc(100vh - 56px);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    border-left: 3px solid #e3d4ad;
}

.toc-sidebar.open {
    right: 0;
}

.toc-toggle {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1001;
    background: #e3d4ad;
    color: #132666;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.toc-toggle:hover {
    background: #132666;
    color: #e3d4ad;
    transform: translateY(-2px);
}

.toc-content {
    padding: 20px;
}

.toc-content h3 {
    color: #e3d4ad;
    margin-bottom: 20px;
    font-size: 1.2rem;
    border-bottom: 2px solid #e3d4ad;
    padding-bottom: 10px;
}

.toc-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-content li {
    margin-bottom: 5px;
}

.toc-content a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-size: 0.9rem;
}

.toc-content a:hover {
    background: rgba(227, 212, 173, 0.2);
    color: #e3d4ad;
    border-left-color: #e3d4ad;
    transform: translateX(5px);
}

.toc-content a.active {
    background: rgba(227, 212, 173, 0.3);
    color: #e3d4ad;
    border-left-color: #e3d4ad;
}

/* Indentation levels */
.toc-content .level-1 {
    padding-left: 15px;
}

.toc-content .level-2 {
    padding-left: 30px;
    font-size: 0.85rem;
    color: #cccccc;
}

.toc-content .level-3 {
    padding-left: 45px;
    font-size: 0.8rem;
    color: #aaaaaa;
}

/* Overlay for mobile */
.toc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.toc-overlay.show {
    display: block;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #e3d4ad;
    color: #132666;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: #132666;
    color: #e3d4ad;
    transform: scale(1.1);
}

.back-to-top.show {
    display: block;
}

/* Improved spacing and styling */
.container {
    color: #ffffff;
    padding: 20px 15px;
}

.row {
    margin-bottom: 30px;
}

.col {
    padding: 0 15px;
}

/* Better typography spacing */
h1, h2, h3, h4, h5, h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    margin-top: 0;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid #e3d4ad;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.5rem;
    color: #e3d4ad;
}

h4 {
    font-size: 1.25rem;
    color: #e3d4ad;
}

p {
    margin-bottom: 15px;
    line-height: 1.6;
}

ul, ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Better table spacing */
.template-table-wrapper {
    margin: 25px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

table {
    margin: 0;
}

/* Better image spacing */
.image-container {
    margin: 25px 0;
    text-align: center;
}

.image-container img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.02);
}

/* Center all images, carousels, and graphs */
.image-enlarge-container {
    text-align: center !important;
    margin: 25px auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-direction: column !important;
    width: 100% !important;
}

.image-enlarge-container img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.3s ease !important;
    margin: 0 auto !important;
    display: block !important;
}

.image-enlarge-container img:hover {
    transform: scale(1.02) !important;
}

/* Center carousels */
.carousel {
    margin: 25px auto !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

.carousel-inner {
    text-align: center !important;
    width: 100% !important;
}

.carousel-item {
    text-align: center !important;
    width: 100% !important;
}

.carousel-item img {
    margin: 0 auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Center all other images */
img {
    display: block ;
    margin: 25px auto ;
    max-width: 100% ;
    height: auto ;
    border-radius: 8px ;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) ;
    transition: transform 0.3s ease ;
    text-align: center ;
}

img:hover {
    transform: scale(1.02) ;
}

/* Ensure all images are centered regardless of parent container */
.container img,
.template-section img,
.template-container img,
body img {
    display: block;
    margin-left: auto ;
    margin-right: auto ;
    text-align: center ;
}

/* Center embedded content */
embed {
    display: block;
    margin: 25px auto;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Ensure all carousels are centered in any context */
.container .carousel,
.template-section .carousel,
.template-container .carousel,
body .carousel {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Center divs with specific styling */
div[style*="width: 100%; max-width: 800px; margin: 20px auto;"] {
    text-align: center;
}

/* Center tables */
.template-table-wrapper {
    margin: 25px auto;
    text-align: center;
}

.template-table-wrapper table {
    margin: 0 auto;
}

/* Accordion styling for human practices page */
.accordion {
    margin: 25px 0;
}

.accordion-item {
    background-color: transparent;
    border: 1px solid #e3d4ad;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

/* Ensure readable contrast by default (no hover required) */
.accordion-button {
    background-color: #132666; /* dark navy */
    color: #e3d4ad; /* beige text */
    border: none;
    font-weight: bold;
    padding: 15px 20px;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover uses red accent for better contrast */
.accordion-button:hover {
    background-color: #ea3231; /* red background */
    color: #ffffff; /* white text */
}

.accordion-button:not(.collapsed) {
    background-color: #132666;
    color: #e3d4ad;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(227, 212, 173, 0.25);
    border-color: #e3d4ad;
}

.accordion-body {
    background-color: rgba(227, 212, 173, 0.1);
    color: #ffffff;
    padding: 20px;
    border-top: 1px solid #e3d4ad;
}

.accordion-body p {
    color: #ffffff;
    margin-bottom: 15px;
}

.accordion-body ul {
    color: #ffffff;
    margin-bottom: 15px;
}

.accordion-body li {
    color: #ffffff;
    margin-bottom: 8px;
}

.accordion-body strong {
    color: #e3d4ad;
    font-weight: bold;
}

/* Code blocks */
pre {
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border-left: 4px solid #e3d4ad;
}

code {
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        left: -100%;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-toggle {
        left: 10px;
        top: 60px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 15px 10px;
    }
}

/* Strengthen global centering without breaking layout utilities */
.image-enlarge-container,
.template-section .image-enlarge-container,
.template-container .image-enlarge-container {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-direction: column !important;
    width: 100% !important;
}

.image-enlarge-container img,
.template-section .image-enlarge-container img,
.template-container .image-enlarge-container img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Additional centering rules for all carousels */
.carousel,
.template-section .carousel,
.template-container .carousel,
.image-enlarge-container .carousel {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

.carousel-inner,
.template-section .carousel-inner,
.template-container .carousel-inner {
    text-align: center !important;
    width: 100% !important;
}

.carousel-item,
.template-section .carousel-item,
.template-container .carousel-item {
    text-align: center !important;
    width: 100% !important;
}

.carousel-item img,
.template-section .carousel-item img,
.template-container .carousel-item img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
}
