/**
 * EUC brand theme — tông màu theo logo
 * Burgundy (EUC) + Blue (English by heart)
 */

:root {
    --euc-burgundy: #5c322e;
    --euc-burgundy-deep: #3f221f;
    --euc-burgundy-soft: #8a524a;
    --euc-blue: #417de6;
    --euc-blue-dark: #2f5fbf;
    --euc-blue-soft: #eaf1fc;
    --euc-ink: #1c1917;
    --euc-muted: #6b7280;
    --euc-line: #e5e7eb;
    --euc-soft: #f4f6fa;
    --euc-white: #ffffff;

    /* Tương thích theme cũ */
    --primary-color: #417de6;
    --secondary-color: #5c322e;
    --accent-color: #417de6;
    --dark-bg: #3f221f;
    --dark-bg-light: #5c322e;
    --social-color: #417de6;
    --link-color: #417de6;
    --gradient-start: #5c322e;
    --gradient-end: #417de6;
    --surface-tint: #eaf1fc;
    --border-tint: #e5e7eb;

    --bs-primary: #417de6;
    --bs-primary-rgb: 65, 125, 230;
    --bs-info: #417de6;
    --bs-link-color: #417de6;
    --bs-link-hover-color: #2f5fbf;
}

/* ── Buttons Bootstrap ── */
.btn-primary {
    background-color: var(--euc-blue) !important;
    border-color: var(--euc-blue) !important;
    color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--euc-blue-dark) !important;
    border-color: var(--euc-blue-dark) !important;
    color: #fff !important;
}

.btn-secondary {
    background-color: var(--euc-burgundy) !important;
    border-color: var(--euc-burgundy) !important;
    color: #fff !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--euc-burgundy-deep) !important;
    border-color: var(--euc-burgundy-deep) !important;
    color: #fff !important;
}

.btn-outline-primary {
    background-color: transparent !important;
    color: var(--euc-blue) !important;
    border-color: var(--euc-blue) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--euc-blue) !important;
    border-color: var(--euc-blue) !important;
    color: #fff !important;
}

.btn-link {
    background-color: transparent !important;
    border-color: transparent !important;
}

.btn-link.text-danger {
    color: #dc3545 !important;
}

.btn-link.text-danger:hover {
    color: #b02a37 !important;
}

.bg-primary { background-color: var(--euc-blue) !important; }
.text-primary { color: var(--euc-burgundy) !important; }

/* ── Header ── */
.euc-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--euc-line);
    box-shadow: 0 1px 0 rgba(92, 50, 46, 0.04);
}

