/**
 * Quantilica Portal — Unified Hero Component
 * Follows official branding guidelines from branding/
 */

.portal-hero {
    position: relative;
    border-radius: 0.75rem;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Sub-app gradient themes aligned with branding/ */
.portal-hero.hero-quantilica {
    background: linear-gradient(135deg, #0B101E 0%, #0C4A6E 55%, #1E293B 100%);
}

.portal-hero.hero-flamingo {
    background: linear-gradient(135deg, #9f1239 0%, #4c0519 100%);
}

.portal-hero.hero-alpaca {
    background: linear-gradient(135deg, #0369a1 0%, #082f49 100%);
}

.portal-hero.hero-fish {
    background: linear-gradient(135deg, #1d4ed8 0%, #172554 100%);
}

.portal-hero.hero-hedgehog {
    background: linear-gradient(135deg, #4338ca 0%, #1e1b4b 100%);
}

.portal-hero.hero-sloth {
    background: linear-gradient(135deg, #0d6efd 0%, #3b0764 100%);
}

.portal-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

/* Badge (last update / sync status) */
.portal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.85rem;
}

/* Brand header (Icon + Name) */
.portal-hero-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.portal-hero-brand img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.portal-hero-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.95;
    line-height: 1;
}

/* Title (Inter Tight) */
.portal-hero-title {
    font-family: 'Inter Tight', 'Inter', -apple-system, sans-serif;
    font-size: clamp(1.5rem, 3.2vw, 2.25rem);
    font-weight: 700;
    line-height: 1.22;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    color: #ffffff;
}

/* Tagline */
.portal-hero-tagline {
    font-size: 1.025rem;
    line-height: 1.55;
    opacity: 0.9;
    margin-bottom: 1.35rem;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.92);
}

/* Search Box */
.portal-hero-search {
    margin-bottom: 1.15rem;
    max-width: 620px;
}

.portal-hero-search .form-control {
    border-radius: 0.5rem 0 0 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
}

.portal-hero-search .form-control::placeholder {
    color: #64748B !important;
    opacity: 1 !important;
}

.portal-hero-search .form-control:focus {
    background: #FFFFFF !important;
    color: #0F172A !important;
    border-color: #00D8D6;
    box-shadow: 0 0 0 0.25rem rgba(0, 216, 214, 0.35);
}

.portal-hero-search .btn {
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
}

/* Chips / Popular queries (Hedgehog pattern) */
.portal-hero-chips {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.portal-hero-chips-label {
    opacity: 0.8;
    font-weight: 500;
    margin-right: 0.2rem;
}

.portal-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    padding: 0.18rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    transition: background 0.15s, transform 0.15s, border-color 0.15s;
}

.portal-hero-chip:hover {
    background: rgba(255, 255, 255, 0.26);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-1px);
}

/* Action buttons */
.portal-hero-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.portal-hero-actions .btn {
    font-size: 0.875rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: transform 0.15s, box-shadow 0.15s;
}

.portal-hero-actions .btn:hover {
    transform: translateY(-1px);
}

.portal-hero-actions .btn-light {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    border-color: #FFFFFF !important;
}

.portal-hero-actions .btn-light:hover {
    background-color: #F1F5F9 !important;
    color: #0F172A !important;
    border-color: #F1F5F9 !important;
}

.portal-hero-actions .btn-outline-light {
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    background-color: transparent !important;
}

.portal-hero-actions .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
    color: #FFFFFF !important;
}

/* Mascot watermark (Full Color with subtle depth) */
.portal-hero-mascot {
    position: absolute;
    right: 1.5rem;
    bottom: -0.75rem;
    height: 190px;
    width: 190px;
    opacity: 0.82;
    pointer-events: none;
    z-index: 1;
    user-select: none;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35));
    transition: opacity 0.2s, transform 0.2s;
}

.portal-hero-mascot img,
.portal-hero-mascot-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

@media (max-width: 767.98px) {
    .portal-hero {
        border-radius: 0.75rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        padding: 2rem 1.25rem;
        margin-bottom: 2rem;
    }
    .portal-hero-mascot {
        display: none;
    }
    .portal-hero-search .form-control,
    .portal-hero-search .btn {
        min-height: 46px;
    }
    .portal-hero-actions {
        width: 100%;
    }
    .portal-hero-actions .btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 130px;
        text-align: center;
    }
}

@media (min-width: 992px) {
    .portal-hero-mascot {
        height: 230px;
        width: 230px;
        opacity: 0.92;
        right: 2.5rem;
    }
}
