/* ----- Theme ----- */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');

html {
    font-family: "Nunito Sans";
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    scrollbar-gutter: stable;
}

body {
    font-family: "Nunito Sans";
}

/* ----- Bootstrap Overrides ----- */
.btn-primary {
    --bs-btn-bg: #1a73d3;
    --bs-btn-border-color: #1a73d3;
    --bs-btn-hover-bg: #1560b3;
    --bs-btn-hover-border-color: #1560b3;
    --bs-btn-active-bg: #1257a0;
    --bs-btn-active-border-color: #1257a0;
}

hr {
    opacity:  .5;
}

.nav-link {
    --bs-nav-link-font-size: 14px;
}

/* ----- Navbar ----- */
#header-container {
    border-bottom: 1px solid #d8d8d8;
}

@media (min-width: 992px) {
    #header-container .nav-item {
        margin-inline: 0.7rem;
    }
}

/* SVG logos often have no intrinsic dimensions, so an explicit height is
   required to keep them from collapsing or falling back to the 300x150 default. */
.navbar-brand .brand-logo {
    height: 50px;
    max-height: 50px;
    max-width: 300px;
    width: auto;
    object-fit: contain;
    transform-origin: left center;
    view-transition-name: page-logo;
}

@media (max-width: 991.98px) {
    .navbar-brand .brand-logo {
        max-width: 200px;
    }
}

@keyframes logo-fade-shrink {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.85); }
}

@keyframes logo-fade-grow {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

::view-transition-old(page-logo) {
    animation: logo-fade-shrink 500ms ease forwards;
}

::view-transition-new(page-logo) {
    animation: logo-fade-grow 500ms ease forwards;
}

@media (max-width: 991.98px) {
    .navbar-brand .brand-logo {
        max-width: 200px;
    }
}

#mobile-menu-icon{
    font-size: 36px;
}

/* ----- Body Content ----- */
.partner-library-title-banner img {
    max-width: 100%;
    height: auto;
}

#install-message-text {
    color: rgb(0, 107, 159);
}

.search-icon {
    color: #212529;
}

.latest-issue-article-title {
    color: #4a4a4a;
}

.issue-label {
    font-size: 15px !important;
    text-decoration: none;
    padding-top: 15px;
}

#latest-issue-title{
    font-size: 40px;
}

a {
    text-decoration: none;
}

#latest-issue-hr{
    margin-top: 0;
}

.login-card-container {
    position: relative;
    z-index: 999;
    margin-top: 16px;
    max-width: 425px;
    margin-left: auto;
    margin-right: auto;
}

/* Banner is forced to a fixed aspect ratio so its rendered height is always
   (container width * 3 / 8), regardless of the source image dimensions. */
.login-banner {
    position: relative;
    line-height: 0;
    overflow: hidden;
    aspect-ratio: 8 / 3;
}

    .login-banner img,
    .login-banner picture {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

@media (min-width: 992px) {
    /* Percentage margins resolve against the container width, so -18.75%
       (= half of the 3/8 aspect ratio) always lands the card's top edge
       exactly halfway down the banner at any viewport width. */
    .login-card-container.login-card-overlap {
        margin-top: -18.75%;
        margin-bottom: 0;
    }
}

/* ----- Sign-in and verification cards ----- */
.auth-card {
    --auth-accent: #1a73d3;
    --auth-ink: #1f2328;
    --auth-muted: #59636e;
    --auth-line: #d1d9e0;
    background: #fff;
    color: var(--auth-ink);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .12);
    padding: 2rem 1.5rem;
}

@media (min-width: 576px) {
    .auth-card {
        padding: 2.5rem 2.25rem;
    }
}

.auth-card__icon {
    display: block;
    width: 56px;
    height: auto;
    margin: 0 auto 1.25rem;
}

.auth-card__title {
    color: var(--auth-ink);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
    text-align: center;
    text-wrap: balance;
    margin: 0 0 .5rem;
}

.auth-card__lead {
    color: var(--auth-muted);
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    text-wrap: pretty;
    margin: 0 auto 1.5rem;
    max-width: 34ch;
}

