/* ==========================================================================
   Homepage — "Hot new casinos": the three casinos the rotation job picked.

   The same visual language as the rest of the site: the dark panel of the
   Latest Slots section, the purple-to-teal gradient, the gradient hairline
   that fades in on hover, the gradient offer text of the /casino-sites/
   cards.

   Every class, custom property and keyframe here ends in -30, so nothing
   collides with tailwind.css, style2.css or the other homepage sheets.
   Logical properties throughout, so right-to-left locales mirror without
   any rule in app/rtl.py.
   ========================================================================== */

.hn-section-30 {
    --hn-purple-30: #a948f8;
    --hn-teal-30: #22e2b6;
    --hn-ink-30: #f5f3ff;
    --hn-text-30: #d6d4de;
    --hn-muted-30: #a3a1ae;
    --hn-faint-30: #77748a;
    --hn-line-30: rgba(255, 255, 255, 0.07);
    --hn-line-strong-30: rgba(255, 255, 255, 0.12);
    --hn-grad-30: linear-gradient(90deg, #a948f8, #22e2b6);
    --hn-grad-loop-30: linear-gradient(90deg, #a948f8, #22e2b6, #a948f8);
    --hn-ease-30: cubic-bezier(.22, 1, .36, 1);
    --hn-font-30: 'Roboto', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

    box-sizing: border-box;
    width: calc(100% - 2rem);
    max-width: 72rem;
    margin: 2rem auto;
    padding: clamp(1rem, 0.6rem + 1.2vw, 1.75rem);
    border-radius: 1.25rem;
    border: 1px solid #242129;
    background:
        radial-gradient(60% 120% at 0% 0%, rgba(169, 72, 248, 0.12), transparent 60%),
        radial-gradient(50% 100% at 100% 100%, rgba(34, 226, 182, 0.07), transparent 60%),
        linear-gradient(180deg, #17151b 0%, #121016 100%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    color: var(--hn-text-30);
    font-family: var(--hn-font-30);
}

.hn-section-30[hidden] {
    display: none;
}

.hn-section-30 *,
.hn-section-30 *::before,
.hn-section-30 *::after {
    box-sizing: border-box;
}

/* --- Heading ------------------------------------------------------------- */

.hn-head-30 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--hn-line-30);
}

/* The short gradient rule under the heading, as on Latest Slots. */
.hn-head-30::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: -2px;
    width: 4.5rem;
    height: 3px;
    border-radius: 3px;
    background: var(--hn-grad-30);
}

.hn-title-30 {
    margin: 0;
    background: linear-gradient(90deg, #ffffff, #e9d5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(1.125rem, 0.9rem + 0.9vw, 1.625rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

/* A live dot: the list changes on its own, every few minutes. */
.hn-live-30 {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--hn-teal-30);
    box-shadow: 0 0 0 0 rgba(34, 226, 182, 0.55);
    animation: hn-pulse-30 2s ease-out infinite;
}

@keyframes hn-pulse-30 {
    0% { box-shadow: 0 0 0 0 rgba(34, 226, 182, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(34, 226, 182, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 226, 182, 0); }
}

/* --- Grid ---------------------------------------------------------------- */

.hn-grid-30 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

/* --- Card ---------------------------------------------------------------- */

.hn-card-30 {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    min-width: 0;
    padding: 1.125rem;
    border-radius: 1rem;
    border: 1px solid var(--hn-line-30);
    background:
        radial-gradient(120% 80% at 0% 0%, rgba(169, 72, 248, 0.14), transparent 60%),
        linear-gradient(180deg, #1e1b25, #16141b);
    box-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.9);
    transition: transform .35s var(--hn-ease-30), box-shadow .35s var(--hn-ease-30);
}

[dir="rtl"] .hn-card-30 {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(169, 72, 248, 0.14), transparent 60%),
        linear-gradient(180deg, #1e1b25, #16141b);
}

/* Gradient hairline that fades in on hover. */
.hn-card-30::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -1px;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(169, 72, 248, 0.9), rgba(34, 226, 182, 0.7));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

/* Real cards rise in one after another; the placeholders do not move. */
.hn-card-30:not(.hn-ghost-30) {
    animation: hn-in-30 .5s var(--hn-ease-30) both;
}

.hn-card-30:not(.hn-ghost-30):nth-child(2) { animation-delay: .07s; }
.hn-card-30:not(.hn-ghost-30):nth-child(3) { animation-delay: .14s; }

@keyframes hn-in-30 {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (hover: hover) {
    .hn-card-30:not(.hn-ghost-30):hover {
        transform: translateY(-3px);
        box-shadow: 0 26px 48px -28px rgba(0, 0, 0, 0.95), 0 16px 36px -26px rgba(169, 72, 248, 0.6);
    }

    .hn-card-30:not(.hn-ghost-30):hover::before {
        opacity: 1;
    }

    .hn-card-30:hover .hn-logo-30 {
        transform: scale(1.05);
    }
}

.hn-new-30 {
    position: absolute;
    top: 0.875rem;
    inset-inline-end: 0.875rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(34, 226, 182, 0.4);
    background: rgba(34, 226, 182, 0.12);
    color: var(--hn-teal-30);
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hn-top-30 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    /* Room for the New badge. */
    padding-inline-end: 3.5rem;
}

/* The logo in a rounded square with the gradient ring. If the file is
   missing, the casino's initial shows through instead. */
.hn-logo-30 {
    position: relative;
    flex: none;
    width: 3.25rem;
    height: 3.25rem;
    padding: 2px;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--hn-grad-30);
    box-shadow: 0 10px 22px -12px rgba(169, 72, 248, 0.85);
    transition: transform .35s var(--hn-ease-30);
}

.hn-logo-30::before {
    content: attr(data-initial-30);
    position: absolute;
    inset: 2px;
    display: grid;
    place-items: center;
    border-radius: calc(1rem - 2px);
    background: #17151c;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
}

.hn-logo-img-30 {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    border: 2px solid #17151c;
    border-radius: calc(1rem - 2px);
    object-fit: cover;
    background: #0f0e11;
}

.hn-name-30 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--hn-ink-30);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The offer is why the card is there, so it gets the size. It grows, so
   the buttons line up along the bottom of a row of cards. */
