/* RevidAPI shared chrome — header, mega menu, ecosystem, footer (đồng bộ trang chủ) */
:root {
  --green: #15803d;
  --green-light: #f0fdf4;
  --green-mid: #dcfce7;
  --text: #111827;
  --muted: #4b5563;
  --border: #e5e7eb;
  --radius: 12px;
}

/* Header */
.revid-hd {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #16a34a 0%, #15803d 45%, #166534 100%);
  box-shadow: 0 12px 30px rgba(21, 128, 61, 0.28);
}
.revid-hd-in {
  max-width: 1230px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.revid-hd-logo {
  flex: 0 0 auto;
  background: #fff;
  border-radius: 8px;
  padding: 3px 10px;
  line-height: 0;
}
.revid-hd-logo img {
  height: 42px;
  width: auto;
  display: block;
}
.revid-hd-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  height: 42px;
  padding: 0 14px;
  background: #fff;
  color: #1f2937;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.15s;
}
.revid-hd-pill:hover {
  background: #f3f4f6;
  color: #166534;
  text-decoration: none;
}
.revid-hd-search {
  flex: 1;
  min-width: 0;
}
.revid-hd-search-in {
  display: flex;
  align-items: center;
  height: 42px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.revid-hd-search-in input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  padding: 0 12px;
  font-size: 0.88rem;
  background: transparent;
  color: #374151;
}
.revid-hd-search-in input::placeholder {
  color: #9ca3af;
}
.revid-hd-search-in button {
  border: 0;
  background: transparent;
  padding: 0 12px;
  color: #15803d;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.revid-hd-lang {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}
.revid-hd-lang select {
  appearance: none;
  min-height: 42px;
  height: 42px;
  padding: 0 36px 0 14px;
  background: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
}
.revid-hd-lang i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #4b5563;
  pointer-events: none;
}
.revid-hd-login {
  color: #15803d;
  font-weight: 700;
}
.revid-hd-contact {
  display: none;
}
@media (min-width: 640px) {
  .revid-hd-contact {
    display: inline-flex;
  }
}
@media (max-width: 767px) {
  .revid-hd-in {
    padding: 8px 10px;
    gap: 6px;
  }
  .revid-hd-logo img {
    height: 34px;
  }
  .revid-hd-search {
    display: none;
  }
  .revid-hd-catmega-btn,
  .revid-hd-pill,
  .revid-hd-lang select {
    min-height: 38px;
    height: 38px;
    font-size: 0.8rem;
    padding: 0 10px;
  }
  .revid-hd-lang select {
    padding-right: 30px;
  }
  .revid-hd-login {
    margin-left: auto;
  }
}

