/* =========================================================
   APINI COMPARE TABLE - bảng so sánh các quốc gia
   ========================================================= */

/* Biến màu theo giao diện */
:root{
  --apini-compare-text-light: #ffffff;
  --apini-compare-text-dark: #ffffff;

  --apini-compare-cell-light: #1f6fa3;   /* xanh dương sáng mặc định */
  --apini-compare-cell-dark:  #183d66;   /* xanh dương tối mặc định */

  --apini-compare-head-light: #7ccfd1;   /* màu sáng gần nền apini-dinhcu-inner */
  --apini-compare-head-dark:  #0a2b52;   /* màu tối cho header */

  --apini-compare-country-light: #1c4f9b;
  --apini-compare-country-dark:  #0b2b52;

  --apini-compare-line-light: rgba(255,255,255,.20);
  --apini-compare-line-dark:  rgba(255,255,255,.14);

  --apini-compare-outer-light: #0a2a62;
  --apini-compare-outer-dark:  #ffd83b;
}



.apini-compare-table-wrap{
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  border-radius: 10px;  
  max-width: 100%;
 
  box-sizing: border-box;
  position: relative;
}

.apini-compare-table-root{
  width: 100%;
}
.apini-compare-table-root:empty{
  min-height: 320px;
  display: block;
}
/* bảng */
.apini-compare-table{
  width: max-content;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--apini-compare-text-light);
  font-size: 15px;
  line-height: 1.45;
  user-select: text;
  border: 2px solid var(--apini-compare-outer-light);
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
}

/* ô chung */
.apini-compare-table th,
.apini-compare-table td{
  padding: 12px 14px;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  box-sizing: border-box;
  transition:
    background-color .22s ease,
    color .22s ease,
    box-shadow .22s ease,
    opacity .22s ease;
}

/* MẶC ĐỊNH LIGHT */
html:not(.apini-dark) .apini-compare-table th,
html:not(.apini-dark) .apini-compare-table td{
  background: var(--apini-compare-cell-light);
  color: var(--apini-compare-text-light) !important;
  -webkit-text-fill-color: var(--apini-compare-text-light) !important;
  border-right: 1px solid var(--apini-compare-line-light);
  border-bottom: 1px solid var(--apini-compare-line-light);
  text-shadow: none !important;
}


/* MẶC ĐỊNH DARK */
html.apini-dark .apini-compare-table th,
html.apini-dark .apini-compare-table td{
  background: var(--apini-compare-cell-dark);
  color: var(--apini-compare-text-dark) !important;
  -webkit-text-fill-color: var(--apini-compare-text-dark) !important;
  border-right: 1px solid var(--apini-compare-line-dark);
  border-bottom: 1px solid var(--apini-compare-line-dark);
  text-shadow: none !important;
}

/* header */
html:not(.apini-dark) .apini-compare-table thead th{
  background: var(--apini-compare-head-light) !important;
}
html.apini-dark .apini-compare-table thead th{
  background: var(--apini-compare-head-dark) !important;
}

/* sticky header */
.apini-compare-table thead th{
  position: sticky;
  top: 0;
  z-index: 20;
  font-weight: 700;
}

/* sticky 2 cột đầu */
.apini-compare-table .sticky-col{
  position: sticky;
  z-index: 10;
}

.apini-compare-table .sticky-col-1{
  left: 0;
  width: 132px;
  min-width: 132px;
  z-index: 24;
}

.apini-compare-table .sticky-col-2{
  left: 132px;
  width: 270px;
  min-width: 270px;
  z-index: 23;
}

.apini-compare-table thead .sticky-col-1,
.apini-compare-table thead .sticky-col-2{
  z-index: 30;
}

.apini-compare-table th:not(.sticky-col),
.apini-compare-table td:not(.sticky-col){
  min-width: 150px;
}

/* ô quốc gia mặc định */
html:not(.apini-dark) .apini-compare-table td.apini-country-cell{
  background: var(--apini-compare-country-light) !important;
}
html.apini-dark .apini-compare-table td.apini-country-cell{
  background: var(--apini-compare-country-dark) !important;
}

/* bỏ hở viền ngoài cùng */
.apini-compare-table tr > *:last-child{
  border-right: 0 !important;
}
.apini-compare-table tbody tr:last-child > *{
  border-bottom: 0 !important;
}

