/* ==========================================
   STUDENT HUB STYLE SHEET (PREMIUM & PREMIUM GRID)
   ========================================== */

.hub-hero {
    text-align: center;
    padding: 80px 5% 50px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(79, 140, 255, 0.05));
    border-radius: 0 0 40px 40px;
    margin-bottom: 40px;
}

.hub-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.hub-hero p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Search bar */
.hub-search {
    padding: 0 5% 40px;
    display: flex;
    justify-content: center;
}

.search-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border: none !important;
    box-shadow: none !important;
}

.search-wrapper input {
    flex: 1;
    border-radius: 50px !important;
    border: 1.5px solid var(--border, #cbd5e1) !important;
    background: var(--surface, #ffffff) !important;
    color: var(--text, #1e293b) !important;
    outline: none !important;
    font-size: 1.05rem;
    padding: 14px 24px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

.search-wrapper button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #ffffff;
    border: none;
    outline: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-wrapper button:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

/* Pinned section */
.pinned-section-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 40px;
    display: none; /* Shown dynamically via JS */
}

/* Hub Grid */
.hub-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 60px;
}

.hub-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hub-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0.8;
}

.hub-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.hub-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.link-box a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}

.link-box a:hover {
    background: rgba(108, 99, 255, 0.08);
    border-color: var(--primary);
    transform: translateX(3px);
}

/* Pin/Bookmark styling */
.pin-btn {
    opacity: 0;
    cursor: pointer;
    font-size: 1.15rem;
    transition: all 0.2s ease;
    color: #ccc;
    z-index: 10;
    padding: 2px;
}

.link-box a:hover .pin-btn {
    opacity: 1;
}

.pin-btn.pinned {
    opacity: 1 !important;
    color: #FFD700 !important; /* Gold star */
}

/* Highlight matching text */
.highlight {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
    padding: 0 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hub-hero h1 {
        font-size: 2.2rem;
    }
    .hub-hero p {
        font-size: 1rem;
    }
    .hub-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Custom styling for Book PDF Directory Cards */
.hub-directory-header {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(99, 102, 241, 0.16));
    border: 1px solid rgba(79, 70, 229, 0.25);
    border-radius: 20px;
    padding: 24px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.book-card-section {
    position: relative;
    border-top: 4px solid var(--primary, #4f46e5);
}

.card-badge-header {
    margin-bottom: 12px;
}

.medium-tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 50px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.medium-tag.eng {
    background: rgba(79, 70, 229, 0.12);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.medium-tag.hindi {
    background: rgba(234, 88, 12, 0.12);
    color: #ea580c;
    border: 1px solid rgba(234, 88, 12, 0.3);
}

.medium-tag.state {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.medium-tag.psc {
    background: rgba(168, 85, 247, 0.12);
    color: #9333ea;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
