/* ═══════════════════════════════════════════════════════════
   AN PHÚ QUỐC — giao diện chung
   Màu thương hiệu: đỏ đô #7E141A · nền #F2F3F4 · chữ #333
   ═══════════════════════════════════════════════════════════ */
:root {
  --do: #7e141a;
  --do-dam: #5b0e13;
  --do-nhat: #a02236;
  --vang: #f2c14e;
  --nen: #f2f3f4;
  --chu: #333;
  --chu-nhat: #6b6b6b;
  --vien: #e3e3e3;
  --rong: 1170px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--nen);
  color: var(--chu);
  font-family: 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--do); text-decoration: none; }
a:hover { color: var(--do-nhat); }
.container { width: 100%; max-width: var(--rong); margin: 0 auto; padding: 0 15px; }
.clear { clear: both; }

/* ── Thanh trên cùng ─────────────────────────────────────── */
.topbar { background: #fff; border-bottom: 1px solid var(--vien); font-size: 13px; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: 34px; gap: 12px; flex-wrap: wrap; }
.topbar-info { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; color: #555; }
.topbar-info li { display: flex; align-items: center; gap: 6px; }
.topbar-info b { color: var(--do); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.search { display: flex; }
.search input {
  border: 1px solid var(--vien); border-right: 0; height: 26px; padding: 0 8px;
  font: inherit; font-size: 12px; width: 150px; outline: none;
}
.search button {
  border: 0; background: var(--do); color: #fff; height: 26px; width: 30px;
  cursor: pointer; font-size: 12px;
}
.lang { display: inline-block; padding: 1px 7px; border: 1px solid var(--vien); color: #666; font-size: 12px; }
.lang.active { background: var(--do); border-color: var(--do); color: #fff; }

/* ── Băng logo ───────────────────────────────────────────── */
.logoband { background: #fff; padding: 18px 0; }
.logoband img { max-height: 78px; width: auto; }

/* ── Menu chính ──────────────────────────────────────────── */
.mainnav { background: var(--do); position: relative; z-index: 60; }
.mainnav .container { display: flex; align-items: center; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.menu > li { position: relative; }
.menu > li > a {
  display: block; color: #fff; padding: 11px 13px; font-size: 14px; white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, .12);
}
.menu > li:first-child > a { border-left: 1px solid rgba(255, 255, 255, .12); }
.menu > li:hover > a, .menu > li.active > a { background: var(--do-dam); color: #fff; }
.menu ul {
  list-style: none; margin: 0; padding: 0; position: absolute; top: 100%; left: 0;
  min-width: 250px; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  display: none; border-top: 3px solid var(--vang);
}
.menu li:hover > ul { display: block; }
.menu ul li { position: relative; }
.menu ul a {
  display: block; padding: 9px 14px; color: #333; font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}
.menu ul a:hover { background: var(--do); color: #fff; }
.menu ul ul { top: 0; left: 100%; }
.menu .co-con > a::after { content: ' ▸'; font-size: 11px; opacity: .8; }
.menu > li.co-con > a::after { content: ' ▾'; }
.nav-toggle {
  display: none; background: transparent; border: 0; color: #fff; font-size: 22px;
  padding: 8px 12px; cursor: pointer;
}

/* ── Slider ──────────────────────────────────────────────── */
.slider { position: relative; overflow: hidden; background: #111; }
.slider .slides { position: relative; width: 100%; aspect-ratio: 1600 / 450; }
.slider .slides a { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.slider .slides a.on { opacity: 1; }
.slider img { width: 100%; height: 100%; object-fit: cover; }
.slider .dots { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; }
.slider .dots i {
  display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin: 0 4px;
  background: rgba(255, 255, 255, .5); cursor: pointer;
}
.slider .dots i.on { background: var(--vang); }
.slider .ar {
  position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 60px;
  background: rgba(0, 0, 0, .3); color: #fff; border: 0; font-size: 22px; cursor: pointer;
}
.slider .ar:hover { background: var(--do); }
.slider .ar.prev { left: 0; }
.slider .ar.next { right: 0; }

/* ── Khối / tiêu đề chung ────────────────────────────────── */
.sect { padding: 46px 0; }
.sect.white { background: #fff; }
.sect.grey { background: var(--nen); }
.sect.do { background: var(--do); color: #fff; }
.sect.do a { color: #fff; }
.sect-title { text-align: center; margin: 0 0 8px; font-size: 30px; font-weight: 500; }
.sect-title a { color: inherit; }
.sect-sub { text-align: center; max-width: 780px; margin: 0 auto 30px; color: var(--chu-nhat); }
.sect.do .sect-sub { color: rgba(255, 255, 255, .85); }
.gach { width: 60px; height: 3px; background: var(--vang); margin: 12px auto 24px; }

/* ── Vì sao chọn ─────────────────────────────────────────── */
.uudiem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 14px; }
.uudiem .item { text-align: center; padding: 0 6px; }
.uudiem .ic {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 14px;
  background: var(--do); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}
.uudiem h3 { font-size: 17px; margin: 0 0 8px; font-weight: 700; line-height: 1.35; }
.uudiem p { margin: 0; color: var(--chu-nhat); font-size: 14px; }

/* ── Thẻ bài viết ────────────────────────────────────────── */
.luoi3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.luoi2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.luoi4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.the { background: #fff; border: 1px solid var(--vien); display: flex; flex-direction: column; }
.the .anh { overflow: hidden; }
.the .anh img { width: 100%; transition: transform .5s ease; }
.the:hover .anh img { transform: scale(1.06); }
.the .noi { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.the h3 { font-size: 16px; margin: 0 0 8px; font-weight: 700; line-height: 1.35; }
.the h3 a { color: #333; }
.the h3 a:hover { color: var(--do); }
.the p { margin: 0 0 12px; color: var(--chu-nhat); font-size: 14px; flex: 1; }
.the .chan {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px dashed var(--vien); padding-top: 9px; font-size: 12px; color: #999;
}
.the .share { display: flex; gap: 6px; }
.the .share span {
  width: 22px; height: 22px; border-radius: 50%; background: #eee; color: #666;
  display: flex; align-items: center; justify-content: center; font-size: 11px; cursor: pointer;
}
.the .share span:hover { background: var(--do); color: #fff; }

/* thẻ vuông (khối visa nền đỏ) */
.the-vuong { position: relative; overflow: hidden; display: block; background: #000; }
.the-vuong img { width: 100%; aspect-ratio: 1/1; object-fit: cover; transition: transform .5s; }
.the-vuong:hover img { transform: scale(1.07); }
.the-vuong .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .82)); color: #fff; font-size: 14px; font-weight: 700;
}

/* ── Nút ─────────────────────────────────────────────────── */
.nut {
  display: inline-block; background: var(--do); color: #fff; padding: 10px 26px;
  border: 0; font: inherit; font-size: 15px; cursor: pointer;
}
.nut:hover { background: var(--do-dam); color: #fff; }
.nut.vang { background: var(--vang); color: #5b1020; font-weight: 700; }
.nut.vang:hover { background: #e0ad34; }
.nut.vien { background: transparent; border: 1px solid #fff; }
.giua { text-align: center; margin-top: 30px; }

/* ── Form đăng ký tư vấn ─────────────────────────────────── */
.dangky { background: #fff; border: 1px solid var(--vien); padding: 26px; }
.dangky h3 { margin: 0 0 6px; font-size: 22px; }
.dangky p.mo { color: var(--chu-nhat); margin: 0 0 16px; }
.hang { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dangky input, .dangky select, .dangky textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d8d8d8; font: inherit; font-size: 14px;
  margin-bottom: 12px; background: #fff; outline: none;
}
.dangky input:focus, .dangky select:focus, .dangky textarea:focus { border-color: var(--do); }
.dangky textarea { min-height: 84px; resize: vertical; }
.kq { margin-top: 10px; font-size: 14px; }
.kq.ok { color: #1e7a3c; }
.kq.loi { color: #c0392b; }

/* ── Bảng thông tin liên hệ 2 cột ────────────────────────── */
.vp { background: #fff; border: 1px solid var(--vien); padding: 22px; }
.vp h3 { margin: 0 0 10px; font-size: 19px; color: var(--do); }
.vp p { margin: 0 0 6px; }

/* ── Nội dung trang con ──────────────────────────────────── */
.head-anh img { width: 100%; }
.crumb { background: #fff; border-bottom: 1px solid var(--vien); font-size: 13px; color: #888; }
.crumb .container { padding-top: 9px; padding-bottom: 9px; }
.bai { background: #fff; border: 1px solid var(--vien); padding: 30px; }
.bai h2 { font-size: 24px; margin: 30px 0 12px; color: var(--do); }
.bai h2:first-child { margin-top: 0; }
.bai h3 { font-size: 18px; margin: 22px 0 8px; }
.bai p { margin: 0 0 12px; }
.bai ul { margin: 0 0 14px; padding-left: 20px; }
.bai li { margin-bottom: 6px; }
.cot-2 { display: grid; grid-template-columns: 1fr 350px; gap: 26px; align-items: start; }
.canh { background: #fff; border: 1px solid var(--vien); padding: 18px; }
.canh h4 { margin: 0 0 12px; font-size: 17px; color: var(--do); border-bottom: 2px solid var(--vang); padding-bottom: 8px; }
.canh ul { list-style: none; margin: 0; padding: 0; }
.canh li { border-bottom: 1px solid #f0f0f0; }
.canh li a { display: block; padding: 8px 0; color: #444; font-size: 14px; }
.canh li a:hover { color: var(--do); }

/* bảng giá / bảng dữ liệu */
.bang { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 14px; }
.bang th, .bang td { border: 1px solid var(--vien); padding: 9px 11px; text-align: left; }
.bang th { background: var(--do); color: #fff; font-weight: 700; }
.bang tr:nth-child(even) td { background: #fafafa; }

/* ── Thanh menu chân trang ───────────────────────────────── */
.footnav { background: var(--do); }
.footnav ul {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap;
  justify-content: center;
}
.footnav a { color: #fff; display: block; padding: 14px 16px; font-size: 14px; }
.footnav a:hover { background: var(--do-dam); }

/* ── Nhận bản tin ────────────────────────────────────────── */
.bantin { background: #fff; padding: 26px 0; border-bottom: 1px solid var(--vien); }
.bantin .container { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.bantin b { font-size: 17px; }
.bantin form { display: flex; }
.bantin input {
  border: 1px solid #d8d8d8; border-right: 0; padding: 9px 12px; font: inherit; width: 280px; outline: none;
}
.bantin button { border: 0; background: var(--do); color: #fff; padding: 0 22px; font: inherit; cursor: pointer; }

/* ── Chân trang ──────────────────────────────────────────── */
.site-footer { background: #fff; padding: 30px 0 40px; font-size: 14px; color: #555; }
.site-footer .ten { font-weight: 700; color: var(--do); font-size: 16px; margin-bottom: 10px; }
.site-footer .cot { display: grid; grid-template-columns: 1fr 1fr 260px; gap: 26px; }
.site-footer p { margin: 0 0 6px; }
.site-footer .tukhoa { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--vien); font-size: 12.5px; color: #999; }
.site-footer .tukhoa a { color: #999; }
.site-footer .ban-quyen { margin-top: 10px; font-size: 12.5px; color: #999; }
.mxh { display: flex; gap: 8px; margin-top: 10px; }
.mxh a {
  width: 32px; height: 32px; border-radius: 50%; background: var(--do); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.mxh a:hover { background: var(--do-dam); color: #fff; }

/* ── Nút nổi ─────────────────────────────────────────────── */
.fabs { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 9px; }
.fabs a, .fabs button {
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.fab-phone { background: #2e7d32; }
.fab-zalo { background: #0068ff; font-size: 13px; font-weight: 700; }
.fab-fb { background: #1877f2; }
.fab-top { background: #777; }
.fabs a:hover, .fabs button:hover { filter: brightness(1.1); color: #fff; }

/* ── Điện thoại / máy tính bảng ──────────────────────────── */
@media (max-width: 991px) {
  .uudiem { grid-template-columns: repeat(2, 1fr); }
  .luoi3, .luoi4 { grid-template-columns: repeat(2, 1fr); }
  .cot-2 { grid-template-columns: 1fr; }
  .site-footer .cot { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .mainnav .container { display: block; }
  .menu { display: none; flex-direction: column; padding-bottom: 8px; }
  .menu.mo { display: flex; }
  .menu > li > a, .menu > li:first-child > a { border: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .menu ul {
    position: static; display: none; box-shadow: none; border-top: 0;
    background: rgba(0, 0, 0, .18); min-width: 0;
  }
  .menu li.mo > ul { display: block; }
  .menu ul a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); padding-left: 28px; }
  .menu ul ul a { padding-left: 44px; }
  .menu li:hover > ul { display: none; }
  .menu li.mo > ul { display: block; }
  .luoi3, .luoi2, .luoi4, .hang { grid-template-columns: 1fr; }
  .sect-title { font-size: 24px; }
  .topbar-in { justify-content: center; }
  .search input { width: 120px; }
  .bai { padding: 20px; }
  .logoband img { max-height: 56px; }
}

/* ═══════════════════════════════════════════════════════════
   BỔ SUNG cho bản sao anphuquoc.edu.vn (trang danh mục + bài viết)
   ═══════════════════════════════════════════════════════════ */

/* cờ ngôn ngữ ở thanh trên */
.lang { padding: 0; border: 0; line-height: 0; }
.lang img { width: 26px; height: auto; border: 1px solid var(--vien); }
.lang.active img { border-color: var(--do); }

/* icon ưu điểm là ảnh thật của khách */
.uudiem .ic { background: var(--do); overflow: hidden; }
.uudiem .ic img { width: 38px; height: 38px; object-fit: contain; filter: brightness(0) invert(1); }

/* tiêu đề trang danh mục / bài viết */
.tieu-de-trang {
  font-size: 27px; margin: 0 0 20px; font-weight: 700; color: var(--do);
  border-bottom: 2px solid var(--vang); padding-bottom: 10px;
}
.tieu-de-bai { font-size: 26px; line-height: 1.3; margin: 0 0 12px; color: #222; }
.tieu-de-cot {
  font-size: 21px; margin: 0 0 16px; font-weight: 700;
  border-bottom: 2px solid var(--do); padding-bottom: 8px;
}
.tieu-de-cot a { color: var(--do); }

.meta-bai {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  border-bottom: 1px dashed var(--vien); padding-bottom: 12px; margin-bottom: 18px;
  font-size: 13px; color: #888;
}
.share { display: inline-flex; gap: 6px; align-items: center; }
.share a {
  width: 24px; height: 24px; border-radius: 50%; background: #eee; color: #666;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.share a:hover { background: var(--do); color: #fff; }

/* nội dung bài lấy từ web gốc */
.noi-dung { font-size: 16px; line-height: 1.75; }
.noi-dung img { max-width: 100%; height: auto; margin: 12px auto; }
.noi-dung p { margin: 0 0 14px; }
.noi-dung h2, .noi-dung h3 { color: var(--do); line-height: 1.35; }
.noi-dung table { max-width: 100%; border-collapse: collapse; }
.noi-dung table td, .noi-dung table th { border: 1px solid var(--vien); padding: 7px 9px; }
.noi-dung iframe { max-width: 100%; }
.noi-dung ul, .noi-dung ol { padding-left: 22px; margin: 0 0 14px; }

/* tin ngang 2 cột ở trang chủ */
.hai-cot-tin { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.tin-ngang { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--vien); }
.tin-ngang .anh { flex: 0 0 130px; overflow: hidden; }
.tin-ngang .anh img { width: 130px; height: 84px; object-fit: cover; transition: transform .5s; }
.tin-ngang:hover .anh img { transform: scale(1.07); }
.tin-ngang h3 { font-size: 15px; margin: 0 0 5px; line-height: 1.35; }
.tin-ngang h3 a { color: #333; }
.tin-ngang h3 a:hover { color: var(--do); }
.tin-ngang p { margin: 0; font-size: 13px; color: var(--chu-nhat); }

/* cột bên */
.canh .dang-xem { color: var(--do); font-weight: 700; }
.doc-nhieu li a { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.doc-nhieu img { width: 62px; height: 44px; object-fit: cover; flex: 0 0 62px; }
.doc-nhieu span { font-size: 13.5px; line-height: 1.35; }
.hop-hotline { margin-top: 20px; background: var(--do); color: #fff; padding: 16px; text-align: center; }
.hop-hotline b { display: block; font-size: 17px; margin-bottom: 8px; }
.hop-hotline p { margin: 0 0 4px; }
.hop-hotline a { color: #fff; }
.hop-hotline .nut { background: var(--vang); color: #5b1020; margin-top: 10px; font-weight: 700; }

/* ô tìm kiếm lớn */
.tim-lon input {
  width: 100%; padding: 12px 14px; border: 1px solid #d8d8d8; font: inherit; font-size: 16px;
  margin-bottom: 14px; outline: none;
}
.tim-lon input:focus { border-color: var(--do); }
#kqTim .the { margin-bottom: 14px; }

@media (max-width: 991px) {
  .hai-cot-tin { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 767px) {
  .tin-ngang .anh, .tin-ngang .anh img { flex-basis: 104px; width: 104px; }
  .tieu-de-bai { font-size: 21px; }
}