.auth-card__lead strong {
    color: var(--auth-ink);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.auth-card__alert {
    font-size: .9375rem;
    line-height: 1.45;
    border-radius: 8px;
    padding: .75rem 1rem;
    margin-bottom: 1.25rem;
}

.auth-card__label {
    display: block;
    color: var(--auth-ink);
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: .375rem;
}

.auth-card .form-control {
    min-height: 48px;
    border-color: var(--auth-line);
    border-radius: 8px;
    font-size: 1rem;
}

.auth-card .form-control:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(26, 115, 211, .2);
}

.auth-card__button {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 1.25rem;
    border: 1px solid var(--auth-accent);
    border-radius: 8px;
    background: var(--auth-accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    line-height: 46px;
    padding: 0 1.25rem;
    transition: background-color .15s ease-out, border-color .15s ease-out;
}

.auth-card__button:hover,
.auth-card__button:focus-visible {
    background: #155fae;
    border-color: #155fae;
    color: #fff;
}

.auth-card__button:focus-visible {
    outline: 3px solid rgba(26, 115, 211, .35);
    outline-offset: 2px;
}

.auth-card__button:disabled {
    opacity: .7;
    cursor: progress;
}

.auth-card__button--secondary {
    background: transparent;
    color: var(--auth-ink);
    border-color: var(--auth-line);
}

.auth-card__button--secondary:hover,
.auth-card__button--secondary:focus-visible {
    background: #f6f8fa;
    border-color: var(--auth-line);
    color: var(--auth-ink);
}

.auth-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .25rem .75rem;
    margin-top: 1.25rem;
}

.auth-card__actions form {
    margin: 0;
}

.auth-card__link {
    background: none;
    border: 0;
    border-radius: 4px;
    padding: .5rem 0;
    color: var(--auth-accent);
    font-size: .9375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    cursor: pointer;
}

.auth-card__link:hover {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.auth-card__link:focus-visible {
    outline: 2px solid var(--auth-accent);
    outline-offset: 2px;
}

.auth-card__link:disabled {
    color: var(--auth-muted);
    font-weight: 400;
    text-decoration: none;
    cursor: default;
}

.auth-card__divider {
    width: 1px;
    height: 1rem;
    background: var(--auth-line);
}

/* Narrow cards stack the secondary actions so a divider never dangles at the end of a wrapped row. */
@media (max-width: 479.98px) {
    .auth-card__actions {
        flex-direction: column;
        gap: 0;
    }

    .auth-card__divider {
        display: none;
    }
}

a.auth-card__button,
a.auth-card__button:hover {
    text-decoration: none;
}

form + .auth-card__button--secondary,
.auth-card__button + .auth-card__button {
    margin-top: .75rem;
}

.auth-card__link--muted {
    color: var(--auth-muted);
    font-weight: 400;
}

.otp__error:empty,
.auth-card__field-error:empty {
    display: none;
}

.auth-card__field-error {
    display: block;
    color: #cf222e;
    font-size: .875rem;
    margin-top: .375rem;
}

.auth-card__footnote {
    color: var(--auth-muted);
    font-size: .8125rem;
    line-height: 1.5;
    text-align: center;
    text-wrap: pretty;
    margin: 1.5rem 0 0;
    padding-top: 1.25rem;
    border-top: 1px solid #eaeef2;
}

.auth-card__footnote p {
    margin: 0;
}

.auth-card__footnote p + p {
    margin-top: .25rem;
}

/* "Continue with Google": Google's neutral button colors, at the card's button size. */
.auth-card__google {
    margin-top: .25rem;
}

.auth-card__button--google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    margin-top: 0;
    background: #fff;
    border-color: #747775;
    color: #1f1f1f;
    line-height: 1.25;
}

.auth-card__button--google:hover,
.auth-card__button--google:focus-visible {
    background: #f6f8fa;
    border-color: #747775;
    color: #1f1f1f;
}

.auth-card__button--google .gsi-logo {
    flex: none;
}

.auth-card__button--google.is-busy {
    opacity: .7;
    cursor: progress;
}

