/* School Manager Pro CSS v2.4.3 */
:root {
  --smp-primary: #b51221;
  --smp-location: #0284c7;
  --smp-school-title: #047857;
  --smp-dark: #162b48;
  --smp-border: #e2e8f0;
  --smp-container-max: 1200px;
}

/* Áp dụng Chiều rộng Container */
.smp-archive-container,
.smp-single-container{
  max-width: var(--smp-container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

/* Headings */
.smp-sub-heading {
  color: var(--smp-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}
.smp-main-heading {
  color: var(--smp-dark);
  font-size: 26px;
  font-weight: 800;
  margin: 0;
}
.smp-heading-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}
.smp-heading-note {
  font-size: 14px;
  color: #64748b;
}
.smp-back-link {
  color: var(--smp-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* Breadcrumbs Link */
.smp-breadcrumbs {
  font-size: 14px;
  color: #64748b;
  margin: 15px 0 20px 0;
  line-height: 1.6;
}
.smp-breadcrumbs a {
  color: #475569;
  text-decoration: none;
  font-weight: 500;
}
.smp-breadcrumbs a:hover {
  color: var(--smp-primary);
  text-decoration: underline;
}
.smp-breadcrumbs .current {
  color: #1e293b;
  font-weight: 600;
}

/* Link địa điểm */
.smp-loc-link {
  color: var(--smp-location) !important;
  text-decoration: none;
  font-weight: 600;
}
.smp-loc-link:hover {
  text-decoration: underline;
}

/* 1. Country Cards */
.smp-country-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 35px;
}
@media (max-width: 992px) {
  .smp-country-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .smp-country-grid { grid-template-columns: 1fr; }
}

.smp-country-card {
  background: #fff;
  border: 1px solid var(--smp-border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.smp-country-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}
.smp-country-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fef2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
  flex-shrink: 0;
}
.smp-country-info { flex-grow: 1; }
.smp-country-title { display: block; font-weight: 700; font-size: 15px; color: var(--smp-primary); }
.smp-country-count { display: block; font-size: 12px; color: #64748b; }
.smp-country-arrow { color: var(--smp-primary); font-size: 20px; font-weight: bold; }

/* 2. Region Cards */
.smp-region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 35px;
}
@media (max-width: 768px) {
  .smp-region-grid { grid-template-columns: 1fr; }
}
.smp-region-card {
  background: #fff;
  border: 1px solid var(--smp-border);
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--smp-dark);
  font-weight: 600;
  transition: all 0.2s;
}
.smp-region-card:hover, .smp-region-card.active {
  border-color: var(--smp-primary);
  background: #fff5f5;
}
.smp-region-count { color: var(--smp-primary); font-size: 13px; font-weight: 500; }

/* 3. Filter Container */
.smp-filter-container {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  border: 1px solid var(--smp-border);
  margin-bottom: 30px;
}
.smp-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 992px) {
  .smp-filter-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .smp-filter-grid { grid-template-columns: 1fr; }
}
.smp-select-wrap { position: relative; }
.smp-select-wrap .smp-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--smp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.smp-select-wrap .smp-icon::after {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--smp-primary);
  border-radius: 50%;
}
.smp-select-wrap select {
  width: 100%;
  height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 35px 0 38px;
  font-size: 14px;
  color: #1e293b;
  background: #fff url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%207.5L10%2012.5L15%207.5%22%20stroke%3D%22%2364748B%22%20stroke-width%3D%221.67%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
}
.smp-btn-search {
  background: var(--smp-primary) !important;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  height: 46px;
  width: 100%;
}

/* 4. School Card & BADGE NỔI BẬT */
.smp-schools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 768px) {
  .smp-schools-grid { grid-template-columns: 1fr; }
}
.smp-school-card {
  background: #ffffff;
  border: 1px solid var(--smp-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.smp-school-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.07);
}
.smp-school-logo-wrap {
  width: 110px;
  flex-shrink: 0;
  text-align: center;
  position: relative;
}
.smp-school-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 5px;
}
.smp-logo-placeholder {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: #f8fafc;
  border-radius: 8px;
}

.smp-featured-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--smp-primary);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 6px rgba(181, 18, 33, 0.35);
  z-index: 2;
}

