/* ============================================================
   home.css — StudentSite Home Page
   ALL rules scoped under .home-page to avoid polluting globals.
   Brand colors come from --brand-* injected by _HomeLayout.cshtml.
   ============================================================ */

/* Exception: overflow-x guard below is intentionally global so it applies regardless of which layout loads this file. */
/* ── Global overflow guard ───────────────────────────────── */
html, body {
    overflow-x: hidden;
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes hp-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-15px); }
}
@keyframes hp-float-slow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33%      { transform: translate(10px, -15px) rotate(5deg); }
    66%      { transform: translate(-10px, 15px) rotate(-5deg); }
}
@keyframes hp-mesh {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Root scope ──────────────────────────────────────────── */
.home-page {
    --primary:           var(--brand-primary, #002066);
    --secondary:         var(--brand-secondary, #375ca8);
    --accent:            var(--brand-accent, #EDC66E);
    --surface:           #f7f9fb;
    --surface-lowest:    #ffffff;
    --surface-container: #eceef0;
    --on-surface:        #191c1e;
    --on-surface-variant: #444651;
    --outline-variant:   #c5c6d2;
    --radius:            1rem;
    --radius-lg:         2rem;
    --radius-xl:         3rem;
    --gutter:            24px;
    --stack-sm:          12px;
    --stack-md:          24px;
    --stack-lg:          48px;
    --container-max:     1280px;
    --nav-bg:            rgba(255, 255, 255, .8);
    --blob-1:            #b5c4ff;
    --blob-2:            #eebbad;
    --blob-3:            #b0c6ff;
    --news-cat-bg:       #dce1ff;
    --news-cat-color:    var(--primary);
    --news-cat-urgent-bg:         #ffdad6;
    --news-cat-urgent-color:      #93000a;
    --news-cat-scholarship-bg:    #d9e2ff;
    --news-cat-scholarship-color: #001945;
    --course-icon-bg:    rgba(0, 32, 102, .08);
    --tools-heading-color: #3c2a00;
    --tools-card-color:    #56332a;

    font-family: "Be Vietnam Pro", system-ui, sans-serif;
    color: var(--on-surface);
    background: var(--surface);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Scroll Reveal ───────────────────────────────────────── */
.home-page .reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s ease-out, transform .8s cubic-bezier(.16, 1, .3, 1);
}
.home-page .reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
    padding-bottom: 16px;
}

/* ── Float animations ────────────────────────────────────── */
.home-page .animate-float {
    animation: hp-float 4s ease-in-out infinite;
}
.home-page .animate-float-slow {
    animation: hp-float-slow 8s ease-in-out infinite;
}
.home-page .animate-float-delayed {
    animation: hp-float-slow 9s ease-in-out infinite 2s;
}
.home-page .animate-mesh {
    background-size: 200% 200%;
    animation: hp-mesh 10s ease infinite;
}

/* ── Background blobs ────────────────────────────────────── */
.home-page .hp-bg-blobs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -10;
}
.home-page .hp-blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(100px);
    opacity: .2;
}
.home-page .hp-blob--1 {
    top: 10%; left: -10%;
    width: 40%; height: 40%;
    background: var(--blob-1);
    filter: blur(100px);
}
.home-page .hp-blob--2 {
    top: 40%; right: -10%;
    width: 30%; height: 30%;
    background: var(--blob-2);
    filter: blur(100px);
}
.home-page .hp-blob--3 {
    bottom: 10%; left: 20%;
    width: 40%; height: 40%;
    background: var(--blob-3);
    filter: blur(120px);
}

/* ── Nav ─────────────────────────────────────────────────── */
.home-page .hp-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: background .2s;
}
.home-page .hp-nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gutter);
}
.home-page .hp-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.home-page .hp-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 9999px;
}
.home-page .hp-brand-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: none;
}
@media (min-width: 640px) {
    .home-page .hp-brand-title { display: block; }
}
.home-page .hp-nav-links {
    display: none;
    align-items: center;
    gap: var(--gutter);
}
@media (min-width: 768px) {
    .home-page .hp-nav-links { display: flex; }
}
.home-page .hp-nav-links a {
    text-decoration: none;
    color: var(--on-surface-variant);
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 4px;
    transition: color .2s;
    border-bottom: 2px solid transparent;
}
.home-page .hp-nav-links a:hover,
.home-page .hp-nav-links a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ── Main ────────────────────────────────────────────────── */
.home-page .hp-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--stack-md) var(--gutter) calc(var(--stack-lg) * 2);
    gap: var(--stack-lg);
}
@media (max-width: 767px) {
    .home-page .hp-main {
        padding-left: 0px;
        padding-right: 0px;
    }
}

