.footer iframe {
    position: fixed;
    bottom: 0;
    z-index: 9999;
}

.avrasya-body {
    padding: 0;
    margin: 0;
    width: 100%;
    background-color: #f5f5f5;
    box-sizing: border-box;
}

.avrasya-footer-notifi iframe {
    position: fixed;
    bottom: 0;
    z-index: 9999999;
}

.avrasya-tablo-container {
    padding: 1px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.avrasya-header-popup {
    position: fixed;
    top: 0;
    z-index: 9999999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.avrasya-header-popup-content {
    margin: 0 auto;
}

.avrasya-header-popup-content img {
    width: 100%;
    object-fit: contain;
}

.avrasya-tablo-topside {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.avrasya-avrasya-tablo-topcard-continer,
.avrasya-avrasya-tablo-card-continer,
.avrasya-tablo-bottomcard-continer {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1px 0;
}

.avrasya-tablo-topcard,
.avrasya-tablo-topcard-mobile {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
}

.avrasya-tablo-topcard-mobile {
    display: none;
}

.avrasya-tablo-card,
.avrasya-tablo-card-mobile {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
}

.avrasya-tablo-card-mobile {
    display: none;
}

.avrasya-tablo-bottomcard,
.avrasya-tablo-bottomcard-mobile {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
}

.avrasya-tablo-bottomcard-mobile {
    display: none;
}

.avrasya-tablo-topcard a,
.avrasya-tablo-topcard-mobile a,
.avrasya-tablo-card a,
.avrasya-tablo-card-mobile a,
.avrasya-tablo-bottomcard a,
.avrasya-tablo-bottomcard-mobile a {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: transform .3s ease;
    background-color: #fff;
}

.avrasya-tablo-topcard a img,
.avrasya-tablo-topcard-mobile a img,
.avrasya-tablo-card a img,
.avrasya-tablo-card-mobile a img,
.avrasya-tablo-bottomcard a img,
.avrasya-tablo-bottomcard-mobile a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 5px;
}

.avrasya-tablo-bottomside {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}

.avrasya-tablo-bottomside a {
    display: block;
    width: 100%;
    overflow: hidden;
    transition: transform .3s ease;
    background-color: #fff;
}

.avrasya-tablo-bottomside a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 5px;
}

.avrasya-footer-popup {
    position: fixed;
    bottom: 0;
    z-index: 9999999;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, .1);
    margin-top: auto;
}

.avrasya-footer-popup-content {
    margin: 0 auto;
    padding: 0;
}

.avrasya-footer-popup-content img {
    width: 100%;
    object-fit: contain;
}

.avrasya-tablo-giris-button {
    margin: 1px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.avrasya-footer-popup-content-left {
    margin-bottom: -6px;
}

.avrasya-header-popup-content-left {
    margin-bottom: -6px;
}

.avrasya-tablo-giris-button {
    margin: 1px 0;
    width: 100%;
    border-radius: 5px;
    padding: 0;
    background: linear-gradient(90deg, #00a2ff, #00ff73, #ffe600, #ff7b00, #ff00c8, #00a2ff);
    background-size: 300% 100%;
    animation: ledBorderMove 4s linear infinite;
    overflow: hidden;
}

.avrasya-tablo-giris-button a.button {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px;
    width: calc(100% - 4px);
    min-height: 44px;
    border-radius: 3px;
    background: #222;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .4);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
}

@keyframes ledBorderMove {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

#close-top:checked~.avrasya-header-popup {
    display: none;
}

#close-bottom:checked~.avrasya-footer-popup {
    display: none;
}

.avrasya-tablo-banner-wrapper {
    position: relative;
}

.avrasya-iletisim-bar {
    width: 100%;
    box-sizing: border-box;
    margin: 16px 0 1px;
    padding: 22px 16px;
    background: #d32f2f;
    color: #fff;
    text-align: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(211, 47, 47, .25);
}

.avrasya-iletisim-bar a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: .3px;
}

