/* ========== Reset cơ bản ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  line-height: 1.6;
  color: #333;
  background: #fafafa;
}

/* ========== Header ========== */
header {
  background: #1e1e2f;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
  color: #00c4ff;
}

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, #00c4ff, #7d2ae8);
  color: #fff;
  text-align: center;
  padding: 70px 20px;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.hero .btn {
  display: inline-block;
  background: #fff;
  color: #7d2ae8;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s;
}

.hero .btn:hover {
  background: #00c4ff;
  color: #fff;
}

/* ========== Main Layout ========== */
main {
  display: flex;
  padding: 20px;
  max-width: 1100px;
  margin: auto;
  gap: 20px;
}

/* ========== Posts Section ========== */
.posts {
  flex: 3;
}
.posts .map {
  width: 100%;
  height: 450px;
  border: 0;
  border-radius: 12px;
  margin-top: 15px;
}
.posts h2 {
  margin-bottom: 15px;
  color: #7d2ae8;
}

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ddd;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.post-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-card h3 {
  padding: 15px;
  font-size: 1.2rem;
  color: #333;
}

.post-card h3 a {
  text-decoration: none;
  color: #7d2ae8;
}

.post-card p {
  padding: 0 15px 15px;
  font-size: 0.95rem;
  color: #555;
}

.post-card .read-more {
  display: block;
  text-align: right;
  padding: 10px 15px;
  color: #00c4ff;
  font-weight: bold;
  text-decoration: none;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* ========== Sidebar ========== */
aside {
  flex: 1;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #ddd;
  height: fit-content;
}

.widget {
  margin-bottom: 25px;
}

.widget h3 {
  margin-bottom: 10px;
  color: #00c4ff;
}

/* Search box */
.widget.search form {
  display: flex;
  gap: 10px;
}

.widget.search input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.widget.search button {
  padding: 8px 12px;
  border: none;
  background: #7d2ae8;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.widget.search button:hover {
  background: #00c4ff;
}

/* Sidebar list */
aside ul {
  list-style: none;
}

aside ul li {
  padding: 6px 0;
  border-bottom: 1px dashed #ddd;
}

aside ul li a {
  color: #333;
  text-decoration: none;
  transition: 0.3s;
}

aside ul li a:hover {
  color: #7d2ae8;
}

/* ========== Footer ========== */
footer {
  background: #1e1e2f;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 30px;
}

footer a {
  color: #00c4ff;
  text-decoration: none;
  margin: 0 5px;
}

footer a:hover {
  text-decoration: underline;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  main {
    flex-direction: column;
  }

  nav ul {
    flex-direction: column;
    background: #2a2a3d;
    position: absolute;
    top: 60px;
    right: 0;
    display: none;
    width: 200px;
  }

  nav ul li {
    margin: 15px;
  }
}
