/* Responsive Reklam Sistemi CSS - Tam Görünüm Mobil Uyumlu */
.reklam-alani {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
    margin: 10px auto;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    /* Mobilde küçük boyut */
    max-height: 120px;
    min-height: 80px;
}

.reklam-alani a {
    display: block;
    width: 100% !important;
    height: auto !important;
    text-decoration: none;
    text-align: center;
}

.reklam-alani img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important; /* Contain kullan, crop etme */
    border-radius: 6px;
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
    /* Mobilde maksimum yükseklik sınırı */
    max-height: 100px;
}

/* Mobil cihazlar için - TAM GÖRÜNÜM */
@media screen and (max-width: 768px) {
    .reklam-alani {
        margin: 8px auto !important;
        padding: 6px !important;
        /* Mobilde küçük sabit boyut */
        max-height: 100px !important;
        min-height: 60px !important;
        height: auto !important;
    }
    
    .reklam-alani img {
        /* Mobilde küçük boyut */
        height: auto !important;
        width: 100% !important;
        object-fit: contain !important; /* Contain kullan */
        max-height: 80px !important; /* Mobilde maksimum yükseklik */
        border-radius: 4px;
    }
    
    /* Ana sayfa büyük reklamlar - mobilde küçük boyut */
    .reklam-yeri-2, .reklam-yeri-7, .reklam-yeri-8, .reklam-yeri-9, 
    .reklam-yeri-10, .reklam-yeri-11, .reklam-yeri-13, .reklam-yeri-15, 
    .reklam-yeri-16, .reklam-yeri-25, .reklam-yeri-36, .reklam-yeri-38 {
        max-height: 120px !important;
        min-height: 80px !important;
        height: auto;
    }
    
    .reklam-yeri-2 img, .reklam-yeri-7 img, .reklam-yeri-8 img, .reklam-yeri-9 img,
    .reklam-yeri-10 img, .reklam-yeri-11 img, .reklam-yeri-13 img, .reklam-yeri-15 img,
    .reklam-yeri-16 img, .reklam-yeri-25 img, .reklam-yeri-36 img, .reklam-yeri-38 img {
        height: auto !important;
        max-height: 100px !important;
        object-fit: contain !important;
    }
    
    /* Banner tarzı reklamlar */
    .reklam-yeri-12, .reklam-yeri-30, .reklam-yeri-37 {
        max-height: 80px !important;
        min-height: 50px !important;
        height: auto;
    }
    
    .reklam-yeri-12 img, .reklam-yeri-30 img, .reklam-yeri-37 img {
        height: auto !important;
        max-height: 60px !important;
        object-fit: contain !important;
    }
    
    /* Kare reklamlar */
    .reklam-yeri-14, .reklam-yeri-17, .reklam-yeri-19, .reklam-yeri-22,
    .reklam-yeri-23, .reklam-yeri-24, .reklam-yeri-26, .reklam-yeri-27,
    .reklam-yeri-28, .reklam-yeri-29, .reklam-yeri-31, .reklam-yeri-32,
    .reklam-yeri-33, .reklam-yeri-34, .reklam-yeri-35 {
        max-height: 100px !important;
        min-height: 70px !important;
        height: auto;
    }
    
    .reklam-yeri-14 img, .reklam-yeri-17 img, .reklam-yeri-19 img, .reklam-yeri-22 img,
    .reklam-yeri-23 img, .reklam-yeri-24 img, .reklam-yeri-26 img, .reklam-yeri-27 img,
    .reklam-yeri-28 img, .reklam-yeri-29 img, .reklam-yeri-31 img, .reklam-yeri-32 img,
    .reklam-yeri-33 img, .reklam-yeri-34 img, .reklam-yeri-35 img {
        height: auto !important;
        max-height: 80px !important;
        object-fit: contain !important;
    }
    
    /* Özel boyutlu reklamlar */
    .reklam-yeri-18 {
        max-height: 140px !important;
        min-height: 100px !important;
        height: auto;
    }
    
    .reklam-yeri-18 img {
        height: auto !important;
        max-height: 120px !important;
        object-fit: contain !important;
    }
    
    .reklam-yeri-20, .reklam-yeri-21 {
        max-height: 110px !important;
        min-height: 80px !important;
        height: auto;
    }
    
    .reklam-yeri-20 img, .reklam-yeri-21 img {
        height: auto !important;
        max-height: 90px !important;
        object-fit: contain !important;
    }
    
    /* İlk açılış reklamı - mobilde daha küçük */
    .reklam-yeri-1 {
        padding: 15px !important;
        background: rgba(0,0,0,0.9) !important;
        max-height: none !important; /* Popup için sınır yok */
    }
    
    .reklam-yeri-1 img {
        max-width: 90% !important;
        max-height: 70vh !important;
        object-fit: contain !important;
    }
}

