/* ================================================
   TABLO REKLAM SİSTEMİ - FRONTEND CSS
   Bu CSS tüm müşteri sitelerinde kullanılır.
   ================================================ */

.tablo-main { padding: 0; margin: 0; width: 100%; }

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

/* Header/Footer Popup */
.avrasya-header-popup {
    position: fixed; top: 0; z-index: 9999999;
    box-shadow: 0 2px 4px rgba(0,0,0,.1); width: 100%;
}
.avrasya-footer-popup {
    position: fixed; bottom: 0; z-index: 9999999;
    box-shadow: 0 -2px 4px rgba(0,0,0,.1); width: 100%;
}
.avrasya-header-popup-content,
.avrasya-footer-popup-content {
    margin: 0 auto; padding: 0;
}
.avrasya-header-popup-content img,
.avrasya-footer-popup-content img {
    width: 100%; object-fit: contain;
}
.avrasya-header-popup-content-left,
.avrasya-footer-popup-content-left { margin-bottom: -6px; }

/* Close button */
.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);
}
.avrasya-tablo-banner-wrapper { position: relative; }

/* Checkbox toggle */
#close-top:checked ~ .avrasya-header-popup,
#close-top:checked ~ .header-spacer { display: none; }
#close-bottom:checked ~ .avrasya-footer-popup { display: none; }
.tablo-close-toggle { display: none; }

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

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

/* Card containers */
.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;
}

/* Top cards - 2 column grid */
.avrasya-tablo-topcard,
.avrasya-tablo-topcard-mobile {
    width: 100%; display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 2px;
}
.avrasya-tablo-topcard-mobile { display: none; }

/* VIP cards - 4 column */
.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; }

/* Bottom banner cards */
.avrasya-tablo-bottomcard,
.avrasya-tablo-bottomcard-mobile {
    width: 100%; display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}
.avrasya-tablo-bottomcard-mobile { display: none; }

/* Links & Images */
.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;
}

/* Tablo bottom grid */
.avrasya-tablo-bottomside-container { width: 100%; margin: 1px 0; }
.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;
}

/* GIF rows */
.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, .avrasya-gif-row-mobile a {
    display: block; width: 100%;
    overflow: hidden; transition: transform .3s ease;
    background-color: #fff;
}
.avrasya-gif-row a img, .avrasya-gif-row-mobile a img {
    width: 100%; height: 100%;
    object-fit: contain; display: block; border-radius: 5px;
}

/* Giriş butonu */
.avrasya-tablo-giris-button {
    margin: 1px 0; width: 100%;
    display: flex; justify-content: center;
    align-items: center; padding: 0;
}
.avrasya-tablo-giris-button a.button {
    text-align: center;
    display: inline-flex; align-items: center; justify-content: center;
    width: 100%; min-height: 44px;
    padding: 10px 12px; border-radius: 18px;
    font-size: 18px; font-weight: bold;
    color: #fff !important; text-decoration: none !important;
    text-shadow: 0 2px 0 rgba(0,0,0,.4);
    background: #ff0000 !important;
    margin: 1px 0; position: relative;
    overflow: hidden;
    animation: tablo-radius-pulse 2s ease-in-out infinite;
}
@keyframes tablo-radius-pulse {
    0%   { border-radius: 18px 0px 18px 0px; }
    25%  { border-radius: 0px 18px 0px 18px; }
    50%  { border-radius: 18px 0px 18px 0px; }
    75%  { border-radius: 0px 18px 0px 18px; }
    100% { border-radius: 18px 0px 18px 0px; }
}

/* === RESPONSIVE === */
@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; }
    .avrasya-tablo-card-mobile { grid-template-columns: 1fr 1fr 1fr 1fr; }
    .avrasya-tablo-bottomcard-mobile { grid-template-columns: 1fr 1fr; }
    .avrasya-tablo-bottomside { grid-template-columns: 1fr; }
}

@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; }
}
