/* ==========================================================================
   Home Page Styles - Illustricon
   Matches reference design: 2-column hero with 3D layered floating cards,
   style-grouped trending icon wall, 6 collection packs,
   "Bring your ideas to life" CTA banner, and the framework carousel.
   ========================================================================== */

/* ── Hero Two-Column Layout ────────────────────────────────────────────── */
.hero-two-col {
    position: relative;
    padding: 40px 0 0px;
    overflow: hidden;
    background: radial-gradient(ellipse 600px 400px at 85% 25%, rgba(108, 92, 231, 0.07), transparent 70%),
                radial-gradient(ellipse 500px 350px at 95% 75%, rgba(0, 206, 201, 0.06), transparent 70%),
                radial-gradient(ellipse 400px 300px at 15% 15%, rgba(124, 58, 237, 0.04), transparent 70%);
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-title {
    font-size: clamp(1.4rem, 3.3vw, 3rem);
    font-weight: 600;
    line-height: 1.14;
    color: #0F172A;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
}

.highlighted-text-hero {
    color: #6C5CE7;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: #64748B;
    line-height: 1.62;
    max-width: 530px;
    margin-bottom: 28px;
}

/* ── Hero Search Box ───────────────────────────────────────────────────── */
.hero-search-box {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 520px;
    background: #FFFFFF;
    border: 1.5px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--border-radius-pill);
    padding: 6px 6px 6px 18px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.02);
    margin-bottom: 24px;
    transition: var(--transition-standard);
}

.hero-search-box:focus-within {
    border-color: #6C5CE7;
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.16), 0 0 0 3px rgba(108, 92, 231, 0.12);
}

.hero-search-box .hero-search-icon {
    width: 20px;
    height: 20px;
    color: #94A3B8;
    margin-right: 10px;
    flex-shrink: 0;
}

.hero-search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9375rem;
    color: #0F172A;
}

.hero-search-box input::placeholder {
    color: #94A3B8;
}

.hero-search-btn {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* ── Hero Visual (Lottie Animation) ───────────────────────────────────── */
.hero-visual {
    position: relative;
    width: 100%;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-lottie {
    width: 100%;
    max-width: 520px;
    height: auto;
    display: block;
}

/* ── Section Header (Inline) ───────────────────────────────────────────── */
.section-header-inline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #64748B;
    margin-top: 6px;
    line-height: 1.5;
}

.btn-trending-view-all,
.link-explore-arrow {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6C5CE7;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.btn-trending-view-all:hover,
.link-explore-arrow:hover {
    opacity: 0.85;
    transform: translateX(2px);
}

/* ── Trending Section (Style-Grouped Icon Wall) ─────────────────────────── */
.trending-section {
    padding-top: 0px;
    padding-bottom: 56px;
}

.home-trend-style-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.home-trend-style-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.home-trend-style-btn {
    padding: 5px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: #FFFFFF;
    border: 1px solid var(--border-color-2);
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-standard);
}
.home-trend-style-btn:hover {
    border-color: var(--primary-main);
    color: var(--primary-main);
    background: var(--primary-light);
}
.home-trend-style-btn.active {
    background: var(--primary-main);
    border-color: var(--primary-main);
    color: #FFFFFF;
}

/* ── Trend wall static icons ─────────────────────────────────────────── */
.home-trend-wall {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.home-trend-cell {
    aspect-ratio: 1;
    /* Grid tracks are 1fr, so the automatic minimum (min-width: auto) would
       let a wide inline SVG's intrinsic size blow the track out sideways on
       narrow screens. Zeroing it keeps every cell inside its column. */
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 16px;
    padding: 10px 8px 8px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.2s ease,
                border-color 0.2s ease;
}
.home-trend-cell:hover {
    transform: translateY(-4px) scale(1.06);
    border-color: rgba(108, 92, 231, 0.3);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    z-index: 2;
}

/* Cells outside the active style group are toggled via the hidden attribute */
.home-trend-cell[hidden] {
    display: none;
}

.home-trend-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    min-height: 0;
    flex: 1;
}

/* Inline scoped vectors, the <img> fallback, and the lottie-player element
   all get an explicit size from the cell media flex parent. */
.home-trend-media > svg,
.home-trend-media > img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 64px;
    object-fit: contain;
    display: block;
}

.home-trend-media > lottie-player {
    width: 34px;
    height: 34px;
}

/* Name label under each icon — same pill vocabulary as .explorer-cell-label
   on the explorer grid, so tiles read consistently across both pages. */
.home-trend-label {
    text-align: center;
    width: 100%;
    padding: 2px 5px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    transition: var(--transition-standard);
}