.auth-card__google-status {
    color: var(--auth-muted);
    font-size: .875rem;
    line-height: 1.45;
    text-align: center;
    text-wrap: pretty;
    margin: .625rem 0 0;
}

.auth-card__google-status:empty {
    display: none;
}

.auth-card__google-status--error {
    color: #cf222e;
}

.auth-card__or {
    display: flex;
    align-items: center;
    gap: .875rem;
    margin: 1.25rem 0;
    color: var(--auth-muted);
    font-size: .8125rem;
}

.auth-card__or::before,
.auth-card__or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--auth-line);
}

/* Segmented one-time code. Without script the real input is shown as a single wide field.
   With script it sits transparently over six visual boxes, so typing, paste, autofill and
   screen readers all still work on one native input. */
.otp {
    position: relative;
}

.otp__input.form-control {
    min-height: 56px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: .5em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.otp__boxes {
    display: none;
}

.otp--enhanced .otp__field {
    position: relative;
}

.otp--enhanced .otp__boxes {
    display: flex;
    justify-content: center;
    gap: .5rem;
}

.otp--enhanced .otp__input.form-control {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    opacity: 0;
    border: 0;
    padding: 0;
    color: transparent;
    caret-color: transparent;
    letter-spacing: 0;
    z-index: 1;
}

.otp__box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 3rem;
    min-width: 0;
    height: 3.5rem;
    border: 1px solid var(--auth-line, #d1d9e0);
    border-radius: 8px;
    background: #fff;
    color: var(--auth-ink, #1f2328);
    font-size: 1.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: border-color .12s ease-out, box-shadow .12s ease-out;
}

.otp__box:nth-child(3) {
    margin-right: .5rem;
}

.otp__box--active {
    border-color: var(--auth-accent, #1a73d3);
    box-shadow: 0 0 0 3px rgba(26, 115, 211, .2);
}

.otp__box--active:empty::after {
    content: "";
    width: 2px;
    height: 1.5rem;
    background: var(--auth-accent, #1a73d3);
    animation: otp-caret 1s steps(1) infinite;
}

.otp--invalid .otp__box {
    border-color: #cf222e;
}

.otp--invalid .otp__box--active {
    box-shadow: 0 0 0 3px rgba(207, 34, 46, .18);
}

.otp__error {
    color: #cf222e;
    font-size: .875rem;
    text-align: center;
    margin: .5rem 0 0;
}

@keyframes otp-caret {
    50% {
        opacity: 0;
    }
}

@media (max-width: 380px) {
    .otp--enhanced .otp__boxes {
        gap: .375rem;
    }

    .otp__box {
        flex-basis: 2.5rem;
        height: 3rem;
        font-size: 1.25rem;
    }

    .otp__box:nth-child(3) {
        margin-right: .25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .otp__box--active:empty::after {
        animation: none;
    }
}

h1 {
    color: rgb(74, 74, 74);
}

#login-h1 {
    letter-spacing: .2px;
}

#login-lock-image{
    margin-top: -4px;
}

#partnerLibraryTitle {
    text-align: center;
    color: black;
    margin: auto;
    font-weight: 400;
    font-size: 40px;
    line-height: 1.2;
}

#nav-search-input{
    border-radius: 10px;
}

#latest-issue-title {
    font-weight: 400;
}

.issueTitle{
    margin-bottom: 15px;
}

.downLoadIssue{
    margin-top: 10px;
}

.swiper-slide .cover-navigation-image {
    max-width: 192px;
    max-height: 250px;
    object-fit: contain;
    /*opacity: .6;*/
    /*transition: opacity 0.3s ease, max-width 0.3s ease, max-height 0.3s ease;*/
}

.title-view-more-button {
    font-weight: 600;
}

.latest-issue-article-body {
    color: #4a4a4a;
}

/* Backwards compat when people put pictures in the partner library h1 property */
.partner-library-title-banner picture {
    display: block;
}



@media (min-width: 1200px) {
    .container, .container-sm, .container-md, .container-lg, .container-xl {
        max-width: 1140px;
    }
}

/* ----- Footer ----- */
.site-footer {
    border-top: 1px solid #d8d8d8;
}

