/* ==========================================================================
   HUB Home — Navrachana University
   Scoped stylesheet for index.php (does not touch shared main.css)
   ========================================================================== */

:root{
    --nuv-red: #b5272c;
    --nuv-red-dark: #8f1e22;
    --nuv-red-light: #d94a48;
    --nuv-black: #1a1a1a;
    --nuv-gray-900: #222429;
    --nuv-gray-600: #6b7280;
    --nuv-gray-300: #e2e2e6;
    --nuv-gray-100: #f6f6f8;
    --radius: 14px;
    --shadow-sm: 0 1px 3px rgba(20,20,20,0.06), 0 1px 2px rgba(20,20,20,0.08);
    --shadow-md: 0 12px 28px -8px rgba(181,39,44,0.25), 0 4px 10px -4px rgba(20,20,20,0.08);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*{ box-sizing: border-box; }

html{
    scroll-behavior: smooth;
}

body.hub-body{
    margin: 0;
    background: var(--nuv-gray-100);
    font-family: "Manrope", "Segoe UI", "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--nuv-gray-900);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    opacity: 0;
    animation: hub-page-in 0.5s var(--ease) forwards;
}

@keyframes hub-page-in{
    from{ opacity: 0; }
    to{ opacity: 1; }
}

a{ text-decoration: none; }

::selection{
    background: var(--nuv-red);
    color: #fff;
}

/* Thin, on-brand scrollbar */
html{ scrollbar-width: thin; scrollbar-color: var(--nuv-red) transparent; }
body.hub-body::-webkit-scrollbar{ width: 10px; }
body.hub-body::-webkit-scrollbar-track{ background: transparent; }
body.hub-body::-webkit-scrollbar-thumb{
    background: var(--nuv-gray-300);
    border-radius: 999px;
    border: 2px solid var(--nuv-gray-100);
}
body.hub-body::-webkit-scrollbar-thumb:hover{ background: var(--nuv-red); }

:focus-visible{
    outline: 2px solid var(--nuv-red);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce){
    html{ scroll-behavior: auto; }
    body.hub-body{ opacity: 1; animation: none; }
    *, *::before, *::after{
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Top bar ---------- */
.hub-topbar{
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    position: sticky;
    top: 0;
    z-index: 40;
    transition: box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.hub-topbar.is-scrolled{
    border-color: var(--nuv-gray-300);
    box-shadow: 0 4px 16px -6px rgba(20,20,20,0.12);
}

.hub-topbar-inner{
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hub-topbar img.logo{
    height: 38px;
    width: auto;
    display: block;
}

.hub-topbar .brand-divider{
    width: 1px;
    height: 28px;
    background: var(--nuv-gray-300);
}

.hub-topbar .brand-name{
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--nuv-black);
}

.hub-topbar .brand-name span{
    color: var(--nuv-red);
}

.hub-topbar-right{
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--nuv-gray-600);
}

.hub-topbar-right #hub-clock{
    font-variant-numeric: tabular-nums;
}

/* ---------- Hero ---------- */
.hub-hero{
    background: linear-gradient(135deg, var(--nuv-red) 0%, var(--nuv-red-dark) 100%);
    padding: 46px 24px 64px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hub-hero::before{
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.10) 0, transparent 45%),
                       radial-gradient(circle at 85% 80%, rgba(255,255,255,0.08) 0, transparent 40%);
    pointer-events: none;
}

.hub-hero-inner{
    position: relative;
    max-width: 780px;
    margin: 0 auto;
}

.hub-hero h1{
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: 0.01em;
}

#hub-greeting{
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.85;
    margin-bottom: 6px;
}

.hub-hero p{
    margin: 0 auto 26px;
    max-width: 560px;
    font-size: 1rem;
    opacity: 0.92;
    line-height: 1.5;
}

/* Search */
.hub-search{
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

.hub-search input{
    width: 100%;
    padding: 14px 20px 14px 46px;
    border-radius: 999px;
    border: none;
    font-size: 0.95rem;
    outline: none;
    box-shadow: var(--shadow-sm);
    background: #fff;
    color: var(--nuv-gray-900);
}

.hub-search input:focus{
    box-shadow: 0 0 0 3px rgba(255,255,255,0.5), var(--shadow-sm);
}

.hub-search i.fa-search{
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nuv-gray-600);
    font-size: 0.95rem;
}

