body {
    font-family: 'Roboto', sans-serif;
    color: #333;
}

p {
    font-size: 1.0rem !important;
}

a {
    overflow-wrap: break-word;
}

.ribbon {
    background-image: url("/static/mcplatform/images/banner_new.994e5ddde1f4.png");
    background-size: cover;
    background-position: center;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 2rem;
}

.logo-container {
    background-color: transparent;
}

.logo-text {
    font-size: 0.9rem;
    line-height: 1.2;
    text-transform: uppercase;
    color: #333;
}

.breadcrumb_bar {
    background-color: #333333;
    height: 40px;
    color: white;
}

.breadcrumb_bar a {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
}

.breadcrumb_bar a .material-icons {
    margin-right: 0.25rem;
}

.breadcrumb_bar .me-auto {
    min-width: 0;
}

.breadcrumb {
    flex-wrap: nowrap !important;
    overflow: hidden;
    font-size: 0.85rem;
}

.breadcrumb-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 25ch;
    flex-shrink: 1;
    padding-left: 0.5rem;
}

.breadcrumb-item:first-child {
    flex-shrink: 0;
    max-width: none;
}

.breadcrumb-item.active {
    max-width: 15ch; /* mobile default */
}

@media (min-width: 768px) {
    .breadcrumb-item.active {
        max-width: 40ch;
    }
}

@media (min-width: 1200px) {
    .breadcrumb-item.active {
        max-width: none;
    }
}

.breadcrumb-item.active {
    color: #6a7c4a;
}
.breadcrumb-item + .breadcrumb-item::before {
    color: white;
    content: ">";
}

.sidebar-nav {
    width: 100%;
    background-color: #f0f0f0;
    border-right: 1px solid #ddd;
    min-height: 100vh;
}

.sidebar-menu .nav-link {
    color: #333;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    border-radius: 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.sidebar-menu .nav-link:hover {
    background-color: #e0e0e0;
}

.sidebar-menu .nav-link.active {
    background-color: #444444;
    color: white;
}

.sidebar-menu .nav-link .material-icons {
    margin-right: 15px;
    font-size: 20px;
}

.sidebar-divider {
    margin: 15px 0;
    border-top: 1px solid #ccc;
    opacity: 1;
}

.search-input {
    border-radius: 4px;
    border: none;
    padding: 2px 10px;
    width: 250px;
}

@media (max-width: 576px) {
    .search-input {
        width: 120px;
    }
}

.search-container .material-icons {
    font-size: 18px;
}

.footer {
    background-color: #c4c4c4;
}

:root {
    --mc-blue: #4a86e8;
    --mc-dark-blue: #3c78d8;
    --mc-light-blue: #c9daf8;
    --mc-green: #6aa84f;
    --mc-brown: #783f04;
    --mc-light-brown: #fce5cd;
    --mc-orange: #e69138;
    --mc-red: #cc0000;
    --mc-bg-gray: #f3f3f3;
}

/* Detail Page Header */
.detail-header {
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 0.25rem;
}

.scientific-name {
    font-style: italic;
    color: #666;
    font-size: 1.1rem;
}

.other-names {
    color: #666;
    font-size: 1rem;
}

/* Tabs Styling */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    gap: 2px;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 0;
    color: #444;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.nav-tabs .nav-link.active {
    background-color: var(--mc-blue);
    color: white;
    border: none;
}

.tab-content {
    padding-top: 2rem;
}

/* Content Cards */
.info-card {
    background-color: var(--mc-light-blue);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: none;
}

