/* Letterbox background behind object-fit:contain photos. Stays white for
   e-commerce-looking photos in light mode; goes near-black in dark mode so
   oversized product shots don't glare. */
:root {
    --ne-media-bg: #fff;
}
[data-bs-theme="dark"] {
    --ne-media-bg: #14161a;
}

body { background: #F1F1F1; font-size: 16px; }

main { background: white; margin: 0 0 50px 0; padding: 20px; }
@media ( min-width: 768px ) {
    main { padding: 50px; }
}
main h1 { margin-bottom: 20px; margin-top: 0; }
main h2 { font-size: 120%; clear: both; margin-bottom: 15px; }

.navbar {
    background: transparent;
    border-bottom: none;
    margin-bottom: 25px;
}
@media ( min-width: 1024px ) {
    .navbar { margin-top: 0; }
}

/* Active nav item: replicates the v3 navbar-default active link styling,
   since Bootstrap 5 no longer styles active nav items by default. */
.navbar .nav-item.active > .nav-link {
    color: #555;
    background-color: #e7e7e7;
}

/* Transparent navbar: used inside the review hero header where the page
   background image should reach the very top of the viewport. */
.navbar-transparent {
    background: transparent;
    border: none;
    margin-bottom: 25px;
    min-height: 50px;
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-transparent .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.6);
}
.navbar-transparent .navbar-nav .nav-link,
.navbar-transparent .navbar-nav .nav-link:hover,
.navbar-transparent .navbar-nav .nav-link:focus {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.navbar-transparent .navbar-nav .active > .nav-link,
.navbar-transparent .navbar-nav .active > .nav-link:hover,
.navbar-transparent .navbar-nav .active > .nav-link:focus {
    color: #fff;
    background: transparent;
}

.navbar-transparent .navbar-nav .nav-link:hover,
.navbar-transparent .navbar-nav .nav-link:focus,
.navbar-transparent .navbar-nav .active > .nav-link:hover,
.navbar-transparent .navbar-nav .active > .nav-link:focus {
    text-shadow: 1px 1px 2px black, 0 1px 3px rgba(0, 0, 0, 0.6);
}

header.hero {
    margin: 0 -15px 0 -15px;
}
header.hero img { width: 100%; display: block; }

/* Review hero: full-width cover photo with title/subtitle/rating overlaid in
   per-line white highlight boxes (background lives on an inner <span>) so the
   text stays legible over any part of the photo and each line keeps its own row.
   The transparent navbar (~50px tall) sits inside this header at the top. */
header.hero.review-hero {
    background-image: linear-gradient(rgba(255, 255, 255, 0.2) 60%, rgba(0, 0, 0, 0.6)), var(--bg-img);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    align-items: flex-start;
    padding: 0px 15px 40px;
    box-sizing: border-box;
}
/* Medium Devices, Desktops */
@media only screen and (min-width : 992px) {
    header.hero.review-hero { padding: 0px 15px 60px; }
    .navbar-transparent { margin-bottom: 35px; }
}

/* Large Devices, Wide Screens */
@media only screen and (min-width : 1200px) {
    header.hero.review-hero { padding: 0px 15px 80px; }
    .navbar-transparent { margin-bottom: 45px; }
}
header.hero.review-hero h1 > span,
header.hero.review-hero h2 > span,
header.hero.review-hero .review-meta > span {
    display: inline;
    background: rgba(255, 255, 255, 0.9);
    color: #222;
    border-radius: 6px;
    padding: 0.1em 0.5em;
    line-height: 1.5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
header.hero.review-hero h1 {
    margin: 0 0 0.4em 0;
    font-size: 220%;
    line-height: 1.25;
}
header.hero.review-hero h2 {
    clear: none;
    margin: 0 0 0.4em 0;
}
header.hero.review-hero .review-meta {
    margin: 0;
}

li { word-wrap: break-word; }
footer { margin: 50px; font-size: 80%; color: #555; }
footer a { color: #555; }

ul.links {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 20px;
}
ul.links li {
    display: inline-block;
    vertical-align: top;
    padding: 20px 4px 0px 60px;
}
ul.links li i {
    font-size: 59px;
    margin-right: 6px;
    position: relative;
    margin-left: -56px;
    margin-top: -20px;
}
ul.links li.text i {
    font-size: 51px;
}
ul.links li.text {
    line-height: 14px;
    min-height: 54px;
    display: block;
}

.oneline { white-space: pre; }

/* ---- Reviews ---- */

.reviews .review-heading { margin-bottom: 5px; }
.reviews .review-heading a { color: #222; }
.reviews .review-meta { color: #888; font-size: 90%; margin-bottom: 10px; }

.review-card {
    margin-bottom: 35px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    --bs-card-border-width: 0;
    --bs-card-border-radius: 0;
}
.review-card:hover h2 {
    color: #286090;
    text-decoration: underline;
}
/* The Eleventy webp transform wraps every <img> in a <picture>, so the flex
   sizing lives on the wrapper and the thumbnail image fills it. */
.review-card > picture {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    align-self: flex-start;
}
.review-card .card-body > picture {
    float: right;
    width: 90px;
    margin: 0 0 10px 15px;
}
.review-card h2 { clear: none; font-size: 130%; margin-top: 0; margin-bottom: 4px; }
.review-card .stars { color: #f0a51b; margin-right: 6px; font-size: 90%; }
.review-card .excerpt { color: var(--bs-body-color); }

.review-filters { margin-bottom: 25px; }
.review-filters .review-filters-label { font-weight: bold; margin-right: 10px; }
.review-filters .review-filter, .review-filters .review-tags-toggle { margin-right: 5px; padding: 0 3px; font-size: 12px; line-height: 1.5; color:black; }
.review-filters .review-filter.active { border-color: #286090; background: #286090; color: #fff; }
.review-filters .review-filter .badge { background: #fff; color: #286090; }
.review-filters .review-filter.active .badge { background: #fff; color: #286090; }
.review-filters .review-filter-clear { display: none; font-style: italic; font-size: 90%; margin-left: 5px; color: #999; }
.review-filters .review-filter-clear:hover { color: #286090; }
.review-tags-toggle { cursor: pointer; font-style: italic; color: #286090; }
.review-tags-toggle[hidden], .review-tags-more[hidden] { display: none; }

.review-body img {
    max-width: 100%;
    margin: 10px 0;
    border: 1px solid #eee;
}
.review-body img.left { float: left; margin: 5px 15px 10px 0; max-width: 45%; }
.review-body img.right { float: right; margin: 5px 0 10px 15px; max-width: 45%; }

.review-photos .review-photo-link { display: block; }
.review-photos .review-photo-card > picture { display: block; width: 100%; }
.review-photos .review-photo-media {
    display: block;
    width: 100%;
    height: auto;
    background: var(--ne-media-bg);
    border-top-left-radius: var(--bs-card-inner-border-radius);
    border-top-right-radius: var(--bs-card-inner-border-radius);
}

.review-box {
    margin: 25px 0;
}
.review-box .card-body {
    padding: 15px 20px;
}
.review-box h2 { margin-top: 0; font-size: 115%; }
.review .stars { color: #f0a51b; }
.review-box p { margin-bottom: 5px; }
@media ( min-width: 992px ) {
    .review-main {
        display: flex;
        align-items: flex-start;
    }
    .review-box {
        order: 2;
        flex: 0 0 280px;
        margin: 0 0 20px 20px;
    /*}
    .review-box.has-hero {*/
        position: relative;
        top: -95px;
        z-index: 1;
    }
    .review-box .row > [class*="col-"] {
        width: 100%;
    }
    .review-body {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }
}

.disclosure {
    font-size: 85%;
    color: #777;
    font-style: italic;
    margin: 15px 0;
}

.review-origin {
    font-size: 85%;
    color: #777;
    font-style: italic;
    margin: 15px 0 4px;
}

/* Related reviews: shown between the main content and the disclosure, so it
   gets its own white block on the gray page background. */
.related-reviews {
    background: #fff;
    padding: 20px;
    margin: 0 0 40px 0;
}
@media ( min-width: 768px ) {
    .related-reviews { padding: 40px; }
}
.related-reviews h2 {
    font-size: 140%;
    margin-top: 0;
    margin-bottom: 20px;
}
.related-review-card {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}
.related-review-card:hover h3 {
    color: #286090;
    text-decoration: underline;
}
.related-review-card > picture {
    display: block;
    width: 100%;
    height: 180px;
}
.related-review-card .related-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--ne-media-bg);
}
.related-review-card h3 {
    font-size: 105%;
    line-height: 1.4;
    margin: 0 0 4px;
}
.related-review-card .related-subtitle {
    font-size: 90%;
    color: #666;
    margin: 0;
}

.btn-buy {
    margin: 0 8px 4px 0;
}

.btn-buy .site-favicon {
    height: 16px;
    width: auto;
    display: inline-block;
    margin-right: 5px;
    vertical-align: -2px;
}

.posts { margin-top: 30px; }

/* ---- Theme toggle button (floating, every page) ---- */

.theme-toggle {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1050;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.05rem;
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #212529;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
[data-bs-theme="dark"] .theme-toggle {
    background-color: #343a40;
    border-color: #495057;
    color: #e9ecef;
}
.theme-toggle .fa-sun { display: none; }
[data-bs-theme="dark"] .theme-toggle .fa-moon { display: none; }
[data-bs-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }

/* ---- Dark mode ----
   data-bs-theme="dark" is set on <html> by the theme script in main.njk.
   Bootstrap flips its own variables (body color, cards, borders, buttons),
   so most components adapt automatically; these rules cover the colors the
   site still hardcodes. */

[data-bs-theme="dark"] body { background: #181a1d; }
[data-bs-theme="dark"] main { background: #212529; }

/* Navbar is transparent, so recolor the links/toggler for the dark page. */
[data-bs-theme="dark"] .navbar .navbar-nav .nav-link,
[data-bs-theme="dark"] .navbar .navbar-nav .nav-link:hover,
[data-bs-theme="dark"] .navbar .navbar-nav .nav-link:focus {
    color: rgba(255, 255, 255, 0.85);
}
[data-bs-theme="dark"] .navbar .navbar-nav .nav-link:hover,
[data-bs-theme="dark"] .navbar .navbar-nav .nav-link:focus {
    color: #fff;
}
[data-bs-theme="dark"] .navbar:not(.navbar-transparent) .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.6);
}
[data-bs-theme="dark"] .navbar .navbar-toggler-icon {
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
[data-bs-theme="dark"] .navbar:not(.navbar-transparent) .nav-item.active > .nav-link {
    color: #111;
    background-color: #e9ecef;
}

[data-bs-theme="dark"] .reviews .review-heading a { color: #dee2e6; }
[data-bs-theme="dark"] .reviews .review-meta { color: #adb5bd; }
[data-bs-theme="dark"] .related-reviews { background: #212529; }
[data-bs-theme="dark"] .related-review-card .related-subtitle { color: #adb5bd; }
[data-bs-theme="dark"] .review-filters .review-filter { color: #e9ecef; }
[data-bs-theme="dark"] .review-filters .review-tags-toggle { color: #e9ecef; }
[data-bs-theme="dark"] .review-filters .review-filter-clear { color: #adb5bd; }
[data-bs-theme="dark"] .disclosure { color: #adb5bd; }
[data-bs-theme="dark"] .review-origin { color: #adb5bd; }
[data-bs-theme="dark"] .review-body img { border-color: #495057; }