/* nhóm quốc gia cách nhau */
.apini-compare-table tr.country-start > *{
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

/* =========================================
   TRẠNG THÁI CHỌN
   - dùng màu gốc của apini-dinhcu-inner theo light/dark
   ========================================= */

/* Ô đang chọn */
html:not(.apini-dark) .apini-compare-table .is-active-cell{
  background: #9fe3d6 !important;
  color: #0a2a62 !important;
  -webkit-text-fill-color: #0a2a62 !important;
  box-shadow: inset 0 0 0 1px rgba(10,42,98,.25);
}
html.apini-dark .apini-compare-table .is-active-cell{
  background: #458da6 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(255,216,59,.35);
}

/* Dòng đang chọn */
html:not(.apini-dark) .apini-compare-table tr.is-active-row > *{
  background: #6fd0c9 !important;
  color: #0a2a62 !important;
  -webkit-text-fill-color: #0a2a62 !important;
}
html.apini-dark .apini-compare-table tr.is-active-row > *{
  background: #0f3470 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Cột đang chọn */
html:not(.apini-dark) .apini-compare-table .is-active-col{
  background: #7ccfd1 !important;
  color: #0a2a62 !important;
  -webkit-text-fill-color: #0a2a62 !important;
}
html.apini-dark .apini-compare-table .is-active-col{
  background: #1f4f7f !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* ô chính mạnh hơn */
html:not(.apini-dark) .apini-compare-table .is-active-cell{
  background: #9fe3d6 !important;
}
html.apini-dark .apini-compare-table .is-active-cell{
  background: #458da6 !important;
}

/* Khi click block quốc gia: trả cả nhóm về màu gốc */
.apini-compare-table .is-country-reset > *{
  box-shadow: none !important;
}

/* country label không bị đè sai */
html:not(.apini-dark) .apini-compare-table .is-country-reset .apini-country-cell{
  background: var(--apini-compare-country-light) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html.apini-dark .apini-compare-table .is-country-reset .apini-country-cell{
  background: var(--apini-compare-country-dark) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}


html:not(.apini-dark) .apini-compare-table-note{
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
html.apini-dark .apini-compare-table-note{
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* mobile vẫn là spreadsheet, chỉ gọn hơn */
@media (max-width: 849px){
  .apini-compare-table{
    font-size: 13px;
  }

  .apini-compare-table th,
  .apini-compare-table td{
    padding: 10px 10px;
  }

  .apini-compare-table .sticky-col-1{
    width: 96px;
    min-width: 96px;
  }

  .apini-compare-table .sticky-col-2{
    left: 96px;
    width: 210px;
    min-width: 210px;
  }

  .apini-compare-table th:not(.sticky-col),
  .apini-compare-table td:not(.sticky-col){
    min-width: 120px;
  }
}

/* =========================================
   TRẠNG THÁI CHỌN
   ========================================= */

/* ô */
.apini-compare-table .is-active-cell{
  background: transparent !important;
  box-shadow: none !important;
}

/* dòng */
.apini-compare-table tr.is-active-row > td,
.apini-compare-table tr.is-active-row > th{
  background: transparent !important;
  box-shadow: none !important;
}

/* cột */
.apini-compare-table .is-active-col{
  background: transparent !important;
  box-shadow: none !important;
}

/* click quốc gia = cả block trong suốt */
.apini-compare-table .is-country-reset{
  background: transparent !important;
  box-shadow: none !important;
}

/* riêng sticky cell cũng phải trong suốt luôn */
.apini-compare-table .sticky-col.is-active-cell,
.apini-compare-table .sticky-col.is-active-col,
.apini-compare-table .sticky-col.is-country-reset,
.apini-compare-table tr.is-active-row > .sticky-col{
  background: transparent !important;
  box-shadow: none !important;
}


.apini-compare-table .is-active-cell,
.apini-compare-table .is-active-col,
.apini-compare-table tr.is-active-row > td,
.apini-compare-table tr.is-active-row > th,
.apini-compare-table .is-country-reset{
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}


/* =========================================
   HERO-USA3 = khung bằng HERO-USA2
   ========================================= */

section.apini-hero-section.hero-usa3{
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  isolation: isolate !important;
  background: transparent !important;
  padding: 80px 0 !important;
}

/* giữ nội dung bên trong nổi trên nền */
section.apini-hero-section.hero-usa3 .page-header-wrapper,
section.apini-hero-section.hero-usa3 .page-title-inner,
section.apini-hero-section.hero-usa3 .page-header-inner,
section.apini-hero-section.hero-usa3 .container,
section.apini-hero-section.hero-usa3 .row,
section.apini-hero-section.hero-usa3 .col,
section.apini-hero-section.hero-usa3 .large-12{
  position: relative !important;
  background: transparent !important;
  z-index: 1 !important;
}

/* khung card ngoài cùng */
section.apini-hero-section.hero-usa3 .apini-dinhcu-card{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* khung thật bên trong: giữ bằng section 2 */
section.apini-hero-section.hero-usa3 .apini-dinhcu-inner{
  position: relative !important;
  display: block !important;
  width: 100% !important;
   max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 20px !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* LIGHT */
html:not(.apini-dark) section.apini-hero-section.hero-usa3{
  border: 6px solid rgba(0,0,0,0.9);
  box-shadow: none;
}

/* DARK */
html.apini-dark section.apini-hero-section.hero-usa3{
  border: 6px solid rgba(255,255,255,0.9);
  box-shadow:
    0 0 8px rgba(255,255,255,0.6),
    0 0 16px rgba(255,255,255,0.25);
}
/* ===== Desktop Canada section 2: luôn full khung + chỉnh vị trí ảnh nền ===== */
@media (min-width: 1025px){
  section.apini-hero-section.hero-usa3::before{
    background-size: cover !important;
    background-position: 50% center !important; /* chỉnh số này để drop theo ý */
    background-repeat: no-repeat !important;
  }
}
/* mobile: khung gọn như section 2 */
@media (max-width: 767px){
  section.apini-hero-section.hero-usa3 .container,
  section.apini-hero-section.hero-usa3 .row,
  section.apini-hero-section.hero-usa3 .col,
  section.apini-hero-section.hero-usa3 .large-12{
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  section.apini-hero-section.hero-usa3 .apini-dinhcu-inner{
    width: calc(100% - 22px) !important;
    max-width: 100% !important;
    margin-left: 10px !important;
    margin-right: 10px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  section.apini-hero-section.hero-usa3 .apini-dinhcu-card,
  section.apini-hero-section.hero-usa3 .apini-dinhcu-card .col-inner{
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
}

