/* ============================================================
   am-industries-index.css
   Styles cho page template "Industries Index"
   Load path: assets/css/am-industries-index.css
   ============================================================ */

/* ── HERO ──────────────────────────────────────────────────── */
.ind-hero {
    background: var(--dk2);
    padding: 80px 0 64px;
    position: relative;
    overflow: hidden;
}

.ind-hero__glow {
    position: absolute;
    top: -120px;
    right: -80px;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96,159,116,.18) 0%, transparent 70%);
    pointer-events: none;
}

.ind-hero__inner {
    position: relative;
    z-index: 2;
}

.ind-hero__title {
    color: #fff;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin: 12px 0 16px;
}

.ind-hero__sub {
    color: rgba(255,255,255,.55);
    font-size: 16px;
    max-width: 540px;
    line-height: 1.7;
    margin-bottom: 28px;
}

.ind-hero__stats {
    display: flex;
    gap: 32px;
}

.ind-stat {
    color: rgba(255,255,255,.6);
    font-size: 14px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.ind-stat strong {
    color: var(--yw);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ── ALPHABET JUMP BAR ─────────────────────────────────────── */
.ind-jumpbar {
    background: var(--dk);
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: sticky;
    top: var(--nav-height);
    z-index: 90;
    padding: 10px 0;
}

.ind-jumpbar__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
}

.ind-jumpbar__letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.ind-jumpbar__letter--active {
    color: var(--yw);
    background: rgba(255,252,153,.1);
}

.ind-jumpbar__letter--active:hover {
    background: rgba(255,252,153,.2);
    color: var(--yw);
}

.ind-jumpbar__letter--empty {
    color: rgba(255,255,255,.18);
    cursor: default;
    font-weight: 400;
}

/* ── LIST SECTION ──────────────────────────────────────────── */
.ind-list-section {
    padding: 64px 0 80px;
    background: var(--wh);
}

.ind-groups {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── ALPHABET GROUP ────────────────────────────────────────── */
.ind-group {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0 32px;
    padding: 32px 0;
    border-bottom: 1px solid var(--bd);
    scroll-margin-top: calc(var(--nav-height) + 56px); /* offset for sticky bars */
}

.ind-group:first-child {
    padding-top: 0;
}

.ind-group:last-child {
    border-bottom: none;
}

.ind-group__letter {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gr);
    letter-spacing: -1px;
    line-height: 1;
    padding-top: 6px;
    /* sticky letter khi scroll qua group dài */
    position: sticky;
    top: calc(var(--nav-height) + 56px);
    align-self: start;
    height: fit-content;
}

/* ── TERM LIST ─────────────────────────────────────────────── */
.ind-group__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ── TERM ITEM ─────────────────────────────────────────────── */
.ind-item__link {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 0 14px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    text-decoration: none;
    color: var(--txt);
    transition: background .15s, box-shadow .15s;
    border: 1px solid transparent;
}

.ind-item__link:hover {
    background: var(--cr);
    border-color: var(--bd);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

/* icon */
.ind-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: rgba(96,159,116,.1);
    color: var(--gr2);
    flex-shrink: 0;
    transition: background .15s, color .15s;
}

.ind-item__link:hover .ind-item__icon {
    background: var(--gr);
    color: #fff;
}

/* name + desc */
.ind-item__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ind-item__name {
    font-size: 15px;
    font-weight: 600;
    color: var(--dk);
    line-height: 1.3;
}

.ind-item__link:hover .ind-item__name {
    color: var(--gr2);
}

.ind-item__desc {
    font-size: 13px;
    color: var(--txt3);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* count + arrow */
.ind-item__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 12px;
}

.ind-item__count {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gr2);
    white-space: nowrap;
}

.ind-item__count-label {
    font-weight: 400;
    color: var(--txt3);
}

.ind-item__count--empty {
    font-weight: 400;
    color: var(--txt3);
    font-style: italic;
}

.ind-item__arrow {
    font-size: 16px;
    color: var(--txt3);
    transition: transform .2s, color .2s;
}

.ind-item__link:hover .ind-item__arrow {
    transform: translateX(4px);
    color: var(--gr2);
}

/* ── EMPTY STATE ───────────────────────────────────────────── */
.ind-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--txt2);
    font-size: 15px;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ind-hero {
        padding: 56px 0 44px;
    }

    .ind-hero__title {
        font-size: 2rem;
    }

    .ind-jumpbar__letter {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .ind-group {
        grid-template-columns: 40px 1fr;
        gap: 0 16px;
        padding: 24px 0;
    }

    .ind-group__letter {
        font-size: 1.5rem;
        position: static; /* tắt sticky trên mobile để tiết kiệm không gian */
    }

    .ind-item__link {
        grid-template-columns: 32px 1fr;
        grid-template-rows: auto auto;
        gap: 0 12px;
        padding: 12px 10px;
    }

    .ind-item__meta {
        grid-column: 2;
        grid-row: 2;
        margin-left: 0;
        margin-top: 4px;
    }

    .ind-item__icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .ind-jumpbar__inner {
        gap: 1px;
    }

    .ind-jumpbar__letter {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }
}

/* ── SEARCH BAR ────────────────────────────────────────────── */
.ind-search-bar {
    background: #fff;
    border-bottom: 1px solid var(--bd);
    padding: 16px 0;
}

.ind-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 560px;
}

.ind-search-icon {
    position: absolute;
    left: 14px;
    color: var(--txt3);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.ind-search-input {
    width: 100%;
    height: 46px;
    padding: 0 44px 0 44px;
    border: 1.5px solid var(--bd);
    border-radius: var(--r-lg);
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--txt);
    background: var(--cr);
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.ind-search-input::placeholder {
    color: var(--txt3);
}

.ind-search-input:focus {
    border-color: var(--gr);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(96,159,116,.15);
}

/* Clear (×) button */
.ind-search-clear {
    position: absolute;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bd);
    border-radius: 50%;
    color: var(--txt2);
    cursor: pointer;
    transition: background .15s, color .15s;
}

.ind-search-clear:hover {
    background: var(--gr);
    color: #fff;
}

/* Result count */
.ind-search-count {
    margin-top: 10px;
    font-size: 13px;
    color: var(--txt3);
}

/* No-results state */
.ind-no-results {
    text-align: center;
    padding: 60px 0;
    color: var(--txt3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .ind-search-wrap {
        max-width: 100%;
    }
}