/********** Template CSS (base template by HTML Codex) - themed for English Galaxy BD **********/
:root {
    --primary: #E01F26;   /* Brand red */
    --light: #F5F5F7;
    --dark: #221F1F;      /* Brand charcoal */
    --navy: #263347;
    --green: #2D743A;
    --purple: #2E3090;
    --white: #FFFFFF;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-brand {
    display: flex;
    align-items: center;
}

.navbar .navbar-brand img {
    max-height: 50px;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

.navbar .navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.header-bg {
    background: linear-gradient(rgba(38, 51, 71, .82), rgba(34, 31, 31, .82)), url(../img/bg-1.svg) center center no-repeat;
    background-size: cover;
}

.btn-play {
    position: relative;
    display: block;
    box-sizing: content-box;
    width: 16px;
    height: 26px;
    border-radius: 100%;
    border: none;
    outline: none !important;
    padding: 18px 20px 20px 28px;
    background: #FFFFFF;
}

.btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: #FFFFFF;
    border-radius: 100%;
    animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: #FFFFFF;
    border-radius: 100%;
    transition: all 200ms;
}

.btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    left: -1px;
    border-left: 16px solid var(--primary);
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

@keyframes pulse-border {
    0% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
        opacity: 0;
    }
}

.modal-video .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

.modal-video .modal-body {
    position: relative;
    padding: 0px;
}

.modal-video .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: #FFFFFF;
    background: #000000;
    opacity: 1;
}

.header-carousel .owl-nav {
    position: absolute;
    width: 200px;
    height: 40px;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: transparent;
    border: 1px solid #FFFFFF;
    font-size: 22px;
    transition: .5s;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.header-carousel .owl-dots {
    position: absolute;
    height: 45px;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    background: transparent;
    border: 1px solid #FFFFFF;
    transition: .5s;
}

.header-carousel .owl-dot::after {
    position: absolute;
    content: "";
    width: 5px;
    height: 5px;
    top: 4px;
    left: 4px;
    background: #FFFFFF;
    border-radius: 5px;
}

.header-carousel .owl-dot.active {
    background: var(--primary);
    border-color: var(--primary);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--light);
}


/*** Img Border ***/
.img-border {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.img-border::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    right: 3rem;
    bottom: 3rem;
    border: 5px solid var(--primary);
}

.img-border img {
    position: absolute;
    top: 3rem;
    left: 3rem;
    width: calc(100% - 3rem);
    height: calc(100% - 3rem);
    object-fit: cover;
}


/*** Facts & Visiting Hours ***/
.facts {
    background: linear-gradient(rgba(38, 51, 71, .75), rgba(46, 48, 144, .75)), url(../img/bg-1.svg) center center no-repeat;
    background-size: cover;
}

.visiting-hours {
    background: linear-gradient(rgba(34, 31, 31, .78), rgba(38, 51, 71, .85)), url(../img/bg-2.svg) center center no-repeat;
    background-size: cover;
}

.visiting-hours .list-group-item {
    display: flex;
    justify-content: space-between;
    color: var(--light);
    background: rgba(0, 0, 0, .15);
    border-color: rgba(255, 255, 255, .15);
}

.visiting-hours .table {
    color: var(--light);
    background: rgba(0, 0, 0, .15);
}

.visiting-hours .table td {
    padding: .5rem 1rem;
    border-color: rgba(255, 255, 255, .15);
}

.visiting-hours .table tr:last-child td {
    border: none;
}


/*** Course tiles ***/
.course-tile {
    position: relative;
    display: block;
}

.course-tile .course-tile-text {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(to top, rgba(34, 31, 31, .9), rgba(38, 51, 71, .55));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 100px !important;
    opacity: 0;
    transition: .5s;
}

.course-tile:hover .course-tile-text {
    opacity: 1;
    padding-bottom: 20px !important;
}


/*** Membership ***/
.membership-item {
    padding: 45px 30px;
    color: #FFFFFF;
    background: rgba(34, 31, 31, .78);
}

