/*
 * EduTime UI safe override
 * Load after style.css, anhtuan.css and Additional CSS.
 * No content, template or database changes are required.
 */

@font-face {
  font-family: "EduTime Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/be-vietnam-pro/be-vietnam-pro-400-vi.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "EduTime Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/be-vietnam-pro/be-vietnam-pro-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "EduTime Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/be-vietnam-pro/be-vietnam-pro-700-vi.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "EduTime Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/be-vietnam-pro/be-vietnam-pro-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body,
#wrapper,
#wrapper :is(p, a, h1, h2, h3, h4, h5, h6, button, input, select, textarea, label, summary, table, th, td),
#wrapper .section-title-main {
  font-family: "EduTime Sans", "Segoe UI", Tahoma, sans-serif !important;
}

/* The Viber badge source is square; keep its rendered ratio square as well. */
img[src*="/viber.webp"] {
  width: 50px !important;
  height: 50px !important;
  object-fit: contain;
}

:root {
  --edu-primary: #c91511;
  --edu-primary-strong: #a70f0b;
  --edu-secondary: #0377a4;
  --edu-ink: #263244;
  --edu-muted: #64748b;
  --edu-line: #e6ebf1;
  --edu-surface: #ffffff;
  --edu-surface-soft: #f7f9fc;
  --edu-radius-sm: 8px;
  --edu-radius-md: 12px;
  --edu-shadow-sm: 0 4px 16px rgba(30, 48, 70, 0.07);
  --edu-shadow-hover: 0 10px 26px rgba(30, 48, 70, 0.11);
  --edu-layout-max: 1200px;
  --edu-layout-gutter: 16px;
}

:is(.single-post, .page-template-page-right-sidebar, .single-truonghoc) .ez-toc-section {
  scroll-margin-top: 120px;
}

/* Stop decorative effects that repaint continuously while scrolling. */
.bubble,
.parallax > use,
.section-quocgia::before,
.hotline-phone-ring-circle,
.hotline-phone-ring-circle-fill,
.hotline-phone-ring-img-circle {
  animation: none !important;
  -webkit-animation: none !important;
}

/* Keep contact actions clickable without covering the article or repainting rings. */
.hotline-phone-ring-wrap {
  left: 12px !important;
  width: 42px !important;
  height: 42px !important;
}

.hotline-phone-ring-wrap.hotline {
  bottom: 12px !important;
}

.hotline-phone-ring-wrap.zalo {
  bottom: 60px !important;
}

.hotline-phone-ring-wrap.viber {
  bottom: 108px !important;
}

.hotline-phone-ring-wrap .hotline-phone-ring {
  width: 42px;
  height: 42px;
}

.hotline-phone-ring-wrap :is(.hotline-phone-ring-circle, .hotline-phone-ring-circle-fill) {
  display: none !important;
}

.hotline-phone-ring-wrap .hotline-phone-ring-img-circle {
  position: relative;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(29, 41, 57, 0.18);
}

.hotline-phone-ring-wrap .hotline-phone-ring-img-circle .pps-btn-img img {
  width: 22px !important;
  height: 22px !important;
}

.hotline-phone-ring-wrap .hotline-bar {
  left: 21px;
  bottom: 4px;
  height: 34px;
  padding: 0 12px 0 25px;
  border: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-6px);
  box-shadow: 0 4px 12px rgba(29, 41, 57, 0.14);
  line-height: 34px;
  transition: opacity 160ms ease, transform 160ms ease !important;
}

.hotline-phone-ring-wrap .hotline-bar > a {
  font-size: 13px !important;
  line-height: 34px !important;
  text-indent: 0 !important;
}

.hotline-phone-ring-wrap:is(:hover, :focus-within) .hotline-bar {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.post-item .box-image::before {
  display: none !important;
}

.single-post :is(article, .article-inner, .entry-content, .post-sidebar, .widget) {
  transition: none !important;
}

/* Shared lightweight cards. */
:is(.home, .single-post) .home-blog .post-item > .col-inner,
.home .post-item > .col-inner {
  overflow: hidden;
  background: var(--edu-surface) !important;
  border: 1px solid var(--edu-line);
  border-radius: var(--edu-radius-md) !important;
  box-shadow: var(--edu-shadow-sm) !important;
  transition: transform 180ms ease, box-shadow 180ms ease !important;
}

@media (hover: hover) and (pointer: fine) {
  :is(.home, .single-post) .home-blog .post-item > .col-inner:hover,
  .home .post-item > .col-inner:hover {
    transform: translateY(-2px);
    box-shadow: var(--edu-shadow-hover) !important;
  }
}

:is(.home, .single-post) .home-blog .box-image,
.home .post-item .box-image {
  overflow: hidden;
  border-radius: var(--edu-radius-md) var(--edu-radius-md) 0 0 !important;
}

:is(.home, .single-post) .home-blog .box-text,
.home .post-item .box-text {
  min-height: 0 !important;
  padding: 14px 15px 16px !important;
  border-top: 0 !important;
  background: #fff !important;
}

:is(.home, .single-post) .home-blog .post-title {
  height: auto !important;
  min-height: 44px;
  margin: 8px 0 10px !important;
  color: var(--edu-ink) !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
}

:is(.home, .single-post) .home-blog .cat-label {
  min-width: 0 !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font-size: 10px !important;
}

/* Card excerpts stay readable and use normal text weight on every page. */
.post-item .from_the_blog_excerpt {
  color: #667085 !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.65 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.post-item .from_the_blog_excerpt :is(b, strong) {
  color: inherit !important;
  font-weight: 400 !important;
}

/* Font-independent chevron for post-card links. */
.post-item .box-text .button.is-link {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.post-item .box-text .button.is-link::after {
  position: static !important;
  display: inline-block !important;
  width: 7px;
  height: 7px;
  margin: 0 2px 0 0 !important;
  border: 0 !important;
  border-top: 2px solid currentColor !important;
  border-right: 2px solid currentColor !important;
  background: transparent !important;
  content: "" !important;
  font-family: inherit !important;
  transform: rotate(45deg);
}

.edu-rankmath-breadcrumb {
  width: 100%;
  min-width: 0;
  margin: 0 0 10px;
  padding: 0 0 9px;
  overflow-x: auto;
  border-bottom: 1px solid #e8edf3;
  color: #68778b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.edu-rankmath-breadcrumb::-webkit-scrollbar {
  display: none;
}

.edu-rankmath-breadcrumb :is(.rank-math-breadcrumb, p) {
  margin: 0 !important;
  padding: 0 !important;
}

.edu-rankmath-breadcrumb a {
  color: #52647b !important;
  font-weight: 600;
  text-decoration: none !important;
  transition: color 160ms ease;
}

.edu-rankmath-breadcrumb a:first-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.edu-rankmath-breadcrumb a:first-child::before {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  background: currentColor;
  content: "";
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3-9 8h2v9h5v-6h4v6h5v-9h2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 3-9 8h2v9h5v-6h4v6h5v-9h2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.edu-rankmath-breadcrumb a:is(:hover, :focus-visible) {
  color: var(--edu-primary) !important;
}

.edu-rankmath-breadcrumb .separator {
  display: inline-block;
  margin: 0 7px;
  color: #a7b2c0;
}

/* Preserve accessibility when the user requests less motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
