/* titles.css */

body {
    margin: 0;
    padding: 0;
    width: 800px;
    height: 600px;
    display: flex;
    justify-content: space-between;
    background-color: black;
    color: white;
    background-color: #000000;
    font-family: Arial;
    font-weight: normal;
    font-size: 17px;
    overflow: hidden;
}

#image-container {
    width: 50%;
    height: 100%;
    background-color: #000000;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    box-sizing: border-box;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

#image-container img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* The surviving Ariolasoft PaperClip scan is only 177 by 185 pixels.
   Preserve it at its natural size rather than magnifying the scan. */
#image-container img[src$="paperclip-ariolasoft.png"] {
    width: 177px;
    height: 185px;
    justify-self: center;
    align-self: center;
}

#image-container.image-count-1 {
    grid-template-columns: 1fr;
}

#image-container.image-count-2 {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

#text-container {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#text-container.text-only {
    width: 100%;
}

#text-header {
    font-size: 20px;
    margin-bottom: 10px;
}

#text-box {
    width: 80%;
    height: 80%;
    padding: 20px;
    box-sizing: border-box;
    background-color: black;
    color: white;
    border: 1px solid #cccccc;
    border-radius: 5px;
}

.detail-box {
    overflow-y: auto;
    line-height: 1.45;
}

.detail-box p:first-child {
    margin-top: 0;
}

.play-link {
    display: inline-block;
    margin-top: 8px;
    padding: 12px 18px;
    border: 1px solid #5fd7ff;
    border-radius: 5px;
    color: #ffffff;
    background: #173f67;
    text-decoration: none;
    font-weight: bold;
}

.play-link:visited {
    color: #ffffff;
}

.play-link:hover,
.play-link:focus {
    background: #235b90;
}
/* Add this style to titles.css to target the image */
.card img {
    background-color: black; /* Set background color of the image container to black */
}

/* Responsive catalogue detail layout. The generated pages use the same
   document both inside the catalogue modal and as direct landing pages. */
:root {
    color-scheme: dark;
    background: #050505;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0 auto;
    width: min(100%, 1240px);
    height: auto;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
    justify-content: initial;
    background: #000000;
    color: #f5f7fa;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 17px;
    overflow: auto;
}

#image-container {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 100vh;
    gap: 18px;
    padding: 38px;
    background:
        radial-gradient(circle at 50% 35%, rgba(42, 83, 117, 0.32), transparent 52%),
        #050505;
}

#image-container img {
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
}

#text-container {
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 100vh;
    align-items: stretch;
    padding: 62px 52px 44px;
    background: linear-gradient(145deg, #121923 0%, #080b10 70%);
    border-left: 1px solid rgba(255, 255, 255, 0.09);
}

#text-container.text-only {
    grid-column: 1 / -1;
    width: min(100%, 880px);
    justify-self: center;
    border-left: 0;
}

.detail-kicker {
    margin: 0 0 12px;
    color: #61d5ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

#text-header {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 0.98;
    letter-spacing: -0.035em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 26px;
}

.detail-meta span {
    padding: 6px 10px;
    border: 1px solid rgba(97, 213, 255, 0.32);
    border-radius: 999px;
    color: #d6eff8;
    background: rgba(31, 89, 117, 0.2);
    font-size: 12px;
    line-height: 1;
}

#text-box {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.detail-copy {
    color: #dce2e8;
    line-height: 1.58;
    overflow-y: auto;
    scrollbar-color: #427896 transparent;
    padding-right: 8px;
}

.detail-copy p {
    margin: 0 0 1em;
}

.detail-copy p:last-child {
    margin-bottom: 0;
}

.detail-sources {
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #8fa2b2;
    font-size: 12px;
    line-height: 1.45;
}

.detail-close {
    position: fixed;
    z-index: 10;
    top: 16px;
    right: 18px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(5, 8, 12, 0.88);
    font: 30px/1 Arial, sans-serif;
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.detail-close:hover,
.detail-close:focus-visible {
    color: #000000;
    background: #ffffff;
    outline: none;
}

html.is-embedded .detail-close {
    display: none;
}

.play-link {
    align-self: flex-start;
    margin-top: 22px;
    border-radius: 7px;
}

@media (max-width: 760px) {
    body {
        display: block;
        width: 100%;
    }

    #image-container {
        width: 100%;
        min-height: 48vh;
        height: auto;
        grid-auto-rows: minmax(260px, 48vh);
        padding: 58px 18px 20px;
    }

    #image-container.image-count-2 {
        grid-template-rows: repeat(2, minmax(260px, 48vh));
    }

    #text-container,
    #text-container.text-only {
        width: 100%;
        min-height: auto;
        padding: 34px 24px 42px;
        border-top: 1px solid rgba(255, 255, 255, 0.09);
        border-left: 0;
    }

    #text-container.text-only {
        padding-top: 74px;
    }

    #text-header {
        font-size: clamp(38px, 12vw, 58px);
    }

    .detail-copy {
        overflow: visible;
        padding-right: 0;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .detail-close,
    .play-link {
        transition: color 150ms ease, background-color 150ms ease, transform 150ms ease;
    }

    .detail-close:hover,
    .play-link:hover {
        transform: translateY(-1px);
    }
}