.membership-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.membership-item .display-1 {
    color: transparent;
    -webkit-text-stroke: 2px var(--primary);
}


/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 300px;
    }
}

.testimonial-carousel .owl-item .testimonial-text {
    background: var(--light);
    transform: scale(.8);
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    background: var(--primary);
    transform: scale(1);
}

.testimonial-carousel .owl-item .testimonial-text *,
.testimonial-carousel .owl-item .testimonial-item img {
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text * {
    color: var(--light) !important;
}

.testimonial-carousel .owl-item.center .testimonial-item img {
    border-color: var(--primary) !important;
} 

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 350px;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
    z-index: 1;
}

.testimonial-carousel:hover .owl-nav {
    width: 300px;
    opacity: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    color: var(--primary);
    font-size: 45px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}


/*** Footer ***/
.footer {
    background: linear-gradient(rgba(34, 31, 31, .92), rgba(34, 31, 31, .92)), url(../img/bg-2.svg) center center no-repeat;
    background-size: cover;
}

.footer .btn.btn-social {
    margin-right: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    border: 1px solid #FFFFFF;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .copyright a:hover {
    color: var(--primary);
}

/* =====================================================================
   ENGLISH GALAXY BD - ADDITIONS
   New components built in the template's design language.
   ===================================================================== */