/* ── Hero ────────────────────────────────────────────────── */
.home-page .hp-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--stack-md);
    padding-top: 32px;
    position: relative;
}
@media (min-width: 768px) {
    .home-page .hp-hero { padding-top: 64px; }
}
.home-page .hp-hero-mesh {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right,
        rgba(181, 196, 255, .3),
        rgba(238, 187, 173, .2),
        rgba(176, 198, 255, .3));
    border-radius: var(--radius-xl);
    z-index: -1;
    opacity: .6;
    animation: hp-mesh 10s ease infinite;
    background-size: 200% 200%;
}
.home-page .hp-hero-img-wrap {
    position: relative;
    width: 100%;
    max-width: 512px;
    aspect-ratio: 16/9;
    overflow: visible;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}
.home-page .hp-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.12));
    transition: transform .1s ease-out;
}
.home-page .hp-hero-text h1 {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--primary);
    max-width: 48rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
@media (min-width: 768px) {
    .home-page .hp-hero-text h1 { font-size: 48px; letter-spacing: -.02em; }
}
.home-page .hp-hero-text p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--on-surface-variant);
    max-width: 42rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.home-page .hp-hero-cta {
    display: inline-block;
    padding: 16px 40px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 9999px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: background .2s, transform .2s, box-shadow .2s;
    text-decoration: none;
    position: relative;
    z-index: 1;
}
.home-page .hp-hero-cta:hover {
    background: var(--secondary);
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

/* ── Hero decorative elements ────────────────────────────── */
.home-page .hp-hero-deco {
    position: absolute;
    pointer-events: none;
}
.home-page .hp-hero-deco--dot-sm {
    width: 16px; height: 16px;
    border-radius: 9999px;
}
.home-page .hp-hero-deco--dot-md {
    width: 24px; height: 24px;
    border-radius: 9999px;
}
.home-page .hp-hero-deco--star {
    top: 10%; left: 10%;
    font-size: 36px;
    color: rgba(0,32,102,.4);
    display: none;
}
.home-page .hp-hero-deco--sparkle {
    bottom: 20%; right: 15%;
    font-size: 48px;
    color: rgba(86,51,42,.4);
    display: none;
}
@media (min-width: 768px) {
    .home-page .hp-hero-deco--star,
    .home-page .hp-hero-deco--sparkle { display: block; }
}

/* ── Section mascot glow ─────────────────────────────────── */
.home-page .hp-section-mascot-glow {
    position: absolute;
    width: 96px; height: 96px;
    background: rgba(138,172,255,.4);
    border-radius: 9999px;
    filter: blur(32px);
    z-index: -1;
    top: 50%; left: 40px;
    transform: translateY(-50%);
}

/* ── Nav trail (hamburger + account) ────────────────────── */
.home-page .hp-nav-trail {
    display: flex;
    align-items: center;
    gap: 16px;
}
.home-page .hp-nav-hamburger {
    display: flex;
    background: none;
    border: none;
    color: var(--on-surface-variant);
    cursor: pointer;
    transition: color .2s;
    padding: 0;
}
@media (min-width: 768px) {
    .home-page .hp-nav-hamburger { display: none; }
}
.home-page .hp-nav-hamburger:hover { color: var(--primary); }

.home-page .hp-nav-hamburger-icon--close { display: none; }
.home-page .hp-nav-hamburger.is-open .hp-nav-hamburger-icon--menu { display: none; }
.home-page .hp-nav-hamburger.is-open .hp-nav-hamburger-icon--close { display: flex; }

@media (max-width: 767px) {
    .home-page .hp-nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        background: var(--surface-lowest);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: var(--stack-md) var(--gutter);
        transform: translateX(-100%);
        transition: transform .3s ease;
        overflow-y: auto;
    }
    .home-page .hp-nav-links.is-open {
        display: flex;
        transform: translateX(0);
    }
    .home-page .hp-nav-links a {
        padding: 16px 4px;
        border-bottom: 1px solid var(--outline-variant);
        font-size: 18px;
    }
    /* .hp-nav's backdrop-filter creates a new containing block for its
       position:fixed descendants (per spec, filter/backdrop-filter behave
       like transform here), so #hp-nav-links would size itself relative to
       the 80px-tall nav bar instead of the viewport, collapsing to ~0 height.
       Drop the filter while the drawer is open so it positions against the
       viewport as intended; the drawer's own opaque background covers the
       nav bar anyway, so the blur is not visible during that time. */
    .home-page .hp-nav:has(.hp-nav-links.is-open) {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}
.home-page.hp-nav-locked {
    overflow: hidden;
}

/* ── News Section ────────────────────────────────────────── */
.home-page .hp-news {
    display: flex;
    flex-direction: column;
    gap: var(--stack-md);
    margin-top: 64px;
    background: rgba(247,249,251,.5);
    backdrop-filter: blur(8px);
    padding: var(--stack-md);
    border-radius: var(--radius);
    border: 1px solid var(--outline-variant);
    position: relative;
    overflow: hidden;
}
.home-page .hp-news-glow {
    position: absolute;
    top: -20%; right: -20%;
    width: 256px; height: 256px;
    background: rgba(138,172,255,.4);
    border-radius: 9999px;
    filter: blur(64px);
    pointer-events: none;
}
.home-page .hp-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}
.home-page .hp-section-mascot {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.1));
}
.home-page .hp-section-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
    margin: 0;
}
@media (min-width: 768px) {
    .home-page .hp-section-title { font-size: 32px; }
}
.home-page .hp-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gutter);
    z-index: 1;
    padding: 8px;
}
@media (min-width: 768px) {
    .home-page .hp-news-grid { grid-template-columns: 1fr 1fr; }
}
.home-page .hp-news-card {
    background: var(--surface-lowest);
    border-radius: var(--radius-lg);
    padding: var(--stack-md);
    border: 1px solid rgba(181,196,255,.4);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    gap: var(--stack-sm);
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
}
.home-page .hp-news-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0,0,0,.12);
}
.home-page .hp-news-img {
    width: 100%;
    height: 160px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 8px;
}
.home-page .hp-news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.home-page .hp-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.home-page .hp-news-cat {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 9999px;
    background: var(--news-cat-bg);
    color: var(--news-cat-color);
}
.home-page .hp-news-cat--urgent {
    background: var(--news-cat-urgent-bg);
    color: var(--news-cat-urgent-color);
}
.home-page .hp-news-cat--scholarship {
    background: var(--news-cat-scholarship-bg);
    color: var(--news-cat-scholarship-color);
}
.home-page .hp-news-time {
    font-size: 12px;
    color: var(--on-surface-variant);
}
.home-page .hp-news-card h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--on-surface);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-page .hp-news-card p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--on-surface-variant);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.home-page .hp-news-card a {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.home-page .hp-news-card a:hover { text-decoration: underline; }
.home-page .hp-empty {
    text-align: center;
    color: var(--on-surface-variant);
    padding: var(--stack-lg);
    font-size: 16px;
}
.home-page .hp-section-more {
    display: flex;
    justify-content: center;
    margin-top: 16px;
    z-index: 1;
}
.home-page .hp-btn-outline {
    padding: 8px 32px;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.home-page .hp-btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* ── Classes / Course Section ────────────────────────────── */
.home-page .hp-classes {
    display: flex;
    flex-direction: column;
    gap: var(--stack-md);
    margin-top: 64px;
}
.home-page .hp-search {
    position: relative;
    width: 100%;
    max-width: 672px;
    margin: 0 auto 32px;
    transition: transform .3s;
}
.home-page .hp-search:hover { transform: scale(1.01); }
.home-page .hp-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--on-surface-variant);
    font-size: 20px;
    pointer-events: none;
}
.home-page .hp-search input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border-radius: 9999px;
    border: 1px solid var(--outline-variant);
    background: var(--surface-lowest);
    font-size: 16px;
    color: var(--on-surface);
    font-family: inherit;
    outline: none;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s, border-color .2s;
    box-sizing: border-box;
}
.home-page .hp-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,32,102,.15), 0 4px 12px rgba(0,0,0,.08);
}
.home-page .hp-course-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gutter);
    padding: 8px;
}
@media (min-width: 768px) {
    .home-page .hp-course-grid { grid-template-columns: 1fr 1fr; }
}
.home-page .hp-course-card {
    background: var(--surface-lowest);
    border-radius: var(--radius-lg);
    padding: var(--stack-md);
    border: 1px solid var(--outline-variant);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    gap: var(--stack-sm);
    cursor: pointer;
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
}
.home-page .hp-course-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0,0,0,.12);
}
.home-page .hp-course-icon {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    background: var(--course-icon-bg);
    transition: background .2s;
}
.home-page .hp-course-card:hover .hp-course-icon {
    background: var(--primary);
    color: #fff;
}
.home-page .hp-course-card h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--on-surface);
    margin: 0;
}
.home-page .hp-course-card p {
    font-size: 16px;
    color: var(--on-surface-variant);
    margin: 0;
}
.home-page .hp-course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.home-page .hp-course-tag {
    background: var(--surface-container);
    color: var(--on-surface);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
}
.home-page .hp-course-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--outline-variant);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.home-page .hp-course-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}
.home-page .hp-course-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    transform: translateX(16px);
    transition: opacity .3s, transform .3s, background .2s;
}
.home-page .hp-course-card:hover .hp-course-btn,
.home-page .hp-course-card:focus-within .hp-course-btn {
    opacity: 1;
    transform: translateX(0);
}
.home-page .hp-course-btn:hover { background: var(--secondary); }
.home-page .hp-classes-more {
    text-align: center;
    margin-top: 16px;
}
.home-page .hp-classes-more a {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: text-decoration .2s;
}
.home-page .hp-classes-more a:hover { text-decoration: underline; }

