/*
Theme Name: SANET AI Network
Theme URI: https://sanet.vn/
Author: SANET
Author URI: https://sanet.vn/
Description: Theme WordPress cho SANET - Smart AI Network, thiet ke trang chu tri thuc, cong cu va AI theo mau SANET.
Version: 1.3.8
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sanet-ai-network
Tags: blog, news, custom-logo, featured-images, responsive-layout
*/

:root {
  --sanet-blue: #2858ff;
  --sanet-blue-2: #4d7dff;
  --sanet-ink: #071127;
  --sanet-text: #25324a;
  --sanet-muted: #75829a;
  --sanet-line: #dde6f4;
  --sanet-bg: #f7fbff;
  --sanet-soft: #eef4ff;
  --sanet-footer: #071d38;
  --sanet-radius: 8px;
  --sanet-container: 1180px;
  --sanet-shadow: 0 16px 42px rgba(33, 67, 126, 0.11);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--sanet-text);
  background: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select { font: inherit; }

.sanet-container {
  width: min(var(--sanet-container), calc(100% - 64px));
  margin-inline: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e7edf7;
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 78px;
  gap: 28px;
}

.site-branding {
  flex: 0 0 142px;
}

.sanet-logo {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 118px;
}

.sanet-logo__word {
  display: flex;
  align-items: center;
  color: var(--sanet-blue);
  font-size: 33px;
  font-weight: 900;
  line-height: .88;
  letter-spacing: 0;
}