body { color: #555; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--dark); }
.bn { font-family: 'Hind Siliguri', 'Open Sans', sans-serif; }
a { transition: color .3s; }
:focus-visible { outline: 3px solid rgba(224, 31, 38, .45); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100000; background: var(--primary); color: #fff; padding: 10px 16px; }
.skip-link:focus { left: 10px; top: 10px; color: #fff; }
.text-navy { color: var(--navy) !important; }
.text-green { color: var(--green) !important; }
.text-purple { color: var(--purple) !important; }
.bg-navy { background-color: var(--navy) !important; }
.bg-green { background-color: var(--green) !important; }
.bg-purple { background-color: var(--purple) !important; }
.bg-soft { background: #FBF6F2 !important; }

/*** Brand logo ***/
.navbar .navbar-brand img.brand-logo { max-height: 58px; height: 58px; width: auto; }
@media (max-width: 575.98px) { .navbar .navbar-brand img.brand-logo { height: 46px; } }
.footer-logo { display: inline-block; background: #FFFFFF; padding: 12px 16px; margin-bottom: 1.25rem; }
.footer-logo img { height: 64px; width: auto; display: block; }

/*** Topbar ***/
.topbar a { color: inherit; }
.topbar a:hover { color: var(--primary); }

/*** Navbar (mobile usability) ***/
.navbar-toggler { border: 1px solid rgba(34, 31, 31, .15); padding: 8px 10px; }
@media (max-width: 991.98px) {
    .navbar .navbar-collapse { max-height: calc(100vh - 90px); overflow-y: auto; }
    .navbar .navbar-nav .nav-link { padding: 12px 0; font-size: 15px; }
    .navbar .dropdown-menu { border: none; background: var(--light); padding: 0 0 0 12px; }
    .navbar .dropdown-item { padding: 10px 12px; }
    .navbar .nav-cta { width: 100%; margin-top: 12px; }
}
.navbar .dropdown-item.active, .navbar .dropdown-item:active { background: var(--primary); }
.navbar .nav-cta { white-space: nowrap; }

/*** Hero ***/
.hero-title { line-height: 1.15; }
.hero-tagline { font-size: 1.5rem; color: #FFD84D; }
.hero-sub { color: rgba(255, 255, 255, .8); font-size: 1.05rem; max-width: 520px; }
.header-carousel .owl-carousel-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.btn-play-wrap { cursor: pointer; }

/*** Section label (#) ***/
.section-label { font-weight: 600; letter-spacing: .5px; }

/*** Facts ***/
.facts .fact-text { font-family: 'Quicksand', sans-serif; font-weight: 700; }

/*** Program (service) items ***/
.program-item { display: block; padding: 28px 24px; height: 100%; background: #FFFFFF; border: 1px solid #EEE; transition: .4s; color: #555; }
.program-item img { width: 56px; height: 56px; }
.program-item h5 { transition: .3s; }
.program-item:hover { border-color: var(--primary); box-shadow: 0 10px 30px rgba(34, 31, 31, .08); transform: translateY(-4px); color: #555; }
.program-item:hover h5 { color: var(--primary); }
.program-item .more { font-size: 14px; font-weight: 600; color: var(--primary); }

/*** Course cards ***/
.course-tile img { width: 100%; }
.course-tile .course-tile-text h5 { line-height: 1.3; }
.course-tile .course-tile-text .chip { display: inline-block; }
.course-card { background: #FFFFFF; border: 1px solid #EEE; height: 100%; display: flex; flex-direction: column; transition: .4s; }
.course-card:hover { box-shadow: 0 14px 36px rgba(34, 31, 31, .1); transform: translateY(-4px); }
.course-card .course-img { position: relative; overflow: hidden; display: block; }
.course-card .course-img img { width: 100%; aspect-ratio: 12 / 7; object-fit: cover; transition: .6s; }
.course-card:hover .course-img img { transform: scale(1.06); }
.course-card .course-cat { position: absolute; left: 0; bottom: 0; background: var(--primary); color: #FFF; font-size: 13px; font-weight: 600; padding: 6px 14px; text-transform: uppercase; letter-spacing: .5px; }
.course-card .course-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.course-card h5 a { color: var(--dark); }
.course-card h5 a:hover { color: var(--primary); }
.course-card .course-meta { border-top: 1px solid #EEE; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 30px; background: var(--light); color: var(--dark); line-height: 1.4; }
.chip-online { background: rgba(46, 48, 144, .1); color: var(--purple); }
.chip-offline { background: rgba(45, 116, 58, .12); color: var(--green); }
.chip-red { background: rgba(224, 31, 38, .1); color: var(--primary); }

/*** Filters ***/
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-bar .btn { border: 1px solid #E5E5E5; background: #FFF; color: var(--dark); padding: 10px 20px; }
.filter-bar .btn.active, .filter-bar .btn:hover { background: var(--primary); border-color: var(--primary); color: #FFF; }
@media (max-width: 575.98px) {
    .filter-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
    .filter-bar .btn { flex: 0 0 auto; }
}
.search-box { position: relative; }
.search-box i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: #999; }
.search-box input { padding-left: 46px; height: 50px; }
.empty-state { padding: 60px 20px; text-align: center; background: var(--light); }
.empty-state i { font-size: 42px; color: var(--primary); margin-bottom: 16px; display: block; }

/*** Course details ***/
.detail-hero img { width: 100%; aspect-ratio: 12 / 7; object-fit: cover; }
.detail-list li { padding: 8px 0 8px 34px; position: relative; list-style: none; }
.detail-list li::before { content: "\f00c"; font-family: "Font Awesome 5 Free"; font-weight: 900; position: absolute; left: 0; top: 8px; color: var(--primary); }
.detail-list { padding-left: 0; }
.sidebar-box { background: var(--light); padding: 30px; margin-bottom: 30px; }
.sidebar-box .info-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, .07); }
.sidebar-box .info-row:last-child { border-bottom: none; }
.sidebar-box .info-row span:first-child { color: var(--dark); font-weight: 600; }
.sidebar-box .info-row span:last-child { text-align: right; }
@media (min-width: 992px) { .sticky-sidebar { position: sticky; top: 110px; } }

/*** Promise (testimonial) carousel ***/
.testimonial-item .promise-icon { width: 100px; height: 100px; background: #FFF; padding: 22px; }
.testimonial-text h5 { margin-top: 4px; }

/*** Portal promo ***/
.portal-feature { display: flex; gap: 16px; margin-bottom: 22px; }
.portal-feature .ico { width: 52px; height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(224, 31, 38, .1); color: var(--primary); font-size: 20px; }

/*** Books ***/
.book-cat { padding: 36px 28px; background: #FFF; border: 1px solid #EEE; height: 100%; text-align: center; transition: .4s; }
.book-cat:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 10px 30px rgba(34, 31, 31, .08); }
.book-cat img { width: 64px; height: 64px; margin-bottom: 18px; }
.book-card { background: #FFF; border: 1px solid #EEE; height: 100%; }
.book-card .cover { aspect-ratio: 3 / 4; background: var(--light); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.book-card .cover img { width: 100%; height: 100%; object-fit: cover; }

/*** Gallery ***/
.gallery-item { display: block; position: relative; overflow: hidden; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: .6s; }
.gallery-item .gallery-cap { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 20px; background: linear-gradient(to top, rgba(34, 31, 31, .85), transparent 60%); color: #FFF; opacity: 0; transition: .4s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover .gallery-cap, .gallery-item:focus .gallery-cap { opacity: 1; }
@media (hover: none) { .gallery-item .gallery-cap { opacity: 1; } }
.gallery-grid .col-item.hide { display: none; }

/*** Contact ***/
.contact-card { min-height: 130px; }
.contact-card h5 { word-break: break-word; }
@media (max-width: 575.98px) { .contact-card { padding: 1.5rem !important; } }

/*** Forms & validation ***/
.form-control, .form-select { border-radius: 0; }
.form-floating > .form-select { padding-top: 1.625rem; }
.was-validated .form-control:invalid, .form-control.is-invalid,
.was-validated .form-select:invalid, .form-select.is-invalid { border: 1px solid #dc3545 !important; }
.was-validated .form-control:valid, .form-control.is-valid,
.was-validated .form-select:valid, .form-select.is-valid { border: 1px solid var(--green) !important; }
.form-note { font-size: 13px; color: #777; }
.password-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #888; z-index: 5; padding: 6px; }
.form-alert { display: none; }
.form-alert.show { display: block; }

/*** Auth pages ***/
.auth-wrap { max-width: 560px; margin: 0 auto; }
.auth-card { background: #FFF; border: 1px solid #EEE; padding: 40px; box-shadow: 0 20px 50px rgba(34, 31, 31, .06); }
@media (max-width: 575.98px) { .auth-card { padding: 26px 20px; } }
.demo-hint { background: rgba(46, 48, 144, .07); border-left: 4px solid var(--purple); padding: 14px 16px; font-size: 14px; }
.strength { height: 6px; background: #EEE; margin-top: 8px; }
.strength span { display: block; height: 100%; width: 0; transition: .3s; }

/*** Demo / integration notices ***/
.demo-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; background: rgba(46, 48, 144, .1); color: var(--purple); }
.integration-note { font-size: 13px; background: #FFF8E1; border-left: 4px solid #F2A900; padding: 12px 14px; color: #6b5300; }

/* =====================================================================
   STUDENT PORTAL
   ===================================================================== */
.portal-header { background: linear-gradient(rgba(38, 51, 71, .9), rgba(46, 48, 144, .85)), url(../img/bg-1.svg) center / cover no-repeat; }
.portal-header .avatar { width: 64px; height: 64px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #FFF; background: var(--primary); font-family: 'Quicksand', sans-serif; flex-shrink: 0; }
.portal-nav { background: #FFF; border: 1px solid #EEE; }
.portal-nav a { display: flex; align-items: center; gap: 12px; padding: 14px 20px; color: var(--dark); font-weight: 500; border-left: 4px solid transparent; border-bottom: 1px solid #F2F2F2; }
.portal-nav a:last-child { border-bottom: 0; }
.portal-nav a i { width: 20px; text-align: center; color: #999; transition: .3s; }
.portal-nav a:hover, .portal-nav a.active { color: var(--primary); background: #FFF5F5; border-left-color: var(--primary); }
.portal-nav a:hover i, .portal-nav a.active i { color: var(--primary); }
@media (max-width: 991.98px) {
    .portal-nav { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; position: sticky; top: 0; z-index: 10; }
    .portal-nav a { flex: 0 0 auto; border-left: 0; border-bottom: 3px solid transparent; padding: 12px 16px; font-size: 14px; }
    .portal-nav a:hover, .portal-nav a.active { border-left: 0; border-bottom-color: var(--primary); }
}
.stat-card { background: #FFF; border: 1px solid #EEE; padding: 22px; display: flex; align-items: center; gap: 16px; height: 100%; }
.stat-card .ico { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #FFF; flex-shrink: 0; }
.stat-card h3 { margin: 0; font-size: 1.75rem; }
.stat-card p { margin: 0; font-size: 14px; }
.panel { background: #FFF; border: 1px solid #EEE; }
.panel-head { padding: 18px 22px; border-bottom: 1px solid #EEE; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.panel-head h5 { margin: 0; }
.panel-body { padding: 22px; }
.progress { height: 8px; border-radius: 0; background: #EEE; }
.progress-bar { background: var(--primary); }
.progress-bar.bg-green { background: var(--green) !important; }
.enrolled-item { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid #F0F0F0; align-items: center; }
.enrolled-item:last-child { border-bottom: 0; padding-bottom: 0; }
.enrolled-item:first-child { padding-top: 0; }
.enrolled-item img { width: 120px; aspect-ratio: 12 / 7; object-fit: cover; flex-shrink: 0; }
@media (max-width: 575.98px) {
    .enrolled-item { flex-direction: column; align-items: stretch; }
    .enrolled-item img { width: 100%; }
}
.continue-card { background: var(--navy); color: #FFF; padding: 28px; position: relative; overflow: hidden; }
.continue-card h4 { color: #FFF; }
.continue-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(224, 31, 38, .35); }
.continue-card > * { position: relative; z-index: 1; }
.download-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #F0F0F0; }
.download-row:last-child { border-bottom: 0; }
.download-row .file-ico { width: 42px; height: 42px; background: rgba(224, 31, 38, .1); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.table-portal th { font-family: 'Quicksand', sans-serif; color: var(--dark); white-space: nowrap; }
.table-portal td, .table-portal th { padding: 14px 12px; vertical-align: middle; }
.status { font-size: 12px; font-weight: 600; padding: 4px 10px; display: inline-block; white-space: nowrap; }
.status-paid, .status-active, .status-passed { background: rgba(45, 116, 58, .12); color: var(--green); }
.status-pending { background: #FFF4D6; color: #8a6500; }
.status-failed { background: rgba(224, 31, 38, .1); color: var(--primary); }
@media (max-width: 767.98px) {
    .table-stack thead { display: none; }
    .table-stack tr { display: block; border: 1px solid #EEE; margin-bottom: 12px; }
    .table-stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; border-bottom: 1px solid #F3F3F3; text-align: right; }
    .table-stack td::before { content: attr(data-label); font-weight: 600; color: var(--dark); text-align: left; }
    .table-stack td:last-child { border-bottom: 0; }
}

/*** Course learning interface ***/
.curriculum .accordion-button { font-family: 'Quicksand', sans-serif; font-weight: 700; color: var(--dark); border-radius: 0 !important; }
.curriculum .accordion-button:not(.collapsed) { background: #FFF5F5; color: var(--primary); box-shadow: none; }
.curriculum .accordion-button:focus { box-shadow: none; border-color: rgba(224, 31, 38, .3); }
.curriculum .accordion-item { border-radius: 0 !important; }
.lesson-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid #F2F2F2; color: var(--dark); }
.lesson-row:last-child { border-bottom: 0; }
.lesson-row:hover { background: #FAFAFA; color: var(--primary); }
.lesson-row .state { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #DDD; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #AAA; flex-shrink: 0; }
.lesson-row.done .state { background: var(--green); border-color: var(--green); color: #FFF; }
.lesson-row.current { background: #FFF5F5; }
.lesson-row.current .state { border-color: var(--primary); color: var(--primary); }
.lesson-row .meta { margin-left: auto; font-size: 13px; color: #888; white-space: nowrap; }

/*** Video lesson interface ***/
.player-wrap { background: #000; position: relative; }
.player-wrap video { width: 100%; display: block; aspect-ratio: 16 / 9; background: #000; }
.player-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--dark); color: #FFF; }
.player-toolbar .form-select { width: auto; background-color: #2f2b2b; color: #FFF; border-color: #444; }
.player-toolbar .btn-outline-light { border-color: rgba(255, 255, 255, .3); }
.playlist { max-height: 70vh; overflow-y: auto; }
@media (max-width: 991.98px) { .playlist { max-height: none; } }
.lesson-tabs .nav-link { color: var(--dark); border-radius: 0; font-weight: 600; padding: 12px 18px; }
.lesson-tabs .nav-link.active { color: #FFF; background: var(--primary); }
.key-phrase { background: var(--light); padding: 12px 16px; margin-bottom: 10px; border-left: 4px solid var(--primary); font-weight: 500; color: var(--dark); }
.complete-banner { display: none; background: rgba(45, 116, 58, .1); color: var(--green); padding: 12px 16px; font-weight: 600; }
.complete-banner.show { display: block; }

/*** Quizzes ***/
.quiz-card { background: #FFF; border: 1px solid #EEE; padding: 24px; height: 100%; display: flex; flex-direction: column; transition: .3s; }
.quiz-card:hover { border-color: var(--primary); }
.quiz-option { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px 18px; border: 2px solid #EEE; background: #FFF; margin-bottom: 12px; color: var(--dark); font-weight: 500; transition: .2s; min-height: 56px; }
.quiz-option:hover { border-color: rgba(224, 31, 38, .4); }
.quiz-option .letter { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--light); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.quiz-option.selected { border-color: var(--primary); background: #FFF5F5; }
.quiz-option.selected .letter { background: var(--primary); color: #FFF; }
.quiz-option.correct { border-color: var(--green); background: rgba(45, 116, 58, .08); }
.quiz-option.correct .letter { background: var(--green); color: #FFF; }
.quiz-option.wrong { border-color: var(--primary); background: rgba(224, 31, 38, .06); }
.quiz-timer { font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--dark); }
.quiz-timer.low { color: var(--primary); }
.quiz-dots { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-dots button { width: 36px; height: 36px; border: 1px solid #DDD; background: #FFF; font-weight: 600; }
.quiz-dots button.answered { background: var(--navy); color: #FFF; border-color: var(--navy); }
.quiz-dots button.current { outline: 2px solid var(--primary); outline-offset: 1px; }
.score-ring { width: 160px; height: 160px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; background: conic-gradient(var(--green) calc(var(--p) * 1%), #EEE 0); }
.score-ring span { width: 128px; height: 128px; border-radius: 50%; background: #FFF; display: flex; align-items: center; justify-content: center; font-family: 'Quicksand', sans-serif; font-size: 2rem; font-weight: 700; color: var(--dark); }

/*** Toast ***/
.eg-toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(120px); background: var(--dark); color: #FFF; padding: 14px 22px; z-index: 9999; transition: .4s; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.eg-toast.show { transform: translateX(-50%) translateY(0); }
.eg-toast.success { border-left: 5px solid #47b35a; }
.eg-toast.error { border-left: 5px solid var(--primary); }

/*** Back to top on mobile ***/
@media (max-width: 575.98px) { .back-to-top { right: 16px; bottom: 16px; } }

/*** Reduced motion ***/
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .wow { visibility: visible !important; }
}

/* Touch devices: show course overlay text without hover */
@media (hover: none) {
    .course-tile .course-tile-text { opacity: 1; padding-bottom: 20px !important; background: linear-gradient(to top, rgba(34, 31, 31, .85), transparent 70%); }
}
.visiting-hours .table td { overflow-wrap: anywhere; }
.visiting-hours .table td:first-child { white-space: nowrap; width: 1%; }
.course-card .course-img img, .gallery-item img, .detail-hero img { height: auto; }
.lesson-tabs { flex-wrap: nowrap; overflow-x: auto; }
.lesson-tabs .nav-link { white-space: nowrap; }