/* ── Course card — class list ────────────────────────────── */
.home-page .hp-course-classes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    border-top: 1px solid var(--outline-variant);
    padding-top: 12px;
}
.home-page .hp-course-class-item {
    font-size: 13px;
    color: var(--on-surface-variant);
}
.home-page .hp-course-class-item span {
    opacity: .75;
}
.home-page .hp-course-tag--premium {
    background: #fff8e1;
    color: #7c5c00;
}

/* ── Tools Section ───────────────────────────────────────── */
.home-page .hp-tools {
    margin-top: 64px;
    border-radius: var(--radius);
    padding: var(--gutter);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--stack-lg);
    background-color: var(--accent);
    transition: box-shadow .5s;
}
@media (min-width: 768px) {
    .home-page .hp-tools {
        flex-direction: row;
        padding: 40px;
    }
}
.home-page .hp-tools:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
}
.home-page .hp-tools-mascot-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1;
    position: relative;
}
@media (min-width: 768px) {
    .home-page .hp-tools-mascot-wrap { width: 33.333%; }
}
.home-page .hp-tools-mascot-glow {
    position: absolute;
    width: 160px; height: 160px;
    background: rgba(255,255,255,.4);
    border-radius: 9999px;
    filter: blur(48px);
    z-index: -1;
    inset: 0;
    margin: auto;
}
.home-page .hp-tools-mascot {
    width: 192px;
    max-width: 300px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,.15));
}
@media (min-width: 768px) {
    .home-page .hp-tools-mascot { width: 100%; }
}
.home-page .hp-tools-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--stack-sm);
    z-index: 1;
    text-align: center;
}
@media (min-width: 768px) {
    .home-page .hp-tools-content {
        width: 66.667%;
        text-align: left;
    }
}
.home-page .hp-tools-content h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--tools-heading-color);
    margin: 0;
}
@media (min-width: 768px) {
    .home-page .hp-tools-content h2 { font-size: 32px; }
}
.home-page .hp-tools-card {
    background: rgba(255,255,255,.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: var(--stack-md);
    margin-top: 8px;
    border: 1px solid rgba(255,255,255,.5);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.home-page .hp-tools-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.home-page .hp-tools-card h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--tools-card-color);
    margin: 0 0 8px;
}
.home-page .hp-tools-card p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--on-surface-variant);
    margin: 0 0 24px;
}
.home-page .hp-tools-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--on-surface);
    color: #fff;
    border: none;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .2s, transform .2s, box-shadow .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.home-page .hp-tools-btn:hover {
    opacity: .85;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
/* Decorative blobs inside tools section */
.home-page .hp-tools-deco-1 {
    position: absolute;
    top: 0; right: 0;
    width: 256px; height: 256px;
    background: rgba(255,255,255,.3);
    border-radius: 9999px;
    transform: translate(33%, -50%);
    filter: blur(32px);
    animation: hp-float-slow 8s ease-in-out infinite;
}
.home-page .hp-tools-deco-2 {
    position: absolute;
    bottom: 0; left: 0;
    width: 192px; height: 192px;
    background: rgba(255,255,255,.2);
    border-radius: 9999px;
    transform: translate(-25%, 33%);
    filter: blur(32px);
    animation: hp-float-slow 9s ease-in-out infinite 2s;
}

/* ── Footer ──────────────────────────────────────────────── */
.home-page .hp-footer {
    background: var(--surface-container);
    color: var(--secondary);
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-top: auto;
    position: relative;
    z-index: 1;
}
.home-page .hp-footer-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--stack-lg) var(--gutter);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--stack-md);
}
.home-page .hp-footer-top {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    gap: var(--stack-lg);
    border-bottom: 1px solid rgba(197,198,210,.3);
    padding-bottom: 32px;
}
@media (min-width: 768px) {
    .home-page .hp-footer-top { flex-direction: row; }
}
.home-page .hp-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
}
@media (min-width: 768px) {
    .home-page .hp-footer-brand {
        align-items: flex-start;
        width: 33.333%;
    }
}
.home-page .hp-footer-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-primary);
}
.home-page .hp-footer-tagline {
    font-size: 16px;
    font-weight: 400;
    color: var(--on-surface-variant);
    text-align: center;
}
@media (min-width: 768px) {
    .home-page .hp-footer-tagline { text-align: left; }
}
.home-page .hp-footer-mascots {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.home-page .hp-footer-mascots img {
    width: 68px;
    height: 68px;
    object-fit: contain;
    border-radius: 9999px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    padding: 4px;
    transition: transform .2s;
    cursor: pointer;
}
.home-page .hp-footer-mascots img:hover { transform: scale(1.1); }
.home-page .hp-footer-cols {
    display: flex;
    flex-direction: column;
    gap: var(--stack-md);
    width: 100%;
    text-align: center;
}
@media (min-width: 768px) {
    .home-page .hp-footer-cols {
        flex-direction: row;
        gap: var(--stack-lg);
        width: 66.667%;
        justify-content: flex-end;
        text-align: left;
    }
}
.home-page .hp-footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
    .home-page .hp-footer-col h4 {
        font-size: 12px;
        font-weight: 700;
        color: var(--brand-primary);
        text-transform: uppercase;
        letter-spacing: .08em;
        margin: 0 0 8px;
    }
.home-page .hp-footer-col a {
    color: var(--on-surface-variant);
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: color .2s, transform .2s;
    display: inline-block;
}
.home-page .hp-footer-col a:hover {
    color: var(--primary);
    transform: translateX(4px);
}
.home-page .hp-copyright {
    width: 100%;
    text-align: center;
    color: var(--on-surface-variant);
    font-size: 12px;
    font-weight: 400;
    padding-top: 16px;
}

/* ── Account Menu ────────────────────────────────────────── */
.home-page .hp-btn-login {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s;
}
.home-page .hp-btn-login:hover { opacity: .85; }

.home-page .hp-account { position: relative; }

.home-page .hp-account-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 999px;
    transition: background .15s;
}
.home-page .hp-account-trigger:hover { background: rgba(0,0,0,.06); }

