/* Reset CSS */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Variables */
:root {
  --primary-color: #4a90e2;
  --text-color: #333;
  --background-color: #f5f5f5;
  --link-hover-color: #2c5282;
  --spacing-unit: 1rem;
  --border-radius: 8px;
  --transition-speed: 0.3s;
}

/* Base styles */
body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: url('../images/background.jpg') no-repeat center center fixed;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-unit);
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: -1;
}

.container {
  max-width: 680px;
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  padding: calc(var(--spacing-unit) * 2);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Profile section */
.profile {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.profile-pic {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: var(--spacing-unit);
  object-fit: cover;
}

.profile h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.profile p {
  margin-bottom: 0.5rem;
}

.profile address {
  font-style: normal;
  color: #666;
}

/* Links section */
.links {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 0.8);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.link-btn {
  display: flex;
  align-items: center;
  padding: calc(var(--spacing-unit) * 0.8);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-color);
  transition: all var(--transition-speed) ease;
  width: 100%;
  justify-content: center;
}

.link-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
}

.link-btn img {
  width: 24px;
  height: 24px;
  margin-right: calc(var(--spacing-unit) * 0.8);
}

/* Social media specific styles */
.facebook:hover {
  background: #1877f2;
  color: white;
}

.zalo:hover {
  background: #0068ff;
  color: white;
}

.tiktok:hover {
  background: #000000;
  color: white;
}

.hotline:hover {
  background: #25d366;
  color: white;
}

/* Responsive design */
@media (max-width: 520px) {
  .container {
    padding: var(--spacing-unit);
  }

  .profile-pic {
    width: 120px;
    height: 120px;
  }

  .profile h1 {
    font-size: 1.5rem;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
  }

  .container {
    box-shadow: none;
    padding: 0;
  }

  .link-btn {
    border: 1px solid #000;
  }
}

/* ============================= */
/*   Biến màu chủ đạo (theo logo) */
/* ============================= */
:root {
  --primary: #6DA9B7;        /* Màu chính (teal) lấy từ logo */
  --primary-dark: #5C94A1;   /* Màu đậm hơn để hover */
  --primary-light: #DDEDEF;  /* Màu sáng làm nền phụ */
  --text-main: #333333;      /* Màu chữ chính */
  --text-sub: #666666;       /* Màu chữ phụ */
  --white: #FFFFFF;
  --bg-overlay: rgba(247, 252, 253, 0.6); /* Lớp phủ màu #F7FCFD với alpha 0.6 */
}

/* Reset cơ bản */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

/* ============================= */
/*         Hiệu ứng Background   */
/* ============================= */
body {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 20vh;
  overflow-x: hidden; /* Đảm bảo không xuất hiện scroll ngang */
}

/* 1) Lớp ảnh nền được làm mờ */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('background.jpg');
  background-size: cover;
  background-position: center center;
  filter: blur(8px);         /* Độ nhòe 8px */
  transform: scale(1.05);     /* Tăng nhẹ cho blur không bị bo viền */
  z-index: -2;                /* Đặt phía sau mọi thứ */
}

/* 2) Lớp phủ màu chủ đạo #F7FCFD (80% opacity) */
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-overlay);
  z-index: -1;                /* Đặt trên lớp ảnh nhưng sau nội dung */
}

/* ============================= */
/*       Container chính         */
/* ============================= */
.container {
  width: 100%;
  max-width: 400px;
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  text-align: center;
  margin-bottom: 40px;
  z-index: 0;                  /* Đảm bảo nội dung nằm trên overlay */
}

/* Phần profile/logo */
.profile {
  padding: 24px 0 12px;
}

.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
  margin-bottom: 12px;
}

.profile h1 {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.profile p {
  font-size: 0.9rem;
  color: var(--text-sub);
}

/* Danh sách liên kết (button) */
.links {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
}

/* Style chung cho mỗi nút liên kết */
.link-btn {
  width: 100%;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--white);
  background-color: var(--primary);
  border-radius: 8px;
  padding: 12px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  z-index: 1;  /* Đảm bảo nổi trên overlay */
}

.link-btn img {
  width: 28px;
  height: 28px;
  margin-right: 12px;
  object-fit: contain;
}

.link-btn span {
  font-size: 1rem;
  font-weight: 500;
  flex: 1;
  text-align: left;
}

/* Hover effect */
.link-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  background-color: var(--primary-dark);
}

/* ============================= */
/*   Facebook Page Plugin         */
/* ============================= */
.fb-container {
  padding: 16px;
  background-color: var(--primary-light);
  z-index: 1;  /* Nằm trên overlay */
}

.fb-container .fb-page {
  margin: 0 auto;
  width: 100% !important;
  overflow: hidden;
  border-radius: 8px;
}

/* ============================= */
/*   TikTok Embed (nếu có)       */
/* ============================= */
.tiktok-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background-color: var(--primary-light);
  z-index: 1;  /* Nằm trên overlay */
}

.tiktok-container iframe {
  border: none;
}

/* ========================= */
/*   Responsive nhỏ hơn      */
/* ========================= */

/* Tablet & Mobile ngang (>= 480px && < 768px) */
@media (max-width: 767px) and (min-width: 480px) {
  .container {
    max-width: 360px;
  }
  .profile-pic {
    width: 100px;
    height: 100px;
  }
  .profile h1 {
    font-size: 1.4rem;
  }
  .profile p {
    font-size: 0.85rem;
  }
  .link-btn {
    padding: 10px 14px;
  }
  .link-btn img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
  }
  .link-btn span {
    font-size: 0.95rem;
  }
  .tiktok-container blockquote.tiktok-embed {
    max-width: 280px !important;
    min-width: 280px !important;
  }
}

/* Mobile dọc (< 480px) */
@media (max-width: 479px) {
  .container {
    max-width: 320px;
  }
  .profile-pic {
    width: 88px;
    height: 88px;
  }
  .profile h1 {
    font-size: 1.3rem;
  }
  .profile p {
    font-size: 0.8rem;
  }
  .link-btn {
    padding: 8px 12px;
  }
  .link-btn img {
    width: 20px;
    height: 20px;
    margin-right: 8px;
  }
  .link-btn span {
    font-size: 0.9rem;
  }
  .tiktok-container blockquote.tiktok-embed {
    max-width: 240px !important;
    min-width: 240px !important;
  }
}

.qr-code img {
  border: 2px solid var(--primary);
  border-radius: 8px;
}
.qr-code p {
  color: var(--text-sub);
}

.map-container {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 680px;
  margin: 2rem auto;
  width: 100%;
}
