/* =========================
   Ads Section
========================= */

.home-ads-section {
    padding: 40px 0;
    display: block;
    visibility: visible;
}
.home-ads-section {
    padding-bottom: 2.5rem;
}

.home-ads-section.reveal {
    opacity: 1;
    transform: none;
}

/* =========================
   Ads Grid
========================= */

.ads-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ads-grid:has(.ads-item:only-child) {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
}

/* =========================
   Ads Item
========================= */

.ads-item {
    position: relative;
    min-height: 320px;
    border-radius: 10px;
    overflow: hidden;

    background-size: cover;
    background-position: center;

    border: 1px solid #eaeaea;
    transition:
        border-color .25s ease,
        box-shadow .25s ease;
}

/* image micro-interaction */
.ads-item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    transform: scale(1);
    transition: transform 1.2s ease;
    z-index: 0;
}

.ads-item:hover::before {
    transform: scale(1.08);
}

.ads-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
}

/* =========================
   Overlay
========================= */

.ads-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    display: flex;
    align-items: flex-end;

    padding: 28px;

    background: linear-gradient(
        to top,
        rgba(0,0,0,.65),
        rgba(0,0,0,.15)
    );

    color: #ffffff;
}

/* RTL / LTR smart alignment */
html[dir="rtl"] .ads-content {
    text-align: right;
    align-items: flex-end;
}

html[dir="ltr"] .ads-content {
    text-align: left;
    align-items: flex-start;
}

.ads-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 85%;
}

/* =========================
   Headline
========================= */

.ads-headline {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 6px 16px rgba(0,0,0,.45);
}

/* =========================
   Animated Text
========================= */

.ads-animated-text {
    font-size: 18px;
    min-height: 1.8em;
    overflow: hidden;
}

/* base */
.ads-animated-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px) scale(.96);
    filter: blur(2px);

    transition:
        opacity .45s ease,
        transform .45s ease,
        filter .45s ease,
        color .35s ease;

    text-shadow: 0 4px 12px rgba(0,0,0,.45);
}

/* visible */
.ads-animated-text span.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* subtle pulse emphasis */
.ads-animated-text span.fx-scale {
    animation: adsPulse 1.8s ease;
}

@keyframes adsPulse {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* alternating colors */
.ads-animated-text span.is-primary {
    color: var(--primary-color);
}

.ads-animated-text span.is-white {
    color: #ffffff;
}

/* =========================
   Responsive
========================= */

@media (max-width: 991px) {
    .ads-grid {
        grid-template-columns: 1fr;
    }

    .ads-headline {
        font-size: 24px;
    }

    .ads-animated-text {
        font-size: 16px;
    }
}
