/* Reset căn bản */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue&display=swap');

@font-face {
  font-family: 'ComicSansCustom';
  src: url('/assets/fonts/Comic Sans MS.ttf') format('truetype');
}
@font-face {
  font-family: 'LdfComicSanslight';
  src: url('/assets/fonts/ldfcomicsans-font/Ldfcomicsanslight-6dZo.ttf') format('truetype');
}

body {
  /* font-family: 'Comic Sans MS', cursive, sans-serif; */
  /* font-family: 'ComicSansCustom', 'Comic Sans MS', cursive, sans-serif; */
  /* font-family: 'Comic Neue', cursive; */
  /* font-family: 'ComicSansCustom'; */
  font-family: 'Fredoka', sans-serif;

  background: #f0fff0;
  color: #333;
  line-height: 1.6;
}

/* Header */
header {
  background: #a8dba8;
  padding: 15px;
}

.logo {
  display: flex;
  align-items: center;
}
.logo img {
  width: 50px;
  animation: bounceIn 1s ease-out;
}
nav ul {
  list-style: none;
  display: flex;
  margin-top: 10px;
}
nav ul li {
  margin-right: 20px;
}
nav ul li a {
  text-decoration: none;
  color: #333;
  transition: color 0.3s;
}
nav ul li a:hover {
  color: #2ecc71;
}

/* Section Hero */
.hero {
  text-align: center;
  padding: 20px 20px;
  background: #d0f0c0;
}
.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}
.hero button {
  padding: 10px 20px;
  background: #28a745;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}
.hero button:hover {
  background: #218838;
  animation: pulse 0.6s infinite;
}

/* Section Posts */
.posts {
  padding: 30px 20px;
}
.posts h2 {
  text-align: center;
  margin-bottom: 20px;
}
.post-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.post {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  width: 300px;
  overflow: hidden;
  transition: transform 0.3s;
}
.post:hover {
  transform: translateY(-5px);
}
.post img {
  width: 100%;
  height: auto;
}
.post h3 {
  font-size: 1.5rem;
  margin: 15px;
}
.post p {
  margin: 15px;
}
.read-more {
  display: block;
  text-align: center;
  margin: 15px;
  text-decoration: none;
  color: #28a745;
  font-weight: bold;
}



/* ===== Animation Styles ===== */

/* Trạng thái ban đầu */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

/* Khi xuất hiện */
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframes */
@keyframes bounceIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