/* Mega danh mục */
.revid-hd-catmega {
  position: relative;
  flex: 0 0 auto;
}
.revid-hd-catmega-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  height: 42px;
  padding: 0 14px;
  background: #fff;
  color: #1f2937;
  border: 0;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.revid-hd-catmega-btn:hover {
  background: #f3f4f6;
  color: #166534;
}
.catmega-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 998;
}
body.is-mega-open {
  overflow: hidden;
}
body.is-mega-open .catmega-backdrop {
  display: block;
}
.catmega-panel {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  top: 62px;
  max-height: calc(100vh - 62px);
  overflow: auto;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  z-index: 999;
}
body.is-mega-open .catmega-panel {
  display: block;
}
.catmega-in {
  max-width: 1230px;
  margin: 0 auto;
  padding: 20px 16px 24px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
}
.catmega-menu {
  list-style: none;
  border-right: 1px solid var(--border);
  padding-right: 12px;
}
.catmega-menu li {
  margin-bottom: 4px;
}
.catmega-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  text-align: left;
  cursor: pointer;
}
.catmega-menu button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.catmega-menu button:hover,
.catmega-menu button.is-active {
  background: var(--green-light);
  color: var(--green);
}
.catmega-tab {
  display: none;
}
.catmega-tab.is-active {
  display: block;
}
.catmega-tab h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--text);
}
.catmega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.catmega-group {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafafa;
}
.catmega-group-title {
  display: block;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text);
  margin-bottom: 8px;
  text-decoration: none;
}
.catmega-group-title:hover {
  color: var(--green);
}
.catmega-links {
  list-style: none;
  font-size: 0.82rem;
}
.catmega-links li {
  margin-bottom: 4px;
}
.catmega-links a {
  color: var(--muted);
  text-decoration: none;
}
.catmega-links a:hover {
  color: var(--green);
}
@media (max-width: 768px) {
  .catmega-in {
    grid-template-columns: 1fr;
  }
  .catmega-menu {
    border-right: 0;
    padding-right: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .catmega-menu li {
    margin: 0;
  }
}

/* Ecosystem strip */
.eco {
  padding: 24px 0 12px;
  background: #fff;
  border-top: 1px solid var(--border);
}
.eco h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.eco-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
  max-width: 760px;
  line-height: 1.5;
}
.eco-sub strong {
  color: var(--green);
}
.eco-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.eco-row::-webkit-scrollbar {
  display: none;
}
.eco-item {
  flex: 1 1 0;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: 0.18s;
}
.eco-item:hover {
  border-color: var(--green);
  box-shadow: 0 8px 20px rgba(21, 128, 61, 0.12);
  transform: translateY(-2px);
  text-decoration: none;
}
.eco-item.active {
  border-color: var(--green);
  background: var(--green-light);
  box-shadow: 0 4px 16px rgba(21, 128, 61, 0.15);
}
.eco-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-light), var(--green-mid));
  display: flex;
  align-items: center;
  justify-content: center;
}
.eco-icon img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}
.eco-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.eco-free {
  position: relative;
}
.eco-free::after {
  content: 'FREE';
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 8px;
  font-weight: 800;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  padding: 1px 5px;
  border-radius: 999px;
}
@media (max-width: 900px) {
  .eco-item {
    flex: 0 0 auto;
    min-width: 128px;
  }
}

/* Footer */
.revid-ft {
  border-top: 1px solid var(--border);
  background: #fff;
  margin-top: 40px;
}
.revid-ft-in {
  max-width: 1230px;
  margin: 0 auto;
  padding: 32px 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
.revid-ft-brand img {
  height: 46px;
  width: auto;
  margin-bottom: 12px;
}
.revid-ft-brand ul {
  list-style: none;
  font-size: 0.88rem;
  color: #374151;
  line-height: 1.65;
}
.revid-ft-brand li {
  margin-bottom: 4px;
}
.revid-ft-brand a {
  color: #15803d;
  text-decoration: none;
}
.revid-ft-brand a:hover {
  text-decoration: underline;
}
.revid-ft-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.revid-ft-col h4 {
  font-size: 0.94rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}
.revid-ft-col ul {
  list-style: none;
}
.revid-ft-col li {
  margin-bottom: 6px;
}
.revid-ft-col a {
  font-size: 0.88rem;
  color: #374151;
  text-decoration: none;
  transition: 0.15s;
}
.revid-ft-col a:hover {
  color: #15803d;
}
.revid-ft-social {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.revid-ft-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
  transition: 0.15s;
}
.revid-ft-social a:hover {
  opacity: 0.85;
}
.revid-ft-social .fb {
  color: #2563eb;
}
.revid-ft-social .yt {
  color: #dc2626;
}
.revid-ft-social .tg {
  color: #0ea5e9;
}
.revid-ft-social .em {
  color: #374151;
}
.revid-ft-copy {
  border-top: 1px solid var(--border);
  padding: 16px;
  text-align: center;
  font-size: 0.88rem;
  color: #4b5563;
}
.revid-ft-copy strong {
  color: #111827;
}
@media (min-width: 1024px) {
  .revid-ft-in {
    grid-template-columns: 3fr 9fr;
    gap: 32px;
  }
  .revid-ft-cols {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Shared buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: 0.15s;
}
.btn-green {
  background: var(--green);
  color: #fff;
}
.btn-green:hover {
  background: #166534;
  text-decoration: none;
}
.btn-outline {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--green);
}
.btn-outline:hover {
  background: var(--green-light);
  text-decoration: none;
}
.btn-lg {
  padding: 12px 26px;
  font-size: 1rem;
  border-radius: 10px;
}
