@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 700px;
}

.top-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 20px 0;
}

button#playButton {
    background: none;
    border: none;
    cursor: pointer;
    width: 100px;
    height: 90px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    flex: 0 0 auto;
}

/* Style the button image */
button#playButton img {
    max-width: 100%;
    height: auto;
}

.gallery,
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    justify-items: center;
    width: min(1200px, 100%);
    margin: 0 auto;
}

.gallery a,
.image-gallery a {
    width: 100%;
    text-decoration: none;
    color: #333;
}

.gallery img,
.image-gallery img,
.gallery video,
.image-gallery video,
.gallery iframe,
.image-gallery iframe {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery iframe,
.image-gallery iframe {
    margin: 0;
    box-shadow: none;
}

h1 {
    text-align: center;
}


a {
    font-size: 30px; /* Adjust as needed */
}

.home-row {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 0 auto 30px;
    width: min(1200px, 100%);
    padding: 0 16px;
}

.home-image {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: nowrap;
    flex: 1 1 600px;
    max-width: 800px;
    width: 100%;
    transform: translateY(-80px);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: min(280px, 100%);
}

.home-row .nav-links {
    position: relative;
    z-index: 30;
    transform: none;
}

.nav-links a {
    width: 100%;
    text-align: center;
}

.home-image .image-item { 
    width: auto;
    max-width: 240px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.home-image img {
    width: 100%;
    height: auto;
}

.home-image .image-item img {
    max-width: 240px;
}

.image-item {
    text-align: center;
}

.image-gallery .flex-bottom-center {
    grid-column: 2;
    justify-self: center;
}

@media (max-width: 760px) {
    .image-gallery .flex-bottom-center {
        grid-column: auto;
    }
}

.image-title {
    color: #333;
    text-decoration: none;
}

/* Place the caption above the homepage image (so "The Links" appears on top) */
.home-image .image-item .image-title {
    order: -1;
    margin-bottom: 2px;
}

@media (max-width: 600px) {
    a {
        font-size: 24px;
    }
    .gallery,
    .image-gallery {
        gap: 16px;
    }
    .home-row {
        padding: 0 12px;
    }
    .nav-links {
        width: 100%;
        padding: 0 12px;
    }
}

/* Ensure the specific Link image is centered and constrained */
img[src$="Link_png_8:10:26.png"] {
    max-width: 240px;
    width: 100%;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 40;
}

/* TADC page: constrain and center images */
.tadc-page .gallery,
.tadc-page .image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
    justify-content: center;
    gap: 20px;
    justify-items: center;
    width: min(1000px, 100%);
    margin: 0 auto;
}

/* Ensure gallery links and their images are centered */
.tadc-page .gallery a {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: auto;
    max-width: 640px;
    text-align: center;
}
.tadc-page .gallery a img {
    margin: 0 auto;
}

/* Make TADC images share a common max height so they line up visually */
.tadc-page img {
    max-height: 480px;
    width: auto;
    display: block;
    margin: 0 auto;
}

/* Inktober page sizing */
.image-gallery .image-item img {
    width: 180px;
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* If viewport is narrow, reduce height */
@media (max-width: 700px) {
    .tadc-page img {
        max-height: 320px;
    }
}

/* Make Jax 2 and Clue span full width of the TADC grid and enlarge them */
.tadc-page a[href$="TADC_Jax_2.jpeg"],
.tadc-page a[href$="TADC, Clue.jpeg"] {
    grid-column: 1 / -1;
    justify-self: center;
}
.tadc-page a[href$="TADC_Jax_2.jpeg"] img,
.tadc-page a[href$="TADC, Clue.jpeg"] img {
    max-width: 440px;
    width: 100%;
    height: auto;
    max-height: none;
}


img#Link_png_8\:10\:26 {
    align-self: flex-start;
    transform: translateY(-300px);
}
