:root {
    --nav-height: 3.5rem;

    /* Ocean & Coral brand palette */
    --brand-teal: #0d9488;
    --brand-teal-dark: #0b7268;
    --brand-teal-darker: #134e4a;
    --brand-coral: #fb7185;
    --brand-coral-dark: #f43f5e;
    --brand-amber: #f59e0b;

    /* Retint Bootstrap "primary" to teal (utilities/links reference these). */
    --bs-primary: #0d9488;
    --bs-primary-rgb: 13, 148, 136;
    --bs-link-color: #0b7268;
    --bs-link-color-rgb: 11, 114, 104;
    --bs-link-hover-color: #0a655c;
    --bs-link-hover-color-rgb: 10, 101, 92;
}

/* Bootstrap's compiled button CSS hardcodes the old blue, so retint via the
   per-component variables rather than --bs-primary. */
.btn-primary {
    --bs-btn-bg: var(--brand-teal);
    --bs-btn-border-color: var(--brand-teal);
    --bs-btn-hover-bg: var(--brand-teal-dark);
    --bs-btn-hover-border-color: var(--brand-teal-dark);
    --bs-btn-active-bg: var(--brand-teal-darker);
    --bs-btn-active-border-color: var(--brand-teal-darker);
    --bs-btn-disabled-bg: var(--brand-teal);
    --bs-btn-disabled-border-color: var(--brand-teal);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-teal);
    --bs-btn-border-color: var(--brand-teal);
    --bs-btn-hover-bg: var(--brand-teal);
    --bs-btn-hover-border-color: var(--brand-teal);
    --bs-btn-active-bg: var(--brand-teal-dark);
    --bs-btn-active-border-color: var(--brand-teal-dark);
}

/* Coral accent for high-emphasis calls to action. */
.btn-accent {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brand-coral);
    --bs-btn-border-color: var(--brand-coral);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand-coral-dark);
    --bs-btn-hover-border-color: var(--brand-coral-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--brand-coral-dark);
    --bs-btn-active-border-color: var(--brand-coral-dark);
    font-weight: 600;
}

/* Deep-teal chrome instead of near-black. */
.navbar.bg-dark {
    background: linear-gradient(90deg, var(--brand-teal-darker) 0%, var(--brand-teal-dark) 100%) !important;
}

footer.bg-dark {
    background: var(--brand-teal-darker) !important;
}

/* Brighter, consistent navbar links on the teal chrome (default .55 white is
   too dim, and the language toggle otherwise inherits a stray link color). */
.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .show > .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

html {
    font-size: 14px;
}

/* Fixed height so the sticky breadcrumb can pin directly beneath the sticky navbar */
.navbar {
    min-height: var(--nav-height);
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.hero {
    background: linear-gradient(135deg, #0c4a4a 0%, var(--brand-teal) 55%, var(--brand-coral) 120%);
    color: #fff;
    padding: 5rem 0;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
}

.hero p.lead {
    font-size: 1.3rem;
    opacity: 0.85;
}

/* Rotating category banner on the home page. */
.hero-carousel {
    position: relative;
}

.hero-carousel .carousel-item {
    height: 460px;
}

.hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(12, 74, 74, 0.55) 0%,
        rgba(12, 74, 74, 0.15) 35%,
        rgba(12, 74, 74, 0.75) 100%);
}

/* Persistent brand overlay that stays put while the pictures rotate beneath it.
   pointer-events:none so it never blocks the carousel controls or the slide link. */
.hero-carousel .hero-brand {
    position: absolute;
    top: 2.5rem;
    left: 0;
    right: 0;
    color: #fff;
    pointer-events: none;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    padding: 0 1rem;
}

.hero-carousel .hero-brand h1 {
    font-size: 2.75rem;
    font-weight: 700;
}

.hero-carousel .hero-brand p.lead {
    opacity: 0.9;
}

