/* ============================================================
   Homepage hero slider + domain search
   ------------------------------------------------------------
   Markup: resources/views/frontend/inc/slider.blade.php
           resources/views/frontend/home.blade.php (domain section)
   Behaviour: public/frontend/js/home-hero.js
   ============================================================ */

.hs, .dsx {
    --hs-navy: #061634;
    --hs-navy-2: #0a2a6b;
    --hs-blue: #2563eb;
    --hs-cyan: #22d3ee;
    --hs-green: #10b981;
    --hs-gold: #fbbf24;
    --hs-ink: #0f172a;
    --hs-muted: #64748b;
    --hs-line: #e6ebf3;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hs {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(900px 500px at 85% 20%, rgba(34, 211, 238, .18), transparent 60%),
        radial-gradient(700px 500px at 10% 90%, rgba(37, 99, 235, .35), transparent 60%),
        linear-gradient(135deg, var(--hs-navy) 0%, var(--hs-navy-2) 100%);
    isolation: isolate;
}
.hs::before {
    /* Fine grid texture */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    z-index: -1;
    pointer-events: none;
}

/* All slides share one grid cell, so the hero is as tall as its tallest
   slide and nothing is clipped on small screens. */
.hs__track { display: grid; }
.hs__slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease, visibility .7s;
    padding: 72px 0 128px;
}
.hs__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }

.hs__grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 48px;
}

/* Content enters each time its slide becomes active. A transition (not a
   keyframe) so the text always ends up visible, even if animation is throttled. */
.hs__slide .hs__anim {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
}
.hs__slide.is-active .hs__anim {
    opacity: 1;
    transform: none;
    transition-delay: calc(var(--d, 0) * 90ms + 120ms);
}

.hs__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #e0ecff;
    backdrop-filter: blur(8px);
}
.hs__badge i {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hs-cyan), var(--hs-blue));
    color: #fff;
    font-size: 10px;
}

.hs__title {
    margin: 20px 0 16px;
    font-size: clamp(2.1rem, 4.4vw, 3.8rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.02em;
    color: #fff !important;
    background: linear-gradient(90deg, #ffffff 0%, #cfe3ff 60%, #8fd8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hs__desc {
    max-width: 560px;
    margin: 0 0 22px;
    font-size: 1.08rem;
    line-height: 1.7;
    color: rgba(226, 236, 255, .86);
}

.hs__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.hs__chips li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: 13px;
    font-weight: 600;
    color: #e6efff;
}
.hs__chips li i { color: var(--hs-cyan); font-size: 12px; }

.hs__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.hs__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 26px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.hs__btn i { font-size: 13px; transition: transform .2s; }
.hs__btn:hover i { transform: translateX(3px); }
.hs__btn--primary { background: #fff; color: var(--hs-navy) !important; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }
.hs__btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0, 0, 0, .3); }
.hs__btn--ghost { color: #fff !important; border: 1.5px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .04); }
.hs__btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); }

.hs__offer {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
    padding: 12px 18px 12px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(8px);
}
.hs__offer-save {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 58px; height: 58px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(239, 68, 68, .35);
}
.hs__offer-save b { font-size: 18px; }
.hs__offer-save small { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; margin-top: 3px; }
.hs__offer-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #9fb7e6; }
.hs__offer-prices { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.hs__offer-old { font-size: 15px; color: rgba(226, 236, 255, .55); text-decoration: line-through; }
.hs__offer-new { font-size: 30px; font-weight: 900; color: var(--hs-gold); letter-spacing: -.01em; }

/* Visual */
.hs__visual { position: relative; display: flex; justify-content: center; }
.hs__visual::before {
    content: "";
    position: absolute;
    width: 78%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 211, 238, .35), rgba(37, 99, 235, 0) 70%);
    filter: blur(20px);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.hs__frame {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    border-radius: 28px;
    padding: 28px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03));
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 30px 80px rgba(2, 8, 30, .45);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.hs__frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    animation: hsFloat 6s ease-in-out infinite;
}
@keyframes hsFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hs__placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; color: rgba(255, 255, 255, .5); }
.hs__placeholder i { font-size: 56px; }

