/**
 * Site-specific overrides
 *
 * Migrated from Appearance > Customize > Additional CSS.
 * Added by JG on 2026-10-05.
 */

/* Content columns */

.col-container {
    display: flex;
    flex-direction: row;
    margin-bottom: 20px;
}

.col-66 {
    width: 100%;
    max-width: 66%;
}

.col-50:first-child {
    width: 100%;
    max-width: 50%;
    margin-right: 20px;
}

.col-33 {
    width: 100%;
    max-width: 33%;
}

.col-container .col-50 a img {
    height: auto;
    max-height: unset;
    min-height: unset;
}

/* Captions and title links */

.image-caption {
    display: block;
    width: 100%;
    font-size: 15px;
    font-style: italic;
    text-align: center;
}

.content-container .content-main .content-title a {
    margin-left: 30px;
}

/* B-roll timestamp table */

.b-roll-timestamps {
    border-spacing: 0;
    border-collapse: collapse;
}

.b-roll-timestamps tbody tr td {
    padding: 5px 10px;
    font-size: 15px;
}

.b-roll-timestamps tbody tr td:first-child {
    min-width: 120px;
    font-weight: 700;
    border-right: none;
}

.b-roll-timestamps tbody tr:nth-child(odd) {
    background-color: #efefef;
}

/* Section and project adjustments */

.section-subnav {
    padding: 10px 24px;
}

.project-children .child-title {
    pointer-events: none;
}

.project-links .button {
    display: none;
}

.completed-construction-project
.project-menu-item.completed-construction-project {
    pointer-events: none;
}

/* I-4 Beyond North map */

#i-4-beyond-north .area-title {
    display: none;
}

/* Toolkit photo galleries: three-column layout */
#photos .ngg-galleryoverview {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}

#photos .ngg-gallery-thumbnail-box {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}

#photos .ngg-gallery-thumbnail {
    width: 100%;
    margin: 0 !important;
}

#photos .ngg-gallery-thumbnail a {
    display: block;
    width: 100%;
}

#photos .ngg-gallery-thumbnail img {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* Remove NextGEN's legacy clearing elements from the grid */
#photos .ngg-galleryoverview > br,
#photos .ngg-galleryoverview > .ngg-clear {
    display: none !important;
}

/* Responsive columns */
@media (max-width: 850px) {
    #photos .ngg-galleryoverview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 550px) {
    #photos .ngg-galleryoverview {
        grid-template-columns: 1fr;
    }
}

/* Keep desktop navigation stable when ReciteMe enlarges text */
@media (min-width: 851px) {
    .primary-nav__list {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        column-gap: clamp(0.75rem, 2vw, 2.5rem);
    }

    .primary-nav__list > li {
        min-width: 0;
    }

    .primary-nav__list > li > a {
        width: 100%;
        min-width: 0;
        height: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.2;
    }

    /* Show line breaks normally */
	.primary-nav__list > li > a:not(:has(> recite)) > br {
		display: inline;
	}

	/* Hide line breaks after ReciteMe injects <recite> elements */
	.primary-nav__list > li > a:has(> recite) > br {
		display: none;
	}

    .primary-nav__list > li > a > recite {
        display: block !important;
        max-width: 100%;
    }
}
