.past-contest .contentCMS p:first-child {   
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.625;
}

[data-theme="dark"] .past-contest .contentCMS p:first-child {
    color: white;
}

.past-contest .contentCMS .masonry {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .past-contest .contentCMS .masonry {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.past-contest .contentCMS .brick-item {
    background-color: var(--contest-color1);
    color: black;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    min-width: auto !important;
    width: auto !important;
    margin: 0 !important;
    display: inline-block !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    cursor: pointer;
}

.past-contest .contentCMS .brick-item:nth-child(1) {
    background-color: var(--contest-color1);
}

.past-contest .contentCMS .brick-item:nth-child(2) {
    background-color: var(--contest-color2);
}

.past-contest .contentCMS .brick-item:nth-child(3) {
    background-color: var(--contest-color3);
}

.past-contest .contentCMS .brick-item:nth-child(4) {
    background-color: var(--contest-color4);
}

.past-contest .contentCMS .brick-item:nth-child(5) {
    background-color: var(--contest-color5);
}

.past-contest .contentCMS .brick-item:hover {
    background-color: var(--bg-contest-hover, #47d9bd);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: black;
}

.past-contest .contentCMS .brick-item a {
    color: black !important;
    font-family: 'Londrina Solid', sans-serif;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    text-decoration: none;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    cursor: pointer;
}

.past-contest .contentCMS .brick-item:hover a {
    color: black !important;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.4);
}

.past-contest .contentCMS .winner-age-group {
    font-size: 2.25rem;
    font-family: 'Londrina Solid', sans-serif;
    color: var(--text-primary);
    margin-bottom: 2rem;
    margin-top: 4rem;
    text-transform: uppercase;
    background: none;
    padding: 1rem 0 1rem 0;
    position: relative;
}

.past-contest .contentCMS .winner-age-group:first-of-type {
    margin-top: 2rem;
}

[data-theme="dark"] .past-contest .contentCMS .winner-age-group {
    color: white;
}



.past-contest .contentCMS .contest-winners-list {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: stretch;
}

.past-contest .contentCMS .winner-age-group { grid-column: 1 / -1; }

.past-contest .contentCMS .row {
    background-color: var(--card-primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: flex-start;
    --winner-gap: 20px;
    gap: var(--winner-gap, 20px);
    height: 100%;
    min-height: 240px;
}

.past-contest .contentCMS .row:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.past-contest .contentCMS .row.gold-separator-plus {
    margin-top: 0;
}

.past-contest .contentCMS .col-sm-3,
.past-contest .contentCMS .col-md-4,
.past-contest .contentCMS .col-lg-3 {
    float: none;
    width: 180px;
    margin-right: 0;
    margin-bottom: 0;
    flex: 0 0 180px;
}

.past-contest .contentCMS .winner-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    background-color: white;
    border: 3px solid var(--fallback-p, oklch(var(--p)/1));
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15);
}

.past-contest .contentCMS .winner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.past-contest .contentCMS .col-sm-9,
.past-contest .contentCMS .col-md-4,
.past-contest .contentCMS .col-lg-9 {
    overflow: hidden;
    padding: 0;
    text-align: left;
  
    min-width: 0;
}

.past-contest .contentCMS .winner-name {
    font-size: 2rem;
    font-family: 'Londrina Solid', sans-serif;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-weight: 900;
    line-height: 2.2rem !important;
    letter-spacing: 1.1px;
}

[data-theme="dark"] .past-contest .contentCMS .winner-name {
    color: white;
    font-weight: 900;
}

.past-contest .contentCMS .winner-name.text-black-white {
    color: var(--text-primary);
    font-weight: 900;
}

[data-theme="dark"] .past-contest .contentCMS .winner-name.text-black-white {
    color: white;
    font-weight: 900;
}

.past-contest .contentCMS .winner-name + p {
    font-size: 0.75rem;
    color: var(--text-primary);
    opacity: 0.75;
    margin-bottom: 0.5rem;
    text-align: left;
    line-height: 1.3;
}

[data-theme="dark"] .past-contest .contentCMS .winner-name + p {
    color: white;
}

.past-contest .contentCMS .winner-title {
    margin-bottom: 0.75rem;
    text-align: left;
}

.past-contest .contentCMS .winner-title a {
    color: var(--fallback-p, oklch(var(--p)/1)) !important;
    display: inline-block;
    line-height: 1.3;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.past-contest .contentCMS .winner-title a:hover {
    color: color-mix(in oklab, var(--fallback-p, oklch(var(--p)/1)) 90%, black) !important;
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.past-contest .contentCMS .gradient {
    border: none;
    height: 0.1875rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--fallback-p, oklch(var(--p)/1)), var(--accent), transparent);
    margin-left: 0;
    width: 100%;
    clear: both;
}

.past-contest .contentCMS .winner-rank {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-family: inherit;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0.025em;
    margin-bottom: 0.5rem;
    background-color: transparent;
    color: var(--fallback-p, oklch(var(--p)/1));
    border: 2px solid var(--fallback-p, oklch(var(--p)/1));
    box-shadow: none;
    transition: none;
    clear: both;
}

.past-contest .contentCMS .winner-rank::before {
    font-family: var(--fa-family, var(--fa-style-family, "Font Awesome 7 Free"));
    font-weight: 900;
    content: '\f091';
    font-size: 0.875rem;
    color: var(--fallback-p, oklch(var(--p)/1));
}

.past-contest .contentCMS .row:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.2);
}
.past-contest .contentCMS .other-finalists {
    border: var(--fallback-p, oklch(var(--p)/1)) 1px solid;
    color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
    grid-column: 1 / -1;
}

