/**
 * Trang chủ EUC — brand blue, full-bleed hero, dữ liệu từ admin
 */

:root {
    --euc-navy: #5c322e;
    --euc-blue: #417de6;
    --euc-sky: #6b9aef;
    --euc-ink: #1c1917;
    --euc-muted: #6b7280;
    --euc-line: #e5e7eb;
    --euc-soft: #f4f6fa;
}

/* ── Hero ── */
.euc-hero {
    position: relative;
    color: #fff;
    overflow: hidden;
}

.euc-hero__carousel,
.euc-hero__carousel .carousel-inner,
.euc-hero__carousel .carousel-item {
    height: min(78vh, 640px);
}

.euc-hero__slide {
    position: relative;
    min-height: min(78vh, 640px);
    height: 100%;
    display: flex;
    align-items: flex-end;
    background-color: var(--euc-navy);
    overflow: hidden;
}

.euc-hero__slide::before {
    content: "";
    position: absolute;
    inset: -4%;
    background-image: var(--euc-hero-image);
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.euc-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(100deg, rgba(63, 34, 31, 0.88) 0%, rgba(92, 50, 46, 0.58) 48%, rgba(65, 125, 230, 0.28) 100%),
        linear-gradient(to top, rgba(63, 34, 31, 0.55) 0%, transparent 45%);
}

.euc-hero__content {
    position: relative;
    z-index: 2;
    padding-top: 4.5rem;
    padding-bottom: 4rem;
    animation: euc-hero-in 0.7s ease both;
}

.euc-hero__copy {
    max-width: 38rem;
}

.euc-hero__brand {
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.euc-hero__title {
    margin: 0 0 1rem;
    font-size: clamp(1.55rem, 3.2vw, 2.45rem);
    font-weight: 700;
    line-height: 1.2;
    max-width: 18ch;
}

.euc-hero__lead {
    margin: 0 0 1.5rem;
    font-size: 1.05rem;
    line-height: 1.55;
    opacity: 0.92;
    max-width: 38ch;
}

.euc-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.euc-hero__indicators {
    margin-bottom: 1.25rem;
}

.euc-btn-light {
    background: #fff;
    color: var(--euc-burgundy, #5c322e);
    border: 0;
    font-weight: 600;
    padding: 0.7rem 1.25rem;
}

.euc-btn-light:hover {
    background: #eaf1fc;
    color: var(--euc-burgundy, #5c322e);
}

.euc-btn-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.65);
    font-weight: 600;
    padding: 0.7rem 1.25rem;
}

.euc-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: #fff;
}

@keyframes euc-hero-in {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Promo: 6 mục tiêu chương trình ── */
.euc-promo {
    position: relative;
    overflow: hidden;
    padding: 4.25rem 0;
    background: linear-gradient(145deg, #2a1715 0%, #3f221f 40%, #2f4f9a 100%);
    color: #fff;
}

.euc-promo__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 28px,
            rgba(255, 255, 255, 0.35) 28px,
            rgba(255, 255, 255, 0.35) 30px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 36px,
            rgba(255, 255, 255, 0.2) 36px,
            rgba(255, 255, 255, 0.2) 38px
        );
}

.euc-promo__inner {
    position: relative;
    z-index: 1;
}

.euc-promo__head {
    text-align: center;
    max-width: 46rem;
    margin: 0 auto 2.25rem;
}

.euc-promo__eyebrow {
    margin: 0 0 0.55rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    opacity: 0.9;
}

.euc-promo__title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.45rem, 3vw, 2.1rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.euc-promo__lead {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.55;
    opacity: 0.9;
}

.euc-promo__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .euc-promo__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .euc-promo__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .euc-promo__grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.euc-promo__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    min-height: 100%;
    padding: 1.25rem 1.1rem 1.35rem;
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.euc-promo__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.euc-promo__card--1 { background: linear-gradient(160deg, #3f221f, #5c322e); }
.euc-promo__card--2 { background: linear-gradient(160deg, #2f5fbf, #417de6); }
.euc-promo__card--3 { background: linear-gradient(160deg, #1f6f7a, #2f97a3); }
.euc-promo__card--4 { background: linear-gradient(160deg, #7a3f56, #a85a72); }
.euc-promo__card--5 { background: linear-gradient(160deg, #a14a32, #c45d3e); }
.euc-promo__card--6 { background: linear-gradient(160deg, #b56b1f, #d4892a); }

.euc-promo__icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 1.25rem;
}

.euc-promo__card-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 750;
    line-height: 1.35;
}

.euc-promo__card-text {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.55;
    opacity: 0.94;
}

@media (max-width: 575.98px) {
    .euc-promo {
        padding: 3rem 0;
    }
}

/* ── Sections ── */
.euc-section {
    padding: 4rem 0;
}

.euc-section--muted {
    background: var(--euc-soft);
}

.euc-section__head {
    margin-bottom: 1.75rem;
}

.euc-section__head--row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.euc-section__title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 800;
    color: var(--euc-ink);
    letter-spacing: -0.02em;
}

.euc-section__desc {
    margin: 0;
    color: var(--euc-muted);
}

.euc-link {
    color: var(--euc-blue);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.euc-link:hover {
    color: var(--euc-navy);
    text-decoration: underline;
}

/* ── Categories ── */
.euc-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (min-width: 768px) {
    .euc-cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .euc-cat-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.euc-cat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--euc-line);
    border-radius: 12px;
    text-decoration: none;
    color: var(--euc-ink);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 100%;
}

.euc-cat:hover {
    border-color: #93c5fd;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(11, 61, 145, 0.08);
    color: var(--euc-ink);
}

.euc-cat__img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.35rem;
}

.euc-cat__name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
}

.euc-cat__meta {
    font-size: 0.8rem;
    color: var(--euc-muted);
}

/* ── Courses ── */
.euc-course {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--euc-line);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.euc-course:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(92, 50, 46, 0.1);
    border-color: #c7d9f8;
    color: inherit;
}

.euc-course__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dbeafe;
}

.euc-course__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.euc-course:hover .euc-course__media img {
    transform: scale(1.05);
}

.euc-course__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.1rem 1.15rem;
    flex: 1;
}

.euc-course__cat {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--euc-navy);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.euc-course__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--euc-ink);
}

.euc-course__meta {
    margin: 0;
    font-size: 0.85rem;
    color: var(--euc-muted);
}

.euc-course__foot {
    margin-top: auto;
    padding-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border-top: 1px solid var(--euc-line);
}

.euc-course__foot strong {
    color: var(--euc-navy);
    font-size: 0.95rem;
}

.euc-course__foot span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--euc-blue);
}

