/*
 * Grantaura - Grant Hero (v2)
 * Requires Google Fonts: Playfair Display + DM Sans.
 */

.ga-grant-hero {
    --ga-primary:      #5A3B8C;
    --ga-primary-dk:   #3D2463;
    --ga-primary-lt:   #7B55B8;
    --ga-accent:       #FFA366;
    --ga-accent-dk:    #D85A30;
    --ga-white:        #FFFFFF;
    --ga-text-muted:   rgba(255, 255, 255, 0.60);
    --ga-glass-bd:     rgba(255, 255, 255, 0.12);
    --ga-radius-pill:  999px;
    --ga-hero-min-h:   520px;
    --ga-img-col:      380px;
}

.ga-grant-hero {
    position: relative;
    width: auto;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--ga-primary-dk);
    overflow: hidden;
}

.ga-grant-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 90% at 110% 50%,  rgba(90,59,140,0.45)  0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 85%  10%,  rgba(216,90,48,0.12)  0%, transparent 50%),
        radial-gradient(ellipse 50% 60% at 60%  90%,  rgba(61,36,99,0.60)   0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.ga-grant-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
    background-size: 28px 28px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

.ga-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--ga-img-col) 1fr;
    min-height: var(--ga-hero-min-h);
}

.ga-hero-image-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 24px 14px 24px 18px;
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 36%),
        linear-gradient(160deg, rgba(70, 42, 110, 0.98) 0%, rgba(42, 20, 74, 0.98) 100%);
    isolation: isolate;
}

.ga-hero-image-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--ga-image-src);
    background-size: cover;
    background-position: center center;
    filter: blur(24px) saturate(0.9);
    transform: scale(1.14);
    opacity: 0.42;
    pointer-events: none;
    z-index: 0;
}

.ga-hero-image-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(13, 5, 31, 0.06) 0%, rgba(13, 5, 31, 0.3) 54%, rgba(13, 5, 31, 0.82) 100%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 18%, rgba(13, 5, 31, 0) 72%, rgba(13, 5, 31, 0.68) 100%);
    pointer-events: none;
    z-index: 1;
}

.ga-hero-image-stage {
    position: relative;
    z-index: 2;
    width: min(100%, 354px);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 34px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(20, 8, 44, 0.14);
    box-shadow:
        0 34px 74px rgba(7, 3, 22, 0.32);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.ga-hero-image-stage::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 50%);
    pointer-events: none;
    z-index: 0;
}

.ga-hero-image-stage::after {
    content: "";
    position: absolute;
    inset: auto 28px 22px;
    height: 18px;
    border-radius: 999px;
    background: rgba(8, 3, 20, 0.42);
    filter: blur(12px);
    pointer-events: none;
    z-index: 1;
}

.ga-hero-img {
    position: relative;
    z-index: 2;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    object-fit: contain;
    object-position: center center;
    display: block;
    filter: drop-shadow(0 28px 46px rgba(8, 2, 20, 0.34));
    transition: transform 0.35s ease, filter 0.35s ease;
}

.ga-grant-hero:hover .ga-hero-img {
    transform: translateY(-2px);
    filter: drop-shadow(0 34px 54px rgba(8, 2, 20, 0.4));
}

.ga-img-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 0;
    background: linear-gradient(145deg, #3D2463 0%, #7B55B8 100%);
}

.ga-img-gradient {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 128px;
    background: linear-gradient(to top, rgba(18, 6, 40, 0.96) 0%, rgba(18, 6, 40, 0.32) 62%, transparent 100%);
    pointer-events: none;
    z-index: 3;
}

.ga-img-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 82px;
    background: linear-gradient(90deg, rgba(61, 36, 99, 0) 0%, rgba(61, 36, 99, 0.75) 44%, rgba(61, 36, 99, 1) 100%);
    pointer-events: none;
    z-index: 4;
}

.ga-watermark {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 700;
    text-transform: uppercase;
    z-index: 5;
    pointer-events: none;
    user-select: none;
}

.ga-hero-content {
    padding: 40px 46px 36px 36px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ga-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.ga-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: var(--ga-radius-pill);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
}

.ga-status--active  { background: rgba(34,197,94,0.12);  border: 1px solid rgba(74,222,128,0.28); color: #4ade80; }
.ga-status--closed  { background: rgba(239,68,68,0.12);   border: 1px solid rgba(248,113,113,0.28); color: #f87171; }
.ga-status--rolling { background: rgba(251,191,36,0.12);  border: 1px solid rgba(251,191,36,0.28); color: #fbbf24; }

.ga-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ga-status--active .ga-pulse-dot { background: #4ade80; animation: ga-pulse 2.2s ease-in-out infinite; }
.ga-status--closed .ga-pulse-dot { background: #f87171; }
.ga-status--rolling .ga-pulse-dot { background: #fbbf24; animation: ga-pulse 2.2s ease-in-out infinite; }

@keyframes ga-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 currentColor; }
    50% { opacity: 0.6; box-shadow: 0 0 0 5px transparent; }
}

.ga-deadline-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.76rem;
    color: var(--ga-text-muted);
    font-weight: 500;
}

.ga-days-chip {
    padding: 4px 11px;
    border-radius: var(--ga-radius-pill);
    background: rgba(255, 163, 102, 0.12);
    border: 1px solid rgba(255, 163, 102, 0.25);
    color: var(--ga-accent);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
}

.ga-hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.55rem, 2.5vw, 2.25rem);
    font-weight: 800;
    color: var(--ga-white);
    line-height: 1.17;
    letter-spacing: -0.025em;
    margin: 0 0 15px;
}

.ga-hero-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    color: var(--ga-text-muted);
    line-height: 1.7;
    margin: 0 0 22px;
    max-width: 500px;
}