.info-card-title {
    color: var(--mc-dark-blue);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.section-header {
    background-color: var(--mc-blue);
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* ============================================
   Theme overrides for detail pages
   CARE = #909C47 (olive green)
   WORRY = #c64518 (red-orange)
   CHECK = #4980BA (blue)
   ============================================ */

/* --- CARE theme (Species) --- */
.theme-care .nav-tabs .nav-link.active {
    background-color: #909C47;
}
.theme-care .info-card {
    background-color: #e8edcf;
}
.theme-care .info-card-title {
    color: #5a6623;
}
.theme-care .section-header {
    background-color: #909C47;
    color: white;
}
.theme-care .text-theme {
    color: #909C47 !important;
}
.theme-care .btn-primary,
.theme-care .btn-sm.btn-primary {
    background-color: #909C47;
    border-color: #909C47;
}
.theme-care .btn-primary:hover {
    background-color: #6d7b2a;
    border-color: #6d7b2a;
}
.theme-care .mc-table th {
    background-color: #909C47;
}
.aboriginal-header {
    background-color: #909C47;
}

/* --- WORRY theme (Threats) --- */
.theme-worry .nav-tabs .nav-link.active {
    background-color: #c64518;
}
.theme-worry .info-card {
    background-color: #fbe5da;
}
.theme-worry .info-card-title {
    color: #8a3515;
}
.theme-worry .section-header {
    background-color: #c64518;
}
.theme-worry .text-theme {
    color: #c64518 !important;
}
.theme-worry .btn-primary,
.theme-worry .btn-sm.btn-primary {
    background-color: #c64518;
    border-color: #c64518;
}
.theme-worry .btn-primary:hover {
    background-color: #963b18;
    border-color: #963b18;
}
.theme-worry .mc-table th {
    background-color: #c64518;
}
.aboriginal-header {
    background-color: #c64518;
}

/* --- CHECK theme (Monitoring) --- */
.theme-check .nav-tabs .nav-link.active {
    background-color: #4980BA;
}
.theme-check .info-card {
    background-color: #d6e8f4;
}
.theme-check .info-card-title {
    color: #2a5575;
}
.theme-check .section-header {
    background-color: #4980BA;
}
.theme-check .text-theme {
    color: #4980BA !important;
}
.theme-check .btn-primary,
.theme-check .btn-sm.btn-primary {
    background-color: #4980BA;
    border-color: #4980BA;
}
.theme-check .btn-primary:hover {
    background-color: #2e5d80;
    border-color: #2e5d80;
}
.theme-check .mc-table th {
    background-color: #4980BA;
}
.aboriginal-header {
    background-color: #2e5d80;
}
/* Tables */
.aboriginal-table-container {
    max-height: 400px;
    overflow-y: auto;
}

.mc-table {
    width: 100%;
    border-collapse: collapse;
}

.mc-table th {
    background-color: #6d7b4b;
    color: white;
    padding: 0.5rem;
    text-align: left;
}

.mc-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #dee2e6;
    background-color: transparent;
    font-size: 0.95rem;
}

#aboriginalTable tr:nth-child(even) {
    background-color: #f2f2f2;
}

#aboriginalTable tr:hover {
    background-color: #e9ecef;
}

/* Detail Items with Icons */
.detail-icon-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.detail-item i {
    font-size: 1.5rem;
    color: #333;
}

/* Cards with Stretched Links */
.species-card, .threat-card, .monitoring-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    height: 100%;
    transition: transform 0.2s;
    position: relative;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

.species-card:hover, .threat-card:hover, .monitoring-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.card-img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-footer-title {
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 1rem;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
}

.species-card .card-footer-title {
    background-color: #909C47;
}

.threat-card .card-footer-title {
    background-color: #c64518;
}

.monitoring-card .card-footer-title {
    background-color: #4980BA;
}