.avrasya-iletisim-bar svg {
    width: 18px;
    height: 18px;
    fill: #fff;
    flex-shrink: 0;
}

.avrasya-iletisim-bar strong {
    color: #ffeb3b;
    font-weight: 700;
}

.avrasya-iletisim-bar a:hover strong,
.avrasya-iletisim-bar a:focus strong {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 500px) {
    .avrasya-iletisim-bar {
        font-size: 14px;
        padding: 18px 12px;
    }
    .avrasya-iletisim-bar svg {
        width: 16px;
        height: 16px;
    }
    .avrasya-iletisim-bar a {
        gap: 6px;
    }
}

.tablo-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 25px;
    height: 25px;
    line-height: 20px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #000;
    cursor: pointer;
    user-select: none;
    z-index: 99999999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

.tablo-close-btn:hover,
.tablo-close-btn:focus {
    outline: 2px solid rgba(255, 255, 255, .7);
}

.avrasya-tablo-bottomside-container {
    width: 100%;
    margin: 1px 0;
}

.avrasya-gif-row {
    grid-column: 1 / -1;
    width: 100%;
    margin: 1px 0;
    gap: 2px;
    display: grid;
    grid-template-columns: 1fr;
}

.avrasya-gif-row-mobile {
    display: none;
}

.avrasya-gif-row a {
    display: block;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    transition: transform .3s ease;
    background-color: #fff;
}

.avrasya-gif-row a img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 5px;
}

#close-top:checked~.avrasya-header-popup {
    display: none;
}

#close-top:checked~.header-spacer {
    display: none;
}

@media (min-width: 600px) {
    .header-spacer {
        padding-bottom: 74px;
    }
}

@media (max-width: 1200px) {
    .avrasya-tablo-topcard-mobile {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
    .avrasya-tablo-card-mobile {
        grid-template-columns: repeat(4, 1fr);
    }
    .avrasya-tablo-bottomcard-mobile {
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .avrasya-gif-row {
        display: none;
    }
    .avrasya-gif-row-mobile {
        display: grid;
    }
    .avrasya-tablo-topcard-mobile,
    .avrasya-tablo-card-mobile,
    .avrasya-tablo-bottomcard-mobile {
        display: grid;
    }
    .avrasya-tablo-topcard,
    .avrasya-tablo-card,
    .avrasya-tablo-bottomcard {
        display: none;
    }
    .avrasya-tablo-topcard-mobile {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }
    .avrasya-tablo-card-mobile {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
    .avrasya-tablo-bottomcard-mobile {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr 1fr;
    }
    .avrasya-tablo-bottomside {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .header-spacer {
        width: 100%;
        aspect-ratio: var(--header-w, 600) / var(--header-h, 74);
    }
}

@media (max-width: 500px) {
    .avrasya-tablo-giris-button a.button {
        font-size: 15px;
    }
    .tablo-close-btn {
        width: 15px;
        height: 15px;
        font-size: 15px;
        line-height: 12px;
    }
}

@media (max-width: 400px) {
    .tablo-close-btn {
        width: 15px;
        height: 15px;
        font-size: 15px;
        line-height: 12px;
    }
}

/* When a banner-row container has only one ad left, span it full-width
   instead of leaving the remaining grid cells empty. */
.avrasya-tablo-topcard:has(> a:only-child),
.avrasya-tablo-topcard-mobile:has(> a:only-child),
.avrasya-tablo-bottomcard:has(> a:only-child),
.avrasya-tablo-bottomcard-mobile:has(> a:only-child),
.avrasya-tablo-card:has(> a:only-child),
.avrasya-tablo-card-mobile:has(> a:only-child) {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
}

/* Two-column tablo grid with an odd item count: collapse to single
   column when 1 item is left over so no empty cell appears. */
.avrasya-tablo-bottomside:has(> a:nth-child(1):nth-last-child(1)),
.avrasya-tablo-bottomside:has(> a:only-child) {
    grid-template-columns: 1fr;
}