.euc-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 72px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.euc-header__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.euc-header__logo {
    height: 52px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.euc-header__brand-text {
    font-weight: 800;
    color: var(--euc-burgundy);
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.euc-header__nav {
    display: none;
    align-items: center;
    gap: 0.15rem;
}

@media (min-width: 992px) {
    .euc-header__nav {
        display: flex;
    }
}

.euc-header__nav a {
    position: relative;
    padding: 0.55rem 0.85rem;
    color: var(--euc-ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.94rem;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.euc-header__nav a:hover {
    color: var(--euc-blue);
    background: var(--euc-blue-soft);
}

.euc-header__nav a.is-active {
    color: var(--euc-blue);
}

.euc-header__nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.2rem;
    height: 2px;
    border-radius: 2px;
    background: var(--euc-blue);
}

.euc-header__nav a.euc-header__admin {
    color: var(--euc-burgundy);
}

.euc-header__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.euc-header__phone {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--euc-blue-soft);
    color: var(--euc-blue-dark);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 650;
    white-space: nowrap;
}

.euc-header__phone:hover {
    background: #dce8fb;
    color: var(--euc-burgundy);
}

@media (min-width: 768px) {
    .euc-header__phone {
        display: inline-flex;
    }
}

.euc-header__btn {
    border-radius: 10px !important;
    font-weight: 650 !important;
    padding: 0.45rem 0.95rem !important;
}

.euc-header__btn-login {
    color: var(--euc-burgundy) !important;
    border-color: rgba(92, 50, 46, 0.28) !important;
    background: transparent !important;
}

.euc-header__btn-login:hover {
    background: rgba(92, 50, 46, 0.06) !important;
    border-color: var(--euc-burgundy) !important;
    color: var(--euc-burgundy) !important;
}

.euc-header__btn-logout {
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    color: var(--euc-burgundy-soft) !important;
    border: 1px solid rgba(92, 50, 46, 0.22) !important;
    background: var(--euc-soft) !important;
}

.euc-header__btn-logout i {
    font-size: 0.95rem;
    line-height: 1;
}

.euc-header__btn-logout:hover,
.euc-header__btn-logout:focus {
    color: #fff !important;
    background: var(--euc-burgundy) !important;
    border-color: var(--euc-burgundy) !important;
}

.euc-header__menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    border-radius: 10px !important;
    border-color: var(--euc-line) !important;
    color: var(--euc-ink) !important;
    line-height: 1;
}

/* Desktop: ẩn icon 3 gạch, dùng menu ngang */
@media (min-width: 992px) {
    .euc-header__menu-btn {
        display: none !important;
    }
}

.euc-header__menu-btn i {
    font-size: 1.35rem;
    line-height: 1;
}

.euc-header__menu-btn:hover {
    border-color: var(--euc-blue) !important;
    color: var(--euc-blue) !important;
    background: var(--euc-blue-soft) !important;
}

.euc-header__desktop-auth {
    flex-shrink: 0;
}

/* Offcanvas mobile */
#eucMobileMenu.offcanvas {
    border-left: 1px solid var(--euc-line);
}

#eucMobileMenu .offcanvas-title {
    color: var(--euc-burgundy);
}

#eucMobileMenu .offcanvas-body a {
    color: var(--euc-ink);
    font-weight: 600;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--euc-line);
}

#eucMobileMenu .offcanvas-body a:hover {
    color: var(--euc-blue);
}

/* ── Page banners / CTA dùng chung ── */
.euc-page-hero {
    background: linear-gradient(135deg, var(--euc-burgundy-deep) 0%, var(--euc-burgundy) 48%, var(--euc-blue) 100%);
    color: #fff;
}

/*
 * Banner trang (admin upload): hiện đủ ảnh theo tỉ lệ — giống hero trang chủ.
 * Không dùng background-size: cover (sẽ cắt chữ/logo hai bên trên mobile).
 */
.euc-page-banner {
    position: relative;
    overflow: hidden;
    color: #fff;
    background-color: #3f221f;
}

.euc-page-banner__picture {
    display: block;
    width: 100%;
    margin: 0;
    line-height: 0;
}

.euc-page-banner__img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    vertical-align: top;
    object-fit: contain;
    object-position: center center;
}

.euc-page-banner--image-only {
    line-height: 0;
}

.euc-page-banner--with-copy {
    display: grid;
}

.euc-page-banner--with-copy > .euc-page-banner__picture,
.euc-page-banner--with-copy > .euc-page-banner__shade,
.euc-page-banner--with-copy > .euc-page-banner__body {
    grid-area: 1 / 1;
}

.euc-page-banner--with-copy .euc-page-banner__picture {
    width: 100%;
    min-height: 100%;
}

.euc-page-banner--with-copy .euc-page-banner__img {
    width: 100%;
    height: 100%;
    min-height: clamp(320px, 36vw, 520px);
    object-fit: cover;
    object-position: center center;
}

.euc-page-banner--with-copy .euc-page-banner__shade {
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(63, 34, 31, 0.55) 0%, rgba(47, 95, 191, 0.42) 100%);
}

.euc-page-banner--with-copy .euc-page-banner__body {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 2.75rem 0;
}

.euc-page-banner--with-copy .euc-page-banner__body > .container {
    width: 100%;
}

