/* =========================
   HERO — CÂN ĐỐI, THOÁNG, VIỀN MẢNH
========================= */
/* =========================
   HERO — DỊCH LÊN & VIỀN MẢNH HƠN
========================= */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  /* Giảm padding để đẩy cụm nội dung lên */
  padding: clamp(40px, 5vw, 80px) 0  clamp(50px, 6vw, 100px);
  margin-top: -20px; /* đẩy hero lên gần header hơn */
}

.hero-grid {
  display: grid;
  align-items: center;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(48px, 5vw, 90px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(40px, 5vw, 60px);
}

/* ========== CỤM HÌNH TRÁI ========== */
.hero-illus {
  position: relative;
  width: clamp(440px, 40vw, 540px);
  aspect-ratio: 1.15 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateX(-8%);
}

/* Ảnh tròn: VIỀN MẢNH HƠN */
.hero-illus img {
  position: absolute;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--primary);  /* ↓ từ 1.5px xuống 1px */
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
  transition: transform 0.25s ease;
}
.hero-illus img:hover { transform: scale(1.03); }

.hero-illus .ring-blue   { border-color: #0ea5e9; }
.hero-illus .ring-orange { border-color: #ffa341; }
.hero-illus .ring-yellow { border-color: #ffd058; }

.hero-illus .ring-blue   { border-color: #0ea5e9; }
.hero-illus .ring-orange { border-color: #ffa341; }
.hero-illus .ring-yellow { border-color: #ffd058; }

/* Bong bóng trang trí nhẹ */
.hero-illus .bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--c1,#eaf6ff), var(--c2,#dff3ff));
  box-shadow: 0 8px 20px rgba(0,0,0,0.04) inset;
}

/* ==== BỐ CỤC 4 ẢNH XEN KẼ ==== */
.hero-illus .img-1 { --s: 260px; --x: 46%; --y: 30%; }
.hero-illus .img-2 { --s: 180px; --x: 70%; --y: 44%; }
.hero-illus .img-3 { --s: 200px; --x: 38%; --y: 68%; }
.hero-illus .img-4 { --s: 160px; --x: 66%; --y: 80%; }

/* Tạo khoảng cách giữa các hình */
.hero-illus img { box-shadow: 0 8px 22px rgba(0,0,0,0.05); }
.hero-illus .img-2 { transform: translate(-50%, -50%) scale(0.98); }
.hero-illus .img-3 { transform: translate(-50%, -50%) scale(0.97); }
.hero-illus .img-4 { transform: translate(-50%, -50%) scale(0.96); }

.hero-illus .b1 { --s: 110px; --x: 82%; --y: 20%; --c1:#dff6ff; --c2:#eaf8ff; }
.hero-illus .b2 { --s: 90px;  --x: 80%; --y: 62%; --c1:#ffe08a; --c2:#ffdf88; }
.hero-illus .b3 { --s: 60px;  --x: 58%; --y: 88%; --c1:#ffb287; --c2:#ffb287; }

.hero-illus > * {
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  transform: translate(-50%, -50%);
}

/* ========== CHỮ PHẢI ========== */
.hero-copy {
  text-align: left;
}

.hero-copy h1 {
  font-size: clamp(40px, 4.8vw, 28px);
  font-weight: 800;
  color: var(--text);
  max-width: 26ch;
  line-height: 1.1; /* chữ Phần mềm & Tuyển sinh lên cùng hàng */
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

/* AMS giữ màu */
.hero-copy h1 span {
  color: var(--primary);
}

/* Đoạn mô tả */
.hero-copy .sub {
  font-size: clamp(17px, 2vw, 15px);
  max-width: 58ch;
  margin: 18px 0 30px;
  color: var(--muted);
  line-height: 1.6;
}

/* Bullet list — nằm cùng hàng */
.hero-bullets {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 12px;
  flex-wrap: nowrap; /* nằm cùng hàng */
}
.hero-bullets li {
  padding: 8px 16px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}
.quick-tools {
  padding: clamp(32px, 5vw, 72px) 0;
  background: var(--bg-1, #fff);
}
.quick-tools .container {
  width: min(1180px, 92vw);
  margin: 0 auto;
  
}
.qt-title {
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
  color: #334155;
}
.qt-intro {
  text-align: center;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: #F59E0B;
  margin: 0 auto 12px;
  opacity: 0.9;
}
.theme-blue .qt-intro { color: #1d4ed8; }
.theme-orange .qt-intro { color: #d97706; }
.theme-purple .qt-intro { color: #7c3aed; }

.qt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 20px);
}
@media (max-width: 1024px) {
  .qt-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .qt-grid { grid-template-columns: 1fr; }
}
.qt-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.04);
  transition: all .2s ease;
}
.qt-item:hover {
  transform: translateY(-2px);
  border-color: #60a5fa;
  box-shadow: 0 8px 26px rgba(2, 6, 23, 0.08);
}
.qt-icon {
  font-size: 56px; /* Tăng kích thước từ 28px lên 36px */
  color: #2563eb;
  flex-shrink: 0;
}
.qt-content h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #1d4ed8;
  font-weight: 600;
}
.qt-content p {
  font-size: 14px;
  color: #475569;
  margin: 0;
  line-height: 1.4;
}
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-illus { order: 1; margin-bottom: 24px; width: clamp(400px, 70vw, 540px); transform: none; }
  .hero-copy  { order: 2; text-align: center; }
  .hero-bullets { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .hero-illus { width: min(88vw, 440px); }
  .hero-illus img { border-width: 1px; }
  .hero-copy h1 { font-size: clamp(30px, 6vw, 38px); }
}
/* ===== Features (tabs) ===== */
.features { padding: clamp(40px,6vw,80px) 0; background: var(--bg-2); }
.features .container { width: min(1120px, 92vw); margin: 0 auto; }
.features-head h2 { font-size: clamp(24px,3vw,32px); margin: 0 0 8px; }
.features-head .sub { color: var(--muted); margin: 0 0 12px; }
.features-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.features-tabs .tab { appearance:none; border:1px solid var(--border); background:#fff; color:var(--text); padding:8px 12px; border-radius:999px; font-weight:600; cursor:pointer; }
.features-tabs .tab.is-active { background: #e6f0ff; border-color:#93c5fd; }
.tab-panel { margin-top: 20px; }
.tab-panel[hidden] { display:none; }

.grid { display:grid; gap: clamp(14px,2vw,20px); }
.cards-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 960px){ .cards-3{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px){ .cards-3,.cards-2{ grid-template-columns:1fr; } }

.card { background:#fff; border:1px solid var(--border); border-radius:14px; padding:16px; box-shadow: var(--shadow); }
.card h3 { margin:6px 0 8px; font-size:18px; }
.card .list { margin:8px 0 0; padding-left:18px; color:var(--muted); }
.card .list li { margin:6px 0; }
.card-icon { font-size:28px; }

/* ===== QUICK TOOLS (3 nhóm màu) ===== */
.quick-tools {
  padding: clamp(32px, 5vw, 72px) 0;
  background: #fff;
}
.quick-tools .container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

/* Tiêu đề */
.qt-title {
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 800;
  text-align: center;
  margin: 60px 0 30px;
  line-height: 1.3;
}

/* --- MÀU CHỦ ĐỀ --- */
.theme-blue {
  --theme-color: #2563eb;
  --theme-bg: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 100%);
}
.theme-orange {
  --theme-color: #ea580c;
  --theme-bg: linear-gradient(180deg, #fff7ed 0%, #fef3c7 100%);
}
.theme-purple {
  --theme-color: #7c3aed;
  --theme-bg: linear-gradient(180deg, #f3e8ff 0%, #faf5ff 100%);
}

/* lưới layout */
.qt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 20px);
  margin-bottom: 50px;
  padding: 28px 20px;
  border-radius: 18px;
  background: var(--theme-bg);
  transition: background 0.4s ease;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}
@media (max-width: 1024px) {
  .qt-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .qt-grid { grid-template-columns: 1fr; padding: 20px 14px; }
}

/* từng item */
/* --- CSS cho Lưới Dịch Vụ (qt-grid) --- */

/* 1. Áp dụng cho từng "nút" (card) */
/* 1. Cập nhật lại thẻ cha (qt-item) */
.qt-item {
  display: flex;
  flex-direction: column; /* Giữ hướng dọc */
  align-items: center;    /* Căn giữa theo chiều ngang */
  text-align: center;
  
  /* BỎ 'justify-content: center' và thêm các thuộc tính sau */
  height: 100%;           /* Đảm bảo các thẻ cao bằng nhau (quan trọng) */
  
  /* Các style cũ của bạn */
  padding: 24px 16px;     
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qt-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

/* 2. Icon (thêm flex-shrink) */
.qt-icon {
  font-size: 40px;
  color: #2563eb;
  margin-bottom: 12px;
  flex-shrink: 0; /* Không bị co lại */
}

/* 3. Cụm chữ (qt-content) - THAY ĐỔI QUAN TRỌNG NHẤT */
.qt-content {
  /* Đây là chìa khóa: */
  flex-grow: 1;           /* Cho phép khối này lấp đầy không gian trống */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Căn giữa h3 và p bên trong nó */
  width: 100%;            /* Đảm bảo chiếm đủ chiều rộng */
}

/* 4. CSS cho h3 và p (điều chỉnh một chút) */
.qt-content h3 {
  font-size: 17px; /* Giảm 1px để dòng dài nhất đỡ bị "kì" */
  color: #333;
  margin-bottom: 6px;
  line-height: 1.4;
}

.qt-content p {
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* 5. Mũi tên (thêm flex-shrink) */
.qt-arrow {
  font-size: 24px;
  color: #2563eb;
  margin-top: 12px;
  flex-shrink: 0; /* Không bị co lại */
}
/* ==== FOOTER HỖ TRỢ CỦA TRƯỜNG/PHÒNG ==== */
.site-footer {
  background: #f9fafb;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  font-size: 15px;
  color: #475569;
}

.support-simple {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
  padding: 40px 0 28px;
}

.support-block {
  max-width: 520px;
  padding-left: 14px;              /* viền nhấn màu theo đơn vị */
  border-left: 4px solid #e5e7eb;
}
/* Nút xanh cho 2 phần hỗ trợ */
.support-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(90deg, #00dfb3, #ffd2cc);
  color: #fff;
  box-shadow: 0 4px 10px rgba(141, 9, 31, 0.25);
  transition: all 0.25s ease;
}
.support-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 0, 0, 0.35);
}

/* Căn chỉnh nhẹ cho layout */
.support-block.is-school,
.support-block.is-dept {
  position: relative;
  padding-bottom: 12px;
}


/* màu nhấn riêng cho từng khối */
.support-block.is-school { border-left-color: #3b82f6; }  /* xanh trường */
.support-block.is-dept   { border-left-color: #7c3aed; }  /* tím phòng */

@media (max-width: 720px){
  .support-simple { gap: 28px; padding: 28px 0 20px; }
}

/* pháp lý dưới cùng */
.foot-legal {
  border-top: 1px solid var(--border);
  background: #f8fafc;
}
.foot-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; flex-wrap: wrap; font-size: 14px; color: #64748b;
}
.foot-inner nav a { color: #64748b; text-decoration: none; margin-left: 14px; }
.foot-inner nav a:hover { color: var(--primary); }
.banner-tuyensinh {
    position: relative;
    width: 100%;
    height: 360px;
    background: url("../../../Common/Images/b4.jpeg") center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Bo cong mép dưới mượt */
    clip-path: path("M0,280 Q50,340 100,280 T200,280 T300,280 T400,280 T500,280 T600,280 T700,280 T800,280 T900,280 T1000,280 V360 H0 Z");
}

.banner-tuyensinh {
    position: relative;
    width: 100%;
    height: 350px;
    background: url("../../../Common/Images/b4.jpeg") center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Bo cong nhẹ ở mép dưới */
    clip-path: ellipse(120% 100% at 50% 0%);
}

/* Lớp phủ mờ nhẹ cho nền */
.banner-tuyensinh .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 60, 100, 0.35); /* nhẹ hơn, không che ảnh */
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: ellipse(120% 100% at 50% 0%);
}
/* --- CSS cho Banner Tuyển Sinh --- */

/* --- CSS cho Banner Tuyển Sinh --- */

/* Áp dụng cho từng mục (li) */
.banner-content ul li {
  color: #FFFFFF; /* Màu chữ trắng */
  line-height: 1.7; 
  margin-bottom: 12px; 
  
  /* CÁC THAY ĐỔI ĐỂ NỔI BẬT HƠN */
  font-size: 18px;     /* Tăng kích thước chữ lên 18px */
  font-weight: 600;    /* Tăng độ đậm của chữ (600 là semi-bold, 700 là bold) */
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); /* Thêm đổ bóng nhẹ cho chữ */
                                               /* Bóng đen, mờ nhẹ 0.5 */
}

/* Xử lý cho mục cuối cùng không cần khoảng cách dưới */
.banner-content ul li:last-child {
  margin-bottom: 0;
}

/* Tối ưu cho thiết bị di động (mobile) */
@media (max-width: 768px) {
  .banner-content {
    padding: 20px 15px; 
  }

.banner-content ul li {
  color: #FFFFFF; /* Màu chữ trắng */
  line-height: 1.7; 
  margin-bottom: 12px; 
  font-size: 18px;     
  font-weight: 600;    
  
  /* THAY THẾ bóng đen bằng bóng trắng (phát sáng) */
  text-shadow: 0px 0px 5px rgba(255, 255, 255, 0.7); /* Bóng trắng mờ xung quanh */
  
  /* Hoặc bạn có thể thử viền chữ (stroke) - nhưng text-shadow dễ hơn */
}

/* --- GỢI Ý THÊM: Điều chỉnh lớp overlay nếu có --- */
/* Nếu bạn có một lớp overlay làm mờ hình ảnh nền, bạn có thể tăng độ tối của nó. */
/* Giả sử overlay của bạn có màu đen và độ trong suốt 30% (rgba(0,0,0,0.3)) */
/* Bạn có thể thử tăng lên 40% hoặc 50% để nền tối hơn, chữ trắng nổi hơn. */
.banner-tuyensinh .overlay {
  background-color: rgba(0, 0, 0, 0.4); /* Ví dụ: tăng độ tối của overlay */
  /* Hoặc nếu overlay của bạn là màu xanh, hãy đảm bảo nó đủ tối */
  /* background-color: rgba(0, 50, 150, 0.6); */ 
}
}
/* --- CSS cho Nhóm Nút Hero --- */

.hero-buttons {
  display: flex;
  flex-direction: row; /* Xếp ngang (cạnh nhau) trên desktop */
  gap: 12px; /* Khoảng cách giữa 2 nút */
  margin-top: 24px; /* Khoảng cách với dòng <p class="sub"> */
  margin-bottom: 24px; /* Khoảng cách với <ul class="hero-bullets"> */
}

/* --- Style Nút Cơ Bản (Nếu bạn chưa có) --- */
.btn {
  padding: 9px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent; /* Đặt border 2px trong suốt để không bị giật khi hover */
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

/* --- Nút Chính: "Đăng ký ngay" --- */
/* (Giả sử đây là style .btn-primary bạn đang dùng) */
.btn-primary {
  background-color: #2563eb; /* Màu xanh (ví dụ) */
  color: #FFFFFF;
  border-color: #2563eb;
}

.btn-primary:hover {
  background-color: #1d4ed8; /* Màu xanh đậm hơn khi hover */
  border-color: #1d4ed8;
}

/* --- Nút Phụ: "Hướng dẫn đăng ký" --- */
/* (Style "khác màu nhẹ" - dạng outline/viền) */
.btn-secondary {
  background-color: #FFFFFF; /* Nền trắng */
  color: #2563eb; /* Chữ màu xanh */
  border-color: #2563eb; /* Viền màu xanh */
}

.btn-secondary:hover {
  background-color: #f0f6ff; /* Nền xanh RẤT nhạt khi hover */
  color: #1d4ed8;
  border-color: #1d4ed8;
}

/* --- Tối ưu cho Mobile (quan trọng) --- */
@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column; /* Xếp dọc (ngay dưới) trên mobile */
    align-items: stretch; /* Kéo dãn 2 nút cho bằng chiều rộng */
  }

  .btn {
    /* Đảm bảo nút chiếm 100% chiều rộng trên mobile */
    width: 100%; 
  }
}
/* Base: đảm bảo cụm illus co giãn đúng tỉ lệ */
.hero-illus{
  position: relative;
  width: clamp(260px, 56vw, 560px);
  margin: 8px auto 0;
}
.hero-illus img{ display:block; max-width:100%; height:auto; }
.hero-illus .bubble{ position:absolute; }

/* MOBILE FIX: <= 480px  chỉ hiển thị ảnh chính, không tràn */
@media (max-width: 480px){
  .hero-illus{
    width: min(88vw, 380px);
  }
  /* giữ ảnh lớn nhất (img-1) ở giữa, không position tuyệt đối */
  .hero-illus .img-1{
    position: relative;
    width: 100%;
    left: auto; top: auto; transform: none;
  }
  /* ẩn các vòng phụ & bubble để không che chữ/không tràn */
  .hero-illus .img-2,
  .hero-illus .img-3,
  .hero-illus .img-4,
  .hero-illus .bubble{ display: none !important; }
}
/* ==== MOBILE FIX (chặn tràn ngang + thu gọn typography) ==== */

/* 1) Chặn mọi tràn ngang vô ý */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, canvas { max-width: 100%; height: auto; display: block; }

/* 2) Container & section co giãn đúng, không “lòi” 100vw + padding */
.container, .section, .hero { overflow-x: hidden; }
.container { padding-left: 16px; padding-right: 16px; }

/* 3) Tối ưu tiêu đề/slogan cho mobile */
@media (max-width: 480px){
  /* Tiêu đề lớn của hero */
  .hero h1, .hero .title, .banner-text h1 {
    font-size: clamp(1.4rem, 7vw, 1.9rem);
    line-height: 1.25;
    letter-spacing: 0;
    word-break: break-word;
    hyphens: auto;
  }
  /* Slogan phụ */
  .hero .subtitle, .banner-text p {
    font-size: clamp(.95rem, 4vw, 1.05rem);
    line-height: 1.45;
  }

  /* 4) Nút bấm full bề ngang, không đẩy layout */
  .btn, .btn-primary, .btn-outline {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  /* 5) Ảnh minh họa/illus: tránh tràn & che chữ */
  .hero-illus { width: 100%; margin: 8px auto 0; }
  .hero-illus img { width: 100%; height: auto; }
  /* nếu đang dùng nhiều vòng tròn/absolute -> ẩn bớt để không đè chữ */
  .hero-illus .img-2, .hero-illus .img-3, .hero-illus .img-4,
  .hero-illus .bubble { display: none !important; }

  /* 6) Banner ở trên: luôn vừa màn hình */
  .banner-top img { width: 100% !important; height: auto; }
  .banner-text { width: 100% !important; padding: 0 12px; }
}

/* 7) Nếu có phần tử dùng 100vw + padding gây “rướm” 1–2px bên phải */
[class*="full-bleed"], .banner-top[style*="100vw"] {
  margin-left: 0 !important;
  width: 100% !important;
}