/* Trang chủ: kiểu hiển thị 9 - Mạng xã hội (inc/display9.php) */
.home-social {
  background: #fff;
  padding: 40px 0 60px;
}

.home-social .container {
  max-width: 1000px;
}

.home-social-title {
  font-family: 'UTM Demian KT', 'SVN-Hollie Script Pro', cursive;
  font-size: 46px;
  font-weight: normal;
  line-height: 1.2;
  color: #111;
  text-align: center;
  text-transform: none;
  margin: 0 0 30px;
}

.home-social-desc {
  text-align: center;
  color: #555;
  margin: -15px 0 25px;
}

.home-social-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 0 60px rgba(66, 133, 244, 0.12);
}

.home-social-card {
  width: 33.3333%;
  padding: 10px;
  box-sizing: border-box;
}

.home-social-card-inner {
  position: relative;
  height: 380px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 10px;
  box-sizing: border-box;
}

/* Widget dạng iframe chiếm trọn ô */
.home-social-card-inner iframe {
  max-width: 100%;
  border: 0;
}

.home-social-card-inner iframe.social-embed-fill,
.home-social-card-inner > iframe:only-child {
  display: block;
  width: 100%;
  height: 100%;
}

.home-social-card-inner .social-embed-video {
  position: relative;
  height: 0;
  padding-bottom: 56.25%;
}

.home-social-card-inner .social-embed-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Ép các widget TikTok / Instagram / X vừa chiều rộng ô */
.home-social-card-inner blockquote,
.home-social-card-inner .tiktok-embed,
.home-social-card-inner .instagram-media,
.home-social-card-inner .twitter-tweet {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
}

/* Thẻ dự phòng (không có mã nhúng) */
.home-social-fallback {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.home-social-fallback-img {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  margin-bottom: 15px;
}

.home-social-fallback-icon {
  font-size: 56px;
  color: #06516C;
  margin-bottom: 15px;
}

.home-social-fallback-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
}

.home-social-fallback-btn {
  display: inline-block;
  padding: 6px 20px;
  border: 1px solid #0068ff;
  border-radius: 20px;
  color: #0068ff;
}

.home-social-fallback-btn:hover {
  background: #0068ff;
  color: #fff;
  text-decoration: none;
}

@media (max-width: 991px) {
  .home-social-card {
    width: 50%;
  }
}

@media (max-width: 575px) {
  .home-social {
    padding: 25px 0 40px;
  }
  .home-social-title {
    font-size: 32px;
  }
  .home-social-card {
    width: 100%;
  }
}

/* Ô có widget tự cuộn bên trong (TikTok, Zalo): tắt cuộn ngoài để không bị 2 thanh cuộn */
.home-social-card-inner.no-scroll {
  overflow: hidden;
}

/* Zalo: bỏ padding để widget cao > 365px (dưới mức này sdk.js ép về 195x365) */
.home-social-card-inner.is-zalo {
  padding: 0;
}

/* Zalo: widget "Quan tâm" rộng bằng ô (sdk.js đo chiều rộng khung chứa; khung flex làm widget co về 180px) */
.home-social-card-inner .social-embed-zalo,
.home-social-card-inner .social-embed-zalo .zalo-follow-button {
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
}

.home-social-card-inner .social-embed-zalo iframe {
  max-width: 100%;
}

/* TikTok: khung nhúng cao bằng ô, chỉ dùng thanh cuộn của TikTok */
.home-social-card-inner .social-tiktok,
.home-social-card-inner .social-tiktok .tiktok-embed {
  height: 100%;
  padding: 0 !important;
}

.home-social-card-inner .social-tiktok iframe {
  height: 100% !important;
  max-height: none !important;
}

/* YouTube: thẻ kênh (nút Đăng ký + video mới nhất + tiêu đề, mô tả) */
.home-social-card-inner .social-yt-header {
  min-height: 48px;
  margin-bottom: 10px;
}

.home-social-card-inner .social-yt-title {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #222;
}

.home-social-card-inner .social-yt-title:hover {
  color: #c00;
  text-decoration: none;
}

.home-social-card-inner .social-yt-desc {
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #444;
}

/* YouTube: danh sách video của playlist */
.home-social-card-inner .social-yt-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.home-social-card-inner .social-yt-list li + li {
  margin-top: 8px;
}

.home-social-card-inner .social-yt-item {
  display: flex;
  align-items: flex-start;
  color: #333;
  font-size: 0.85rem;
  line-height: 1.4;
}

.home-social-card-inner .social-yt-item img {
  flex: 0 0 96px;
  width: 96px;
  height: 54px;
  object-fit: cover;
  margin-right: 8px;
}

.home-social-card-inner .social-yt-item:hover,
.home-social-card-inner .social-yt-item.active {
  color: #c00;
  text-decoration: none;
}

/* Thẻ tĩnh tài khoản (X; TikTok khi khung nhúng bị lỗi/overload) */
.home-social-card-inner .social-profile-logo {
  width: 56px;
  height: 56px;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 12px;
  background: #000;
  fill: #fff;
}

.home-social-card-inner .social-profile-handle {
  color: #536471;
  margin: -10px 0 15px;
}

.home-social-card-inner .social-profile-btn {
  border-color: #000;
  color: #000;
}

.home-social-card-inner .social-profile-btn:hover {
  background: #000;
  color: #fff;
}

.home-social-card-inner .social-tiktok-card .social-profile-btn {
  border-color: #fe2c55;
  color: #fe2c55;
}

.home-social-card-inner .social-tiktok-card .social-profile-btn:hover {
  background: #fe2c55;
  color: #fff;
}