.hn-offer-30 {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.3125rem;
    margin: 0;
}

.hn-offer-label-30 {
    color: var(--hn-faint-30);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hn-offer-text-30 {
    display: -webkit-box;
    overflow: hidden;
    background: linear-gradient(90deg, #ffffff, #e9d5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.3125rem);
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: break-word;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

/* --- Actions --------------------------------------------------------------- */

.hn-actions-30 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
}

.hn-claim-30 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.625rem 1rem;
    border-radius: 0.875rem;
    background-image: var(--hn-grad-loop-30);
    background-size: 200% 100%;
    color: #fff;
    font: 800 0.9375rem/1.2 var(--hn-font-30);
    text-align: center;
    text-decoration: none;
    box-shadow: 0 12px 26px -14px rgba(169, 72, 248, 0.85);
    transition: background-position .5s var(--hn-ease-30), transform .2s ease, box-shadow .2s ease;
}

.hn-claim-30:hover {
    background-position: 100% 0;
    box-shadow: 0 14px 30px -12px rgba(34, 226, 182, 0.6);
    color: #fff;
}

.hn-claim-30:active {
    transform: scale(.98);
}

.hn-claim-30 svg {
    flex: none;
    width: 1rem;
    height: 1rem;
}

.hn-review-30 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 2.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.75rem;
    color: var(--hn-muted-30);
    font: 600 0.8125rem/1.2 var(--hn-font-30);
    text-align: center;
    text-decoration: none;
    transition: color .2s ease, background .2s ease;
}

.hn-review-30:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.hn-arrow-30 {
    display: inline-block;
    transition: transform .2s ease;
}

.hn-review-30:hover .hn-arrow-30 {
    transform: translateX(3px);
}

[dir="rtl"] .hn-arrow-30,
[dir="rtl"] .hn-claim-30 svg {
    transform: scaleX(-1);
}

[dir="rtl"] .hn-review-30:hover .hn-arrow-30 {
    transform: scaleX(-1) translateX(3px);
}

.hn-claim-30:focus-visible,
.hn-review-30:focus-visible {
    outline: 2px solid var(--hn-teal-30);
    outline-offset: 2px;
}

/* --- Placeholders while the list is on its way ---------------------------- */

.hn-ghost-30 {
    min-height: 14rem;
    gap: 0.75rem;
}

.hn-ghost-30 span {
    display: block;
    border-radius: 0.5rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: hn-shimmer-30 1.4s linear infinite;
}

.hn-ghost-30 span:nth-child(1) {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
}

.hn-ghost-30 span:nth-child(2) {
    width: 45%;
    height: 0.875rem;
}

.hn-ghost-30 span:nth-child(3) {
    width: 85%;
    height: 1.375rem;
}

.hn-ghost-30 span:nth-child(4) {
    width: 100%;
    height: 2.75rem;
    margin-top: auto;
    border-radius: 0.875rem;
}

@keyframes hn-shimmer-30 {
    to { background-position: -200% 0; }
}

/* --- Phones and small tablets: one column of compact cards ----------------- */

@media (max-width: 767.98px) {
    .hn-section-30 {
        margin: 1.5rem auto;
        border-radius: 1rem;
    }

    .hn-head-30 {
        align-items: flex-start;
        margin-bottom: 1rem;
    }

    .hn-live-30 {
        margin-top: 0.45em;
    }

    .hn-grid-30 {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }

    .hn-card-30 {
        gap: 0.75rem;
        padding: 0.875rem;
    }

    .hn-new-30 {
        top: 0.75rem;
        inset-inline-end: 0.75rem;
    }

    .hn-logo-30 {
        width: 3rem;
        height: 3rem;
    }

    /* The two actions side by side, so three cards fit a phone screen. */
    .hn-actions-30 {
        flex-direction: row;
        gap: 0.5rem;
    }

    /* The claim takes the room the review label leaves; each label stays
       on one line unless a translation is too long for that. */
    .hn-claim-30 {
        flex: 1 1 auto;
        min-width: 0;
        min-height: 2.75rem;
    }

    .hn-review-30 {
        flex: 0 1 auto;
        min-width: 0;
        min-height: 2.75rem;
        padding-inline: 0.875rem;
        border: 1px solid var(--hn-line-strong-30);
        border-radius: 0.875rem;
        font-size: 0.75rem;
    }

    .hn-ghost-30 {
        min-height: 11rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hn-section-30 *,
    .hn-section-30 *::before,
    .hn-section-30 *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }

    .hn-live-30 {
        animation: none;
    }
}