.home-trend-label:hover {
    color: var(--text-primary);
    background: var(--bg-default);
}

.home-cta-center {
    text-align: center;
}

.btn-explore-pill {
    padding: 11px 28px;
    font-size: 0.92rem;
    font-weight: 600;
}



/* ── Collections Section ───────────────────────────────────────────────── */
.collections-section {
    padding-top: 0px;
    padding-bottom: 56px;
}

.home-col-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.home-col-card {
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 18px;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    position: relative;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.22s ease,
                border-color 0.22s ease;
}

.home-col-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    border-color: rgba(108, 92, 231, 0.25);
}

.home-col-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    transition: transform 0.2s ease;
}

.home-col-card:hover .home-col-icon-box {
    transform: scale(1.08);
}

.home-col-icon-box svg {
    width: 22px;
    height: 22px;
}

.home-col-icon-box img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.home-col-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 4px;
}

.home-col-count {
    font-size: 0.78rem;
    color: #616262;
    font-weight: 500;
}

.home-col-arrow-btn {
    position: absolute;
    bottom: 18px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.home-col-arrow-btn svg {
    width: 14px;
    height: 14px;
}

.home-col-card:hover .home-col-arrow-btn {
    transform: translateX(3px);
}

/* ── "Bring your ideas to life" CTA Banner ─────────────────────────────── */
.ideas-banner-section {
    padding: 16px 0 48px;
}

.ideas-banner {
    background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 50%, #FAF5FF 100%);
    border: 1px solid rgba(124, 58, 237, 0.12);
    border-radius: 24px;
    padding: 28px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.05);
}

.ideas-banner-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ideas-banner-logo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ideas-banner-logo img {
    width: 100%;}

.ideas-banner-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.ideas-banner-desc {
    font-size: 0.92rem;
    color: #64748B;
    line-height: 1.5;
}

.btn-banner-cta {
    padding: 12px 28px;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Ecosystem / Framework Badges Section ──────────────────────────────── */
.ecosystem-section {
    padding: 24px 0 64px;
    text-align: center;
}

.ecosystem-header {
    max-width: 680px;
    margin: 0 auto 32px;
}

.ecosystem-header .section-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 8px;
}

.ecosystem-header .section-subtitle {
    font-size: 0.95rem;
    color: #64748B;
    line-height: 1.58;
}

/* ── Framework Carousel (infinite loop) ────────────────────────────────── */
.frameworks-marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.frameworks-marquee-track {
    display: flex;
    width: max-content;
    animation: frameworks-marquee-scroll 40s linear infinite;
    padding:20px;
}

.frameworks-marquee:hover .frameworks-marquee-track,
.frameworks-marquee:focus-within .frameworks-marquee-track {
    animation-play-state: paused;
}

.frameworks-marquee-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 12px; /* keeps spacing identical across the loop seam */
}

@keyframes frameworks-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
    .frameworks-marquee-track {
        animation: none;
    }
}

.framework-pill {
    background: #FFFFFF;
    border: 1.5px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--border-radius-pill);
    padding: 10px 22px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0F172A;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.framework-pill svg,
.framework-pill img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.framework-pill:hover {
    border-color: rgba(108, 92, 231, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    color: #6C5CE7;
}

/* ── Responsive Breakpoints ────────────────────────────────────────────── */
@media (max-width: 1080px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-content {
        align-items: center;
        text-align: center;
    }

    .hero-subtitle {
        max-width: 600px;
    }

    .hero-visual {
        min-height: 340px;
    }

    .hero-lottie {
        max-width: 420px;
    }

    .home-col-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .home-trend-wall {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 820px) {
    .home-col-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .home-trend-wall {
        grid-template-columns: repeat(6, 1fr);
    }

    .ideas-banner {
        flex-direction: column;
        align-items: center;
        padding: 24px 20px;
        margin:0px 20px;
        justify-content: center;
    }

    .ideas-banner-left {
        width: 100%;
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 580px) {
    .hero-title {
        font-size: 2.1rem;
    }

    .hero-search-box {
        padding: 5px;
    }

    .hero-search-btn {
        padding: 9px 18px;
    }

    .hero-visual {
        min-height: 260px;
    }

    .hero-lottie {
        max-width: 320px;
    }

    .home-trend-wall {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .home-col-grid {
        grid-template-columns: 1fr;
    }

    .section-header-inline {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Phones ≤400px (iPhone SE, small Androids): 4 columns would leave ~75px
   tiles where the name label truncates to nothing readable, so the wall
   drops to 3 columns and the label shrinks a step to match. */
@media (max-width: 400px) {
    .home-trend-wall {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .home-trend-label {
        font-size: 0.6rem;
        padding: 2px 4px;
    }
}