.hub-search input{
    padding-right: 42px;
}

.hub-search-clear{
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) scale(0.7);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--nuv-gray-100);
    color: var(--nuv-gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s var(--ease), transform 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}

.hub-search-clear.visible{
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

.hub-search-clear:hover{
    background: var(--nuv-red);
    color: #fff;
}

/* Quick-access pills */
.hub-pills{
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hub-pills .label{
    font-size: 0.78rem;
    opacity: 0.75;
    margin-right: 2px;
}

.hub-pills a{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    padding: 7px 14px;
    border-radius: 999px;
    transition: background 0.15s var(--ease), transform 0.15s var(--ease), border-color 0.15s var(--ease);
}

.hub-pills a:hover{
    background: rgba(255,255,255,0.26);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

/* ---------- Main content ---------- */
.hub-main{
    max-width: 1180px;
    margin: -34px auto 0;
    padding: 0 24px 40px;
    position: relative;
    z-index: 5;
}

.hub-section{
    margin-top: 42px;
}

.hub-section:first-child{
    margin-top: 0;
}

.hub-section-head{
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.hub-section-head h2{
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--nuv-black);
    margin: 0;
}

.hub-section-head .count{
    font-size: 0.8rem;
    color: var(--nuv-gray-600);
    background: var(--nuv-gray-300);
    padding: 2px 9px;
    border-radius: 999px;
}

.hub-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

/* ---------- Card ---------- */
.hub-card{
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--nuv-gray-300);
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
}

.hub-card.in-view{
    animation: hub-card-in 0.5s var(--ease) forwards;
}

@keyframes hub-card-in{
    to{ opacity: 1; transform: translateY(0); }
}

.hub-card:hover{
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.hub-card:active{
    transform: translateY(-2px) scale(0.99);
}


.hub-card:hover .hub-card-icon{
    background: var(--nuv-red);
    color: #fff;
}

.hub-card-icon{
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(181,39,44,0.10);
    color: var(--nuv-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background 0.18s ease, color 0.18s ease;
}

.hub-card-title{
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--nuv-black);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.hub-card-title i.fa-external-link{
    font-size: 0.72rem;
    color: var(--nuv-gray-600);
    opacity: 0;
    transform: translate(-3px, 3px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.hub-card:hover .hub-card-title i.fa-external-link{
    opacity: 1;
    transform: translate(0,0);
}

.hub-card-desc{
    font-size: 0.83rem;
    color: var(--nuv-gray-600);
    line-height: 1.4;
    margin: 0;
}

.hub-no-results{
    display: none;
    text-align: center;
    padding: 50px 20px;
    color: var(--nuv-gray-600);
}

.hub-no-results i{
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--nuv-gray-300);
    display: block;
}

/* ---------- Footer ---------- */
.hub-footer{
    background: var(--nuv-black);
    border-top: 3px solid var(--nuv-red);
    padding: 36px 24px 22px;
    text-align: center;
    margin-top: 50px;
}

.hub-footer .hub-social{
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 18px;
}

.hub-footer .hub-social a{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, transform 0.18s ease;
}

.hub-footer .hub-social a:hover{
    background: var(--nuv-red);
    transform: translateY(-3px);
}

.hub-footer .hub-social img{
    width: 22px;
    height: 22px;
}

.hub-footer p{
    color: #9a9a9a;
    font-size: 0.8rem;
    margin: 4px 0;
}

.hub-footer a.footer-link{
    color: #ccc;
}

.hub-footer a.footer-link:hover{
    color: var(--nuv-red-light);
}

/* ---------- Back to top ---------- */
.hub-to-top{
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--nuv-red);
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -8px rgba(181,39,44,0.5);
    cursor: pointer;
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}

.hub-to-top.visible{
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.hub-to-top:hover{
    background: var(--nuv-red-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 600px){
    .hub-hero{ padding: 34px 18px 54px; }
    .hub-hero h1{ font-size: 1.5rem; }
    .hub-main{ margin-top: -28px; }
    .hub-topbar .brand-name{ display: none; }
    .hub-topbar-right{ font-size: 0.72rem; }
}