@media (max-width: 767.98px) {
    /* Mobile: hiện đủ ảnh (không crop); chữ xếp dưới ảnh */
    .euc-page-banner--with-copy {
        display: block;
    }

    .euc-page-banner--with-copy .euc-page-banner__img {
        height: auto;
        min-height: 0;
        object-fit: contain;
    }

    .euc-page-banner--with-copy .euc-page-banner__shade {
        display: none;
    }

    .euc-page-banner--with-copy .euc-page-banner__body {
        padding: 1.5rem 0 1.75rem;
        background: linear-gradient(135deg, #3f221f 0%, #5c322e 46%, #2f5fbf 100%);
    }
}

/* Legacy: vẫn hỗ trợ class cũ nếu còn dùng ở đâu đó */
.euc-hero--has-bg {
    min-height: clamp(420px, 45vw, 580px);
    display: flex;
    align-items: center;
    background-color: #3f221f !important;
    background-image:
        linear-gradient(135deg, rgba(63, 34, 31, 0.55) 0%, rgba(47, 95, 191, 0.42) 100%),
        var(--euc-page-hero-bg) !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.euc-hero--has-bg::before {
    display: none !important;
    content: none !important;
}

.euc-hero--has-bg > .container {
    width: 100%;
}

@media (max-width: 767.98px) {
    .euc-hero--has-bg {
        min-height: 0;
        aspect-ratio: 16 / 9;
        background-image:
            linear-gradient(160deg, rgba(63, 34, 31, 0.2) 0%, rgba(47, 95, 191, 0.15) 100%),
            var(--euc-page-hero-bg-mobile, var(--euc-page-hero-bg)) !important;
        background-size: contain !important;
        background-position: center center !important;
    }
}

/* Hero trang Tin tức (đồng bộ với Giới thiệu / Chương trình) */
.euc-blog-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(ellipse 65% 80% at 88% 8%, rgba(65, 125, 230, 0.42), transparent 55%),
        linear-gradient(135deg, #3f221f 0%, #5c322e 46%, #2f5fbf 100%);
    padding: 0;
}

.euc-blog-hero.euc-page-banner {
    background-color: #3f221f;
    background-image: none;
    padding: 0;
}

/*
 * Desktop: thu ngắn banner chỉ trang Giới thiệu & Tin tức
 * (không áp dụng Chương trình / Liên hệ / mobile).
 */
@media (min-width: 768px) {
    .euc-about-hero.euc-page-banner--image-only .euc-page-banner__img,
    .euc-blog-hero.euc-page-banner--image-only .euc-page-banner__img {
        height: clamp(200px, 18vw, 280px);
        object-fit: cover;
        object-position: center center;
    }
}

.euc-blog-hero__crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
}

.euc-blog-hero__crumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.euc-blog-hero__crumb a:hover {
    color: #fff;
}

.euc-blog-hero__title {
    margin: 0 0 0.6rem;
    font-size: clamp(1.75rem, 3.2vw, 2.45rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.18;
}

.euc-blog-hero__lead {
    margin: 0;
    max-width: 40rem;
    font-size: 1.02rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.84);
}

/* ── Footer sáng, có thể gắn ảnh nền từ admin ── */
.euc-footer.footer {
    position: relative;
    margin-top: 0;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 12% 0%, rgba(65, 125, 230, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(138, 82, 74, 0.12) 0%, transparent 50%),
        linear-gradient(165deg, #fbf8f7 0%, #f3f6fc 48%, #eef3fb 100%) !important;
    color: rgba(28, 25, 23, 0.78);
    border-top: 1px solid rgba(92, 50, 46, 0.1);
}

.euc-footer.footer.euc-footer--has-bg {
    color: rgba(255, 255, 255, 0.88);
    border-top: 0;
    background-color: #3f221f !important;
    background-image:
        linear-gradient(160deg, rgba(63, 34, 31, 0.78) 0%, rgba(65, 125, 230, 0.55) 100%),
        var(--euc-footer-bg-image) !important;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.euc-footer__main {
    position: relative;
    z-index: 1;
    padding: 3.75rem 0 3rem;
}

.euc-footer__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: 1rem;
}

.euc-footer__logo {
    height: 56px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(63, 34, 31, 0.12));
}

.euc-footer--has-bg .euc-footer__logo {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.28));
}

.euc-footer__brand-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--euc-burgundy-deep);
    letter-spacing: -0.02em;
}

