/* ==========================================================================
   JIM Student Theme — Hero Section (Integrated Banner)
   ========================================================================== */

.jim-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(105deg, #F0F6FA 0%, #F5F9FA 35%, #EEF5F4 65%, #E3EFEA 100%);
    border-bottom: 1px solid rgba(0, 111, 104, 0.08);
}

/* ── Bottom-left Folded Ribbon Accent ── */
.jim-hero__accent-left {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 145px;
    width: auto;
    pointer-events: none;
    z-index: 1;
}

.jim-hero__accent-left img {
    height: 100%;
    width: auto;
    object-fit: contain;
    object-position: left bottom;
    display: block;
}

/* ── Hero Inner Two-Column Grid ── */
.jim-hero__inner {
    max-width: var(--jim-max-width, 1280px);
    margin-inline: auto;
    padding-inline: var(--jim-content-padding, 2rem);
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 24px;
    align-items: center;
    position: relative;
    z-index: 2;
    min-height: 350px;
}

/* ── Content Side (Left) ── */
.jim-hero__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 38px 0 34px;
    z-index: 3;
}

/* ── Eyebrow Badge ── */
.jim-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--jim-navy, #123354);
}

.jim-hero__badge {
    background: var(--jim-teal, #006F68);
    color: var(--jim-white, #ffffff);
    padding: 3px 12px;
    border-radius: var(--jim-radius-pill, 9999px);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 111, 104, 0.25);
}

.jim-hero__eyebrow-text {
    color: var(--jim-navy, #123354);
    font-weight: 700;
    letter-spacing: 0.08em;
}

/* ── Headline & Alive Animation ── */
.jim-hero__title {
    font-size: clamp(1.85rem, 3.2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--jim-navy, #123354);
    margin: 0;
    letter-spacing: -0.015em;
    position: relative;
    opacity: 1;
}

.jim-hero__title-line {
    display: block;
    position: relative;
    opacity: 1;
}

.jim-hero__title-line--1 {
    margin-bottom: 4px;
}

.jim-hero__title-line--2 {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

/* Subtle glowing accent pill for "Karya Ilmiah" */
.jim-hero__highlight-pill {
    position: relative;
    display: inline-block;
    color: var(--jim-teal-dark, #004D48);
    background: linear-gradient(135deg, rgba(0, 111, 104, 0.08) 0%, rgba(0, 150, 136, 0.12) 100%);
    padding: 2px 14px;
    border-radius: 8px;
    border: 1.5px solid rgba(0, 111, 104, 0.22);
    box-shadow: 0 2px 8px rgba(0, 111, 104, 0.06);
    transition: all 0.3s ease;
    overflow: hidden;
    vertical-align: baseline;
    margin-left: 4px;
}

.jim-hero__highlight-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 111, 104, 0.4);
    box-shadow: 0 4px 14px rgba(0, 111, 104, 0.14);
}

/* Continuous light beam sweep across the highlight pill */
.jim-hero__highlight-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
    animation: jimShimmerSweep 4.5s infinite ease-in-out;
    pointer-events: none;
    border-radius: 8px;
}

/* Dynamic Flowing Brand Gradient for "UIN Ar-Raniry" */
.jim-hero__brand-gradient {
    position: relative;
    display: inline-block;
    font-weight: 800;
    background: linear-gradient(90deg, #006F68 0%, #009688 25%, #D97706 50%, #009688 75%, #006F68 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: jimGradientFlow 5s linear infinite;
    padding-bottom: 4px;
}

/* Animated accent underline under UIN Ar-Raniry */
.jim-hero__brand-gradient::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0px;
    width: 100%;
    height: 3.5px;
    background: linear-gradient(90deg, #006F68 0%, #D97706 50%, #006F68 100%);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: jimUnderlineFlow 3.5s ease infinite;
    box-shadow: 0 1px 6px rgba(217, 119, 6, 0.35);
}

/* Animations */
@keyframes jimGradientFlow {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes jimUnderlineFlow {
    0% {
        background-position: 0% 50%;
        transform: scaleX(0.96);
    }
    50% {
        background-position: 100% 50%;
        transform: scaleX(1);
    }
    100% {
        background-position: 0% 50%;
        transform: scaleX(0.96);
    }
}

@keyframes jimShimmerSweep {
    0%, 25% {
        left: -100%;
    }
    50%, 100% {
        left: 200%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .jim-hero__highlight-pill::before,
    .jim-hero__brand-gradient,
    .jim-hero__brand-gradient::after {
        animation: none !important;
        transform: none !important;
        filter: none !important;
    }
    .jim-hero__brand-gradient {
        background: var(--jim-teal, #006F68);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

/* ── Subtitle Description ── */
.jim-hero__desc {
    font-size: clamp(0.875rem, 1.1vw, 0.975rem);
    color: #506677;
    line-height: 1.6;
    max-width: 530px;
    margin: 0;
}

/* ── Search Bar (Integrated White Pill) ── */
.jim-hero__search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: var(--jim-radius-pill, 9999px);
    box-shadow: 0 6px 24px rgba(18, 51, 84, 0.07), 0 2px 6px rgba(0, 0, 0, 0.03);
    border: 1.5px solid rgba(0, 111, 104, 0.2);
    max-width: 530px;
    padding: 4px 5px 4px 16px;
    transition: border-color var(--jim-duration, 0.2s) var(--jim-ease, ease), box-shadow var(--jim-duration, 0.2s) var(--jim-ease, ease);
}

.jim-hero__search-form:focus-within {
    border-color: var(--jim-teal, #006F68);
    box-shadow: 0 8px 30px rgba(0, 111, 104, 0.14), 0 0 0 3px rgba(0, 111, 104, 0.12);
}

.jim-hero__search-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 10px;
    color: var(--jim-muted, #7a8b99);
}

.jim-hero__search-input-wrap svg {
    width: 19px;
    height: 19px;
    stroke: var(--jim-teal, #006F68);
    stroke-width: 2.2;
    fill: none;
    flex-shrink: 0;
}

.jim-hero__search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 4px;
    font-size: 0.875rem;
    font-family: var(--jim-font, inherit);
    color: var(--jim-text, #123354);
    background: transparent;
    min-width: 0;
}

.jim-hero__search-input::placeholder {
    color: #8c9ba5;
    font-size: 0.875rem;
}

.jim-hero__search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--jim-teal, #006F68);
    color: var(--jim-white, #ffffff);
    border: none;
    border-radius: var(--jim-radius-pill, 9999px);
    padding: 9px 22px;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: var(--jim-font, inherit);
    cursor: pointer;
    transition: background var(--jim-duration, 0.2s) var(--jim-ease, ease), transform var(--jim-duration, 0.2s) var(--jim-ease, ease), box-shadow var(--jim-duration, 0.2s) var(--jim-ease, ease);
    box-shadow: 0 3px 10px rgba(0, 111, 104, 0.25);
    flex-shrink: 0;
}

.jim-hero__search-btn svg {
    width: 15px;
    height: 15px;
    stroke: #ffffff;
    stroke-width: 2.5;
    fill: none;
}

.jim-hero__search-btn:hover {
    background: var(--jim-teal-dark, #004D48);
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0, 111, 104, 0.35);
}

/* ── Topic Chips ── */
.jim-hero__chips {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.jim-hero__chips-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--jim-navy, #123354);
    margin-right: 3px;
}

.jim-hero__chip {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--jim-teal-dark, #005a54);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 111, 104, 0.22);
    padding: 3px 12px;
    border-radius: var(--jim-radius-pill, 9999px);
    text-decoration: none;
    transition: all var(--jim-duration, 0.2s) var(--jim-ease, ease);
    backdrop-filter: blur(4px);
}

.jim-hero__chip:hover {
    background: var(--jim-teal, #006F68);
    color: var(--jim-white, #ffffff);
    border-color: var(--jim-teal, #006F68);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 111, 104, 0.22);
}

/* ── Integrated Visual (Right) ── */
.jim-hero__visual {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    height: 100%;
    align-self: stretch;
}

.jim-hero__visual img {
    height: 100%;
    max-height: 380px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: right bottom;
    display: block;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.04));
}

/* ── Journal Hero Variant ── */
.jim-hero--journal {
    padding: var(--jim-sp-10, 40px) 0 var(--jim-sp-12, 48px);
}

.jim-hero--journal .jim-hero__content {
    max-width: 800px;
}

/* ── Responsive Adaptations ── */
@media (max-width: 992px) {
    .jim-hero__inner {
        grid-template-columns: 1fr;
        gap: 16px;
        min-height: auto;
        padding-block: 28px;
    }

    .jim-hero__content {
        padding: 0;
        max-width: 100%;
    }

    .jim-hero__visual {
        justify-content: center;
        max-height: 260px;
    }

    .jim-hero__visual img {
        max-height: 250px;
    }
}

@media (max-width: 540px) {
    .jim-hero__search-form {
        padding: 3px 4px 3px 12px;
    }

    .jim-hero__search-btn {
        padding: 8px 16px;
        font-size: 0.8125rem;
    }

    .jim-hero__accent-left {
        height: 90px;
    }
}