.hero-carousel .carousel-caption {
    left: 15%;
    right: 15%;
    bottom: 2.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@media (max-width: 767px) {
    .hero-carousel .carousel-item { height: 380px; }
    /* Bootstrap hides the caption under md; keep the category name + button visible. */
    .hero-carousel .carousel-caption { display: block; }
    .hero-carousel .hero-brand h1 { font-size: 2rem; }
}

.card-category,
.card-experience {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
}

.card-category:hover,
.card-experience:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-category .card-img-top,
.card-experience .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Give category cards a colored identity instead of a wall of identical blue
   icons: a tinted circular chip behind the icon plus a colored top accent,
   with the hue rotating per card across the grid. */
.card-category {
    --cat: var(--brand-teal);
    border-top: 4px solid var(--cat);
}

.card-category .card-body > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    color: var(--cat) !important;
    background: color-mix(in srgb, var(--cat) 14%, #fff);
}

.row.g-4 > [class*="col-"]:nth-child(6n+1) .card-category { --cat: #0d9488; }
.row.g-4 > [class*="col-"]:nth-child(6n+2) .card-category { --cat: #fb7185; }
.row.g-4 > [class*="col-"]:nth-child(6n+3) .card-category { --cat: #f59e0b; }
.row.g-4 > [class*="col-"]:nth-child(6n+4) .card-category { --cat: #6366f1; }
.row.g-4 > [class*="col-"]:nth-child(6n+5) .card-category { --cat: #10b981; }
.row.g-4 > [class*="col-"]:nth-child(6n+6) .card-category { --cat: #0ea5e9; }

/* Only show a validation summary once it actually has errors (avoids an empty red box). */
.validation-summary-valid {
    display: none;
}

/* Keyword tag chips (stored lowercase, shown capitalized). */
.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
    color: var(--brand-teal-dark);
    background: color-mix(in srgb, var(--brand-teal) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--brand-teal) 25%, #fff);
    transition: background 0.15s ease;
}

.tag-chip:hover {
    background: color-mix(in srgb, var(--brand-teal) 22%, #fff);
    color: var(--brand-teal-darker);
}

.tag-chip-plain {
    text-transform: capitalize;
}

.xp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.xp-badge-low {
    background-color: #ccfbf1;
    color: #115e59;
}

.xp-badge-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.xp-badge-high {
    background-color: #ffe4e6;
    color: #9f1239;
}

.xp-badge-epic {
    background: linear-gradient(135deg, var(--brand-coral) 0%, var(--brand-coral-dark) 100%);
    color: #fff;
}

.progress-category {
    height: 0.5rem;
    border-radius: 0.25rem;
}

.stat-card {
    border: none;
    border-radius: 0.75rem;
    text-align: center;
    padding: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: #6c757d;
}

.completed-check {
    color: #28a745;
    font-size: 1.2rem;
}

.card-completed {
    border: 2px solid #28a745;
}

.btn-completion {
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-not-completed {
    background-color: transparent;
    border: 2px solid var(--brand-teal);
    color: var(--brand-teal);
}

.btn-not-completed:hover {
    background-color: var(--brand-teal);
    color: #fff;
}

.btn-completed {
    background-color: #28a745;
    border: 2px solid #28a745;
    color: #fff;
}

.btn-completed:hover {
    background-color: #218838;
    border-color: #218838;
    color: #fff;
}

.btn-wishlist {
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-not-wishlisted {
    background-color: transparent;
    border: 2px solid var(--brand-coral);
    color: var(--brand-coral-dark);
}

.btn-not-wishlisted:hover {
    background-color: var(--brand-coral);
    border-color: var(--brand-coral);
    color: #fff;
}

.btn-wishlisted {
    background-color: var(--brand-coral);
    border: 2px solid var(--brand-coral);
    color: #fff;
}

.btn-wishlisted:hover {
    background-color: var(--brand-coral-dark);
    border-color: var(--brand-coral-dark);
    color: #fff;
}

.wishlist-heart {
    color: var(--brand-coral);
    font-size: 1.2rem;
}

.text-coral {
    color: var(--brand-coral-dark) !important;
}

.btn-recommend {
    font-weight: 600;
    font-size: 0.9rem;
    background-color: transparent;
    border: 2px solid #ced4da;
    color: #6c757d;
    transition: all 0.2s ease;
}

.btn-recommend:hover {
    border-color: #adb5bd;
    color: #495057;
}

.btn-recommend-up.active {
    background-color: var(--brand-teal);
    border-color: var(--brand-teal);
    color: #fff;
}

.btn-recommend-down.active {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* "Most Recommended" ranked rows */
.top-rank {
    flex-shrink: 0;
    width: 1.75rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--brand-teal);
}

.top-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* Let flex children with long text truncate instead of overflowing the row */
.min-w-0 {
    min-width: 0;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--brand-teal);
}

/* Full-screen busy overlay shown while a slow admin action (AI content/translation)
   is processing — reassures the admin and blocks accidental navigation. */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
}

/* Quick Facts sidebar sticks below the fixed navbar + breadcrumb (not under them),
   and stays beneath both in z-order so they always win any overlap. */
.facts-sticky {
    top: calc(var(--nav-height) + 4rem);
    z-index: 1010;
}

/* Map containers (public node map + admin location picker). */
.node-map {
    height: 400px;
    z-index: 0;
}

.location-map {
    height: 320px;
    z-index: 0;
}

/* Keep the back-navigation (breadcrumb) pinned to the top so it stays reachable
   after scrolling a long experience page — important on phones. */
.breadcrumb-bar {
    position: sticky;
    top: var(--nav-height);
    z-index: 1019;
    background-color: #fff;
    margin: 0 -0.75rem 1rem;
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb-bar .breadcrumb {
    margin-bottom: 0;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

/* Bigger vertical tap target for the back links; underline only on hover */
.breadcrumb-bar .breadcrumb-item > a {
    display: inline-block;
    padding: 0.35rem 0;
    text-decoration: none;
}

.breadcrumb-bar .breadcrumb-item > a:hover {
    text-decoration: underline;
}

/* Don't let a long current-page title crowd out the parent links */
.breadcrumb-bar .breadcrumb-item.active {
    max-width: 45vw;
    overflow: hidden;
    text-overflow: ellipsis;
}