.sanet-logo__word span:nth-child(2) { color: #1a78ff; }
.sanet-logo__word span:nth-child(3) { color: #071127; }

.sanet-logo__tag {
  margin-top: 7px;
  color: #6d7b91;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1.4px;
}

.site-nav { flex: 1; }

.site-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  color: #071127;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
}

.site-nav .current-menu-item a,
.site-nav a:hover {
  color: var(--sanet-blue);
  background: #eef3ff;
}

.site-nav .current-menu-item a::after {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -18px;
  height: 2px;
  content: "";
  background: var(--sanet-blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #0d1b35;
  background: #f4f7ff;
  border: 1px solid #e8eefc;
  border-radius: 8px;
  cursor: pointer;
}

.sanet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  color: #fff;
  background: linear-gradient(135deg, #2458ff, #386cff);
  border: 0;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(36, 88, 255, .24);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.menu-toggle { display: none; }

.hero-band {
  overflow: hidden;
  padding: 42px 0 42px;
  background:
    radial-gradient(circle at 74% 26%, rgba(62, 128, 255, .15), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, #eef6ff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(520px, .98fr) minmax(390px, 1.02fr);
  align-items: center;
  gap: 44px;
}

.sanet-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-bottom: 24px;
  padding: 8px 14px;
  color: #1d45b8;
  background: #eef4ff;
  border: 1px solid #dfebff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-title {
  max-width: 660px;
  margin: 0;
  color: #061126;
  font-size: clamp(38px, 3.35vw, 50px);
  line-height: 1.14;
  letter-spacing: 0;
}

.hero-title span { color: var(--sanet-blue); }

.hero-copy {
  max-width: 520px;
  margin: 26px 0 22px;
  color: #263852;
  font-size: 16px;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 54px;
  align-items: center;
  max-width: 500px;
  min-height: 56px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2eaf7;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(31, 62, 119, .12);
}

.hero-search input,
.hero-search select {
  width: 100%;
  height: 56px;
  padding: 0 17px;
  color: #647089;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}

.hero-search select { border-left: 1px solid #e5ebf7; }

.hero-search button {
  width: 54px;
  height: 56px;
  color: #fff;
  background: var(--sanet-blue);
  border: 0;
  font-size: 24px;
  cursor: pointer;
}

.trend-row,
.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.trend-row {
  margin-top: 20px;
  color: #53627a;
  font-size: 13px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 13px;
  color: #41506a;
  background: #f1f5fb;
  border: 1px solid #e4ebf5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-art {
  display: grid;
  place-items: center;
  min-height: 470px;
}

.hero-art img {
  width: min(680px, 100%);
  filter: drop-shadow(0 24px 40px rgba(61, 112, 208, .13));
}

.category-strip {
  margin-top: -6px;
  background: #fff;
}

.category-panel {
  display: grid;
  grid-template-columns: repeat(8, minmax(92px, 1fr));
  gap: 8px;
  padding: 18px 18px 16px;
  background: #fff;
  border: 1px solid var(--sanet-line);
  border-radius: 10px;
  box-shadow: 0 14px 38px rgba(31, 53, 94, .08);
}

.category-item {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 106px;
  padding: 8px 6px;
  text-align: center;
}

.category-icon,
.tool-icon,
.job-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 900;
}

.category-item strong,
.tool-card strong {
  color: #071127;
  font-size: 15px;
  line-height: 1.2;
}

.category-item span,
.tool-card p,
.card-meta,
.footer-copy,
.job-company,
.job-location,
.newsletter-copy {
  color: var(--sanet-muted);
  font-size: 12px;
}

.section-block { padding: 36px 0 0; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-head.compact { margin-bottom: 13px; }

.section-title {
  margin: 0;
  color: #071127;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.view-link {
  color: var(--sanet-blue);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.post-card,
.tool-card,
.topic-card,
.jobs-card,
.newsletter-card,
.content-card {
  background: #fff;
  border: 1px solid var(--sanet-line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 53, 94, .06);
}

.post-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: #cad9f2;
  box-shadow: 0 16px 34px rgba(31, 53, 94, .12);
}

.post-thumb {
  position: relative;
  aspect-ratio: 1.62 / 1;
  min-height: 156px;
  overflow: hidden;
  background: #dbe7ff;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}

.post-card:hover .post-thumb img {
  transform: scale(1.035);
}

.fallback-thumb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #061126, #2458ff);
  font-size: 42px;
  font-weight: 900;
}

.post-badge {
  position: absolute;
  left: 14px;
  bottom: 13px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  color: #1557d9;
  background: #eaf1ff;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(7, 17, 39, .12);
  font-size: 12px;
  font-weight: 900;
}

.post-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 16px 15px;
}

.post-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 15px;
  overflow: hidden;
  color: #08152d;
  font-size: 16px;
  line-height: 1.48;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.featured-meta {
  flex-wrap: nowrap;
  min-width: 0;
  white-space: nowrap;
}

.featured-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-meta span + span::before {
  margin-right: 8px;
  color: #b4bed0;
  content: "•";
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.tool-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  min-height: 136px;
  padding: 18px;
}

.tool-card p {
  min-height: 38px;
  margin: 9px 0 10px;
}

.tool-card a {
  color: var(--sanet-blue);
  font-size: 13px;
  font-weight: 900;
}

.sanet-last { padding-bottom: 28px; }

.bottom-grid {
  display: grid;
  grid-template-columns: 1.03fr 1.03fr .92fr;
  gap: 22px;
}

.topic-card,
.jobs-card,
.newsletter-card { padding: 22px; }

.topic-cloud { margin-top: 16px; }

.job-list {
  display: grid;
  gap: 12px;
}

.job-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf1f7;
}

.job-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.job-title {
  display: block;
  color: #071127;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.job-company,
.job-location { display: inline-block; }

.job-salary {
  padding: 6px 10px;
  color: #0f9f5f;
  background: #e9fbf2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.jobs-more {
  display: block;
  margin-top: 14px;
  text-align: center;
}

.newsletter-card {
  overflow: hidden;
  background: linear-gradient(145deg, #fff, #eef2ff);
}

.newsletter-message {
  margin: 14px 0 0;
  padding: 10px 12px;
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.newsletter-message--exists {
  color: #7c2d12;
  background: #ffedd5;
  border-color: #fed7aa;
}

.newsletter-message--invalid {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: #fecaca;
}

.newsletter-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  min-height: 46px;
  margin-top: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe7f5;
  border-radius: 8px;
}

.newsletter-form input,
.newsletter-form button {
  min-width: 0;
  border: 0;
}

.newsletter-form input {
  padding: 0 14px;
  outline: 0;
}

.newsletter-form button {
  color: #fff;
  background: var(--sanet-blue);
  font-weight: 900;
  cursor: pointer;
}

.newsletter-graphic {
  width: 210px;
  margin: 16px auto 0;
}

.site-footer {
  color: #dce7ff;
  background:
    radial-gradient(circle at 90% 100%, rgba(66, 112, 255, .22), transparent 30%),
    linear-gradient(135deg, #061a33, #071d38);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.55fr repeat(4, 1fr);
  gap: 46px;
  padding: 36px 0 26px;
}

.footer-logo .sanet-logo__word {
  color: #dce7ff;
  font-size: 32px;
}

.footer-logo .sanet-logo__word span:nth-child(3) { color: #fff; }

.footer-logo .sanet-logo__tag,
.footer-copy,
.footer-links a,
.footer-contact li { color: #b8c7df; }

.footer-copy { max-width: 300px; }

.footer-title {
  margin: 0 0 14px;
  color: #fff;
  font-size: 15px;
}

.footer-links,
.footer-contact,
.social-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-contact {
  display: grid;
  gap: 11px;
}

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
}

.copyright {
  padding: 18px 0 22px;
  color: #9fb1cc;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
}

.content-wrap { padding: 44px 0; }
.content-card { padding: 30px; }
.content-card h1 { margin-top: 0; }

.greensm-mid-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 32px 0;
  padding: 22px;
  background:
    radial-gradient(circle at 94% 10%, rgba(18, 183, 106, .22), transparent 34%),
    linear-gradient(135deg, #ecfdf5, #eef6ff);
  border: 1px solid #bdebd5;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(18, 183, 106, .12);
}

.greensm-mid-cta__content {
  min-width: 0;
}

.greensm-mid-cta__eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: #047857;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.greensm-mid-cta strong {
  display: block;
  color: #052e1a;
  font-size: 22px;
  line-height: 1.25;
}

.greensm-mid-cta p {
  margin: 8px 0 0;
  color: #315246;
  font-size: 14px;
}

.greensm-mid-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 20px;
  color: #fff;
  background: linear-gradient(135deg, #00a86b, #12b76a);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(18, 183, 106, .28);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--sanet-line);
  color: var(--sanet-muted);
  font-size: 14px;
  font-weight: 800;
}

.facebook-share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  color: #fff;
  background: #1877f2;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(24, 119, 242, .22);
  font-size: 14px;
  font-weight: 900;
}

.facebook-share-button span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  color: #1877f2;
  background: #fff;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
}
.wp-post-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 22px;
  border-radius: 8px;
}

.single .entry-content img,
.page .entry-content img,
.post-body img,
.wp-block-image img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.single .entry-content figure,
.page .entry-content figure,
.wp-block-image,
.wp-caption {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.archive-hero {
  margin: -44px 0 30px;
  padding: 44px 0 38px;
  background:
    radial-gradient(circle at 82% 20%, rgba(62, 128, 255, .16), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, #eef6ff 100%);
  border-bottom: 1px solid #e6eef9;
}

.archive-hero .sanet-pill {
  margin-bottom: 14px;
}

.archive-title {
  max-width: 760px;
  margin: 0;
  color: #071127;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: 0;
}

.archive-description {
  max-width: 760px;
  margin: 16px 0 0;
  color: #42526d;
  font-size: 17px;
}

.archive-grid {
  margin-top: 0;
}

body.sanet-dark {
  --sanet-ink: #eef5ff;
  --sanet-text: #eef5ff;
  --sanet-muted: #a9b8d1;
  --sanet-line: rgba(255,255,255,.12);
  background: #071127;
  color: #eef5ff;
}

body.sanet-dark .site-header,
body.sanet-dark .post-card,
body.sanet-dark .tool-card,
body.sanet-dark .topic-card,
body.sanet-dark .jobs-card,
body.sanet-dark .newsletter-card,
body.sanet-dark .content-card,
body.sanet-dark .category-panel {
  background: #101e36;
}

body.sanet-dark .hero-band {
  background: linear-gradient(180deg, #0b1730 0%, #071127 100%);
}

body.sanet-dark .section-title,
body.sanet-dark .hero-title,
body.sanet-dark .site-nav a,
body.sanet-dark .post-title,
body.sanet-dark .tool-card strong,
body.sanet-dark .category-item strong,
body.sanet-dark .job-title {
  color: #f5f8ff;
}

@media (max-width: 1120px) {
  .site-nav {
    display: none;
    position: absolute;
    left: 24px;
    right: 24px;
    top: 78px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--sanet-line);
    border-radius: 8px;
    box-shadow: var(--sanet-shadow);
  }

  body.nav-open .site-nav { display: block; }

  .site-nav ul {
    display: grid;
    justify-content: stretch;
  }

  .site-nav a { width: 100%; }
  .site-nav .current-menu-item a::after { display: none; }
  .menu-toggle { display: inline-grid; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .hero-art {
    min-height: 360px;
  }

  .hero-art img {
    width: min(620px, 100%);
  }

  .category-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .post-grid,
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body { font-size: 14px; }

  .sanet-container {
    width: min(100% - 28px, var(--sanet-container));
  }

  .header-inner {
    min-height: 66px;
    gap: 10px;
  }

  .site-branding {
    flex-basis: auto;
    margin-right: auto;
  }

  .sanet-logo__word { font-size: 27px; }
  .sanet-logo__tag { font-size: 10px; }

  .menu-toggle { width: 38px; height: 38px; }

  .hero-band {
    padding: 28px 0 24px;
  }

  .sanet-pill {
    margin-bottom: 18px;
    font-size: 12px;
  }

  .hero-title {
    font-size: 31px;
    line-height: 1.15;
  }

  .hero-copy {
    margin: 18px 0;
    font-size: 15px;
  }

  .hero-search {
    grid-template-columns: 1fr 52px;
    max-width: 100%;
  }

  .hero-search select { display: none; }

  .trend-row {
    align-items: flex-start;
  }

  .hero-art {
    min-height: auto;
    margin-top: 8px;
  }

  .category-strip {
    margin-top: 0;
    padding-top: 16px;
  }

  .category-panel,
  .post-grid,
  .tools-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-item {
    grid-template-columns: 56px 1fr;
    justify-items: start;
    align-items: center;
    min-height: auto;
    text-align: left;
  }

  .category-item span:last-child {
    grid-column: 2;
  }

  .section-block { padding-top: 28px; }

  .section-head {
    align-items: start;
  }

  .section-title { font-size: 22px; }

  .post-title {
    min-height: auto;
  }

  .greensm-mid-cta {
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  .greensm-mid-cta strong {
    font-size: 20px;
  }

  .greensm-mid-cta__button {
    width: 100%;
  }

  .tool-card,
  .job-item {
    grid-template-columns: 52px 1fr;
  }

  .job-salary {
    grid-column: 2;
    justify-self: start;
  }

  .newsletter-form {
    grid-template-columns: 1fr;
  }

  .newsletter-form input,
  .newsletter-form button {
    min-height: 46px;
  }
}
