/* ==================== ROOT & BASE ==================== */
:root {
  --green: #198754;
  --blue: #007bff;
  --orange: #f60;
  --red: #e60f1e;
  --white: #fff;
  --gray: #555;
  --gray-light: #f0f0f0;
  --shadow: 0 3px 10px rgba(0,0,0,0.1);
  --radius: 8px;
  --transition: 0.3s ease;
}

body {
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  color: var(--gray);
}

/* ==================== NÚT LIÊN HỆ ==================== */
.echbay-sms-messenger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 45px;
  text-align: center;
  z-index: 999;
}

.echbay-sms-messenger div {
  margin: 14px 0;
  border-radius: 50%;
  background: #0084ff center no-repeat;
  background-size: 70%;
  box-shadow: var(--shadow);
}

.echbay-sms-messenger a {
  display: block;
  line-height: 45px;
  color: transparent;
}

.echbay-sms-messenger .phonering-alo-alo    { background: #0084ff url(https://codfe.com/wp-content/uploads/2020/08/call.png) center/60% no-repeat; }
.echbay-sms-messenger .phonering-alo-sms    { background: var(--orange) url(https://codfe.com/wp-content/uploads/2020/08/mail.png) center/60% no-repeat; }
.echbay-sms-messenger .phonering-alo-zalo   { background: #0084ff url(https://codfe.com/wp-content/uploads/2020/08/zalo.png) center/60% no-repeat; }
.echbay-sms-messenger .phonering-alo-messenger { background: var(--red) url(https://codfe.com/wp-content/uploads/2020/08/messenger.png) center/60% no-repeat; }

/* Hiệu ứng rung */
@keyframes ring {
  0%,100% { transform: rotate(0); }
  10%,30%,50%,70%,90% { transform: rotate(25deg); }
  20%,40%,60%,80% { transform: rotate(-25deg); }
}
.ring-animation {
  animation: ring 1s ease-in-out infinite;
  transform-origin: center;
}

/* ==================== NAVBAR ==================== */
.navbar-nav .nav-link {
  color: var(--white);
  transition: color var(--transition);
}
.navbar-nav .nav-link:hover   { color: #ffc107; }
.navbar-nav .nav-link.active  { color: #ff6f00; font-weight: 700; }

/* Dropdown */
.dropdown-menu .dropdown-item {
  color: var(--green);
  transition: color var(--transition), background-color var(--transition);
}
.dropdown-menu .dropdown-item:hover {
  color: #ffc107;
  background-color: #e9ecef;
}
.dropdown-menu .dropdown-item.active {
  color: #ff6f00;
  font-weight: 700;
  background-color: #e2d3a5;
}
.nav-item.dropdown:hover .dropdown-menu {
  display: block;
  margin-top: 0;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
  background: var(--white);
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.sidebar h5 {
  font-size: 1.25rem;
  color: #333;
  border-bottom: 2px solid var(--blue);
  padding-bottom: 10px;
  margin-bottom: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Post item */
.post-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-light);
}
.post-item:last-child { border-bottom: none; }

.post-item a {
  display: block;
  text-decoration: none;
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.4;
  transition: color var(--transition);
}
.post-item a:hover { color: var(--blue); }

/* Sidebar dịch vụ nổi bật */
.sidebarService .post-item {
  padding-left: 15px;
  position: relative;
}
.sidebarService .post-item::before {
  content: "•";
  color: var(--blue);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Sidebar bài viết mới */
.sidebarPost .post-item img {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  margin-right: 15px;
  object-fit: cover;
  flex-shrink: 0;
}
.sidebarPost .post-item a {
  color: #333;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==================== BACK TO TOP ==================== */
#backToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 1000;
}
#backToTopBtn:hover {
  background: #145c32;
  transform: translateY(-3px);
}

/* ==================== VIDEO RESPONSIVE ==================== */
.video-responsive-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  max-width: 100%;
}
.video-responsive-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
  #backToTopBtn { font-size: 18px; padding: 10px; }
}

@media (max-width: 576px) {
  #backToTopBtn { font-size: 16px; padding: 8px; }
}
