/* === GLOBAL RESET & BASE === */
body {
  font-family: 'Arial', sans-serif;
  background: #fff;
  color: #333;
  margin: 0;
  padding: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
h1, h2, h3, h4 {
  margin: 0.5em 0;
}
strong {
    font-weight: 700;
}

img {
  max-width: 100%;
  height: auto;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
/* === HEADER === */
header {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    box-shadow: 0 0 1px #1515151a, 0 2px 8px -1px #15151533;
    background: #fff;
    padding-bottom: 16px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 15px 0;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding h1 {
  font-size: 24px;
  margin: 0;
}
.site-branding h1 a {
    background: #8d3cff;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    text-align: center;
    margin: 0px;
}

.site-title-mobile {
  display: none;
}

.site-logo-pc,
.site-title-pc {
  display: block;
  width:120px;
}

/* Menu */
.menu-toggle {
  display: none;
  background: #A47BFB;
  color:#fff;
  border: none;
  border-radius: 10px;
  font-size: 28px;
  cursor: pointer;
  margin-left: auto;
}
.main-nav .header-menu ul {
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.main-nav .header-menu li {
  display: block;
}

.main-nav .header-menu li a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.3s;
}

.main-nav .header-menu li a:hover {
  background: #f2f2f2;
  color:#A47BFB ;
}
.search-header {
    background: url(bg.webp);
}
/* Search */
.search-form-container {
    min-width:300px;
}
.search-inline {
  flex: 1;
}
.search-inline form {
  display: flex;
  width: 100%;
}
.styled-search-form {
  position: relative;
  width: 100%;
  max-width: 300px;
}
.search-input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 14px;
}
.search-input::placeholder {
  color: #999;
}
.search-icon-button {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 16px;
  color: #999;
  cursor: pointer;
}
.search-icon-button:hover {
  color: #3c2566;
}
/* === HERO SECTION === */
.hero {
  background: #3c2566;
  color: white;
  padding: 40px 20px;
  text-align: center;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 30px auto 0;
}
.cat-box {
  background: white;
  padding: 15px 20px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-weight: bold;
  transition: all 0.3s ease;
}
.cat-box:hover {
  background: #eae6f8;
  transform: translateY(-2px);
}
.cat-box a {
  color: #3c2566;
}
/* === LATEST NEWS === */
.latest-news {
  padding: 40px 20px;
}
.section-heading {
  font-size: 22px;
  font-weight: bold;
  color: #1a1a3d;
  border-bottom: 1px solid #b1b7c5;
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.latest-news-grid {
  display: flex;
  gap: 20px;
  align-items: stretch;
  flex-wrap: nowrap;
}
.latest-feature-left {
  flex: 0 0 65%;
}
.latest-list-right {
  flex: 0 0 35%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Feature large */
.feature-image-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.feature-image-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}
.feature-overlay {
  position: absolute;
  bottom: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
  color: white;
}
.feature-overlay h3 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 8px;
}
.read-more {
  font-size: 14px;
}

/* Small list */
.latest-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}
.latest-card:hover {
  transform: translateY(-3px);
}
.latest-card .post-category {
  font-size: 11px;
  text-transform: uppercase;
  color: #888;
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
.latest-card h4 {
  font-size: 16px;
  font-weight: bold;
  color: #2c2c54;
}
.latest-card .post-date {
  font-size: 12px;
  color: #888;
}
/* === BLOG POSTS === */
.blog-post {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 25px;
  transition: transform 0.2s ease;
}
.blog-post:hover {
  transform: translateY(-3px);
}
.blog-post-inner {
  display: flex;
  gap: 20px;
  padding: 20px;
}
.blog-thumbnail {
  flex: 0 0 160px;
  height: 120px;
  overflow: hidden;
  border-radius: 8px;
}
.blog-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.blog-content h4 {
  font-size: 18px;
  font-weight: bold;
  color: #2c2c54;
}
.blog-content p {
  font-size: 14px;
  color: #444;
}
.blog-date {
  font-size: 12px;
  color: #888;
  text-align: right;
}
/* === SIDEBAR === */
.sidebar h3 {
  margin-bottom: 15px;
  color: #3c2566;
  font-size: 18px;
}
.related-topics {
  list-style: none;
  padding: 0;
  margin: 0;
}
.related-topics li {
  margin: 20px;
}
.related-topics a {
  color: #333;
  font-weight: 500;
}
.related-topics a:hover {
  color: #8d3cff;
}

/*SIDEBAR*/

.author-box {
  background: #f8f8f8;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 30px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-weight: bold;
  color: #222;
}

.author-date {
  font-size: 13px;
  color: #666;
}

.author-desc {
  font-size: 14px;
  color: #444;
}

.trending-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.trending-rank {
  background: #5b32ff;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  text-align: center;
  line-height: 24px;
  flex-shrink: 0;
}

.trending-thumb img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.trending-thumb {
  flex-shrink: 0;
}

.trending-title {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
}

.trending-title a {
  color: #202124;
  text-decoration: none;
  display: block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trending-title a:hover {
  text-decoration: none;
  color:#5b32ff;
}

/* === FOOTER === */
footer {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    box-shadow: 0 0 1px #1515151a, 0 2px 8px -1px #15151533;
    background: #fff;
    padding-bottom: 16px;
}
.footer-top{
    padding-top:10px;
}
.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}
.footer-column {
  flex: 1;
  min-width: 150px;
}
.footer-widget h4 {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a3d;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
  margin-bottom: 10px;
}
/* === LAYOUT === */
.main-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
}
.content-area {
  flex: 1 1 65%;
}
.sidebar-area {
  flex: 1 1 30%;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
  }

  .main-nav.active {
    display: block;
    margin-top: 10px;
  }

  .main-nav .header-menu ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 cột */
    gap: 10px 20px; /* hàng, cột */
    padding: 10px 15px;
  }

  .main-nav .header-menu li {
    display: block;
  }

  .main-nav .header-menu li a {
    display: block;
    padding: 10px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    text-align: center;
    transition: background 0.2s;
  }

  .main-nav .header-menu li a:hover {
    background: #f0f0f0;
  }
  .site-logo-pc,
  .site-title-pc {
    display: none;
  }

  .site-title-mobile {
    display: block;
    font-size: 20px;
    line-height: 1.2;
    text-align: left;
  }
  .container {
    max-width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }
  /* Header */
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-form-container {
    width: 100%;
  }

  .styled-search-form {
    max-width: 100%;
  }

  /* Hero */
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
    padding: 0 10px;
  }

  /* Latest News */
  .latest-news-grid {
    flex-direction: column;
  }

  .latest-feature-left,
  .latest-list-right {
    flex: 1 1 100%;
  }

  .latest-card {
    padding: 15px;
  }

  /* Blog */
  .blog-post-inner {
    flex-direction: column;
    padding: 15px;
  }

  .blog-thumbnail {
    width: 100%;
    height: 180px;
  }

  .blog-content h4 {
    font-size: 16px;
  }

  .blog-content p {
    font-size: 13px;
  }

  .blog-date {
    font-size: 12px;
  }

  /* Sidebar & Layout */
  .main-area {
    flex-direction: column;
    padding: 0 15px;
  }

  .content-area,
  .sidebar-area {
    flex: 1 1 100%;
  }

  .sidebar-area {
    margin-top: 40px;
  }

  .related-topics li {
    margin: 10px 0;
  }

  /* Footer */
  .footer-columns {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }

  .footer-branding {
    text-align: center;
    width: 100%;
    margin-bottom: 20px;
  }

  .footer-bottom {
    text-align: center;
    padding: 20px;
  }

  /* Buttons */
  .button,
  .learn-more {
    width: 100%;
    text-align: center;
    margin-top: 20px;
  }
}