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

.layout-body {
  min-height: 70vh;
}

/* Site logo in header */
.logo .site-logo {
  height: 46px;
  width: auto;
  display: block;
}

@media (max-width: 575.98px) {
  .logo .site-logo {
    height: 38px;
  }
}

/* Site logo in footer */
.footer-info .footer-logo {
  height: 72px;
  width: auto;
  margin-bottom: 14px;
}

#hero .carousel-item {
  min-height: 70vh;
}

@media (max-width: 991.98px) {
  .layout-body {
    margin-top: 60px;
  }
}

.partners .partners-carousel {
  padding: 10px 0 30px;
}

.partner-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  padding: 20px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.partner-card img {
  max-height: 60px;
  width: auto;
  filter: grayscale(35%);
  transition: transform 0.35s ease, filter 0.35s ease;
}

.partner-overlay {
  position: absolute;
  right: 0;
  left: 0;
  bottom: -42px;
  text-align: center;
  color: #fff;
  background: linear-gradient(90deg, #1f3f6d, #2d6ea3);
  padding: 10px 8px;
  font-size: 14px;
  font-weight: 700;
  transition: bottom 0.35s ease;
}

.partner-card:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.partner-card:hover img {
  transform: scale(1.12);
  filter: grayscale(0%);
}

.partner-card:hover .partner-overlay {
  bottom: 0;
}

.contact-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  height: 100%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.contact-card i {
  font-size: 24px;
  color: #2a5caa;
  margin-bottom: 8px;
  display: inline-block;
}

.contact-card h4 {
  font-size: 18px;
  margin-bottom: 8px;
}

.contact-card p {
  margin: 0;
  line-height: 1.9;
}

.contact-phone-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-phone-list li {
  line-height: 2;
}

.contact-phone-list a {
  color: #2a5caa;
  text-decoration: none;
}

.contact-phone-list a:hover {
  text-decoration: underline;
}

#footer .social-links a img {
  max-width: 20px;
  max-height: 20px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

#footer .social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

#footer .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#footer .social-links a i,
#footer .social-links a img {
  vertical-align: middle;
  display: block;
}

#footer .social-links a.bale img,
#footer .social-links a.eitaa img {
  width: 16px;
  height: 16px;
  max-width: 16px;
  max-height: 16px;
}

/* ===== Latest Articles (home) ===== */
.latest-articles {
  padding: 60px 0;
}

.latest-articles .row {
  margin-bottom: 10px;
}

.latest-articles .col-lg-3 {
  margin-bottom: 30px;
}

.article-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 34px rgba(31, 63, 109, 0.18);
  color: inherit;
}

.article-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.article-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .article-card-img img {
  transform: scale(1.08);
}

.article-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #1f3f6d, #2d6ea3);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.article-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 20px;
}

.article-card-date {
  font-size: 12px;
  color: #7a869a;
  margin-bottom: 8px;
}

.article-card-date i {
  margin-left: 4px;
}

.article-card-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.7;
  margin: 0 0 10px;
  color: #1f3f6d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-summary {
  font-size: 13.5px;
  color: #5b6676;
  line-height: 1.9;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-more {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: #2d6ea3;
}

.article-card-more i {
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-more i {
  transform: translateX(-4px);
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, #1f3f6d, #2d6ea3);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(31, 63, 109, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-view-all:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(31, 63, 109, 0.35);
}

.btn-view-all i {
  transition: transform 0.3s ease;
}

.btn-view-all:hover i {
  transform: translateX(-4px);
}

/* Highlight a blog entry when navigated to from the home tiles */
.entry-highlight {
  animation: entryHighlight 2.6s ease;
}

@keyframes entryHighlight {
  0% { box-shadow: 0 0 0 0 rgba(45, 110, 163, 0.55); }
  30% { box-shadow: 0 0 0 6px rgba(45, 110, 163, 0.18); background: rgba(45, 110, 163, 0.06); }
  100% { box-shadow: 0 0 0 0 rgba(45, 110, 163, 0); }
}

.support-chat {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1050;
}

.support-chat-toggle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.support-chat-panel {
  width: 330px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  margin-bottom: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity .28s ease, transform .32s cubic-bezier(.2,.8,.2,1), visibility .28s;
}

.support-chat-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.support-chat-header {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #fff;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.support-chat-head-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.support-chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
}

.support-chat-head-meta small {
  display: block;
  opacity: .85;
  font-size: 11px;
}

.support-chat-header button {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.support-chat-form,
.support-chat-body {
  padding: 12px;
}

.support-chat-form p {
  margin-bottom: 10px;
}

.support-chat-form input {
  margin-bottom: 8px;
}

.support-messages {
  height: 270px;
  overflow-y: auto;
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}

.support-msg {
  margin-bottom: 8px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.support-msg.user {
  justify-content: flex-end;
}

.support-msg.admin {
  justify-content: flex-start;
}

.support-msg .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}

.support-msg.user .avatar { background: #16a34a; }
.support-msg.admin .avatar { background: #2563eb; }

.support-msg .bubble {
  display: inline-block;
  max-width: 80%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.support-msg.user .bubble { background: #dcfce7; }
.support-msg.admin .bubble { background: #dbeafe; }

.support-typing {
  font-size: 12px;
  color: #334155;
  margin: -2px 0 8px;
}

.support-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 3px;
  border-radius: 50%;
  background: #64748b;
  animation: supportTyping 1s infinite ease-in-out;
}

.support-typing span:nth-child(2){ animation-delay: .15s; }
.support-typing span:nth-child(3){ animation-delay: .3s; }

@keyframes supportTyping {
  0%, 80%, 100% { transform: scale(.7); opacity: .4; }
  40% { transform: scale(1); opacity: 1; }
}