/* Tablet cihazlar için */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .reklam-alani {
        margin: 12px auto;
        padding: 8px;
        max-height: 180px;
        min-height: 120px;
    }
    
    .reklam-alani img {
        height: auto !important;
        max-height: 160px !important;
        object-fit: contain !important;
    }
    
    /* Büyük reklamlar tablet'te orta boyut */
    .reklam-yeri-2, .reklam-yeri-7, .reklam-yeri-8, .reklam-yeri-9, 
    .reklam-yeri-10, .reklam-yeri-11, .reklam-yeri-13, .reklam-yeri-15, 
    .reklam-yeri-16, .reklam-yeri-25, .reklam-yeri-36, .reklam-yeri-38 {
        max-height: 200px;
        min-height: 140px;
    }
    
    .reklam-yeri-2 img, .reklam-yeri-7 img, .reklam-yeri-8 img, .reklam-yeri-9 img,
    .reklam-yeri-10 img, .reklam-yeri-11 img, .reklam-yeri-13 img, .reklam-yeri-15 img,
    .reklam-yeri-16 img, .reklam-yeri-25 img, .reklam-yeri-36 img, .reklam-yeri-38 img {
        height: auto !important;
        max-height: 180px !important;
        object-fit: contain !important;
    }
}

/* Desktop için */
@media screen and (min-width: 1025px) {
    .reklam-alani {
        margin: 15px auto;
        padding: 10px;
        max-height: 300px;
        min-height: 200px;
    }
    
    .reklam-alani img {
        height: auto !important;
        max-height: 280px !important;
        object-fit: contain !important;
    }
}

/* Google Ads için özel stil */
.google-ads {
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    padding: 5px !important;
    max-height: none !important; /* Google Ads için sınır yok */
}

.google-ads * {
    max-width: 100% !important;
}


/* Hover efektleri - sadece desktop */
@media (hover: hover) {
    .reklam-alani:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .reklam-alani img:hover {
        transform: scale(1.02);
    }
}

/* Reklam yükleme animasyonu */
.reklam-alani {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

.reklam-alani.loaded {
    animation: none;
    background: #f8f9fa;
}

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

/* Responsive container */
.reklam-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Ortalama için flex kullanımı */
.reklam-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Reklam placeholder */
.reklam-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    color: #6c757d;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    max-height: 120px;
}

/* Reklam kapanma butonu (ilk açılış reklamı için) */
.reklam-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.reklam-close:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

/* Çok küçük ekranlar için ek optimizasyon */
@media screen and (max-width: 480px) {
    .reklam-alani {
        margin: 6px auto !important;
        padding: 4px !important;
        max-height: 80px !important;
        min-height: 50px !important;
    }
    
    .reklam-alani img {
        height: auto !important;
        max-height: 60px !important;
        object-fit: contain !important;
        border-radius: 3px;
    }
    
    .reklam-placeholder {
        padding: 10px;
        font-size: 11px;
        min-height: 50px;
        max-height: 80px;
    }
    
    .reklam-close {
        width: 30px;
        height: 30px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
}

/* 360px ve altı için ekstra optimizasyon */
@media screen and (max-width: 360px) {
    .reklam-alani {
        margin: 5px auto !important;
        padding: 3px !important;
        max-height: 60px !important;
        min-height: 40px !important;
    }
    
    .reklam-alani img {
        height: auto !important;
        max-height: 50px !important;
        object-fit: contain !important;
    }
}

/* Reklam alanının yüklendikten sonra düzgün görünmesi için */
.reklam-alani img[src] {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.reklam-alani img:not([src]) {
    opacity: 0;
}

/* Lazy loading için */
.reklam-alani img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.reklam-alani img[loading="lazy"].loaded {
    opacity: 1;
}