.smp-school-content { flex-grow: 1; }
.smp-school-name { font-size: 16px; font-weight: 700; color: var(--smp-school-title); margin: 0 0 8px 0; line-height: 1.4; }
.smp-school-name a { color: inherit; text-decoration: none; color: var(--smp-school-title) !important; }
.smp-school-location { font-size: 13px; color: var(--smp-location); font-weight: 600; margin-bottom: 12px; }
.smp-school-meta-list { font-size: 13px; margin-bottom: 15px; }
.smp-meta-row { display: flex; margin-bottom: 5px; }
.smp-meta-label { width: 95px; flex-shrink: 0; color: #64748b; font-weight: 600; font-size: 11px; }
.smp-meta-value { color: #1e293b; font-weight: 500; }
.smp-meta-value.highlight-red { color: var(--smp-primary); font-weight: 700; }
.smp-card-actions { display: flex; gap: 8px; }
.smp-btn-action { padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.2s ease; }
.smp-btn-primary { background: var(--smp-primary); color: #fff !important; border: 1px solid var(--smp-primary); }
.smp-btn-primary:hover { opacity: 0.9; }
.smp-btn-outline { background: #fff; color: #475569 !important; border: 1px solid #cbd5e1; }
.smp-btn-outline:hover { background: #f8fafc; border-color: #94a3b8; }

/* -------------------------------------------------------------
 * 5. BỐ CỤC 1 CỘT HIỆN ĐẠI (CHUẨN THEO image_f63adf.png)
 * ------------------------------------------------------------- */
.smp-header-flex-modern {
  background: #ffffff;
  border: 1px solid var(--smp-border);
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  gap: 30px;
  align-items: stretch;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
@media (max-width: 900px) {
  .smp-header-flex-modern {
    flex-direction: column;
    padding: 20px;
  }
}

/* Card Logo bên trái */
.smp-header-logo-card {
  width: 170px;
  flex-shrink: 0;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafcff;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.01);
}
@media (max-width: 900px) {
  .smp-header-logo-card {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    height: 140px;
  }
}
.smp-modern-logo {
  max-width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: contain;
}

/* Khu vực thông số và nút bấm bên phải */
.smp-header-specs-wrap {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* 2 phân cột thông số có đường kẻ phân cách */
.smp-modern-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
}
@media (max-width: 650px) {
  .smp-modern-specs-grid {
    grid-template-columns: 1fr;
    column-gap: 0;
  }
}

.smp-modern-spec-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  line-height: 1.4;
}
.smp-m-label {
  width: 95px;
  flex-shrink: 0;
  color: #64748b;
  font-weight: 600;
}
.smp-m-val {
  color: #1e293b;
  font-weight: 700;
  flex-grow: 1;
}

/* Cụm nút bấm phía dưới */
.smp-modern-actions-wrap {
  margin-top: 18px;
  display: flex;
  gap: 12px;
}
.smp-btn-bold {
  font-weight: 700 !important;
  padding: 8px 22px !important;
}

/* -------------------------------------------------------------
 * 6. BỐ CỤC 2 CỘT CHI TIẾT TRƯỜNG HỌC
 * ------------------------------------------------------------- */
.smp-detail-2col-wrapper {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  align-items: start;
}
@media (max-width: 991px) {
  .smp-detail-2col-wrapper { grid-template-columns: 1fr; }
}
.smp-sticky-sidebar { position: sticky; top: 30px; }
.smp-detail-left-card {
  background: #ffffff;
  border: 1px solid var(--smp-border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}
.smp-detail-logo-box { text-align: center; margin-bottom: 20px; }
.smp-detail-logo-img { max-width: 180px; height: auto; max-height: 140px; object-fit: contain; }
.smp-left-actions-row { display: flex; gap: 10px; margin-bottom: 24px; }
.smp-left-actions-row .smp-btn-action { flex: 1; justify-content: center; font-size: 13px; padding: 9px 4px; }
.smp-left-specs-table { border-top: 1px solid #f1f5f9; }
.smp-spec-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.smp-spec-label { color: #64748b; font-weight: 500; width: 100px; }
.smp-spec-value { color: #1e293b; font-weight: 600; text-align: right; flex: 1; }

.smp-detail-main-header {
  background: #ffffff;
  border: 1px solid var(--smp-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 25px;
}
.smp-detail-title { font-size: 26px; font-weight: 800; color: var(--smp-dark); margin: 0 0 8px 0; line-height: 1.35; }
.smp-detail-address { font-size: 14px; color: #64748b; }
.smp-detail-content-card {
  background: #ffffff;
  border: 1px solid var(--smp-border);
  border-radius: 12px;
  padding: 30px;
  line-height: 1.8;
  margin-bottom: 30px;
}

/* Thư viện ảnh tỷ lệ 16/9 */
.smp-gallery-sec { margin-bottom: 35px; }
.smp-block-title { font-size: 20px; font-weight: 700; color: var(--smp-dark); margin-bottom: 15px; }
.smp-gallery-grid-16-9 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
@media (max-width: 600px) {
  .smp-gallery-grid-16-9 { grid-template-columns: 1fr; }
}
.smp-gallery-item-16-9 {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--smp-border);
}
.smp-gallery-item-16-9 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  cursor: pointer;
}
.smp-gallery-item-16-9 img:hover { transform: scale(1.04); }

/* Khối gợi ý trường học */
.smp-related-section-custom { margin-top: 40px; }
.smp-related-top-flex { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; }
.smp-related-note { font-size: 13px; color: #64748b; }
.smp-related-grid-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (max-width: 768px) {
  .smp-related-grid-cards { grid-template-columns: 1fr; }
}
.smp-related-card-item {
  background: #ffffff;
  border: 1px solid var(--smp-border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.smp-related-card-item:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.05); }
.smp-rel-logo { width: 75px; height: 75px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.smp-rel-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.smp-rel-info { flex-grow: 1; }
.smp-rel-title { margin: 0 0 6px 0; font-size: 15px; font-weight: 700; line-height: 1.35; }
.smp-rel-title a { color: var(--smp-dark) !important; text-decoration: none; }
.smp-rel-title a:hover { color: var(--smp-primary); }
.smp-rel-meta-row { font-size: 13px; color: #64748b; margin-bottom: 4px; }
.smp-rel-link-red { display: inline-block; color: var(--smp-primary); font-size: 13px; font-weight: 700; text-decoration: none; margin-top: 4px; }
.smp-rel-link-red:hover { text-decoration: underline; }

/* Modal Lightbox Gallery */
.smp-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.smp-lightbox-content {
  max-width: 85%;
  max-height: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#smp-lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 6px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}
.smp-lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}
.smp-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  font-size: 40px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.smp-lightbox-arrow:hover { background: rgba(255,255,255,0.4); }
.smp-lightbox-arrow.smp-prev { left: 25px; }
.smp-lightbox-arrow.smp-next { right: 25px; }
