/*
 * 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: "utm_avo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://duhocedutime.edu.vn/wp-content/themes/du-hoc-edu-time-child/fonts/UTMAvo/UTM_Avo_Regular.woff") format("woff");
}

@font-face {
  font-family: "utm_avo";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("https://duhocedutime.edu.vn/wp-content/themes/du-hoc-edu-time-child/fonts/UTMAvo/UTM_Avo_Bold.woff") format("woff");
}

: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);
}

/* 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;
}

/* Homepage section titles. */
.home .section-title-normal {
  gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--edu-line) !important;
}

.home .section-title-normal .section-title-main {
  padding: 0 0 10px !important;
  border-bottom: 3px solid var(--edu-primary) !important;
  color: var(--edu-ink) !important;
  font-size: clamp(18px, 2vw, 23px) !important;
  letter-spacing: -0.01em;
}

/* Single post layout. */
.single-post .blog-wrapper {
  padding-top: 24px;
  background:
    radial-gradient(circle at 12% 0, rgba(3, 119, 164, 0.05), transparent 28rem),
    linear-gradient(180deg, #f8fafc 0, #fff 36rem);
}

.single-post .blog-wrapper > .row {
  align-items: flex-start;
}

.single-post .large-9.col {
  padding-right: 18px;
}

.single-post article {
  margin-bottom: 24px !important;
}

.single-post article > .article-inner {
  padding: clamp(18px, 2.2vw, 26px);
  background: #fff;
  border: 1px solid var(--edu-line);
  border-radius: 14px;
  box-shadow: var(--edu-shadow-sm);
}

.single-post .entry-header-text {
  padding: 0 0 14px !important;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--edu-line);
}

.single-post .entry-header-text .entry-category {
  margin-bottom: 5px;
  color: var(--edu-secondary) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.045em;
}

.single-post .entry-header-text .entry-title {
  margin: 0;
  color: #1d2939 !important;
  font-size: clamp(24px, 2.25vw, 31px) !important;
  line-height: 1.3 !important;
  letter-spacing: -0.025em;
}

.single-post .entry-content {
  padding: 0 !important;
  color: #364152;
  font-size: 16px;
  line-height: 1.72;
}

.single-post .entry-content > p {
  margin-bottom: 15px;
}

.single-post .entry-content > h2,
.single-post .entry-content > h3 {
  scroll-margin-top: 100px;
  color: var(--edu-ink) !important;
  letter-spacing: -0.015em;
}

.single-post .entry-content > h2 {
  margin: 30px 0 14px;
  padding: 11px 14px;
  border-left: 4px solid var(--edu-primary);
  border-radius: 0 var(--edu-radius-sm) var(--edu-radius-sm) 0;
  background: linear-gradient(90deg, #fff3f1, rgba(255, 255, 255, 0));
  font-size: clamp(20px, 2vw, 23px) !important;
  line-height: 1.4;
}

.single-post .entry-content > h3 {
  margin: 24px 0 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--edu-secondary);
  border-radius: 0 6px 6px 0;
  background: #f2f8fb;
  font-size: clamp(17px, 1.7vw, 19px) !important;
  line-height: 1.45;
}

.single-post .entry-content > ul:not(.custom-horizontal-menu) {
  margin: 0 0 18px;
  padding: 14px 18px 10px 38px;
  border: 1px solid var(--edu-line);
  border-radius: var(--edu-radius-sm);
  background: var(--edu-surface-soft);
}

.single-post .entry-content > ul:not(.custom-horizontal-menu) > li {
  margin: 0 0 8px;
}

.single-post .entry-content figure {
  margin: 20px auto 24px;
}

.single-post .entry-content figure img {
  display: block;
  border-radius: 10px;
}

.single-post .entry-content figcaption {
  padding-top: 7px;
  color: var(--edu-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

/* Navigation pills below the post title. */
.single-post .custom-horizontal-menu {
  display: flex !important;
  flex-flow: row wrap !important;
  gap: 8px !important;
  margin: 0 0 16px !important;
  padding: 10px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #fff7f5 0%, #f4faff 100%) !important;
  box-shadow: 0 5px 18px rgba(30, 48, 70, 0.07);
  list-style: none;
}

.single-post .custom-horizontal-menu li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.single-post .custom-horizontal-menu a {
  display: block;
  padding: 9px 14px !important;
  border: 1px solid #d4dde7 !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #344054 !important;
  box-shadow: 0 2px 7px rgba(30, 48, 70, 0.05);
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.015em;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease !important;
}

.single-post .custom-horizontal-menu a:is(:hover, .active, .active-link) {
  border-color: var(--edu-primary) !important;
  background: var(--edu-primary) !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(201, 21, 17, 0.18);
}

.single-post .custom-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0 0 18px;
  padding: 9px 11px;
  border-radius: var(--edu-radius-sm);
  background: var(--edu-surface-soft);
  color: var(--edu-muted);
  font-size: 13px;
}

.single-post .custom-post-meta span {
  margin: 0 !important;
}

/* Table of contents. */
.single-post #ez-toc-container {
  width: 100% !important;
  margin: 18px 0 24px !important;
  padding: 14px 16px !important;
  border: 1px solid #d9e7f1 !important;
  border-radius: 10px !important;
  background: #f5faff !important;
  box-shadow: none !important;
}

