/* --- PREMIUM DASHBOARD STANDARDIZATION --- */

:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.3);
    --premium-gradient: linear-gradient(135deg, #003366 0%, #0D8ABC 100%);
    --card-shadow-premium: 0 15px 35px -10px rgba(0, 51, 102, 0.1);
}

[data-theme="dark"] {
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-bg-hover: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* Base Glass Class */
.standard-glass {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px !important;
    box-shadow: var(--card-shadow-premium) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Trending & Partners Section Standardization */
.trending-section,
.partners-section {
    background: transparent !important;
    padding: 3.5rem 1rem 1.5rem !important; /* Fixed padding to prevent overlap */
    margin: 10px auto !important;
    max-width: 1000px !important;
    border-radius: 20px !important;
    position: relative;
    overflow: hidden;
}

.trending-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13, 138, 188, 0.05) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Card Standardization */
.trending-card,
.partner-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 16px !important;
    padding: 15px !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    transition: all 0.3s ease !important;
}

.trending-card:hover,
.partner-card:hover {
    transform: translateY(-5px) !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 20px 40px rgba(13, 138, 188, 0.15) !important;
}

[data-theme="dark"] .trending-card:hover,
[data-theme="dark"] .partner-card:hover {
    background: rgba(30, 41, 59, 0.6) !important;
}

/* Icon Standardization */
.card-left-icon,
.partner-logo-container {
    background: rgba(13, 138, 188, 0.1) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 12px !important;
    color: var(--accent-color) !important;
    font-size: 1.2rem !important;
    filter: grayscale(0) !important;
    opacity: 1 !important;
    transition: all 0.3s ease !important;
}

.trending-card:hover .card-left-icon {
    transform: scale(1.1) rotate(-5deg);
}

.partner-card:hover .partner-logo-container {
    transform: scale(1.1);
}

/* Stats Indicator - Premium Pulsing */
.trending-stats {
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(8px) !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-number {
    font-weight: 800;
    color: var(--accent-color);
    position: relative;
}

.stats-number::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
    right: -10px;
    top: 5px;
    box-shadow: 0 0 10px #10B981;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(2);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Title & Text Polish - HYPER COMPACT */
.trending-header h2 {
    font-size: 1.4rem;
    font-weight: 700 !important;
    letter-spacing: -0.5px !important;
    line-height: 1.2;
    color: var(--text-main) !important;
}

.partners-title {
    font-size: 1.2rem;
    font-weight: 700 !important;
    letter-spacing: -0.3px !important;
    line-height: 1.2;
    color: var(--text-main) !important;
}

.trending-header h2 span,
.partners-title span {
    background: var(--premium-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Section Dividers */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin: 60px 0;
}

/* --- PREMIUM HERO SECTION --- */
.premium-hero-card {
    position: relative;
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 80px 40px;
    border-radius: 32px;
    overflow: hidden;
    background: #020617;
    /* Deepest blue base */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.5);
}

/* Mesh Gradient Background */
.premium-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(13, 138, 188, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(81, 139, 243, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 51, 102, 0.4) 0%, transparent 100%);
    z-index: 0;
    animation: meshFlow 15s ease infinite alternate;
}

/* Grid Pattern Overlay */
.premium-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
    pointer-events: none;
}

@keyframes meshFlow {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(20px, 10px);
    }
}

.premium-hero-content {
    position: relative;
    z-index: 10;
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.motivational-icon {
    display: inline-block;
    margin-bottom: 24px;
    animation: heroIconPulse 3s ease-in-out infinite;
}

.hero-custom-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.4)) drop-shadow(0 0 40px rgba(56, 189, 248, 0.3));
    background: transparent !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes heroIconPulse {

    0%,
    100% {
        transform: scale(1) translateY(0);
        filter: brightness(1) drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
    }

    50% {
        transform: scale(1.1) translateY(-5px);
        filter: brightness(1.2) drop-shadow(0 0 35px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 50px rgba(56, 189, 248, 0.4));
    }
}

.premium-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.premium-hero-title span {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

/* Premium List Items */
.premium-hero-list {
    list-style: none;
    padding: 0;
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.premium-hero-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.premium-hero-list li:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.premium-hero-list i {
    color: #38bdf8;
}

/* CTA Improvements */
.premium-hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn-premium-solid {
    background: var(--accent-color);
    color: white;
    padding: 18px 36px;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(13, 138, 188, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-premium-outline {
    background: transparent;
    color: white;
    padding: 18px 36px;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-premium-solid:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(13, 138, 188, 0.6);
}

.btn-premium-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}


/* --- NPDC KNOWLEDGE HUB STYLES (HYPER-COMPACT) --- */
.npdc-hub-section {
    padding: 20px;
    margin: 15px auto;
    max-width: 1000px;
    position: relative;
    z-index: 5;
}

.npdc-hub-section h2 {
    font-size: 1.8rem !important;
}

.npdc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.article-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-card:hover {
    transform: translateY(-8px);
    border-color: #8b5cf6;
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

.article-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
    margin: 0;
}

.article-abstract {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.article-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.article-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.article-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-acervo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    padding: 10px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-acervo:hover {
    background: #8b5cf6;
    color: white;
    transform: translateX(5px);
}

/* ============================================================
   SENAI-INSPIRED CATEGORY SELECTOR
   ============================================================ */
.cat-selector {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    margin-bottom: 2rem;
    overflow: hidden;
}

[data-theme='dark'] .cat-selector {
    border-color: rgba(255, 255, 255, 0.07);
}

.cat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px; /* reduced gap */
    padding: 16px 8px 14px; /* reduced padding */
    text-decoration: none;
    color: var(--text-main);
    position: relative;
    transition: all 0.25s ease;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
    cursor: pointer;
}

[data-theme='dark'] .cat-item {
    border-right-color: rgba(255, 255, 255, 0.07);
}

.cat-item:last-child {
    border-right: none;
}

.cat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.cat-item:hover::after {
    width: 60%;
}

.cat-item:hover {
    background: rgba(13, 138, 188, 0.05);
    color: var(--primary-color);
}

.cat-icon {
    width: 44px; /* reduced from 52px */
    height: 44px; /* reduced from 52px */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.15rem; /* reduced from 1.3rem */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.cat-item:hover .cat-icon {
    transform: translateY(-4px) scale(1.08);
}

.cat-item span:not(.cat-badge) {
    font-size: 0.75rem; /* slightly smaller font */
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.cat-badge {
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(6, 182, 212, 0.15);
    color: #0891b2;
    padding: 2px 8px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cat-item-muted {
    opacity: 0.6;
    pointer-events: none;
}

.cat-item-premium {
    background: rgba(252, 234, 29, 0.05);
    /* Soft Codemar Yellow */
}

.cat-item-premium .cat-icon {
    background: linear-gradient(135deg, #FCEA1D, #f59e0b) !important;
    box-shadow: 0 4px 12px rgba(252, 234, 29, 0.3);
}

/* Mobile: wrap into grid */
@media (max-width: 640px) {
    .cat-selector {
        flex-wrap: wrap;
        border-radius: 16px;
    }

    .cat-item {
        flex: 1 1 calc(33.33% - 1px);
        border-right: 1px solid rgba(0, 0, 0, 0.07);
        border-bottom: 1px solid rgba(0, 0, 0, 0.07);
        padding: 12px 4px;
        gap: 6px;
    }

    .cat-item span:not(.cat-badge) {
        font-size: 0.7rem;
    }

    .cat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
}