/* ==========================================================================
   Quahog Child - inner pages (owner: THEME-INNER)
   The original inner-shell rules (insideimage, slider-usp, breadcrumbs,
   text-highlight, side-coup, inner-bottom, usp-blk, client-response, ...)
   are ported verbatim in base.css. This file only:
     1. neutralises block-markup differences (p instead of div, figure, ul/li),
     2. styles core/details as the original Bootstrap accordion,
     3. ports the press-release bits (posts/post navigation, gallery),
     4. adds the new /reviews/ component.
   ========================================================================== */

/* ---------- 1. Block-markup neutralisers ---------------------------------- */
.insideimage p.banner-head { margin: 0; }
/* migrated h1 values wrapped in <center> rendered left-aligned on the original */
.entry-content h1.page-h1 > center { display: inline; }
.side-coup p.side-price { margin-bottom: 0; }
.side-coup p.side-offer { margin-top: 0; }
.qh-inner-banner-part,
.qh-bottom-usps-part { margin: 0; }

/* core/post-content keeps the original .entry-content class; WP's own block
   wrappers must not add spacing */
.wp-block-post-content.entry-content { margin: 0; }
.qh-article-body { display: flow-root; } /* = original clearfixed article .entry-content */
/* original underscores rule .entry-content{margin:1.5em 0 0} (press releases: whole content is the article) */
.wp-block-post-content.qh-pr-content,
.qh-content > .qh-article-body.entry-content { margin-top: 1.5em; }
.wp-block-post-content.qh-content { margin: 0; }
/* coupons: the (empty) original article after the coupon grid still added its 1.5em top margin */
.coup-page .qh-article-body::after { content: ""; display: block; margin-top: 1.5em; }
.wp-block-post-title { word-break: normal; }
.entry-title.wp-block-post-title a { display: inline; }
.entry-title > a { color: inherit; }

/* Query loop list (original: consecutive <article>s) */
.wp-block-post-template.qh-post-list,
.wp-block-post-template.qh-post-list > li { list-style: none; margin: 0; padding: 0; }
.wp-block-query.qh-loop { margin: 0; }
/* the loop is a <ul>: undo Bootstrap's `ul ul{margin-bottom:0}` for lists inside the posts */
.qh-post-list .entry-content ul, .qh-post-list .entry-content ol, .qh-post-list .entry-content dl { margin-bottom: 1rem; }
.qh-post-list .entry-content :is(ul, ol) :is(ul, ol) { margin-bottom: 0; }

/* Featured image: original div.post-thumbnail 17em crop window */
.wp-block-post-featured-image.post-thumbnail { margin: 1em 0 0; overflow: hidden; height: 17em; }
.wp-block-post-featured-image.post-thumbnail img { width: auto; max-width: 100%; height: auto; vertical-align: middle; position: relative; top: calc(-5% - 1.7em); }

