:root {
    --ponsor-unit: calc(100% / 12);
    --ponsor-unit-mobile: calc(100% / 4);
}

#join-popup {
    position: absolute;
    z-index: 0;
    opacity: 0;
    transition: opacity 200ms ease;
    pointer-events: none;
}

#join-popup.active {
    opacity: 1;
    z-index: 5;
    pointer-events: initial;
}

.join-now {
    background: url(../images/bgs/join-now.webp);
    background-size: cover;
    border-radius: 12px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 24px 36px;
    color: white;
}

.join-now .join-now-btn {
    background: white;
    color: black;
    padding: 16px 24px;
    border-radius: 6px;
    border: none !important;
    opacity: 1;
    transition: all 200ms ease;
}

.join-now .join-now-btn:hover {
    opacity: 0.8;
}

.join-now .join-title {
    font-size: 1.8rem;
}

.join-now .join-desc {
    font-size: 0.8rem;
}

.external-link {
    position: absolute;
    z-index: 5;
    top: 2px;
    right: 6px;

    transform: scale(1);
    transition: all 200ms ease;
}

.external-link:hover {
    transform: scale(1.1) !important;
}

.external-link.ponsor-theme i {
    text-shadow: 0 0 4px #a7370b61;
}

.external-link.ponsor-theme-light i {
    color: white !important;
    text-shadow: 0px 2px 4px rgba(255, 255, 255, 0.334);
}

.external-link.ponsor-theme-dark i {
    color: #00396f !important;
    text-shadow: 0px 2px 4px #00396f3f;
}

.ponsors-display .ponsor-grid {
    position: absolute;
    width: 100%;
}

.ponsor-grid {
    /* display: grid;
    grid-template-columns: repeat(4, 1fr); 
    grid-auto-rows: 1fr;
    grid-auto-flow: row dense;
    align-items: stretch; */
    position: relative;
    pointer-events: none;
}

.ponsor-grid .ponsor-grid-item {
    /* background: red; */
    display: flex;
    justify-content: center;
    align-items: center;
    /* padding: 32px; */
    position: absolute;
    height: auto;
    aspect-ratio: 1;
    margin: 2px;
    /* cursor: pointer; */
    pointer-events: auto;
}

#ponsor-grid-default > div {
    height: auto;
    aspect-ratio: 1;
    margin: 2px;
    position: relative;
    cursor: pointer;
}

#ponsor-grid-default > div {
}

.col-tier-1 {
    width: calc(var(--ponsor-unit-mobile) * 3 - (2px * 2));
}

.col-tier-2 {
    width: calc(var(--ponsor-unit-mobile) * 2 - (2px * 2));
}

.col-tier-3 {
    width: calc(var(--ponsor-unit-mobile) - (2px * 2));
}

.ponsor-theme * {
    color: #ff6e21 !important;
}

.ponsor-theme-dark * {
    color: #373737 !important;
}

.ponsor-theme-light * {
    color: white !important;
}

.ponsor-grid .tier-1 {
    width: calc(100% / 12);
    height: auto;
    aspect-ratio: 1 / 1;
}

.ponsor-grid > .ponsor-small {
    /* grid-column: span 1;
    grid-row: span 1; */
    width: 25%;
    height: auto;
    aspect-ratio: 4 / 3;
}

.ponsor-grid > .ponsor-wide {
    /* grid-column: span 2;
    grid-row: span 1;  */
    width: 50%;
    height: auto;
    aspect-ratio: 8/3;
}

.ponsor-grid > .ponsor-tall {
    /* grid-column: span 1;
    grid-row: span 2;  */
    width: 25%;
    height: auto;
    aspect-ratio: 2 / 3;
}

.ponsor-grid > .ponsor-big {
    /* grid-column: span 2;
    grid-row: span 2;  */
    width: 50%;
    height: auto;
    aspect-ratio: 4/3;
}

.ponsor-grid > .ponsor-wide-2 {
    /* grid-column: span 2;
    grid-row: span 1;  */
    width: 75%;
    height: auto;
    aspect-ratio: 8/3;
}
.ponsor-grid > .ponsor-tall-2 {
    /* grid-column: span 1;
    grid-row: span 2;  */
    width: 50%;
    height: auto;
    aspect-ratio: 2 / 3;
}

.ponsor-grid > .ponsor-big-2 {
    /* grid-column: span 2;
    grid-row: span 2;  */
    width: 75%;
    height: auto;
    aspect-ratio: 4/3;
}

.ponsor-grid > .ponsor-small {
    font-size: 0.6rem;
    text-align: justify;
}

.ponsor-grid > .ponsor-wide.ponsor-layout-3 {
    font-size: 0.6rem;
    text-align: start;
}

.ponsor-grid > .ponsor-wide.ponsor-layout-3 {
    text-align: center;
}

.ponsor-grid > .ponsor-wide.ponsor-layout-3 .inner {
    align-items: start;
    text-align: start;
    row-gap: 10px;
}

.ponsor-grid > .ponsor-wide.ponsor-layout-3 .name,
.ponsor-grid > .ponsor-small .name {
    font-size: 1.2rem;
    font-weight: 600;
}
.ponsor-bg-dark-1 .wrapper * {
    color: white;
}

.ponsor-bg-none .wrapper * {
    color: white;
}

.ponsor-layout-1 {
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
}

.ponsor-layout-1 .wrapper {
    width: 100%;
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 49.31%,
        rgba(0, 0, 0, 0.7) 90.48%
    );
}

.ponsor-layout-0 .bg-img,
.ponsor-layout-3 .bg-img,
.ponsor-layout-2 .bg-img,
.ponsor-layout-1 .bg-img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

.ponsor-layout-0 .bg-img {
    object-fit: contain;
}

.ponsor-layout-2 {
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ponsor-layout-2 .wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    row-gap: 8px;
    padding: 24px 32px;
}

.ponsor-layout-0 .wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    row-gap: 6px;
    /* cursor: pointer; */
}

.ponsor-layout-0 .wrapper .logo-img {
    max-width: 80%;
    max-height: 80%;
}

.ponsor-layout-2 .wrapper img {
    max-width: 90%;
    max-height: 50%;
}

.ponsor-layout-2 .wrapper .desc {
    font-size: 0.6rem;
    text-align: center;
}

.ponsor-layout-2 .wrapper .name {
    font-size: 1rem;
    text-align: justify;
    font-weight: 600;
}

.ponsor-layout-2 .wrapper span {
    font-size: 0.7rem;
    margin-top: 0.5rem;
}

.ponsor-layout-3 {
    position: relative;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.ponsor-layout-3 .wrapper {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    column-gap: 2rem;
}

.ponsor-layout-3 .wrapper .inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ponsor-layout-3 .wrapper img {
    max-width: 40%;
    max-height: 48%;
}

@media (min-width: 992px) {
    .col-tier-1 {
        width: calc(var(--ponsor-unit) * 3 - (2px * 2));
    }

    .col-tier-2 {
        width: calc(var(--ponsor-unit) * 2 - (2px * 2));
    }

    .col-tier-3 {
        width: calc(var(--ponsor-unit) - (2px * 2));
    }
}