.past-contest .contentCMS .other-finalists h3 {
    font-size: 1.5rem;
    font-family: 'Londrina Solid', sans-serif;
    color: white !important;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}


.past-contest .contentCMS .other-finalists p {
    color: white;
    margin-bottom: 1rem;
    line-height: 1.625;
}

.past-contest .contentCMS .other-finalists p:last-child {
    margin-bottom: 0;
}



.past-contest .contentCMS .other-finalists b {
    font-weight: 700;
    color: white;
}

.past-contest .contentCMS .other-finalists em {
    font-size: 0.875rem;
    opacity: 0.75;
    font-style: italic;
}

@media (max-width: 768px) {
    .past-contest .contentCMS .contest-winners-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .past-contest .contentCMS .winner-age-group + .row,
    .past-contest .contentCMS .row.gold-separator-plus {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    
    .past-contest .contentCMS .row {
        padding: 1.25rem;
        min-height: 160px;
    }
    
    .past-contest .contentCMS .col-sm-3,
    .past-contest .contentCMS .col-md-4,
    .past-contest .contentCMS .col-lg-3 {
    float: none;
    margin-bottom: 0.75rem;
    text-align: left;
    margin-right: 0;
    }
    
    .past-contest .contentCMS .winner-img {
        width: 5rem;
        height: 5rem;
        margin: 0;
        border-width: 2px;
    }
    
    .past-contest .contentCMS .col-sm-9,
    .past-contest .contentCMS .col-md-4,
    .past-contest .contentCMS .col-lg-9 {
        overflow: visible;
    text-align: left;
    }
    
    .past-contest .contentCMS .winner-name + p,
    .past-contest .contentCMS .winner-title {
        text-align: left;
    }
    
    .past-contest .contentCMS .gradient {
        clear: none;
    }
    
    .past-contest .contentCMS .winner-rank {
        clear: none;
    }
    
    .past-contest .contentCMS .winner-age-group {
        font-size: 1.5rem;
    }
    
    .past-contest .contentCMS .masonry {
        flex-direction: column;
        align-items: center;
    }
    
    .past-contest .contentCMS .brick-item {
        width: 100% !important;
        max-width: 300px;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .past-contest .contentCMS .winner-img {
        width: 6rem;
        height: 6rem;
    }
    
    .past-contest .contentCMS .winner-rank {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

[data-theme="dark"] .past-contest .contentCMS .row {
    background-color: var(--card-primary);
}



[data-theme="dark"] .past-contest .contentCMS .winner-img {
    border-color: var(--fallback-p, oklch(var(--p)/1));
}

.past-contest .contentCMS .row {
    animation: fadeInUp 0.6s ease-out;
    transform: translateY(0);
}

.past-contest .contentCMS .row:nth-child(even) {
    animation-delay: 0.1s;
}

.past-contest .contentCMS .row:nth-child(odd) {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.past-contest .contentCMS .row:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.2);
}

.past-contest .contentCMS .row:hover .winner-img {
    transform: none;
    box-shadow: none;
}

.past-contest .contentCMS .winner-img {
    transition: all 0.3s ease;
}

.past-contest .contentCMS .row:hover .winner-rank {
    transform: none;
    box-shadow: none;
}

.past-contest .contentCMS .brick-item {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.past-contest .contentCMS .brick-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px) scale(1.05);
}

.past-contest .contentCMS .winner-name {
    line-height: 2.2rem !important;
    margin-bottom: 0.5rem;
}

.past-contest .contentCMS .winner-title a {
    line-height: 1.4;
    display: block;
}

.past-contest .contentCMS .winner-title a:hover {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.past-contest .contentCMS .winner-age-group {
    position: relative;
    z-index: 1;
}

.past-contest .contentCMS .winner-age-group::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--fallback-p, oklch(var(--p)/1)), transparent);
    opacity: 0.1;
}

.past-contest .contentCMS .other-finalists {
    position: relative;
}

@media print {
    .past-contest .contentCMS .masonry,
    .past-contest .contentCMS .brick-item {
        display: none;
    }
    
    .past-contest .contentCMS .row {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .past-contest .contentCMS .winner-age-group {
        break-after: avoid;
    }
}

.past-contest .contentCMS a {
    color: var(--fallback-p, oklch(var(--p)/1));
    transition: color 0.3s ease;
}

.past-contest .contentCMS a:hover {
    color: color-mix(in oklab, var(--fallback-p, oklch(var(--p)/1)) 90%, black);
}

.past-contest .contentCMS a:visited {
    color: var(--fallback-p, oklch(var(--p)/1));
}

.past-contest .contentCMS .row>.col-sm-9,
.past-contest .contentCMS .row>.col-lg-9,
.past-contest .contentCMS .row>.col-md-4:last-child {
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0;
}