/* ── Teachers ── */
.euc-teacher {
    text-align: center;
    padding: 1.25rem 1rem;
    background: #fff;
    border: 1px solid var(--euc-line);
    border-radius: 14px;
    height: 100%;
}

.euc-teacher__avatar {
    width: 88px;
    height: 88px;
    margin: 0 auto 0.9rem;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, var(--euc-navy), var(--euc-sky));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.25rem;
}

.euc-teacher__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.euc-teacher__name {
    margin: 0 0 0.2rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--euc-ink);
}

.euc-teacher__role {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--euc-navy);
}

.euc-teacher__spec,
.euc-teacher__exp {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--euc-muted);
}

/* ── Posts ── */
.euc-post {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--euc-line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.euc-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    color: inherit;
}

.euc-post__media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e2e8f0;
}

.euc-post__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.euc-post__body {
    padding: 1rem 1.1rem 1.2rem;
}

.euc-post__cat {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--euc-navy);
}

.euc-post__title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--euc-ink);
}

.euc-post__excerpt {
    margin: 0;
    font-size: 0.9rem;
    color: var(--euc-muted);
    line-height: 1.5;
}

/* ── CTA ── */
.euc-cta {
    background: linear-gradient(120deg, #3f221f 0%, #5c322e 45%, #417de6 100%);
    color: #fff;
    padding: 3.25rem 0;
}

.euc-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.euc-cta__title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 800;
}

.euc-cta__desc {
    margin: 0;
    opacity: 0.92;
}

.euc-cta__desc a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.euc-cta__hours {
    margin: 0.4rem 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.euc-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 767.98px) {
    .euc-hero__carousel,
    .euc-hero__carousel .carousel-inner,
    .euc-hero__carousel .carousel-item,
    .euc-hero__slide {
        height: auto;
        min-height: 520px;
    }

    .euc-hero__content {
        padding-top: 3.25rem;
        padding-bottom: 3rem;
    }

    .euc-section {
        padding: 2.75rem 0;
    }

    .euc-cta__actions {
        width: 100%;
    }

    .euc-cta__actions .btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* ── Motion / scroll reveal ── */
.euc-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--euc-delay, 0s);
    will-change: opacity, transform;
}

.euc-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.euc-hero__carousel .carousel-item {
    transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.euc-hero__carousel .carousel-item.active .euc-hero__slide::before {
    animation: euc-kenburns 7.5s ease-out both;
}

@keyframes euc-kenburns {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

.euc-promo__pattern {
    animation: euc-pattern-drift 28s linear infinite;
}

@keyframes euc-pattern-drift {
    from { background-position: 0 0, 0 0; }
    to { background-position: 60px 0, 0 48px; }
}

.euc-promo__icon {
    transition: transform 0.35s ease, background 0.35s ease;
}

.euc-promo__card:hover .euc-promo__icon {
    transform: scale(1.08) rotate(-4deg);
    background: rgba(255, 255, 255, 0.28);
}

.euc-teacher__avatar {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.euc-teacher:hover .euc-teacher__avatar {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 22px rgba(92, 50, 46, 0.2);
}

.euc-btn-light,
.euc-btn-ghost,
.euc-cta .btn {
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.euc-btn-light:hover,
.euc-cta .euc-btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.euc-btn-ghost:hover {
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .euc-reveal,
    .euc-hero__content,
    .euc-promo__pattern,
    .euc-hero__carousel .carousel-item.active .euc-hero__slide::before,
    .euc-course,
    .euc-promo__card,
    .euc-cat,
    .euc-post,
    .euc-teacher__avatar,
    .euc-promo__icon,
    .euc-btn-light,
    .euc-btn-ghost {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}