/* Controls */
.hs__controls {
    position: absolute;
    left: 0; right: 0; bottom: 88px;
    z-index: 5;
}
.hs__controls-inner { display: flex; align-items: center; gap: 18px; }
.hs__arrows { display: flex; gap: 8px; }
.hs__arrow {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .06);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.hs__arrow:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .45); }
.hs__dots { display: flex; align-items: center; gap: 8px; }
.hs__dot {
    position: relative;
    width: 28px; height: 4px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, .25);
    cursor: pointer;
    overflow: hidden;
    transition: width .3s;
}
.hs__dot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
}
.hs__dot.is-active { width: 56px; }
.hs__dot.is-active::after { animation: hsProgress var(--hs-interval, 6000ms) linear forwards; }
.hs.is-paused .hs__dot.is-active::after { animation-play-state: paused; }
.hs__dot:hover { background: rgba(255, 255, 255, .45); }
@keyframes hsProgress { to { transform: scaleX(1); } }
.hs__count { margin-left: auto; font-size: 14px; font-weight: 700; color: rgba(226, 236, 255, .7); font-variant-numeric: tabular-nums; }
.hs__count b { color: #fff; font-size: 20px; }

.hs__empty { padding: 120px 0 150px; text-align: center; }
.hs__empty h1 { color: #fff; font-weight: 900; font-size: clamp(2rem, 4vw, 3rem); }
.hs__empty p { color: rgba(226, 236, 255, .8); }

/* ── Domain search (floats over the hero's bottom edge) ───── */
.dsx { position: relative; z-index: 6; margin-top: -64px; padding-bottom: 40px; }
.dsx__card {
    background: #fff;
    border-radius: 24px;
    border: 1px solid var(--hs-line);
    box-shadow: 0 30px 70px rgba(15, 23, 42, .12), 0 2px 8px rgba(15, 23, 42, .04);
    padding: 32px 36px 26px;
}
.dsx__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}
.dsx__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--hs-blue);
}
.dsx__title { margin: 6px 0 4px; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 900; color: var(--hs-ink); letter-spacing: -.01em; }
.dsx__sub { margin: 0; color: var(--hs-muted); font-size: 15px; }
.dsx__links { display: flex; gap: 18px; flex-shrink: 0; }
.dsx__links a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--hs-blue); text-decoration: none; }
.dsx__links a:hover { text-decoration: underline; }

.dsx__form {
    display: flex;
    align-items: stretch;
    height: 64px;
    border-radius: 16px;
    border: 2px solid var(--hs-line);
    background: #f8fafd;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.dsx__form:focus-within { border-color: var(--hs-blue); background: #fff; box-shadow: 0 0 0 5px rgba(37, 99, 235, .12); }
.dsx__prefix { display: flex; align-items: center; padding: 0 4px 0 20px; color: #94a3b8; font-weight: 700; font-size: 16px; }
.dsx__form input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 17px;
    font-weight: 600;
    color: var(--hs-ink);
    padding: 0 8px 0 2px;
}
/* The theme styles bare inputs (padding, size, shadow); this field sets its own. */
.dsx__form input,
.dsx__form select {
    height: auto;
    margin: 0;
    box-shadow: none !important;
    line-height: normal;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    -webkit-appearance: none;
    appearance: none;
}
.dsx__form select {
    padding-right: 30px !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.dsx__form input { font-size: 17px !important; }
.dsx__form input::placeholder { color: #a3aec0 !important; font-size: 16px !important; font-weight: 500; top: 0; }
.dsx__form select {
    border: 0;
    border-left: 1.5px solid var(--hs-line);
    outline: none;
    background: transparent;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--hs-ink);
    cursor: pointer;
    max-width: 210px;
}
.dsx__form button {
    margin: 6px;
    padding: 0 28px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--hs-blue), #1d4ed8);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .3);
    transition: transform .2s, box-shadow .2s;
}
.dsx__form button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(37, 99, 235, .38); }
.dsx__form button:disabled { opacity: .75; cursor: progress; transform: none; }

