/* ==========================================================================
   HOMEPAGE WRAPPER
   ========================================================================== */

.hp-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 140px 24px 100px;
    position: relative;
    z-index: 1;
}

.hp-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 700px;
    background-image: radial-gradient(rgba(33, 40, 66, 0.25) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.15;
    z-index: -2;
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
}

.hp-wrapper::after {
    content: '';
    position: absolute;
    top: -120px;
    left: -200px;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(33, 40, 66, 0.07) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 100px;
    position: relative;
}

/* ── LEFT COLUMN ── */
.hp-hero-left {
    display: flex;
    flex-direction: column;
    gap: 28px;
    z-index: 1;
}

/* Staggered entrance — each direct child fades up */
.hp-hero-left>* {
    opacity: 0;
    transform: translateY(22px);
    animation: hpItemIn 0.6s ease forwards;
}

.hp-hero-left>*:nth-child(1) {
    animation-delay: 0.35s;
}

.hp-hero-left>*:nth-child(2) {
    animation-delay: 0.50s;
}

.hp-hero-left>*:nth-child(3) {
    animation-delay: 0.65s;
}

.hp-hero-left>*:nth-child(4) {
    animation-delay: 0.80s;
}

@keyframes hpItemIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge above title */
.hp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(33, 40, 66, 0.07);
    color: #212842;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border: 1px solid rgba(33, 40, 66, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    width: fit-content;
}

.hp-hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #212842;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(33, 40, 66, 0.18);
    animation: hpPulseDot 2s ease-in-out infinite;
}

@keyframes hpPulseDot {

    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(33, 40, 66, 0.18);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(33, 40, 66, 0.06);
    }
}

/* Headline */
.hp-hero-title {
    font-size: clamp(2.8rem, 5vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.08;
    color: #212842;
    margin: 0;
}

.hp-hero-title-accent {
    background: linear-gradient(135deg, #212842 0%, #3d5080 50%, #212842 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: hpShimmer 5s linear infinite;
}

@keyframes hpShimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* Description */
.hp-hero-desc {
    font-size: 1.05rem;
    color: rgba(33, 40, 66, 0.52);
    line-height: 1.75;
    max-width: 440px;
    margin: 0;
}

/* CTA Buttons */
.hp-hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.hp-hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 32px;
    border-radius: 100px;
    background: linear-gradient(135deg, #212842, #2f3d60);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(33, 40, 66, 0.35);
    transition: all 0.28s ease;
    font-family: inherit;
}

.hp-hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(33, 40, 66, 0.45);
}

.hp-hero-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    border: 2px solid rgba(33, 40, 66, 0.18);
    color: #212842;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(33, 40, 66, 0.04);
    transition: all 0.25s ease;
    font-family: inherit;
}

.hp-hero-btn-ghost:hover {
    border-color: #212842;
    background: rgba(33, 40, 66, 0.08);
    transform: translateY(-2px);
}

/* Social row */
.hp-hero-socials {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 4px;
}

.hp-socials-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(33, 40, 66, 0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.hp-socials-icons {
    display: flex;
    gap: 8px;
}

.hp-social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(33, 40, 66, 0.14);
    background: rgba(33, 40, 66, 0.05);
    color: rgba(33, 40, 66, 0.55);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.25s ease;
}

.hp-social-icon:hover {
    background: #212842;
    border-color: #212842;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(33, 40, 66, 0.22);
}

/* ── PARTICLE CANVAS ── */
#hp-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}

/* ── RIGHT COLUMN — image ── */
.hp-hero-right {
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: hpRightIn 0.7s 0.45s ease forwards;
}

@keyframes hpRightIn {
    from {
        opacity: 0;
        transform: translateX(32px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hp-hero-img-wrap {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 72px rgba(33, 40, 66, 0.18), 0 0 0 1.5px rgba(33, 40, 66, 0.08);
    transition: transform 0.1s ease, box-shadow 0.3s ease;
    will-change: transform;
    transform-style: preserve-3d;
}

.hp-hero-img-wrap:hover {
    box-shadow: 0 36px 90px rgba(33, 40, 66, 0.24), 0 0 0 1.5px rgba(33, 40, 66, 0.12);
}

.hp-hero-img-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg,
            rgba(33, 40, 66, 0.08) 0%,
            transparent 50%,
            rgba(33, 40, 66, 0.22) 100%);
    z-index: 1;
    pointer-events: none;
}

.hp-hero-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.hp-hero-img-wrap:hover .hp-hero-img {
    transform: scale(1.04);
}

/* Floating badge pills on the image */
.hp-hero-img-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.92);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 28px rgba(33, 40, 66, 0.14);
    font-size: 0.825rem;
    font-weight: 700;
    color: #212842;
    z-index: 2;
    animation: hpBadgeFloat 4s ease-in-out infinite;
}

.hp-hero-img-badge i {
    color: #f59e0b;
    font-size: 1rem;
}

/* Badge 1 — bottom left */
.hp-hero-img-badge:first-of-type {
    bottom: 24px;
    left: 20px;
}

/* Badge 2 — top right */
.hp-img-badge-2 {
    top: 24px;
    right: 20px;
    animation-delay: 2s;
}

.hp-img-badge-2 i {
    color: #14b8a6;
}

@keyframes hpBadgeFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }
}

/* ==========================================================================
   RIPPLE KEYFRAME  (used by JS click handler)
   ========================================================================== */

@keyframes hpRipple {
    to {
        transform: scale(3);
        opacity: 0;
    }
}

/* ==========================================================================
   SECTION HEADERS (shared across news, materials, exams)
   ========================================================================== */

.hp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.hp-section-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    color: #212842;
    letter-spacing: -0.8px;
    position: relative;
    display: inline-block;
}

/* Animated underline that grows when section is revealed */
.hp-section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #212842, rgba(33, 40, 66, 0.25));
    border-radius: 100px;
    transition: width 0.55s ease 0.25s;
}

.reveal.visible .hp-section-title::after {
    width: 100%;
}

.hp-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    color: rgba(33, 40, 66, 0.55);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 100px;
    border: 1.5px solid rgba(33, 40, 66, 0.1);
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.25s ease;
}

.hp-view-all:hover {
    color: #212842;
    border-color: #212842;
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(33, 40, 66, 0.1);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .hp-hero {
        gap: 40px;
    }
}

@media (max-width: 820px) {
    .hp-wrapper {
        padding: 120px 20px 80px;
    }

    .hp-hero {
        grid-template-columns: 1fr;
        gap: 48px;
        margin-bottom: 72px;
    }

    .hp-hero-img {
        height: 320px;
    }
}

@media (max-width: 560px) {
    .hp-wrapper {
        padding: 110px 16px 60px;
    }

    .hp-hero-title {
        font-size: 2.4rem;
    }

    .hp-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}