/* LivePath - adventure theme
-------------------------------------------------- */
:root {
    --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Bebas Neue", "Segoe UI", sans-serif;
    --bs-body-bg: #99f6e4;
    --bs-body-color: #1f2937;

    /* Primary - trail-marker terracotta */
    --bs-primary: #c2410c;
    --bs-primary-rgb: 194, 65, 12;
    --bs-link-color: var(--bs-primary);
    --bs-link-hover-color: #9a3412;
    --bs-border-radius: 0.75rem;
    --bs-border-radius-sm: 0.5rem;
    --bs-border-radius-lg: 1rem;

    /* Muted text - both pass AA (>=4.5:1) on white */
    --color-muted: #4b5563;
    --color-muted-light: #6b7280;

    /* Status accents - all pass AA (>=4.5:1) as white-on-color badges */
    --color-live: #dc2626;
    --color-upcoming: #b45309;
    --color-done: #15803d;

    /* Extra accents for icons/borders (non-text, >=3:1 UI-component contrast) */
    --color-accent-speed: #0f766e;
    --color-accent-altitude: #6d28d9;
    --color-accent-time: #0369a1;

    /* Tile background - soft warm off-white, pops against the cool page gradient */
    --color-tile-bg: #fbfaf8;
}

body {
    background: linear-gradient(160deg, #99f6e4 0%, #bae6fd 60%, #dbeafe 100%) fixed;
    min-height: 100vh;
}

/* Navbar */
.navbar-wrap {
    background: linear-gradient(100deg, #166534 0%, #0f766e 50%, #0369a1 100%);
    position: relative;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .18);
}

.navbar {
    padding-top: .9rem;
    padding-bottom: .9rem;
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.7rem;
    letter-spacing: .04em;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.navbar-brand i {
    color: #fbbf24;
    font-size: 1.25rem;
    transition: transform .3s ease;
}

.navbar-brand:hover i {
    transform: rotate(-30deg);
}

.navbar-nav {
    gap: .25rem;
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
    padding: .4rem 1rem !important;
    border-radius: 999px;
    transition: background .15s ease, color .15s ease;
}

.navbar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .15);
}

.navbar-nav .nav-link.active {
    color: #111827;
    background: #fbbf24;
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(15, 23, 42, .12);
    color: var(--color-muted);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Headings */
h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 1.25rem;
    color: #111827;
}

/* Hero banner */
.hero {
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.14' stroke-width='2'%3E%3Cpath d='M-20 30 Q40 0 100 30 T220 30 T340 30'/%3E%3Cpath d='M-20 80 Q40 50 100 80 T220 80 T340 80'/%3E%3Cpath d='M-20 130 Q40 100 100 130 T220 130 T340 130'/%3E%3Cpath d='M-20 180 Q40 150 100 180 T220 180 T340 180'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, #166534 0%, #0f766e 45%, #0369a1 100%);
    color: #fff;
    padding: 4.5rem 0;
    margin-bottom: 2.5rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1;
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-bottom: .6rem;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, .92);
    margin-bottom: 0;
}

/* Section headers */
.section-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.25rem;
}

.section-header i {
    color: var(--bs-primary);
    font-size: 1.1rem;
}

.section-header h3 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-bottom: 0;
}

.section-header--live i {
    color: var(--color-live);
}

.section-header--upcoming i {
    color: var(--color-upcoming);
}

.section-header--done i {
    color: var(--color-done);
}

/* Cards */
.card {
    background: var(--color-tile-bg);
    border: none;
    border-radius: var(--bs-border-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform .15s ease, box-shadow .15s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.track-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.track-card:hover {
    color: inherit;
}

.track-card-media {
    position: relative;
    overflow: hidden;
}

.track-card-media .card-img-top {
    transition: transform .3s ease;
}

.track-card:hover .card-img-top {
    transform: scale(1.05);
}

.track-dates {
    color: var(--color-muted);
    font-size: .9rem;
    margin-bottom: 0;
}

.track-dates i {
    margin-right: .35rem;
}

/* Status badges */
.badge-status {
    position: absolute;
    top: .75rem;
    left: .75rem;
    padding: .3rem .65rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
}

.badge-status .dot {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: #fff;
    animation: pulse 1.6s ease-in-out infinite;
}

.badge-live {
    background: var(--color-live);
}

.badge-upcoming {
    background: var(--color-upcoming);
}

.badge-done {
    background: var(--color-done);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .35;
    }
}

.badge-inline {
    position: static;
    box-shadow: none;
    vertical-align: middle;
}

/* Path list */
.path-list {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 3rem;
}

.path-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--color-tile-bg);
    border-radius: var(--bs-border-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
}

.path-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
    color: inherit;
}

.path-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffedd5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-car {
    background: #ffedd5;
}

.icon-hiker {
    background: #dcfce7;
}

.icon-plane {
    background: #dbeafe;
}

.icon-ship {
    background: #ccfbf1;
}

.path-icon i {
    font-size: 1.15rem;
    color: var(--bs-primary);
}

.icon-hiker i {
    color: var(--color-done);
}

.icon-plane i {
    color: var(--color-accent-time);
}

.icon-ship i {
    color: var(--color-accent-speed);
}

.path-info {
    flex: 1 1 auto;
    min-width: 0;
}

.path-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: .25rem;
}

.path-description {
    color: var(--color-muted);
    margin: 0 0 .25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.path-arrow {
    flex: 0 0 auto;
    color: var(--color-muted-light);
    font-size: 1rem;
}

.path-row:hover .path-arrow {
    color: var(--bs-primary);
}

/* Path detail view */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--color-muted);
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    margin-bottom: 1.25rem;
}

.back-link:hover {
    color: var(--bs-primary);
}

.path-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.path-header-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.path-icon-lg {
    width: 56px;
    height: 56px;
}

.path-icon-lg i {
    font-size: 1.5rem;
}

.path-header .path-title {
    margin-bottom: .3rem;
}

.path-detail-description {
    color: var(--color-muted);
    max-width: 60rem;
}

.stat-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1.5rem 0;
}

.stat-pill {
    flex: 1 1 160px;
    background: #fff;
    border-radius: var(--bs-border-radius-sm);
    border-left: 3px solid var(--bs-primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    padding: .75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.stat-pill:nth-child(2) {
    border-left-color: var(--color-accent-speed);
}

.stat-pill:nth-child(3) {
    border-left-color: var(--color-accent-altitude);
}

.stat-pill:nth-child(4) {
    border-left-color: var(--color-accent-time);
}

.stat-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-muted);
    font-weight: 600;
}

.stat-value {
    font-weight: 600;
    color: #111827;
}

.map-card {
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
    margin-bottom: 1rem;
}

.card-title {
    font-weight: 600;
    color: #111827;
}

/* Buttons */
.btn {
    border-radius: var(--bs-border-radius-sm);
    font-weight: 500;
}

/* Table */
.table {
    --bs-table-bg: transparent;
}

.table thead th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: .05em;
    color: var(--color-muted);
    font-weight: 600;
    border-bottom-width: 1px;
}

.table tbody tr:hover {
    background-color: rgba(194, 65, 12, .05);
}

/* Leaflet position marker */
.marker-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .35), 0 0 0 3px #fff;
}

.marker-pin-car {
    background: var(--bs-primary);
}

.marker-pin-hiker {
    background: var(--color-done);
}

.marker-pin-plane {
    background: var(--color-accent-time);
}

.marker-pin-ship {
    background: var(--color-accent-speed);
}