/* Live availability result */
.dsx__result { display: none; margin-top: 14px; padding: 14px 18px; border-radius: 14px; font-size: 15px; }
.dsx__result.checking { display: block; background: #f1f5f9; color: #334155; }
.dsx__result.available { display: block; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.dsx__result.unavailable { display: block; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.dsx__result .dcr-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.dsx__result .dcr-domain { font-weight: 800; word-break: break-all; }
.dsx__result .dcr-price { font-weight: 900; color: #047857; margin-left: 6px; }
.dsx__result .dcr-actions { display: flex; gap: 8px; }
.dsx__result .dcr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}
.dsx__result .dcr-btn-primary { background: #059669; color: #fff; }
.dsx__result .dcr-btn-primary:hover { background: #047857; color: #fff; }
.dsx__result .dcr-btn-light { background: #fff; color: #b91c1c; border: 1px solid #fecaca; }
.dsx__result .dcr-btn-light:hover { background: #fff5f5; }

/* TLD price chips */
.dsx__tlds {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
    margin-top: 18px;
}
.dsx__tld {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--hs-line);
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.dsx__tld:hover { border-color: #bfd3fb; transform: translateY(-2px); box-shadow: 0 8px 18px rgba(37, 99, 235, .1); }
.dsx__tld.active { border-color: var(--hs-blue); background: #eff5ff; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.dsx__tld-ext { font-size: 17px; font-weight: 900; color: var(--hs-ink); }
.dsx__tld-price { font-size: 13px; font-weight: 700; color: #059669; }
.dsx__tld-price small { color: var(--hs-muted); font-weight: 600; }

.dsx__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed var(--hs-line);
    font-size: 14px;
    color: #475569;
}
.dsx__facts span { display: inline-flex; align-items: center; gap: 8px; }
.dsx__facts i { color: var(--hs-green); }
.dsx__facts b { color: var(--hs-ink); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .hs__slide { padding: 48px 0 120px; }
    .hs__grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
    .hs__desc { margin-left: auto; margin-right: auto; }
    .hs__chips, .hs__actions { justify-content: center; }
    .hs__frame { max-width: 340px; padding: 20px; }
    .hs__visual { order: -1; }
    .dsx__head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .dsx__card { padding: 26px 22px 22px; }
}
@media (max-width: 767.98px) {
    .hs__slide { padding: 36px 0 110px; }
    .hs__frame { max-width: 240px; border-radius: 22px; }
    .hs__desc { font-size: 1rem; }
    .hs__btn { height: 48px; padding: 0 20px; font-size: 14px; }
    .hs__arrows, .hs__count { display: none; }
    .hs__controls { bottom: 84px; }
    .hs__controls-inner { justify-content: center; }

    .dsx { margin-top: -56px; }
    .dsx__form { flex-wrap: wrap; align-items: center; height: auto; padding: 6px; gap: 6px; }
    .dsx__prefix { display: none; }
    .dsx__form input { flex: 1 1 100%; height: 50px; padding: 0 12px; border-bottom: 1.5px solid var(--hs-line); }
    .dsx__form select { flex: 1 1 auto; height: 48px; max-width: none; border-left: 0; padding: 0 8px; }
    .dsx__form button { flex: 0 0 auto; height: 48px; margin: 0; padding: 0 22px; }
    .dsx__tlds { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 479.98px) {
    .hs__offer { padding: 10px 14px 10px 10px; }
    .hs__offer-new { font-size: 24px; }
    .dsx__tlds { grid-template-columns: repeat(2, 1fr); }
    .dsx__links { flex-wrap: wrap; gap: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .hs *, .dsx * { animation: none !important; transition: none !important; }
    .hs__slide .hs__anim { opacity: 1; transform: none; }
}

/* The homepage H1 renders as the hero badge; keep theme heading styles from resizing it. */
h1.hs__badge { color: #e0ecff !important; font-size: 13px !important; font-weight: 700; line-height: 1.35; letter-spacing: .02em; }
