/* ===== KHO GIAO DIỆN ===== */

.kgd-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.kgd-section__heading {
  text-align: center;
  margin-bottom: 40px;
}

.kgd-section__heading h2 {
  font-size: 1.9rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 10px;
}

.kgd-section__heading h2 span { color: #1565c0; }

.kgd-section__heading p {
  font-size: 0.95rem;
  color: #666;
}

/* ===== HERO ===== */
.kgd-hero {
  background: linear-gradient(135deg, #e8f0fe 0%, #f5f9ff 100%);
  padding: 72px 24px 56px;
  text-align: center;
}

.kgd-hero__inner {
  max-width: 680px;
  margin: 0 auto;
}

.kgd-hero__tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1565c0;
  background: #fff;
  border: 1px solid #c5d8f0;
  padding: 5px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kgd-hero h1 {
  font-size: 2.8rem;
  font-weight: 900;
  color: #1a1a2e;
  line-height: 1.2;
  margin-bottom: 16px;
}

.kgd-hero h1 span { color: #1565c0; }

.kgd-hero > p {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 28px;
}

.kgd-hero__search {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(21,101,192,0.12);
}

.kgd-hero__search input {
  flex: 1;
  border: none;
  padding: 14px 20px;
  font-size: 0.95rem;
  outline: none;
}

.kgd-hero__search button {
  border: none;
  background: #1565c0;
  color: #fff;
  padding: 0 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.kgd-hero__search button:hover { background: #0d47a1; }

.kgd-hero__search svg { width: 20px; height: 20px; }

/* ===== FEATURED ===== */
.kgd-featured {
  padding: 64px 24px;
  background: #fff;
}

.kgd-featured__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ===== CATALOG ===== */
.kgd-catalog {
  padding: 64px 24px;
  background: #f8fbff;
}

/* Filters */
.kgd-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.kgd-filter {
  padding: 8px 20px;
  border: 2px solid #e0e8f0;
  background: #fff;
  color: #555;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.kgd-filter:hover {
  border-color: #1565c0;
  color: #1565c0;
}

.kgd-filter.active {
  background: #1565c0;
  border-color: #1565c0;
  color: #fff;
}

/* Grid */
.kgd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Card v2 — khung thẻ mẫu: bìa thiết kế theo ngành + mô tả + hàng nút luôn hiện */
.kgd-card {
  background: #fff;
  border: 1px solid #e4ecf4;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(13, 51, 84, 0.05);
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  display: flex;
  flex-direction: column;
}

.kgd-card:hover {
  box-shadow: 0 18px 40px rgba(13, 71, 161, 0.16);
  transform: translateY(-6px);
  border-color: #c9dcf2;
}

.kgd-card--large {
  grid-column: span 2;
}

.kgd-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #dfe9f5;
}

.kgd-card__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}

.kgd-card:hover .kgd-card__media > img {
  transform: scale(1.06);
}

/* Bìa thiết kế khi mẫu chưa có ảnh chụp thật */
.kgd-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #17557f, #2f7fc1);
  transition: transform 0.5s;
}

.kgd-card:hover .kgd-cover { transform: scale(1.04); }

.kgd-cover--bds     { background: linear-gradient(135deg, #175263, #2a7f62); }
.kgd-cover--fnb     { background: linear-gradient(135deg, #7c4326, #b06a3b); }
.kgd-cover--xaydung { background: linear-gradient(135deg, #39424e, #5f7186); }
.kgd-cover--noithat { background: linear-gradient(135deg, #6e5636, #a5814f); }
.kgd-cover--dulich  { background: linear-gradient(135deg, #0f5e73, #2b8a9e); }
.kgd-cover--lamdep  { background: linear-gradient(135deg, #81486a, #b47d9d); }
.kgd-cover--giaoduc { background: linear-gradient(135deg, #274690, #4068ad); }
.kgd-cover--banhang { background: linear-gradient(135deg, #54438c, #7d6bb3); }
.kgd-cover--khac    { background: linear-gradient(135deg, #17557f, #2f7fc1); }

.kgd-cover__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.kgd-cover__dots { display: inline-flex; gap: 5px; }
.kgd-cover__dots i { width: 9px; height: 9px; border-radius: 50%; background: #f26d6d; display: block; }
.kgd-cover__dots i:nth-child(2) { background: #f5bf4f; }
.kgd-cover__dots i:nth-child(3) { background: #57c46a; }

.kgd-cover__url {
  flex: 1;
  max-width: 300px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 7px;
  font-size: 12px;
  color: #5a6d80;
  text-align: center;
  padding: 3px 10px;
  white-space: nowrap;
  overflow: hidden;
}

.kgd-cover__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 18px 22px;
  overflow: hidden;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.3px);
  background-size: 18px 18px;
}

.kgd-cover__ghost {
  position: absolute;
  right: 6px;
  bottom: -34px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 9.5rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.kgd-cover__wire { display: flex; flex-direction: column; gap: 7px; width: 62%; }
.kgd-cover__wire i {
  display: block;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
}
.kgd-cover__wire i:first-child { height: 13px; background: rgba(255, 255, 255, 0.9); }

.kgd-cover__label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  padding: 5px 12px;
  border-radius: 999px;
}

.kgd-cover--lg { position: relative; inset: auto; width: 100%; height: 100%; min-height: 320px; }
.kgd-cover--lg .kgd-cover__ghost { font-size: 13rem; bottom: -48px; }
.kgd-cover--lg .kgd-cover__body { padding: 30px 36px; }

.kgd-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 42, 74, 0.25), rgba(10, 42, 74, 0.78));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.kgd-card:hover .kgd-card__overlay { opacity: 1; }

.kgd-card__preview,
.kgd-card__use {
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s;
}

.kgd-card__preview {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.kgd-card__use {
  background: #fff;
  color: #1565c0;
}

.kgd-card__preview:hover,
.kgd-card__use:hover { transform: scale(1.05); }

.kgd-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: #12283f;
  color: #ffd97a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.kgd-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.kgd-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.kgd-card__cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1565c0;
  background: #e8f0fe;
  padding: 4px 11px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.kgd-card__uses {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: #8494a5;
  white-space: nowrap;
}

.kgd-card__uses svg { width: 15px; height: 15px; color: #1565c0; }

.kgd-card__body h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.02rem;
  font-weight: 800;
  color: #16283c;
  margin-bottom: 8px;
  line-height: 1.35;
}

.kgd-card__desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #5f7082;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kgd-card__actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #eef3f8;
}

.kgd-btn {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.kgd-btn--ghost {
  border: 1.5px solid #c9dcf2;
  color: #1565c0;
  background: #fff;
}

.kgd-btn--ghost:hover { background: #eef5ff; }

.kgd-btn--solid {
  background: #1565c0;
  color: #fff;
}

.kgd-btn--solid:hover { background: #0d47a1; }

/* Empty state */
.kgd-empty {
  text-align: center;
  padding: 60px 24px;
  color: #888;
  font-size: 1rem;
}

/* ===== CTA ===== */
.kgd-cta {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  padding: 72px 24px;
  text-align: center;
}

.kgd-cta__inner {
  max-width: 600px;
  margin: 0 auto;
}

.kgd-cta h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}

.kgd-cta p {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
  line-height: 1.7;
}

.kgd-cta__btn {
  display: inline-flex;
  padding: 14px 32px;
  background: #fff;
  color: #1565c0;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: transform 0.15s, box-shadow 0.15s;
}

.kgd-cta__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .kgd-featured__grid { grid-template-columns: 1fr; }
  .kgd-grid { grid-template-columns: repeat(3, 1fr); }
  .kgd-card--large { grid-column: span 1; }
}

@media (max-width: 720px) {
  .kgd-hero h1 { font-size: 2rem; }
  .kgd-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .kgd-grid { grid-template-columns: 1fr; }
}

/* ===== LIGHTBOX ===== */
.kgd-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.kgd-lightbox.is-open {
  display: flex;
  animation: lbFadeIn 0.25s ease;
}

@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.kgd-lightbox__box {
  background: #111827;
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: lbSlideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}

@keyframes lbSlideUp {
  from { transform: translateY(30px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.kgd-lightbox__close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background 0.15s;
}

.kgd-lightbox__close:hover { background: rgba(255,255,255,0.2); }

.kgd-lightbox__img-wrap {
  flex: 1;
  overflow: auto;
  background: #0f172a;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 300px;
  max-height: calc(90vh - 80px);
}

.kgd-lightbox__img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.kgd-lightbox__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
  gap: 16px;
}

.kgd-lightbox__cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99,102,241,0.15);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kgd-lightbox__name {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
}

.kgd-lightbox__btn {
  display: inline-flex;
  padding: 10px 22px;
  background: #1565c0;
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}

.kgd-lightbox__btn:hover { background: #0d47a1; }

@media (max-width: 600px) {
  .kgd-lightbox__footer { flex-direction: column; align-items: flex-start; }
  .kgd-lightbox__btn { width: 100%; justify-content: center; }
}

/* Lightbox: mô tả + bìa lớn */
.kgd-lightbox__desc {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.75);
  max-width: 560px;
}

.kgd-lightbox__img-wrap .kgd-cover--lg { aspect-ratio: 16/9; }
