html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}


.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  background: #f5f7fb;
}

/* Keep link presentation consistent across the site. */
a,
a:hover,
a:focus,
a:active,
a:visited,
a.text-decoration-underline,
a.link-underline-primary,
a.link-underline-secondary,
a.link-underline-success,
a.link-underline-info,
a.link-underline-warning,
a.link-underline-danger,
a.link-underline-light,
a.link-underline-dark {
  text-decoration: none !important;
}

.form-floating>.form-control-plaintext::placeholder,
.form-floating>.form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating>.form-control-plaintext:focus::placeholder,
.form-floating>.form-control:focus::placeholder {
  text-align: start;
}

/* PDF Viewer Modal Styles */
.pdf-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  /* Ensure it's on top */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  -webkit-animation-name: fadeIn;
  -webkit-animation-duration: 0.4s;
  animation-name: fadeIn;
  animation-duration: 0.4s;
}

.pdf-modal-content {
  position: relative;
  background-color: #fefefe;
  margin: 2% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 800px;
  border-radius: 5px;
  text-align: center;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.pdf-modal-close {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 35px;
  font-weight: bold;
}

.pdf-modal-close:hover,
.pdf-modal-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

#pdf-viewer-container {
  width: 100%;
  height: 75vh;
  overflow: auto;
  border: 1px solid #ccc;
  margin-top: 15px;
  background-color: #525659;
  /* Dark background for canvas */
}

#pdf-navigation {
  margin-top: 10px;
}

#pdf-navigation button {
  padding: 5px 10px;
  margin: 0 10px;
  cursor: pointer;
}

.news-image-placeholder .placeholder-content {
  max-width: 90%;
}

.news-image-placeholder-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  /* Cho phép hiển thị tối đa 4 dòng */
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.news-image-placeholder-main .news-image-placeholder-title {
  font-size: 1.5rem;
  -webkit-line-clamp: 4;
}

.news-image-placeholder-date {
  font-size: 0.8rem;
  font-style: italic;
  opacity: 0.8;
}

:root {
  --ufm-blue: #003b73;
  --ufm-red: #e45b45;
  --ink: #17243b;
  --line: #e5eaf1;
  --surface: #ffffff;
}

.page-content-wrap,
.page-content {
  padding: 42px 0 58px;
}

.home-banner-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 5;
  object-fit: cover;
}

.glide__slide,
.glide__track {
  overflow: hidden;
}

.glide__arrow {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 59, 115, .84);
  border: 0;
}

.glide__arrow:hover,
.glide__arrow:focus {
  background: var(--ufm-red);
}

.news-card-image,
.news-image-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.news-card-image-main {
  aspect-ratio: 16 / 9;
}

.news-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #003b73, #1784a8);
}

.product,
.newsfeature2 .entry,
.newsfeature4 .event-item,
.single-event {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(23, 36, 59, .06);
}

.product {
  height: 100%;
  margin-bottom: 28px;
}

.product-image,
.product-image .overlay {
  overflow: hidden;
}

.product-description {
  padding: 18px 20px 20px;
}

.product-description .list2 {
  min-height: 54px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.article-featured-image {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
}

.single-event .event-info {
  padding: 28px 32px 34px;
}

.article-content {
  color: #354158;
  font-size: 1.05em;
  line-height: 1.8;
}

.article-content img {
  height: auto;
  max-width: 100%;
}

.related-news-image {
  display: block;
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
}

.newsfeature4 .event-item {
  display: flex;
  gap: 14px;
  padding: 12px;
}

.newsfeature4 .event-info {
  min-width: 0;
}

.section-title {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 767px) {

  .page-content-wrap,
  .page-content {
    padding: 28px 0 40px;
  }

  .home-banner-image {
    aspect-ratio: 16 / 8;
  }

  .single-event .event-info {
    padding: 22px 18px 26px;
  }

  .article-featured-image {
    max-height: 360px;
  }
}

/* Admin dashboard */
.admin-shell {
  min-height: calc(100vh - 220px);
  padding: 52px 0 70px;
  background: #f3f6fa;
}

.admin-heading,
.admin-panel-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.admin-heading {
  margin-bottom: 34px;
}

.admin-kicker {
  display: block;
  margin-bottom: 8px;
  color: #e45b45;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.admin-heading h1,
.admin-panel h2 {
  margin: 0;
  color: #17243b;
  font-weight: 700;
}

.admin-heading h1 {
  font-size: 34px;
  line-height: 1.2;
}

.admin-heading p {
  margin: 10px 0 0;
  color: #6d7890;
}

.admin-outline-button,
.admin-text-link,
.admin-action-item,
.admin-stat-card,
.admin-icon-button {
  transition: .2s ease;
}

.admin-outline-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  color: #003b73;
  border: 1px solid #cbd7e5;
  background: #fff;
  font-weight: 700;
}

.admin-outline-button:hover {
  color: #fff;
  border-color: #003b73;
  background: #003b73;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.admin-stat-card {
  display: block;
  min-height: 168px;
  padding: 22px;
  color: #17243b;
  border: 1px solid #e1e8f0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 36, 59, .05);
}

.admin-stat-card:hover {
  color: #17243b;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(23, 36, 59, .1);
}

.admin-stat-primary {
  color: #fff;
  border-color: #003b73;
  background: #003b73;
}

.admin-stat-primary:hover {
  color: #fff;
}

.admin-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 16px;
  color: #003b73;
  background: #eaf2fb;
}

