/* Teal Theme Overrides */
:root {
    --bs-primary: #14b8a6;
    --bs-primary-rgb: 20, 184, 166;
    --bs-link-color: #0d9488;
    --bs-link-hover-color: #0f766e;
}

body {
    background-color: #EEFFE7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 1600 800'%3E%3Crect fill='%23EEFFE7' width='1600' height='800'/%3E%3Cg fill-opacity='0.35'%3E%3Cpolygon fill='%23c4eddb' points='1600 160 0 460 0 350 1600 50'/%3E%3Cpolygon fill='%239bdacf' points='1600 260 0 560 0 450 1600 150'/%3E%3Cpolygon fill='%2371c8c2' points='1600 360 0 660 0 550 1600 250'/%3E%3Cpolygon fill='%2348b5b6' points='1600 460 0 760 0 650 1600 350'/%3E%3Cpolygon fill='%231EA3AA' points='1600 800 0 800 0 750 1600 450'/%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.btn-primary {
    --bs-btn-bg: #14b8a6;
    --bs-btn-border-color: #14b8a6;
    --bs-btn-hover-bg: #0d9488;
    --bs-btn-hover-border-color: #0f766e;
    --bs-btn-active-bg: #0f766e;
}

.btn-outline-primary {
    --bs-btn-color: #14b8a6;
    --bs-btn-border-color: #14b8a6;
    --bs-btn-hover-bg: #14b8a6;
    --bs-btn-hover-border-color: #14b8a6;
}

.text-primary {
    color: var(--bs-primary) !important;
}

/* Allow Navbar Brand to wrap on mobile */
.navbar-brand {
    white-space: normal;
    max-width: 80%;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Custom fonts */
@import url('https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100..900;1,100..900&display=swap');

/* Base font settings: 1rem = 14px */
html {
    font-size: 87.5%; /* (14/16) * 100 */
}

body {
    font-family: 'Jost', sans-serif;
    font-size: 1rem; /* will be 14px */
    font-weight: 400;
    line-height: 1.6;
    color: #1f2937;
}

/* Custom transitions and refinements */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
}

.hover-primary:hover {
    color: var(--bs-primary) !important;
}

/* Glass effect for primary and secondary buttons */
.btn-primary {
    backdrop-filter: blur(0.625rem) !important;
    background: rgba(var(--bs-primary-rgb), 0.8) !important;
    border: 0.0625rem solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
    font-size: 1rem;
}

.btn-primary:hover {
    background: rgba(var(--bs-primary-rgb), 0.9) !important;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    backdrop-filter: blur(0.625rem) !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 0.0625rem solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

/* Glass effect for other elements */
.glass-effect {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(0.625rem);
    border: 0.0625rem solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
}

/* Navigation link styles */
.navbar-nav .nav-link {
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(0.3125rem);
}

/* Dashboard specific styles */
.dashboard-card {
    transition: transform 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-0.1875rem);
}

#sidebarMenu {
    min-height: calc(100vh - 4.5rem);
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

@media (max-width: 991.98px) {
    #sidebarMenu {
        min-height: auto;
    }
}

.nav-link.active {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary) !important;
    font-weight: 600;
}

/* Editor textarea styles */
.form-control {
    font-size: 1rem;
}

/* Table styles */
.table th {
    font-size: 1rem;
    font-weight: 600;
}

.table td {
    font-size: 1rem;
}

/* Heading styles - Uniform graduation */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    text-transform: capitalize;
    letter-spacing: -0.02rem;
    font-weight: 700;
    line-height: 1.2;
}

h1, .h1 { font-size: 2.5rem; }    /* 35px */
h2, .h2 { font-size: 2.125rem; }  /* 29.75px */
h3, .h3 { font-size: 1.75rem; }   /* 24.5px */
h4, .h4 { font-size: 1.5rem; }    /* 21px */
h5, .h5 { font-size: 1.25rem; }   /* 17.5px */
h6, .h6 { font-size: 1.125rem; }  /* 15.75px */

/* Meta details style */
.meta-details {
    text-transform: uppercase;
    letter-spacing: 0.03125rem;
    font-size: 0.875rem;
}

/* Additional consistent font sizing */
.label, .form-label {
    font-size: 1rem;
}

.small, .text-muted {
    font-size: 1rem; /* 14px */
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
}

.btn {
    font-size: 1rem;
}

.card-title {
    font-size: 1.25rem;
}

.card-text {
    font-size: 1rem;
}

.nav-link {
    font-size: 1rem;
}

.dropdown-item {
    font-size: 1rem;
}

.breadcrumb-item {
    font-size: 1rem;
}

.alert {
    font-size: 1rem;
}

.tooltip-inner {
    font-size: 0.875rem;
}

.popover-header {
    font-size: 1.125rem;
}

.popover-body {
    font-size: 1rem;
}

.pagination {
    font-size: 1rem;
}

.page-link {
    font-size: 1rem;
}

.list-group-item {
    font-size: 1rem;
}

.modal-title {
    font-size: 1.5rem;
}

.modal-body {
    font-size: 1rem;
}

.offcanvas-title {
    font-size: 1.5rem;
}

.offcanvas-body {
    font-size: 1rem;
}

/* Article & Sidebar Harmonization */
.article-content {
    font-size: 1.25rem; /* 17.5px for readability */
}

.toc-card .nav-link {
    font-size: 1.125rem;
    color: #4b5563 !important;
    padding: 0.5rem 1rem;
}

.toc-card .nav-link:hover {
    color: var(--bs-primary) !important;
}

.toc-card .nav-link.active {
    font-weight: 700;
    color: var(--bs-primary) !important;
    background: rgba(var(--bs-primary-rgb), 0.1);
}

/* Read More Links adherence to teal palette */
.stretched-link, .read-more, a.text-primary {
    color: var(--bs-link-color) !important;
    font-weight: 600;
}

a.text-primary:hover {
    color: var(--bs-link-hover-color) !important;
}
