/* HOMEPAGE */

/* Hero: title, image slider and newsletter / giveaway card */
.home-hero { background: linear-gradient(180deg, #fff 0%, var(--sg-bg) 100%); border-bottom: 1px solid var(--sg-border); padding: 2rem 0 3rem 0; }
.home-title { margin: 0 0 1.5rem 0; text-align: left; line-height: 1.15; }
.home-title-name { display: block; font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); font-weight: 700; }
.home-title-sub { display: block; margin-top: .4rem; font-family: var(--sg-font-body); font-size: clamp(.8rem, .7rem + .35vw, 1rem); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--sg-accent-dark); }

.image-gallery { list-style: none; padding: 0; margin: 0; }
/* Every slide gets the same shape so the hero never changes height between slides.
   Images with a different ratio are cropped to fit (object-fit: cover). Reserved space also stops layout shift while they load. */
.image-gallery > li { position: relative; aspect-ratio: 1140 / 550; overflow: hidden; background: #ece6dc; }
.image-gallery > li > a { display: block; height: 100%; }
.image-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Before lightSlider starts, show only the first slide so the page does not jump. */
.image-gallery:not(.lightSlider) > li:not(:first-child) { display: none; }
.gallery-cnt .lSSlideOuter { border-radius: var(--sg-radius); overflow: hidden; box-shadow: var(--sg-shadow); }
.gallery-cnt .image-gallery:not(.lightSlider) > li:first-child { border-radius: var(--sg-radius); overflow: hidden; box-shadow: var(--sg-shadow); }
/* Pager dots sit on the white card below the slides, so they need real contrast. */
.gallery-cnt .lSSlideOuter .lSPager.lSpg { margin: 12px 0 14px 0 !important; }
.gallery-cnt .lSSlideOuter .lSPager.lSpg > li { padding: 0 6px; }
.gallery-cnt .lSSlideOuter .lSPager.lSpg > li a { width: 12px; height: 12px; background-color: #c9c2b8; border: 0; box-shadow: inset 0 0 0 1px rgba(42, 39, 51, .12); }
.gallery-cnt .lSSlideOuter .lSPager.lSpg > li:hover a { background-color: #8f877b; }
.gallery-cnt .lSSlideOuter .lSPager.lSpg > li.active a { background-color: var(--sg-accent); box-shadow: none; }
.image-gallery > li .release-date { position: absolute; bottom: 14px; right: 20px; padding: .35rem .7rem; border-radius: var(--sg-radius-sm); background: rgba(20, 18, 26, .55); color: white; font-size: .9rem; text-align: center; }
.image-gallery > li .release-date.top-right { bottom: auto; top: 14px; right: 20px; }
.image-gallery > li .release-date.bottom-left { bottom: 14px; top: auto; right: auto; left: 20px; }
.image-gallery > li .release-date.top-left { bottom: auto; top: 14px; right: auto; left: 20px; }

.home-email-register .congrats { display: none; }
.home-email-register .email-signup { height: 100%; display: flex; flex-direction: column; justify-content: center; }
.email-signup .free-book-details img.free-book { height: 120px; width: auto; margin-bottom: 11px; }
.email-signup .free-book-details p { font-weight: normal; }
.email-signup .free-book-details .free-book-details-image { display: inline-block; }

/* Giveaway card (replaces the newsletter card while a giveaway runs) */
.home-email-register.giveaway-winner .congrats { display: block; background: white; margin: 0 0 .75rem 0; padding: .75rem 1rem; text-align: center; border-radius: var(--sg-radius); box-shadow: var(--sg-shadow-sm); }
.home-email-register.giveaway-winner .congrats h3 { margin-top: 0; font-weight: 700; }
.homepage-giveaway { height: 100%; padding: 1.5rem; }
.homepage-giveaway h3 { font-size: 1.4rem; }
.homepage-giveaway img { width: 100%; height: auto; border-radius: var(--sg-radius-sm); }
.homepage-giveaway .giveaway-content-block { align-items: center; }
.homepage-giveaway .giveaway-countdown .btn { width: 100%; }
.homepage-giveaway .giveaway-countdown .card { margin: 0; }

/* Book sections */
.book-section { padding: 3rem 0 0 0; }
.book-section:last-of-type { padding-bottom: 1rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); }
.section-head h2 a { color: var(--sg-ink); text-decoration: none; }
.section-head h2 a:hover { color: var(--sg-accent-dark); }
.section-link { font-size: .95rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

.book-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 1.25rem; }
.book-grid-centered { grid-template-columns: repeat(auto-fit, minmax(150px, 220px)); justify-content: center; }
@media (min-width: 576px) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 768px) { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.5rem; } }
@media (min-width: 1200px) { .book-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.book-card { text-align: center; min-width: 0; }
.book-cover { position: relative; display: block; border-radius: 6px; box-shadow: 0 2px 4px rgba(42, 39, 51, .12), 0 10px 24px rgba(42, 39, 51, .16); transition: transform .25s ease, box-shadow .25s ease; }
.book-cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; background: #ece6dc; }
.book-cover:hover { transform: translateY(-6px); box-shadow: 0 4px 8px rgba(42, 39, 51, .14), 0 18px 36px rgba(42, 39, 51, .24); }
.book-card h3 { margin: 1rem 0 .25rem 0; font-family: var(--sg-font-body); font-size: 1rem; font-weight: 600; line-height: 1.35; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-card h3 a { color: var(--sg-ink); text-decoration: none; }
.book-card h3 a:hover { color: var(--sg-accent-dark); text-decoration: underline; }
.book-meta { font-size: .85rem; color: var(--sg-muted); }
.book-cover .usa-today-stamp { position: absolute; bottom: -12px; left: -14px; width: 64px; height: 64px; background: url( '/media/misc/usa-today-best-seller-logo-stamp.png' ) no-repeat; background-size: 64px; transform: rotate(-20deg); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }

/* Single upcoming book */
.feature-book { display: grid; grid-template-columns: 1fr; gap: 1.5rem; background: var(--sg-surface); border-radius: var(--sg-radius); box-shadow: var(--sg-shadow); padding: 1.5rem; }
@media (min-width: 768px) { .feature-book { grid-template-columns: minmax(180px, 280px) 1fr; gap: 2.5rem; padding: 2rem; align-items: center; } }
.feature-cover { display: block; max-width: 240px; margin: 0 auto; border-radius: 6px; box-shadow: 0 4px 8px rgba(42, 39, 51, .14), 0 16px 36px rgba(42, 39, 51, .22); }
.feature-cover img { display: block; width: 100%; height: auto; border-radius: 6px; }
.feature-body .kicker { display: inline-block; margin-bottom: .75rem; padding: .25rem .75rem; border-radius: 999px; background: var(--sg-accent-soft); color: var(--sg-accent-dark); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.feature-body h3 { margin: 0 0 .25rem 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.feature-body h3 a { color: var(--sg-ink); text-decoration: none; }
.feature-body h4 { margin: 0 0 1rem 0; font-size: 1.2rem; color: var(--sg-muted); font-weight: 500; }
.feature-body .scheduled-date { margin: .5rem 0 1rem 0; color: var(--sg-muted); }
.feature-body .scheduled-date .bi { color: var(--sg-accent); margin-right: .25rem; }
.feature-body .upcoming-timer { margin: 0 0 1.5rem 0; }
.feature-body .feature-description { max-width: 70ch; }
.feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.feature-actions .btn-az-buy-now { display: block; width: 180px; }
.feature-actions .btn-az-buy-now img { display: block; width: 100%; height: auto; }

@media (max-width: 767.98px) {
    .home-hero { padding: 1.25rem 0 2rem 0; }
    .home-title { margin-bottom: 1rem; text-align: center; }
    .home-email-register .email-signup { height: auto; }
    .homepage-giveaway { height: auto; }
    .book-section { padding-top: 2.25rem; }
    .section-head { align-items: center; }
    .feature-book { text-align: center; }
    .feature-actions { justify-content: center; }
    .feature-body .feature-description { text-align: left; }
}
