/* =============================================================
   ads.css — რეკლამის ბლოკი: იგივე ჩარჩოებიანი დიზაინი, რაც დანარჩენ პანელებს აქვს.
   ბანერი, ვიდეო და ტექსტი ავტომატურად ეწყობა ეკრანს (ტელეფონი / პლანშეტი / კომპიუტერი).
   ============================================================= */
.ads-slot {
    display: block; box-sizing: border-box; width: 100%;
    max-width: calc(var(--page-max, 1200px) - 2 * var(--page-pad, 24px));
    margin: 0 auto 14px; padding: 14px; text-align: center;
    overflow: hidden; min-width: 0;
    border: 2px solid transparent; border-radius: var(--frame-r, 18px);
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box, var(--frame-grad, linear-gradient(135deg, rgba(108,92,231,.7), rgba(0,217,192,.7))) border-box;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.ads-head {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 14px; font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--text-primary);
    background: var(--frame-inner, #131722); border: 1px solid var(--frame-line, #2a3147);
    border-left: 4px solid var(--accent); border-radius: var(--frame-r-in, 12px);
}
.ads-list { display: grid; gap: 12px; margin-top: 12px; min-width: 0; }
.ads-item {
    position: relative; box-sizing: border-box; margin: 0; min-width: 0; max-width: 100%;
    padding: 8px; overflow: hidden; text-align: center;
    background: var(--frame-inner, #131722); border: 1px solid var(--frame-line, #2a3147);
    border-radius: var(--frame-r-in, 12px);
}
.ads-tag {
    position: absolute; top: 12px; left: 12px; z-index: 2; padding: 2px 8px; border-radius: 999px;
    font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.5;
    color: #fff; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); pointer-events: none;
}
/* ბანერი: ორიგინალზე დიდად არ იჭიმება, ეკრანზე ვიწროვდება, ძალიან მაღალი სურათი იზღუდება */
.ads-item a { display: block; line-height: 0; }
.ads-img img {
    display: block; margin: 0 auto; width: auto; height: auto;
    max-width: 100%; max-height: min(70vh, 520px);
    object-fit: contain; border-radius: 8px;
}
/* ვიდეო: 16:9, კომპიუტერზე მაქს. 760px, ცენტრში */
.ads-video { padding: 8px; }
.ads-video .ads-frame {
    position: relative; width: 100%; max-width: 760px; margin: 0 auto; aspect-ratio: 16 / 9;
    background: #000; border-radius: 8px; overflow: hidden;
}
.ads-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ads-vfile video {
    display: block; margin: 0 auto; width: 100%; max-width: 760px; height: auto;
    max-height: min(70vh, 520px); background: #000; border-radius: 8px; object-fit: contain;
}
/* ტექსტური რეკლამა */
.ads-text { padding: 14px; text-align: left; }
.ads-text .ads-t {
    display: block; margin: 0 0 8px; padding: 0 0 0 10px; font-size: 17px; font-weight: 700; line-height: 1.35;
    color: var(--text-primary); border-left: 3px solid var(--accent); overflow-wrap: anywhere;
}
.ads-text p { margin: 0 0 12px; line-height: 1.6; color: var(--text-secondary); overflow-wrap: anywhere; word-break: break-word; }
.ads-text p:last-child { margin-bottom: 0; }
a.ads-go {
    display: inline-block; max-width: 100%; box-sizing: border-box; padding: 9px 16px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2, var(--accent))); color: #fff;
    text-decoration: none; font-weight: 700; font-size: 14px; line-height: 1.3;
}
.ads-text a.ads-go { margin-top: 2px; }
/* ადმინის HTML/JS კოდი */
.ads-code { overflow-x: auto; line-height: normal; }
.ads-code img, .ads-code iframe, .ads-code video { max-width: 100%; height: auto; }
/* „რეკლამის ადგილი“ (როცა აქტიური რეკლამა არ არის) */
.ads-empty { padding: 14px; }
.ads-empty p { margin: 0 0 12px; line-height: 1.55; color: var(--text-secondary); }
.ads-order-link { display: inline-block; margin: 12px 0 0; padding: 8px 14px; font-size: 13px; color: var(--text-secondary); text-decoration: none; border: 1px dashed var(--frame-line, #2a3147); border-radius: 10px; }
.ads-order-link:hover { color: var(--text-primary); border-color: var(--accent); }
@media (min-width: 900px) {
    .ads-text { padding: 18px 22px; }
    /* რამდენიმე ტექსტური რეკლამა ერთმანეთის გვერდით */
    .ads-list.ads-multi-text { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}
@media (max-width: 520px) {
    .ads-slot { padding: 10px; }
    .ads-head { font-size: 16px; padding: 9px 12px; }
    .ads-item { padding: 6px; }
    .ads-img img { max-height: 60vh; }
}
