/**
 * Sponsored Ads Carousel Styles
 */

.sponsored-ads-section {
    position: relative;
    max-width: 1200px;
    margin: 30px auto;
    padding: 25px 50px 20px;
}

.sponsored-ads-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    position: relative;
}

.sponsored-ads-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.sponsored-ads-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary, #3f7dfa);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.sponsored-ads-info-btn:hover {
    background: #2563eb;
    transform: scale(1.1);
    color: #ffffff !important;
}

.sponsored-ads-info-popup {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    z-index: 100;
    background: #ffffff;
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    max-width: 340px;
    width: 100%;
    animation: sponsoredPopupIn 0.25s ease;
}

.sponsored-ads-info-popup.is-visible { display: block; }

@keyframes sponsoredPopupIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sponsored-ads-info-popup p { margin: 0 0 10px; font-size: 14px; color: #333; line-height: 1.5; }

.sponsored-ads-info-close {
    position: absolute; top: 8px; right: 12px;
    background: none; border: none; font-size: 22px; color: #999; cursor: pointer; padding: 0; line-height: 1;
}
.sponsored-ads-info-close:hover { color: #333; }

.sponsored-ads-info-cta {
    display: inline-block; padding: 8px 20px;
    background: var(--color-primary, #3f7dfa); color: #ffffff !important;
    border-radius: 6px; text-decoration: none !important; font-size: 13px; font-weight: 600;
    transition: background 0.3s ease;
}
.sponsored-ads-info-cta:hover { background: #2563eb; }

.sponsored-ads-carousel { overflow: hidden; }

.sponsored-ad-card {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none !important; border-radius: 10px; background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease; position: relative; height: 100%;
}
.sponsored-ad-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); }

.sponsored-ad-card__image { width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #f0f2f5; }
.sponsored-ad-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.sponsored-ad-card:hover .sponsored-ad-card__image img { transform: scale(1.05); }

.sponsored-ad-card__image--placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #e8ecf1, #d1d8e0);
}
.sponsored-ad-card__placeholder-icon { font-size: 44px; font-weight: 700; color: var(--color-primary, #3f7dfa); opacity: 0.6; }

/* Ad with no artwork yet: show its name on a clean panel rather than a broken image */
.sponsored-ad-card__placeholder-name {
    padding: 0 18px; text-align: center; font-size: 17px; font-weight: 700; line-height: 1.35;
    color: #1a2b4a; letter-spacing: 0.01em;
}

.sponsored-ad-card__name {
    display: block; padding: 12px 14px 8px; font-size: 15px; font-weight: 600;
    color: #333; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;
}

.sponsored-ad-card__badge {
    display: inline-block; padding: 3px 10px; margin-bottom: 12px;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--color-primary, #3f7dfa); background: rgba(63, 125, 250, 0.1); border-radius: 4px;
}

.sponsored-ads-nav {
    position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%);
    display: flex; justify-content: space-between; pointer-events: none; z-index: 10; padding: 0 8px;
}

.sponsored-ads-nav__prev,
.sponsored-ads-nav__next {
    pointer-events: all; width: 40px; height: 40px; border-radius: 50%;
    background: #ffffff; border: 1px solid #ddd; color: #555; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; padding: 0; text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.sponsored-ads-nav__prev:hover,
.sponsored-ads-nav__next:hover {
    background: var(--color-primary, #3f7dfa); border-color: var(--color-primary, #3f7dfa); color: #ffffff;
}

.directorist-single-contents-area .sponsored-ads-section { margin-top: 40px; padding-top: 30px; border-top: 1px solid #eee; }

@media (max-width: 768px) {
    .sponsored-ads-section { padding: 18px 40px 15px; }
    .sponsored-ads-title { font-size: 19px; }
    .sponsored-ad-card__name { font-size: 14px; }
    .sponsored-ad-card__badge { font-size: 10px; }
    /* 8px inset + 32px button = 40px: flush with the section padding, no card overlap */
    .sponsored-ads-nav__prev, .sponsored-ads-nav__next { width: 32px; height: 32px; }
    .sponsored-ads-nav__prev svg, .sponsored-ads-nav__next svg { width: 15px; height: 15px; }
}

@media (max-width: 576px) {
    .sponsored-ads-section { padding: 15px 32px 12px; margin: 20px auto; }
    .sponsored-ads-title { font-size: 17px; }
    .sponsored-ad-card__name { font-size: 13px; }
    /* 8px inset + 24px button = 32px: flush with the section padding */
    .sponsored-ads-nav__prev, .sponsored-ads-nav__next { width: 24px; height: 24px; }
    .sponsored-ads-nav__prev svg, .sponsored-ads-nav__next svg { width: 12px; height: 12px; }
}