.ga-amount-block {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-bottom: 24px;
    line-height: 1;
}

.ga-amount-symbol {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.3rem;
    color: var(--ga-accent);
    font-weight: 700;
    padding-bottom: 4px;
    line-height: 1;
}

.ga-amount-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.3rem, 4vw, 3.3rem);
    font-weight: 900;
    color: var(--ga-white);
    letter-spacing: -0.045em;
    line-height: 1;
}

.ga-amount-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    color: var(--ga-text-muted);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    align-self: center;
    margin-left: 10px;
}

.ga-tag-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.ga-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: var(--ga-radius-pill);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.ga-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
}

.ga-tag--location {
    background: rgba(96, 165, 250, 0.10);
    border: 1px solid rgba(96, 165, 250, 0.22);
    color: #93c5fd;
}

.ga-tag--category {
    background: rgba(255, 163, 102, 0.09);
    border: 1px solid rgba(255, 163, 102, 0.20);
    color: var(--ga-accent);
}

.ga-hero-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--ga-glass-bd) 20%, var(--ga-glass-bd) 80%, transparent);
    margin-bottom: 22px;
    flex-shrink: 0;
}

.ga-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.ga-byline-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 22px 8px 0;
}

.ga-byline-person + .ga-byline-person {
    padding-left: 22px;
    border-left: 1px solid var(--ga-glass-bd);
}

.ga-avatar-ring {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.ga-avatar-ring::before {
    content: '';
    position: absolute;
    inset: -2.5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ga-accent), var(--ga-primary-lt));
    z-index: 0;
}

.ga-avatar-ring.verified::before {
    background: linear-gradient(135deg, #4ade80, #22d3ee);
}

.ga-avatar {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--ga-primary-dk);
}

.ga-avatar-initials {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ga-primary-lt), var(--ga-accent-dk));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ga-white);
    line-height: 1;
    user-select: none;
}

.ga-byline-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ga-byline-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ga-white);
    line-height: 1;
}

.ga-byline-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.ga-micro-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--ga-radius-pill);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1;
}

.ga-badge--written {
    background: rgba(90, 59, 140, 0.55);
    border: 1px solid rgba(155, 120, 210, 0.35);
    color: rgba(215, 195, 255, 0.9);
}

.ga-badge--verified {
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(74, 222, 128, 0.28);
    color: #86efac;
}

@media (max-width: 960px) {
    .ga-grant-hero {
        --ga-img-col: 260px;
        --ga-hero-min-h: 440px;
    }

    .ga-hero-image-panel {
        padding: 20px 10px 20px 12px;
    }

    .ga-hero-image-stage {
        width: min(100%, 256px);
    }

    .ga-hero-content {
        padding: 28px 28px 24px 22px;
    }
}

@media (max-width: 768px) {
    .ga-hero-inner {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .ga-hero-image-panel {
        height: clamp(300px, 68vw, 392px);
        max-height: none;
        padding: 14px 10px 14px;
    }

    .ga-hero-image-stage {
        width: min(100%, 290px);
        border-radius: 28px;
    }

    .ga-hero-img,
    .ga-img-placeholder {
        border-radius: 0;
    }

    .ga-hero-image-panel::before {
        filter: blur(15px) saturate(0.96);
        opacity: 0.54;
    }

    .ga-img-mask {
        top: auto;
        right: 0;
        left: 0;
        bottom: -1px;
        width: 100%;
        height: 55px;
        background: linear-gradient(180deg, rgba(61, 36, 99, 0) 0%, rgba(61, 36, 99, 0.96) 100%);
    }

    .ga-img-gradient {
        height: 92px;
    }

    .ga-hero-content {
        padding: 24px 22px 28px;
    }

    .ga-hero-title {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
        margin-bottom: 12px;
    }

    .ga-amount-number {
        font-size: 2.3rem;
    }

    .ga-byline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .ga-byline-person {
        padding: 10px 0;
        width: 100%;
    }

    .ga-byline-person + .ga-byline-person {
        padding-left: 0;
        border-left: none;
        border-top: 1px solid var(--ga-glass-bd);
    }
}

@media (max-width: 480px) {
    .ga-hero-image-panel {
        height: clamp(312px, 88vw, 386px);
        padding: 12px 8px;
    }

    .ga-hero-image-stage {
        width: min(100%, 300px);
        border-radius: 24px;
    }

    .ga-hero-content {
        padding: 20px 16px 24px;
    }

    .ga-hero-title {
        font-size: 1.4rem;
    }

    .ga-amount-number {
        font-size: 2rem;
    }

    .ga-deadline-text {
        display: none;
    }

}
