/* Home page hero (Views/Jobs/Index.cshtml): the signed-out "Recent Updates" card (.hr-*)
   and the current-job tiles (.hj-*). Colours match the Recent Updates popup (recent-updates-modal.css). */

/* ===== Recent Updates card ===== */
.hr-card {
    position: relative;
    margin: 8px 0 4px;
    background: #fff;
    border: 1px solid #e8ebf3;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(15, 23, 42, .04), 0 16px 34px rgba(15, 23, 42, .12);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    text-align: left;
}
.hr-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: #fff;
    background: radial-gradient(circle at 92% -30%, rgba(255, 255, 255, .25), transparent 45%), linear-gradient(120deg, #be123c 0%, #e11d48 45%, #f97316 100%);
}
.hr-head-icon {
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .35);
    font-size: .85rem;
    animation: hrBell 2.6s ease-in-out infinite;
}
.hr-head-text { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.hr-title { margin: 0; font-family: 'Montserrat', 'Montserrat Fallback', 'Inter', sans-serif; font-size: .98rem; font-weight: 800; color: #fff; letter-spacing: -.2px; }
.hr-sub { display: block; margin-top: 1px; font-size: .7rem; color: rgba(255, 255, 255, .88); }
.hr-live {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: #be123c;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}
/* The pulse is a ring scaled with transform + opacity (runs on the compositor); the old
   box-shadow keyframes repainted the page on every frame. */
.hr-live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #e11d48; }
.hr-live i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: rgba(225, 29, 72, .55); animation: hrPulse 1.6s ease-out infinite; }

.hr-list { list-style: none; margin: 0; padding: 3px 8px; }
.hr-list li + li { border-top: 1px dashed #edf0f6; }
.hr-item {
    --c: #4f46e5;
    --bg: #eef2ff;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 6px;
    border-radius: 9px;
    color: #0f172a;
    text-decoration: none;
    transition: background-color .15s;
}
.hr-item:hover, .hr-item:focus-visible { background: #f8fafc; color: #0f172a; text-decoration: none; outline: none; }
.hr-item:focus-visible { box-shadow: 0 0 0 2px var(--bg); }
.hr-ico {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--c);
    font-size: .68rem;
}
.hr-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hr-item:hover .hr-name { color: var(--c); }
.hr-badge {
    flex: 0 0 auto;
    max-width: 84px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--bg);
    color: var(--c);
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hr-job { --c: #4f46e5; --bg: #eef2ff; }
.hr-result { --c: #15803d; --bg: #dcfce7; }
.hr-admit { --c: #c2410c; --bg: #ffedd5; }
.hr-answer { --c: #7e22ce; --bg: #f3e8ff; }
.hr-syllabus { --c: #0f766e; --bg: #ccfbf1; }
.hr-admission { --c: #be185d; --bg: #fce7f3; }

.hr-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 24px);
    height: 32px;
    margin: 3px 12px 10px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(120deg, #e11d48, #f97316);
    color: #fff;
    font-weight: 800;
    font-size: .82rem;
    box-shadow: 0 6px 14px rgba(225, 29, 72, .25);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.hr-more i { font-size: .76rem; transition: transform .15s; }
.hr-more:hover, .hr-more:focus-visible { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(225, 29, 72, .32); outline: none; }
.hr-more:hover i { transform: translateX(3px); }

@keyframes hrPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}
@keyframes hrBell {
    0%, 70%, 100% { transform: rotate(0); }
    74% { transform: rotate(14deg); }
    80% { transform: rotate(-12deg); }
    86% { transform: rotate(8deg); }
    92% { transform: rotate(-4deg); }
}

/* ===== Current job tiles ===== */
.hj-grid { margin-left: -8px; margin-right: -8px; }
@media (min-width: 768px) {
    .hj-grid { margin-top: -7px; }   /* tiles sit 8px under the search bar */
}
.hj-col { display: flex; padding-left: 8px; padding-right: 8px; }
.hj-tile {
    --c: #4f46e5;
    --bg: #eef2ff;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 93px;
    margin-top: 9px;
    padding: 9px 11px 10px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #e8ebf3;
    border-top: 3px solid var(--c);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 18px rgba(15, 23, 42, .07);
    color: #0f172a;
    text-decoration: none;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    transition: transform .15s, box-shadow .15s;
}
.hj-col:nth-child(4n+2) .hj-tile { --c: #059669; --bg: #d1fae5; }
.hj-col:nth-child(4n+3) .hj-tile { --c: #ea580c; --bg: #ffedd5; }
.hj-col:nth-child(4n+4) .hj-tile { --c: #db2777; --bg: #fce7f3; }
.hj-tile:hover, .hj-tile:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .14);
    color: #0f172a;
    text-decoration: none;
    outline: none;
}
.hj-tile:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 14px 28px rgba(15, 23, 42, .14); }
.hj-top { display: flex; align-items: center; justify-content: space-between; }
.hj-ico {
    width: 23px;
    height: 23px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--c);
    font-size: .67rem;
}
.hj-go {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .62rem;
    color: #94a3b8;
    background: #f1f5f9;
    transition: background-color .15s, color .15s, transform .15s;
}
.hj-tile:hover .hj-go { background: var(--c); color: #fff; transform: translateX(2px); }
.hj-name {
    font-size: .76rem;
    font-weight: 600;
    line-height: 1.33;
    text-transform: capitalize;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hj-tile:hover .hj-name { color: var(--c); }

@media (max-width: 575px) {
    .hj-tile { min-height: 83px; padding: 8px 9px 9px; }
    .hj-name { font-size: .74rem; }
}

/* Dark theme */
html[data-theme="dark"] .hr-card { background: #0f172a; border-color: #1e293b; }
html[data-theme="dark"] .hr-item, html[data-theme="dark"] .hj-tile { color: #e2e8f0; }
html[data-theme="dark"] .hr-item:hover { background: #111c31; }
html[data-theme="dark"] .hr-list li + li { border-color: #1e293b; }
html[data-theme="dark"] .hr-ico, html[data-theme="dark"] .hr-badge, html[data-theme="dark"] .hj-ico { background: rgba(148, 163, 184, .14); }
html[data-theme="dark"] .hj-tile { background: rgba(15, 23, 42, .94); border-color: #1e293b; border-top-color: var(--c); }
html[data-theme="dark"] .hj-go { background: #1e293b; }

/* ===== Government Jobs By State Wise: native swipe row (replaced Owl Carousel) =====
   3 / 5 / 7 / 9 states per screen, the same counts the carousel used. */
.st-wrap { position: relative; }
.st-scroller {
    --st-n: 3;
    --st-gap: 5px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--st-n) - 1) * var(--st-gap)) / var(--st-n));
    gap: var(--st-gap);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}
.st-scroller::-webkit-scrollbar { display: none; }
.st-scroller:focus-visible { outline: 2px solid #f97316; outline-offset: 3px; border-radius: 6px; }
.st-scroller > .item { scroll-snap-align: start; min-width: 0; }
.st-scroller > .item img { display: block; width: 100%; height: auto; }
.st-scroller > .item .badge { white-space: normal; }
@media (min-width: 600px) { .st-scroller { --st-n: 5; } }
@media (min-width: 960px) { .st-scroller { --st-n: 7; } }
@media (min-width: 1200px) { .st-scroller { --st-n: 9; } }
.st-nav {
    position: absolute;
    top: 38%;
    z-index: 2;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #dc3545;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    cursor: pointer;
}
.st-nav:hover, .st-nav:focus-visible { background: #dc3545; color: #fff; border-color: #dc3545; outline: none; }
.st-prev { left: 4px; }
.st-next { right: 4px; }
/* Phones swipe; the right arrow would sit under the site's floating menu button there. */
@media (max-width: 575px) { .st-nav { display: none; } }
html[data-theme="dark"] .st-nav { background: #1e293b; border-color: #334155; color: #fca5a5; }

@media (prefers-reduced-motion: reduce) {
    .hr-head-icon, .hr-live i, .hr-live i::after { animation: none !important; }
    .hr-item, .hr-more, .hr-more i, .hj-tile, .hj-go { transition: none !important; }
}