/* Text meant only for screen readers (theme style.css) */
.screen-reader-text { clip: rect(1px, 1px, 1px, 1px); position: absolute !important; height: 1px; width: 1px; overflow: hidden; word-wrap: normal !important; }
.screen-reader-text:focus { background-color: #f1f1f1; border-radius: 3px; box-shadow: 0 0 2px 2px rgba(0, 0, 0, .6); clip: auto !important; color: #21759b; display: block; font-size: .875rem; font-weight: bold; height: auto; left: 5px; line-height: normal; padding: 15px 23px 14px; text-decoration: none; top: 5px; width: auto; z-index: 100000; }

/* ---------- 2. Posts / post navigation (theme style.css) ------------------ */
.posts-navigation, .post-navigation { overflow: hidden; } /* margin 0 0 1.5em applied only under .site-main (not used) */
.posts-navigation .nav-previous, .post-navigation .nav-previous { float: left; width: 50%; }
.posts-navigation .nav-next, .post-navigation .nav-next { float: right; text-align: right; width: 50%; }
.navigation.post-navigation { padding-top: 1.875rem; }
.post-navigation .nav-previous a, .post-navigation .nav-next a { border: 1px solid #ddd; border-radius: .938rem; display: inline-block; padding: .313rem .875rem; text-decoration: none; }
.post-navigation .nav-next a::after { content: " \2192"; }
.post-navigation .nav-previous a::before { content: "\2190 "; }
.post-navigation .nav-previous a:hover, .post-navigation .nav-next a:hover { background: #eee none repeat scroll 0 0; }

/* ---------- 3. FAQ accordions: core/details styled as Bootstrap 5.0 ------- */
/* Markup (DATA): .accordion.faq-accordion > [h2] + details.accordion-item > summary + answer blocks.
   Original quirk kept: buttons render without .collapsed, so every question shows the
   "expanded" look until the visitor collapses it (inner.js adds .collapsed). */
.faq-accordion { margin: 0; }
/* The original accordion sat after the clearfixed article and always printed an <h2>
   (empty when faq_heading was unset): reproduce that spacing. */
.faq-accordion:has(> h2) { display: flow-root; }
.faq-accordion:not(:has(> h2)) { padding-top: calc(39px + .6rem); }
.faq-page .faq-accordion:not(:has(> h2)) { padding-top: 0; }
.faq-accordion details.accordion-item,
.faq-accordion > details { background-color: #fff; border: 1px solid rgba(0, 0, 0, .125); margin: 0; padding: 0 1.25rem; }
.faq-accordion > details:first-of-type { border-top-left-radius: .25rem; border-top-right-radius: .25rem; }
.faq-accordion > details:not(:first-of-type) { border-top: 0; }
.faq-accordion > details:last-of-type { border-bottom-right-radius: .25rem; border-bottom-left-radius: .25rem; }
.faq-accordion > details > summary {
	position: relative; display: flex; align-items: center; width: auto; margin: 0 -1.25rem; padding: 1rem 1.25rem;
	font-size: 1rem; font-family: inherit; line-height: 1.5; color: #0c63e4; text-align: left; background-color: #e7f1ff;
	box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125); border: 0; border-radius: 0; overflow-anchor: none; cursor: pointer; list-style: none;
	transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out, border-radius .15s ease;
}
.faq-accordion > details > summary::-webkit-details-marker { display: none; }
.faq-accordion > details > summary::marker { content: ""; }
.faq-accordion > details:first-of-type > summary { border-top-left-radius: calc(.25rem - 1px); border-top-right-radius: calc(.25rem - 1px); }
.faq-accordion > details > summary::after {
	flex-shrink: 0; width: 1.25rem; height: 1.25rem; margin-left: auto; content: "";
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
	background-repeat: no-repeat; background-size: 1.25rem; transform: rotate(-180deg); transition: transform .2s ease-in-out;
}
.faq-accordion > details > summary.collapsed { color: #212529; background-color: #fff; box-shadow: none; }
.faq-accordion > details:last-of-type > summary.collapsed { border-bottom-right-radius: calc(.25rem - 1px); border-bottom-left-radius: calc(.25rem - 1px); }
.faq-accordion > details > summary.collapsed::after {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
	transform: none;
}
.faq-accordion > details > summary:hover { z-index: 2; }
.faq-accordion > details > summary:focus { z-index: 3; outline: 0; }
.faq-accordion > details > summary:focus-visible { box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25); }
/* .accordion-body padding 1rem 1.25rem: horizontal comes from details padding */
.faq-accordion > details[open] > summary { margin-bottom: 1rem; }
.faq-accordion > details[open] { padding-bottom: 1rem; }
.faq-accordion > details > :not(summary) { margin-left: 0; margin-right: 0; }
.faq-accordion > details > p,
.faq-accordion > details > .wp-block-html > p { margin-bottom: 1.5em; }
/* default template: the answer was a plain textarea printed raw (no <p>, no margins) */
.page-template-default .faq-accordion > details > p { margin-bottom: 0; }

/* FAQ page: navy buttons, gold when open/hover (original aria-expanded=true only after a click) */
.faq-page .faq-accordion > details > summary,
.faq-page .faq-accordion > details > summary.collapsed { background-color: #18314b; color: #fff; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125); }
.faq-page .faq-accordion > details > summary:hover,
.faq-page .faq-accordion > details.is-toggled[open] > summary { background-color: #bea15d; color: #000; }

@media (prefers-reduced-motion: reduce) {
	.faq-accordion > details > summary, .faq-accordion > details > summary::after { transition: none; }
}

/* ---------- 4. Press-release gallery (core/gallery + core lightbox) ------- */
/* Original [press_release_images]: 150x150 tiles, 2px #f4f5f6 border, 10px gap,
   hover overlay rgba(0,0,0,.4) with a 30px "+". */
.entry-content .wp-block-gallery.has-nested-images {
	display: block !important; padding: 0 !important; margin: 0 0 20px !important; list-style: none; gap: 0;
}
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image {
	display: inline-block !important; width: 150px !important; max-width: 150px !important; height: 150px; margin: 0 10px 0 0 !important;
	border: 2px solid #f4f5f6; overflow: hidden; position: relative; vertical-align: baseline;
	/* original: li(inline-block) > a(block, 2px border) > img(inline, middle): the row pitch
	   (157px @14px, 157.5px @17px root) comes from that baseline, so keep the same inline model */ flex: none; color: #0d6efd;
}
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:last-child { margin-right: 0 !important; }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image img {
	display: inline !important; vertical-align: middle !important; width: 146px !important; height: 146px !important; max-width: 200px; margin: 0 !important; object-fit: cover; cursor: zoom-in;
}
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image::after {
	content: "+"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	font-size: 30px; line-height: 1; color: #0d6efd; background: rgba(0, 0, 0, .4); opacity: 0; pointer-events: none;
	transition: opacity .3s ease-out;
}
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:hover::after { opacity: 1; }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { display: none; }
.entry-content .wp-block-gallery .lightbox-trigger { opacity: 0 !important; }
.entry-content .wp-block-gallery .lightbox-trigger:focus-visible { opacity: 1 !important; }
/* lightbox backdrop like the original (#000 at 75%) */
.wp-lightbox-overlay .scrim { background-color: rgba(0, 0, 0, .75) !important; opacity: 1 !important; }

/* ---------- 5. /reviews/ : marquee + grid (new) --------------------------- */
.q-reviews { margin: 1em 0 2em; }
.q-review {
	position: relative; height: 100%; display: flex; flex-direction: column; padding: 2em; color: #fff; text-align: left;
	background-color: #18314b; background-image: url(/wp-content/uploads/2021/11/bg-lines.png); background-repeat: repeat; background-position: top;
}
.q-review__quote { display: block; height: 30px; margin-bottom: .6em; }
.q-review__quote::before { content: "\201C"; display: block; font-family: Georgia, "Times New Roman", serif; font-size: 64px; line-height: .9; color: #fff; opacity: .9; }
.q-review__text { font-style: italic; font-size: .9em; line-height: 1.8; margin: 0 0 1em; flex: 1 1 auto; color: #fff; }
.q-review__name { font-family: 'poppinsbold'; letter-spacing: .03em; }
.q-review__via { font-size: .75em; letter-spacing: .08em; text-transform: uppercase; color: #cde0ec; }
.q-review__stars { margin-top: .3em; font-size: 1.15em; line-height: 1; letter-spacing: .08em; }
.q-star { color: rgba(255, 255, 255, .25); }
.q-star.is-on { color: #ffd700; }

/* marquee: infinite, pauses on hover/focus, stops for reduced motion */
.q-marquee { position: relative; overflow: hidden; margin: 0 0 3em; padding: 1em 0 1.6em; }
.q-marquee::before, .q-marquee::after { content: ""; position: absolute; top: 0; bottom: 0; width: 4em; z-index: 2; pointer-events: none; }
.q-marquee::before { left: 0; background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.q-marquee::after { right: 0; background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0)); }
.q-marquee__track { display: flex; width: max-content; gap: 1.5em; animation: q-marquee var(--q-marquee-duration, 40s) linear infinite; }
.q-marquee__track > .q-review { width: 24em; flex: none; height: auto; box-shadow: 0 0 1em rgba(0, 0, 0, .25); border-bottom: 9px solid #bea15e; transition: transform .3s ease-in-out; }
.q-marquee__track > .q-review:hover { transform: translateY(-.5em); }
.q-marquee:hover .q-marquee__track,
.q-marquee:focus-within .q-marquee__track { animation-play-state: paused; }
@keyframes q-marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - .75em)); } }
@media (prefers-reduced-motion: reduce) {
	.q-marquee__track { animation: none; }
	.q-marquee { overflow-x: auto; }
}
.q-reviews__heading { position: relative; color: #18314b; text-align: left; margin: 0 0 .5em; padding-left: 1.2em; }
.q-reviews__heading::before { content: ""; position: absolute; left: 0; top: 50%; width: .8em; height: 8px; background: #bea15e; transform: translateY(-50%); }
.q-reviews__grid > [class*="col-"] { margin-top: 1.5rem; }
.q-reviews__grid .q-review { border-bottom: 9px solid #85a4df; transition: all .3s ease-in-out; top: 0; }
.q-reviews__grid .q-review:hover { border-bottom-color: #bea15d; top: -.5em; }
.q-reviews__cta { text-align: center; margin-top: 2.5em; }
.q-reviews__cta .btn-secondary { display: inline-block; min-width: 12em; text-transform: uppercase; letter-spacing: .08em; line-height: 1.3; padding: .8em 1.5em; border-radius: 0; border: 0; font-family: 'poppinsbold'; }
@media (max-width: 600px) {
	.q-marquee__track > .q-review { width: 17em; }
	.q-marquee::before, .q-marquee::after { width: 2em; }
}
