/**
 * AllyouneedisHarry - Ad System v2
 * Selektoren: aynih-ad-badge, aynih-ad--XX, aynih-ad__*
 * Responsiv via @media (kein JS, keine Body-Klassen, kein Layout-Sprung)
 * Geladen global: /media/com_allyou_ads/css/allyou-ads.css
 */

/* =========================================================
   BADGE — aeusserer Rahmen mit Anzeige-Label
========================================================= */
.aynih-ad-badge {
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid #205083;
    border-radius: 22px;
    padding: 2em 1.6em 1.4em;
    margin: 2em auto;
    width: 100%;
    max-width: 810px;
    box-sizing: border-box;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    }

.aynih-ad-badge:hover {
    box-shadow: 0 12px 38px rgba(20, 67, 123, 0.32);
    border-color: #3ea8fa;
    }

.aynih-ad-badge__label {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(90deg, #3ea8fa 70%, #205083 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.22em 0.7em;
    border-radius: 20px 0 10px 0;
    pointer-events: none;
    user-select: none;
    }

.aynih-ad-badge__inner {
    width: 100%;
    }

/* =========================================================
   AD-ITEMS — Rotation Stack
========================================================= */

/* Alle Items standardmaessig versteckt */
.aynih-ad-item {
    display: none;
    }

/* Nur das aktive Item sichtbar */
.aynih-ad-item.is-active {
    display: block;
    }

/* Sanfter Uebergang beim Wechsel */
.aynih-ad-item.is-active .aynih-ad__link {
    animation: aynih-fadein 0.5s ease;
    }

@keyframes aynih-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
    }

/* =========================================================
   AD — innere Karte (generische Struktur, gilt fuer alle Ads)
========================================================= */
.aynih-ad__link {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    height: 90px;
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    padding: 0 1em;
    box-sizing: border-box;
    }

.aynih-ad__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #205083 0%, #1c8d73 50%, #d4af37 100%);
    background-size: 300% 300%;
    animation: aynih-gradient 12s ease infinite;
    z-index: 0;
    }

.aynih-ad__thumb {
    flex: 0 0 auto;
    z-index: 1;
    }

.aynih-ad__thumb img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
    animation: aynih-wobble 6s ease-in-out infinite;
    }

.aynih-ad__link:hover .aynih-ad__thumb img {
    transform: scale(1.1) rotate(-3deg);
    }

.aynih-ad__text {
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    }

.aynih-ad__headline {
    margin: 0;
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    }

.aynih-ad__subtext {
    margin: 0.15em 0 0;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    }

.aynih-ad__cta {
    display: inline-block;
    margin-top: 0.3em;
    padding: 0.22em 0.75em;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: #ffd700;
    font-weight: 700;
    font-size: 0.82em;
    letter-spacing: 0.02em;
    animation: aynih-wobble 4s ease-in-out infinite;
    align-self: flex-start;
    white-space: nowrap;
    }

.aynih-ad__link:hover .aynih-ad__cta {
    background: #ffd700;
    color: #000;
    transform: scale(1.05);
    }

/* Glow-Animation am Badge */
.aynih-ad-badge {
    animation: aynih-glow 6s ease-in-out infinite;
    }

/* =========================================================
   ANIMATIONEN
========================================================= */
@keyframes aynih-gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
    }

@keyframes aynih-wobble {
    0%, 100% { transform: scale(1) rotate(0deg); }
    20%      { transform: scale(1.05) rotate(-2deg); }
    40%      { transform: scale(1.1) rotate(2deg); }
    60%      { transform: scale(1.05) rotate(-2deg); }
    80%      { transform: scale(1.08) rotate(1deg); }
    }

@keyframes aynih-glow {
    0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 0 6px rgba(255,215,0,0.12); }
    50%      { box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 0 14px rgba(255,215,0,0.28); }
    }

/* =========================================================
   RESPONSIVE — echte @media Queries, kein JS noetig
========================================================= */

/* Smartphone klein: bis 400px */
@media (max-width: 400px) {
    .aynih-ad-badge        { padding: 1.6em 0.7em 1em; border-radius: 14px; }
    .aynih-ad__link        { height: 60px; padding: 0 0.5em; gap: 8px; }
    .aynih-ad__thumb img   { width: 32px; height: 50px; border-radius: 6px; }
    .aynih-ad__headline    { font-size: 0.8em; }
    .aynih-ad__subtext     { font-size: 0.55em; }
    .aynih-ad__cta         { font-size: 0.5em; padding: 0.1em 0.35em; }
    }

/* Smartphone: 401–600px */
@media (min-width: 401px) and (max-width: 600px) {
    .aynih-ad-badge        { padding: 1.7em 0.9em 1.1em; border-radius: 16px; }
    .aynih-ad__link        { height: 70px; padding: 0 0.7em; gap: 10px; }
    .aynih-ad__thumb img   { width: 44px; height: 58px; border-radius: 8px; }
    .aynih-ad__headline    { font-size: 0.9em; }
    .aynih-ad__subtext     { font-size: 0.65em; }
    .aynih-ad__cta         { font-size: 0.6em; }
    }

/* Tablet klein: 601–900px */
@media (min-width: 601px) and (max-width: 900px) {
    .aynih-ad__link        { height: 80px; }
    .aynih-ad__thumb img   { width: 54px; height: 62px; }
    .aynih-ad__headline    { font-size: 1em; }
    }

/* Desktop: ab 901px — Standardgroesse aus den Basisregeln */

/* =========================================================
   LAYOUT-VARIANTEN
========================================================= */

/* Bild rechts */
.aynih-layout--right .aynih-ad__link {
    flex-direction: row-reverse;
    }

/* Bild oben */
.aynih-layout--top .aynih-ad__link {
    flex-direction: column;
    height: auto;
    min-height: 130px;
    padding: 0.8em 1em;
    gap: 8px;
    align-items: flex-start;
    }

.aynih-layout--top .aynih-ad__thumb img {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    }

.aynih-layout--top .aynih-ad__text {
    width: 100%;
    }