.euc-footer--has-bg .euc-footer__brand-text {
    color: #fff;
}

.euc-footer__tagline {
    margin: 0 0 0.75rem;
    color: var(--euc-blue);
    font-weight: 650;
    font-size: 0.98rem;
}

.euc-footer--has-bg .euc-footer__tagline {
    color: #c5d6fa;
}

.euc-footer__about {
    margin: 0 0 1.25rem;
    font-size: 0.92rem;
    line-height: 1.65;
    color: rgba(28, 25, 23, 0.68);
    max-width: 34ch;
}

.euc-footer--has-bg .euc-footer__about {
    color: rgba(255, 255, 255, 0.78);
}

.euc-footer__socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.euc-footer__social {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(65, 125, 230, 0.1);
    border: 1px solid rgba(65, 125, 230, 0.22);
    color: var(--euc-burgundy) !important;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.euc-footer--has-bg .euc-footer__social {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff !important;
}

.euc-footer__social:hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(28, 25, 23, 0.14);
}

.euc-footer__social--facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.euc-footer__social--youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
}

.euc-footer__social--instagram:hover {
    background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af);
    border-color: #dd2a7b;
}

.euc-footer__social--zalo:hover {
    background: #0068ff;
    border-color: #0068ff;
}

.euc-footer__social--tiktok:hover {
    background: #111111;
    border-color: #111111;
}

.euc-footer__title {
    margin: 0 0 1rem;
    font-size: 0.82rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--euc-burgundy-deep);
}

.euc-footer--has-bg .euc-footer__title {
    color: #fff;
}

.euc-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.euc-footer__links li + li {
    margin-top: 0.55rem;
}

.euc-footer__links a {
    color: rgba(28, 25, 23, 0.7);
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 500;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.euc-footer--has-bg .euc-footer__links a {
    color: rgba(255, 255, 255, 0.78);
}

.euc-footer__links a:hover {
    color: var(--euc-blue);
    padding-left: 3px;
}

.euc-footer--has-bg .euc-footer__links a:hover {
    color: #c5d6fa;
}

.euc-footer__contact {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.euc-footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-bottom: 0.85rem;
    font-size: 0.94rem;
    line-height: 1.45;
    color: rgba(28, 25, 23, 0.72);
}

.euc-footer--has-bg .euc-footer__contact li {
    color: rgba(255, 255, 255, 0.82);
}

.euc-footer__contact i {
    margin-top: 0.15rem;
    color: var(--euc-blue);
    font-size: 1rem;
    flex-shrink: 0;
}

.euc-footer--has-bg .euc-footer__contact i {
    color: #c5d6fa;
}

.euc-footer__contact a {
    color: var(--euc-burgundy-deep);
    text-decoration: none;
    font-weight: 600;
}

.euc-footer--has-bg .euc-footer__contact a {
    color: rgba(255, 255, 255, 0.92);
}

.euc-footer__contact a:hover {
    color: var(--euc-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.euc-footer--has-bg .euc-footer__contact a:hover {
    color: #fff;
}

.euc-footer__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    background: var(--euc-blue);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(65, 125, 230, 0.22);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.euc-footer__cta:hover {
    background: #2f5fbf;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(47, 95, 191, 0.28);
}

.euc-footer__bottom {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(92, 50, 46, 0.1);
    padding: 1.1rem 0;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(6px);
}

.euc-footer--has-bg .euc-footer__bottom {
    border-top-color: rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: none;
}

.euc-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.86rem;
    color: rgba(28, 25, 23, 0.58);
}

.euc-footer--has-bg .euc-footer__bottom-inner {
    color: rgba(255, 255, 255, 0.7);
}

.euc-footer__slogan {
    font-style: italic;
    color: var(--euc-blue);
    font-weight: 500;
}

.euc-footer--has-bg .euc-footer__slogan {
    color: #c5d6fa;
}

@media (max-width: 767.98px) {
    .euc-footer__main {
        padding: 2.75rem 0 2.25rem;
    }

    .euc-footer__about {
        max-width: none;
    }

    .euc-footer__bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

