/* Custom Brand Colors & Accessibility */
:root {
    --brand-primary: #691816;
    --brand-secondary: #EBB934;
    --brand-accent: #ECC9A8;
    --brand-bg: #F1F5F8;
    --brand-dark: #1C1719;
    --brand-highlight: #C63C26;

    /* RGB Values for Bootstrap Overrides */
    --brand-primary-rgb: 105, 24, 22;
    --brand-secondary-rgb: 235, 185, 52;

    /* Bootstrap Overrides */
    --bs-primary: var(--brand-primary);
    --bs-primary-rgb: var(--brand-primary-rgb);
    --bs-secondary: var(--brand-secondary);
    --bs-secondary-rgb: var(--brand-secondary-rgb);
    --bs-body-bg: var(--brand-bg);
    --bs-body-color: var(--brand-dark);
    --bs-link-color: var(--brand-primary);
    --bs-link-hover-color: var(--brand-highlight);
}

body {
    font-family: 'Lexend', 'Baloo Tamma 2', 'Segoe UI', Arial, sans-serif;
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* High Contrast Mode Overrides */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast .bg-light,
body.high-contrast .bg-white,
body.high-contrast .card,
body.high-contrast .list-group-item {
    background-color: #222 !important;
    color: #fff !important;
    border-color: #fff !important;
}

body.high-contrast a {
    color: #ffff00 !important;
}

body.high-contrast .btn-primary,
body.high-contrast header {
    background-color: #ffff00 !important;
    color: #000 !important;
}

/* Header Styling */
header {
    background-color: var(--brand-primary);
    border-bottom: 4px solid var(--brand-secondary);
}

.logo-placeholder {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-weight: bold;
}

/* Carousel Overlay */
.carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 5px;
}

/* Principal Image Placeholder */
.principal-img {
    width: 150px;
    height: 180px;
    background: #ccc;
    object-fit: cover;
}

/* Custom Color Utilities & Overrides */
.bg-dark {
    background-color: var(--brand-dark) !important;
}

.bg-light {
    background-color: var(--brand-bg) !important;
}

.bg-secondary {
    background-color: var(--brand-secondary) !important;
}

.btn-secondary {
    background-color: var(--brand-secondary) !important;
    border-color: var(--brand-secondary) !important;
    color: var(--brand-dark) !important;
}

.bg-highlight {
    background-color: var(--brand-highlight) !important;
}

.border-highlight {
    border-color: var(--brand-highlight) !important;
}

.bg-accent {
    background-color: var(--brand-accent) !important;
}

.border-accent {
    border-color: var(--brand-accent) !important;
}

/* Primary Color Overrides */
.text-primary {
    color: var(--brand-primary) !important;
}

.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

.btn-outline-primary {
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--brand-primary) !important;
    color: #fff !important;
}

/* Anchor Tag Overrides */
a {
    color: var(--brand-primary);
    text-decoration: none;
}

a:hover {
    color: var(--brand-highlight);
}

/* Table Overrides */
.table-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

.table-primary th,
.table-primary td {
    background-color: var(--brand-primary) !important;
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Back to Top Button */
#btn-back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 1000;
}

/* Navbar Customization */
.navbar-light .navbar-nav .nav-link {
    color: var(--brand-primary) !important;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--brand-highlight) !important;
    border-bottom-color: var(--brand-highlight);
}