.admin-stat-primary .admin-stat-icon {
  color: #fff;
  background: rgba(255, 255, 255, .16);
}

.admin-stat-label,
.admin-stat-card small {
  display: block;
}

.admin-stat-label {
  color: #6d7890;
  font-size: 13px;
}

.admin-stat-primary .admin-stat-label,
.admin-stat-primary small {
  color: rgba(255, 255, 255, .76);
}

.admin-stat-card strong {
  display: block;
  margin: 3px 0 8px;
  font-size: 30px;
  line-height: 1;
}

.admin-stat-card small {
  color: #7d8899;
  font-size: 12px;
}

.admin-content-grid {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(420px, 1.15fr);
  gap: 28px;
}

.admin-panel {
  padding: 28px;
  border: 1px solid #e1e8f0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 36, 59, .05);
}

.admin-panel h2 {
  font-size: 21px;
}

.admin-action-list {
  margin-top: 22px;
}

.admin-action-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
  color: #17243b;
  border-top: 1px solid #edf0f4;
}

.admin-action-item:hover {
  color: #003b73;
  padding-left: 5px;
}

.admin-action-item strong,
.admin-action-item small {
  display: block;
}

.admin-action-item small {
  margin-top: 3px;
  color: #7d8899;
  font-size: 12px;
  line-height: 1.4;
}

.admin-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
}

.admin-action-blue {
  color: #1d69ad;
  background: #eaf3fc;
}

.admin-action-orange {
  color: #bc6a17;
  background: #fff3df;
}

.admin-action-green {
  color: #2d8661;
  background: #e8f6ef;
}

.admin-action-purple {
  color: #6751a8;
  background: #f0ecfb;
}

.admin-action-item>.fa-chevron-right {
  color: #acb7c6;
  font-size: 11px;
}

.admin-text-link {
  color: #003b73;
  font-size: 12px;
  font-weight: 700;
}

.admin-news-list {
  margin-top: 22px;
}

.admin-news-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 13px;
  min-height: 62px;
  border-top: 1px solid #edf0f4;
}

.admin-news-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8dee7;
}

.admin-news-status.is-published {
  background: #2d9b6a;
}

.admin-news-copy {
  min-width: 0;
}

.admin-news-copy strong,
.admin-news-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-news-copy small {
  margin-top: 4px;
  color: #7d8899;
  font-size: 12px;
}

.admin-icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #003b73;
  background: #edf4fb;
}

.admin-icon-button:hover {
  color: #fff;
  background: #003b73;
}

.admin-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 180px;
  color: #7d8899;
}

.admin-header-link a {
  color: #003b73;
  font-weight: 700;
}

@media (max-width: 991px) {
  .admin-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .admin-shell {
    padding: 32px 0 48px;
  }

  .admin-heading,
  .admin-panel-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-heading h1 {
    font-size: 28px;
  }

  .admin-stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel {
    padding: 22px 18px;
  }
}

/* Fix kích thước checkbox và radio bị quá to do xung đột CSS */
input[type="checkbox"], 
input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  margin-top: 2px !important;
  transform: none !important;
  -webkit-appearance: auto !important;
  appearance: auto !important;
}