/* Resources */
.resource-list {
    list-style: none;
    padding: 0;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.resource-item:last-child {
    border-bottom: none;
}

/* Specific Cards */
.reminders-card {
    border: 1px solid #cc0000;
    border-radius: 8px;
    padding: 1rem;
    background-color: #fff;
    display: flex;
    gap: 15px;
}

/* Map Styling */
#distributionMap {
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Status Badges & Conservation */
.status-badge {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
}

.status-lc { background-color: var(--mc-blue); }
.status-nt { background-color: #ffd966; }
.status-vu { background-color: #f1c232; }
.status-en { background-color: #e69138; }
.status-cr { background-color: #cc0000; }

.conservation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    font-size: 0.8rem;
}

.conservation-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
/* Aboriginal names table styling */
.aboriginal-header {
    background-color: #6a7c4a;
    color: white !important;
    padding: 10px 15px !important;
    display: flex;
    justify-content: flex-start;
    gap: 40px;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.aboriginal-table-container {
    background-color: #f8f9fa;
}

#aboriginalTable {
    width: 100%;
    border-collapse: collapse;
}

#aboriginalTable td {
    padding: 8px 15px;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.95rem;
}

#aboriginalTable tr:nth-child(odd) {
    background-color: #f2f2f2;
}

#aboriginalTable tr:last-child td {
    border-bottom: none;
}
/* Homepage layout */
.home-section-title {
    color: #6d7b4b;
    font-weight: 700;
}

.home-section-subtitle {
    color: #333;
    font-weight: 400;
}

.how-it-works-header {
    margin-top: 3rem;
    margin-bottom: 2rem;
}

.how-it-works-column-header {
    font-size: 0.9rem;
    color: #333;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

.mc-card {
    border: none;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease-in-out;
}

.mc-card:hover {
    transform: translateY(-5px);
}

.mc-card-header {
    padding: 10px 15px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.mc-card-header .material-icons {
    font-size: 1.6rem;
}

.mc-card-header-care { background-color: #909C47; }
.mc-card-header-worry { background-color: #c64518; }
.mc-card-header-check { background-color: #4980BA; }
.mc-card-header-filter { background-color: #e27f13; }

.mc-card-img-top {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.mc-card-body {
    padding: 1rem 0;
}

.mc-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.mc-card-title span {
    font-weight: 800;
}

.mc-card-text {
    font-size: 0.85rem;
    line-height: 1.4;
}

.mc-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8rem;
}

.mc-card-list li {
    position: relative;
    padding-left: 15px;
    margin-bottom: 5px;
}

.mc-card-list li::before {
    content: "•";
    position: absolute;
    left: 0;
}

.full-width-btn {
    border-radius: 0;
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.btn-tools { background-color: #c64518; border-color: #c64518; }
.btn-guidance { background-color: #4980BA; border-color: #4980BA; }

.btn-tools:hover { background-color: #a13d17; }
.btn-guidance:hover { background-color: #2e5d80; }

#map {
    width: 100%;
    height: 400px;
}

.map-card-body {
    background-color: #f8f9fa;
}

.map-controls .form-select {
    font-size: 0.8rem;
    margin-bottom: 10px;
    border-radius: 4px;
}

/* Offcanvas Filter Button - Sticky handle on the left of offcanvas */
.offcanvas-btn {
    left: -50px;
    top: 50%;
    visibility: visible;
    width: 50px;
    height: 50px;
    padding: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* toggle the sidebar button icons based on offcanvas state */
.offcanvas .offcanvas-btn span:last-child,
.offcanvas.show .offcanvas-btn span:first-child {
    display: none;
}

.offcanvas.show .offcanvas-btn span:last-child {
    display: inline;
}

/* Tools & Guidance Tiles */
.tg-tile-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 0;
}

.tg-tile {
    background-color: #e9ecef !important;
    border: 1px solid #ccc !important;
    border-radius: 10px !important;
    padding: 15px !important;
    width: 180px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #333 !important;
    font-weight: 600;
    text-decoration: none !important;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
}

.tg-tile:hover {
    background-color: #dee2e6 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    color: #000 !important;
}

.material-symbols-fill {
    font-variation-settings: 'FILL' 1;
}

/* Tool Fullscreen Expansion */
body.tool-fullscreen-active {
    overflow: hidden !important;
}

.fullscreen-tool {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000 !important; /* Higher than sticky headers/nav */
    margin: 0 !important;
    padding: 1.5rem !important;
    overflow-y: auto !important;
    background-color: white !important;
}

.fullscreen-tool #tool-description-content {
    height: 100%;
    width: 100%;
}

.fullscreen-tool #tool-description-content iframe {
    width: 100% !important;
    height: calc(100vh - 3rem) !important;
    border: none;
}
