/* Site-specific additions on top of SB Admin */
.tile-title { font-size: 1.1rem; font-weight: 600; }
.stat-card { border-left: .25rem solid transparent; }
.border-start-primary { border-left-color: #0d6efd !important; }
.border-start-success { border-left-color: #198754 !important; }
.border-start-danger { border-left-color: #dc3545 !important; }
.border-start-dark { border-left-color: #212529 !important; }
.stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.skill-badge { font-weight: 500; margin: 0 .15rem .4rem 0; padding: .45em .7em; }
.row > [class*="col-"] > .h-100-card { height: calc(100% - 1.5rem); }

.timeline-item { position: relative; padding: 0 0 1.25rem 1.5rem; border-left: 2px solid #dee2e6; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: ""; position: absolute; left: -7px; top: .3rem;
    width: 12px; height: 12px; border-radius: 50%; background: #0d6efd; border: 2px solid #fff;
}

.gallery .thumb {
    display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0;
    border-radius: .375rem; overflow: hidden; background: #e9ecef; cursor: zoom-in;
}
.gallery .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gallery .thumb:hover img, .gallery .thumb:focus-visible img { transform: scale(1.04); }
.gallery-empty { color: #6c757d; border: 2px dashed #ced4da; border-radius: .375rem; padding: 2rem 1rem; text-align: center; }

#lightboxImg { max-width: 100%; max-height: 80vh; }
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0, 0, 0, .5); color: #fff; border: 0; width: 2.75rem; height: 2.75rem; border-radius: 50%;
}
.lightbox-nav.prev { left: .75rem; }
.lightbox-nav.next { right: .75rem; }
.row > [class*="col-"] > .h-100-tile { height: calc(100% - 1.5rem); }

/* ---- Ribbon stack -------------------------------------------------------
   Each ribbon is drawn with a linear-gradient whose stops follow the award's
   published stripe widths (1 3/8 in ribbon = 100%). Highest precedence first,
   three per row, read left to right.                                        */
.ribbon-stack { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.ribbon-row { display: flex; gap: 3px; }
.ribbon {
    display: block; width: 84px; height: 24px;
    border: 1px solid rgba(0, 0, 0, .45); border-radius: 1px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, .25), inset 0 -1px 2px rgba(0, 0, 0, .2);
    transition: transform .12s ease-in-out;
}
.ribbon:hover, .ribbon:focus-visible { transform: scale(1.06); position: relative; z-index: 1; }
.ribbon-key { padding-left: 1.1rem; }
.ribbon-key li { margin-bottom: .15rem; }

/* Navy Unit Commendation: blue, gold, red, green centre, red, gold, blue */
.ribbon-nuc {
    background: linear-gradient(90deg,
        #0b2a5b 0 9%, #f0b323 9% 16%, #c8102e 16% 23%, #00703c 23% 77%,
        #c8102e 77% 84%, #f0b323 84% 91%, #0b2a5b 91% 100%);
}
/* Marine Corps Good Conduct: crimson field bisected by a navy blue stripe */
.ribbon-gcm {
    background: linear-gradient(90deg, #9d1535 0 47%, #14315e 47% 53%, #9d1535 53% 100%);
}
/* National Defense Service: scarlet, white, blue, white, golden yellow centre */
.ribbon-ndsm {
    background: linear-gradient(90deg,
        #9e1b32 0 31.8%, #fff 31.8% 36.4%, #1e3a8a 36.4% 40.9%, #fff 40.9% 45.5%,
        #f2c200 45.5% 54.5%, #fff 54.5% 59.1%, #1e3a8a 59.1% 63.6%, #fff 63.6% 68.2%,
        #9e1b32 68.2% 100%);
}
/* Armed Forces Expeditionary: green, golden yellow, spice brown, black,
   bluebird, ultramarine, white, scarlet, bluebird, black, brown, yellow, green */
.ribbon-afem {
    background: linear-gradient(90deg,
        #046a38 0 6.82%, #f0b323 6.82% 13.64%, #7a4a2b 13.64% 20.45%, #1a1a1a 20.45% 27.27%,
        #2c7fb8 27.27% 43.18%, #1b3c8f 43.18% 47.73%, #fff 47.73% 52.27%, #c8102e 52.27% 56.82%,
        #2c7fb8 56.82% 72.73%, #1a1a1a 72.73% 79.55%, #7a4a2b 79.55% 86.36%,
        #f0b323 86.36% 93.18%, #046a38 93.18% 100%);
}
/* Southwest Asia Service: chamois (sand) field, coalition colours,
   myrtle green and a black centre stripe */
.ribbon-swasm {
    background: linear-gradient(90deg,
        #1a1a1a 0 4.55%, #d4bf94 4.55% 13.64%, #10314f 13.64% 18.18%, #fff 18.18% 22.73%,
        #c8102e 22.73% 27.27%, #d4bf94 27.27% 40.91%, #1b4d3e 40.91% 47.73%,
        #1a1a1a 47.73% 52.27%, #1b4d3e 52.27% 59.09%, #d4bf94 59.09% 72.73%,
        #c8102e 72.73% 77.27%, #fff 77.27% 81.82%, #10314f 81.82% 86.36%,
        #d4bf94 86.36% 95.45%, #1a1a1a 95.45% 100%);
}
/* Sea Service Deployment: navy, red, gold, dark teal, teal centre */
.ribbon-ssdr {
    background: linear-gradient(90deg,
        #1a2f5a 0 12%, #c8102e 12% 20%, #f0b323 20% 28%, #0b5563 28% 38%,
        #1a7f8e 38% 62%, #0b5563 62% 72%, #f0b323 72% 80%, #c8102e 80% 88%,
        #1a2f5a 88% 100%);
}