.site-footer #custom-footer-html-container {
    margin-inline: auto;
}

.site-footer #custom-footer-html-container img {
    max-width: 100%;
    height: auto;
}

.footer-social {
    --footer-accent: #3574cc;
}

.footer-social a {
    color: var(--footer-accent);
    display: inline-flex;
}

.footer-social a:hover,
.footer-social a:focus-visible {
    opacity: 0.75;
}

/* ----- Featured Articles ----- */
.featured-article-scroller {
    position: relative;
}

/* The track scrolls, not the wrapper, so the nav buttons can stay anchored */
.featured-article-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.featured-article-track::-webkit-scrollbar {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .featured-article-track {
        scroll-behavior: auto;
    }
}

.featured-article-scroller .featured-article-slide {
    flex: 0 0 auto;
    width: 100%;
    max-width: 375px;
    scroll-snap-align: center;
}

/* Fit three articles inside the scroller on desktop instead of overflowing */
@media (min-width: 992px) {
    .featured-article-scroller .featured-article-slide {
        width: 33.3333%;
        max-width: none;
    }
}

.featured-article-scroller .featured-article-row {
    width: 100%;
    height: 100%;
    flex-wrap: nowrap;
}

.featured-article-scroller .featured-article-image-col {
    flex: 0 0 145px;
    max-width: 145px;
    overflow: hidden;
}

/* Drop the utility top margin so a full-height image can't spill past the slide */
.featured-article-image-col a {
    display: block;
    height: 100%;
}

.featured-article-image-col img {
    margin-top: 0;
}

.featured-article-card {
    height: 100%;
}

/* Keep the "Read More" link inside the slide by letting the body text absorb the leftover space */
.featured-article-text-col {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
}

.featured-article-text-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.featured-article-body {
    flex: 1 1 auto;
    min-height: 0;
}

/* Tighten the gap between adjacent articles */
.featured-article-scroller .featured-article-card {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.featured-article-nav {
    position: absolute;
    z-index: 1;
    color: #000;
    padding: 0;
}

.featured-article-nav[hidden] {
    display: none;
}

.featured-article-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.featured-article-nav-next {
    right: 20px;
}

.featured-article-nav-prev {
    left: 20px;
}

.thin-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}

.thin-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.thin-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.thin-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}

.thin-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

/* Timeline */
#issue-year-container {
    font-weight: 400;
    color: #4a4a4a;
}

.page-link {
    color: #4a4a4a;
}

/* Issue grid. Shared by _IssueListRow, _NewIssues and LibraryTimelineComponent,
   so it lives here rather than in any one partial (a library can render
   _NewIssues alone, e.g. with HideTitlesAndIssues on). */
.issueList {
    display: grid;
    /* auto-fill + minmax lets the tracks stretch to consume any leftover
       width instead of leaving a ragged gap on the right */
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    column-gap: 2rem;
    row-gap: 2.5rem;
    align-items: start;
}

.library-issue-thumbnail-container {
    width: 100%;
    max-width: 100%;
}

.library-cover-image {
    min-height: 240px;
}

.library-issue-thumbnail-container:hover .explore-overlay {
    display: flex !important;
}

@media (max-width: 768px) {
    .issueList {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        column-gap: 1rem;
        row-gap: 1.5rem;
    }

    .library-cover-image {
        min-height: 140px;
    }
}

/* 3 columns from md up to Bootstrap LG */
@media (min-width: 768px) and (max-width: 991px) {
    .issueList {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 4 columns from Bootstrap LG up to XL */
@media (min-width: 992px) and (max-width: 1199px) {
    .issueList {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* 5 columns at Bootstrap XL (1200px) and above */
@media (min-width: 1200px) {
    .issueList {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Fixed-column mode (opt-in via ViewData["UseFixedColumnGrid"]) keeps a
   constant 2/4/6 column layout instead of auto-filling by track width */
.issueList.fixed-column-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.issueList.fixed-column-grid .library-cover-image {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    object-fit: cover !important;
}

@media (min-width: 576px) {
    .issueList.fixed-column-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 768px) {
    .issueList.fixed-column-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 20px;
    }
}