.home-page .hp-account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.home-page .hp-account-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: .8125rem;
    font-weight: 700;
    flex-shrink: 0;
    user-select: none;
}

.home-page .hp-account-name {
    font-size: .875rem;
    font-weight: 500;
    color: var(--on-surface);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-page .hp-account-caret {
    font-size: 18px;
    color: var(--on-surface-variant);
    transition: transform .2s;
    flex-shrink: 0;
}
.home-page .hp-account[data-open] .hp-account-caret { transform: rotate(180deg); }

.home-page .hp-account-dropdown-header {
    padding: 10px 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--outline-variant);
    font-size: .875rem;
    font-weight: 600;
    color: var(--on-surface);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 767px) {
    /* Tên bên cạnh avatar chiếm nhiều chỗ trên nav mobile, đẩy chuông thông
       báo + nút mute ra ngoài/đè lên nhau. Ẩn tên ở trigger, chỉ hiện lại
       trong dropdown (header phía trên) khi bấm vào avatar. */
    .home-page .hp-account-name { display: none; }
}

/* Dropdown panel */
.home-page .hp-account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--surface-lowest);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility 0s .2s;
    z-index: 200;
}
.home-page .hp-account[data-open] .hp-account-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity .2s, transform .2s, visibility 0s;
}

/* Menu items */
.home-page .hp-account-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--on-surface);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}
.home-page .hp-account-item:hover { background: var(--surface-container); }
.home-page .hp-account-item .material-symbols-outlined { font-size: 20px; flex-shrink: 0; }

.home-page .hp-account-item--disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

.home-page .hp-account-item--logout { color: #c0392b; }
.home-page .hp-account-item--logout:hover { background: #fff0ee; }

.home-page .hp-account-divider {
    height: 1px;
    background: var(--outline-variant);
    margin: 4px 6px;
}

.home-page .hp-account-logout-form { display: contents; }

/* ── Shared Toast (layout-level, used by dashboard + notifications) ── */
.home-page .hp-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 16px);
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 1000;
}
.home-page .hp-toast.hp-toast--visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
