/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

/* Container system */


/* Header styles */
header {
    background-color: #000;
    height: 4rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}
body.scrollDown header {
		transform: translateY(-64px);
}

.header-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 2.5rem;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 2rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 400;
    position: relative;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ddd;
}

nav a.active {
    font-weight: 700;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ff0000;
}

/* Main content */
main {
    flex: 1 0 auto;
}

/* Shared heading styles */
h1 {
    font-size: 2.5rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 200;
}

h2 {
    font-size: 1.25rem;
    font-weight: 200;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    color: #666;
    font-weight: 200;
}

.active-tag {
    font-weight: 400;
    color: #ff0000;
}

/* Index-specific styles */
.cards-container {
    margin: 2rem auto;
}

.layout-toggle {
    margin-bottom: 1rem;
}

.layout-toggle button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background-color: #fff;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

.layout-toggle button.active {
    background-color: #f0f0f0;
    font-weight: 700;
}

.tags-container {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-pill {
        display: inline-block;
    padding: 0.25rem .75rem;
    background-color: #343434;
    border: 1px solid #767676;
    border-radius: 20px;
    text-decoration: none;
    color: #c5c5c5;
    font-size: 0.85rem;
    transition: box-shadow 0.2s ease;
}

.tag-pill:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tag-pill.active {
background-color: #000000;
    font-weight: 700;
    color: #ff0000;
}



#tagsContainer {
    overflow: hidden;
    height: 0;
    transition: height 0.3s cubic-bezier(.4,0,.2,1);
    margin-top: 0.5em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
#tagsContainer.visible {
    /* height will be set inline by JS */
}
#currentTags {
    cursor: pointer;
    margin-bottom: 1em;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#currentTagsList {
    display: flex;
    align-items: center;
    flex: 1;
    flex-wrap: wrap;
}

#currentTagsList a.tlist{
    margin-right:.5rem
}

#currentTagsList a.tlist:hover,#currentTagsList a.tlist:active {
    cursor:default;
    color:inherit;
    text-decoration: none;
}


.reset-link {
    margin-left: auto;
    margin-right: 0;
    color: #ff0000;
    font-weight: 600;
    text-decoration: underline;
    padding-left: 1em;
    white-space: nowrap;
}



/* Article-specific styles */
.jumbo-container {
    margin-bottom: 2rem;
}

.article-image {
    margin: 0;
}

.article-image img {
    width: 100%;
    max-height: 66vh;
    object-fit: cover;
    border-radius: 0;
}

.article-container {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article-content {
    margin-bottom: 2rem;
    max-width: 1280px;
}

.copy {
    margin-bottom: 2rem;
    max-width: 1280px;
    line-height: 1.5em;
}   

.content-image-wrapper {
    text-align: center;
    margin: 1rem 0;
}

.content-image {
    max-width: 100%;
    max-height: 66vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-legend {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

.content-text {
    margin: 1rem 0;
}

.related-articles h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 200;
}

/* Card styles */
.cards-grid {
    display: grid;
    gap: 2.75rem 1rem;
}

body.masonry .cards-grid {
    display: flex;
    gap: 1.5rem;
}

.masonry-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    text-decoration: none;
    color: #000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    /* border: none!important;
    border-radius:0!important; */
    
}


.card:hover {
    transform: translateY(-5px);
}

.card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 5px;
}

body.masonry .card-image.square {
    aspect-ratio: 1/1;
}

body.masonry .card-image.portrait {
    aspect-ratio: 3/4;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.card-title {
text-align: start;
    padding: .5rem;
    height: 4rem;
    font-size: .85rem;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    white-space: normal;
}


/* Footer styles */
footer {
    background-color: #f5f5f5;
    padding: 1rem 0;
    flex-shrink: 0;
}

.footer-container {
    text-align: center;
}

/* Responsive design - Bootstrap-style breakpoints */
@media (min-width: 1920px) { /* xxl */

    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) and (max-width: 1919.98px) { /* xl */

    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) { /* lg */

    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991.98px) { /* md */

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 576px) and (max-width: 767.98px) { /* sm */

    .cards-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 575.98px) { /* xs */

    .cards-grid {
        grid-template-columns: 1fr;
    }
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 0.5rem 15px;
        height: auto;
    }

    .logo img {
        height: 2rem;
    }

    nav ul {
        margin-top: 0.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    nav li {
        margin: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    nav li {
        margin: 0.5rem 0.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }
}