/* SERIES LIST */
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.series-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--sg-radius); background: var(--sg-surface); box-shadow: var(--sg-shadow-sm); transition: box-shadow .25s ease, transform .25s ease; }
.series-card:hover { box-shadow: var(--sg-shadow); transform: translateY(-3px); }

/* The cover sits on a soft panel tinted by the page accent, like a book on a shelf. */
.series-card-cover { position: relative; display: block; padding: 1.75rem 1.75rem 1.4rem 1.75rem; background: radial-gradient(120% 90% at 50% 0%, #fff 0%, var(--sg-accent-soft) 100%); }
.series-card-cover .series-image { display: block; width: 72%; height: auto; margin: 0 auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 5px; background: #ece6dc; box-shadow: 0 2px 5px rgba(42, 39, 51, .16), 0 18px 34px rgba(42, 39, 51, .26); transition: transform .35s ease, box-shadow .35s ease; }
.series-card:hover .series-image { transform: translateY(-5px) rotate(-1.5deg); box-shadow: 0 3px 8px rgba(42, 39, 51, .18), 0 26px 44px rgba(42, 39, 51, .32); }
.series-new { position: absolute; top: .9rem; right: .9rem; }

.series-card-body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 1.1rem 1.4rem 1.5rem 1.4rem; }
.series-card-body .hero-tag { margin-bottom: .55rem; }
.series-card-body h3 { margin: 0 0 .6rem 0; font-size: 1.45rem; line-height: 1.2; }
.series-card-body h3 a { color: var(--sg-ink); text-decoration: none; }
.series-card-body h3 a:hover { color: var(--sg-accent-dark); }
.series-facts { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-bottom: 1.1rem; font-size: .9rem; color: var(--sg-muted); }
.series-facts .fact { display: inline-flex; align-items: center; gap: .4rem; }
.series-facts .bi { color: var(--sg-accent); }
.series-card .btn-view-details { margin-top: auto; --bs-btn-padding-y: .5rem; --bs-btn-padding-x: 1.3rem; font-size: .95rem; box-shadow: 0 6px 16px rgba(196, 88, 0, .28); }
.series-card .btn-view-details .bi { margin-left: .25rem; transition: transform .2s; }
.series-card .btn-view-details:hover .bi { transform: translateX(3px); }
.series-header { font-size: 0.9em; }

/* SERIES PAGE (hero and book cards come from books.css) */
.series-hero .book-hero-byline { margin-bottom: 1rem; }
.series-hero-description { max-width: 68ch; margin: 0 0 1.25rem 0; font-size: 1.05rem; }
.series-hero-description p { margin: 0 0 .8rem 0; }
.series-hero-description p:last-child { margin-bottom: 0; }
.series-authors { margin: 0 0 1.5rem 0; }
.series-authors-label { margin-bottom: .6rem; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sg-muted); }
.series-author-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; }
.series-author-chips a { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .5rem .35rem .95rem; border: 1px solid var(--sg-border); border-radius: 999px; background: rgba(255, 255, 255, .85); color: var(--sg-ink); font-size: .9rem; font-weight: 500; text-decoration: none; transition: background-color .15s, border-color .15s, color .15s; }
.series-author-chips a:hover, .series-author-chips a:focus-visible { background: var(--sg-accent-soft); border-color: var(--sg-accent); color: var(--sg-accent-dark); }
.series-author-chips a.is-principle { font-weight: 700; }
.series-author-chips .chip-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .4rem; border-radius: 999px; background: var(--sg-ink); color: #fff; font-size: .75rem; font-weight: 700; }

.book-list-title-cnt { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.1rem 0; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); }
.book-list-title-cnt .btn { float: none !important; order: 2; font-family: var(--sg-font-body); font-size: .85rem; }
.book-list-title-cnt .btn.hidden { display: none !important; }
.series-books .catalog-card-tba { background: transparent; border: 2px dashed var(--sg-border); box-shadow: none; opacity: .85; }
.series-books .catalog-card-tba:hover { transform: none; box-shadow: none; }
.series-books .catalog-card-tba .catalog-cover img.book-image { box-shadow: none; opacity: .7; }

.series-related { margin-top: 2rem; padding: 1.75rem; border-radius: var(--sg-radius); background: var(--sg-surface); box-shadow: var(--sg-shadow-sm); }
.series-related h3 { margin: 0 0 1rem 0; font-size: 1.4rem; }
.series-related-list { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; }
.series-related-list a { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem 1rem; border: 1px solid var(--sg-border); border-radius: 999px; color: var(--sg-ink); font-weight: 500; text-decoration: none; transition: background-color .15s, border-color .15s; }
.series-related-list a:hover { background: var(--sg-accent-soft); border-color: var(--sg-accent); color: var(--sg-accent-dark); }

/* AUTHORS */
.collection-authors { float: right; width: 35%; margin: 0px 0px 10px 20px; }

@media only screen and (max-width : 767px) {
    .series-grid { grid-template-columns: 1fr; gap: 1.1rem; }
    .series-card { flex-direction: row; align-items: stretch; }
    .series-card-cover { flex: none; width: 118px; padding: 1rem .75rem; }
    .series-card-cover .series-image { width: 100%; }
    .series-new { top: .45rem; right: .3rem; padding: .15rem .5rem; font-size: .6rem; }
    .series-card-body { padding: 1rem 1rem 1rem .5rem; justify-content: center; }
    .series-card-body h3 { font-size: 1.2rem; }
    .series-card .btn-view-details { margin-top: .25rem; }
    .series-hero-description { font-size: 1rem; }
    .series-authors-label, .series-author-chips { text-align: center; justify-content: center; }
    .book-list-title-cnt { flex-wrap: wrap; }
}