.single-post #ez-toc-container .ez-toc-title {
  color: var(--edu-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.single-post #ez-toc-container a {
  color: #42566e !important;
  line-height: 1.55;
  text-decoration: none !important;
}

.single-post #ez-toc-container a:hover {
  color: var(--edu-primary) !important;
}

/* Sidebar: each widget becomes its own card; the full-height border is removed. */
.single-post .post-sidebar {
  align-self: flex-start;
  height: auto !important;
  padding: 0 10px 0 16px !important;
  border: 0 !important;
}

.single-post .post-sidebar .widget {
  overflow: hidden;
  margin: 0 0 18px !important;
  padding: 0 14px 10px !important;
  border: 1px solid var(--edu-line) !important;
  border-radius: var(--edu-radius-md) !important;
  background: #fff;
  box-shadow: var(--edu-shadow-sm);
}

.single-post .post-sidebar .widget-title {
  display: flex !important;
  align-items: center;
  gap: 9px;
  margin: 0 -14px 8px !important;
  padding: 12px 14px !important;
  border: 0 !important;
  border-bottom: 2px solid var(--edu-primary) !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--edu-ink) !important;
  font-size: 14px !important;
  line-height: 1.35;
  text-align: left;
  text-transform: uppercase !important;
}

.single-post .post-sidebar .widget-title::before {
  width: 4px;
  height: 18px;
  flex: 0 0 4px;
  border-radius: 999px;
  background: var(--edu-primary);
  content: "";
}

.single-post .post-sidebar .menu {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.single-post .post-sidebar .menu > li {
  margin: 0 !important;
  border-bottom: 1px solid #edf1f5 !important;
}

.single-post .post-sidebar .menu > li:last-child {
  border-bottom: 0 !important;
}

.single-post .post-sidebar .menu > li > a {
  position: relative;
  display: block;
  padding: 9px 18px 9px 2px !important;
  color: #465467 !important;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.45;
}

.single-post .post-sidebar .menu > li > a::after {
  position: absolute;
  top: 50%;
  right: 2px;
  color: #a7b0bc;
  content: "›";
  transform: translateY(-50%);
}

.single-post .post-sidebar .menu > li > a:hover {
  color: var(--edu-primary) !important;
}

.single-post .post-sidebar .widget_media_image {
  padding: 8px !important;
}

.single-post .post-sidebar .widget_media_image img {
  display: block;
  width: 100%;
  border-radius: var(--edu-radius-sm);
}

/* 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;
  }
}

@media (max-width: 849px) {
  .single-post .blog-wrapper {
    padding-top: 12px;
  }

  .single-post .large-9.col,
  .single-post .post-sidebar {
    width: 100% !important;
    padding: 0 12px !important;
  }

  .single-post article > .article-inner {
    padding: 16px;
    border-radius: 10px;
  }

  /* Flatsome's sticky mobile search header is 58px high. */
  .single-post .custom-horizontal-menu {
    position: sticky !important;
    top: 58px !important;
    z-index: 990;
    flex-flow: row nowrap !important;
    gap: 7px !important;
    width: calc(100% + 32px);
    max-width: none;
    margin: 0 -16px 16px !important;
    padding: 9px 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-right: 0 !important;
    border-left: 0 !important;
    border-radius: 0 0 10px 10px !important;
    background: #fff !important;
    box-shadow: 0 8px 18px rgba(30, 48, 70, 0.11);
    overscroll-behavior-x: contain;
    scroll-padding-inline: 12px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .single-post .custom-horizontal-menu::-webkit-scrollbar {
    display: none;
  }

  .single-post .custom-horizontal-menu li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .single-post .custom-horizontal-menu a {
    padding: 8px 12px !important;
    font-size: 11px !important;
  }

  .single-post .post-sidebar {
    margin-top: 18px;
  }
}

@media (max-width: 549px) {
  .single-post .entry-header-text .entry-title {
    font-size: 23px !important;
  }

  .single-post .entry-content {
    font-size: 15px;
    line-height: 1.68;
  }

  .single-post .entry-content > h2 {
    margin-top: 25px;
    padding: 9px 11px;
    font-size: 19px !important;
  }

  .single-post .entry-content > h3 {
    font-size: 17px !important;
  }

  .single-post .custom-horizontal-menu {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  .single-post .custom-horizontal-menu li {
    width: auto !important;
  }

  .single-post .custom-horizontal-menu a {
    width: auto !important;
    padding: 7px 10px !important;
  }
}
