/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ul,
li,
fieldset,
form,
label,
legend,
caption,
tbody,
tfoot,
thead,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  /* border: 0; */
  font-size: 100%;
  vertical-align: baseline;
  text-decoration: none;
}
h2 {
  font-size: 30px;
}
h3 {
  font-size: 26px;
}
h4 {
  font-size: 22px;
  padding-bottom: 10px;
}
tr,
th,
td {
  margin-bottom: 20px;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
  padding-top: 100px;
}
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
  margin-bottom: 25px;
}
.latest-posts {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.latest-posts__wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
}

.latest-posts__image {
  position: relative;
  flex: 1 1 55%;
  margin-bottom: 60px;
}

.latest-posts__image img {
  width: 100%;
  height: 450px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  transition: opacity 0.4s ease;
}

.latest-posts__nav {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.latest-posts__nav button {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  padding: 8px 14px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.3s ease;
}
.latest-posts__nav button:hover {
  background: #333;
  color: #fff;
}

.latest-posts__content {
  flex: 1 1 40%;
}

#main-post-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #333;
  line-height: 1.5;
}

.latest-posts__content p {
  font-size: 16px;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.6;
}

.latest-posts__date {
  font-size: 14px;
  color: #777;
  margin-bottom: 20px;
}

.latest-posts__thumbnails {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.latest-posts__thumbnails img {
  width: calc((100% - 24px) / 4);
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.latest-posts__thumbnails img.active,
.latest-posts__thumbnails img:hover {
  opacity: 1;
  transform: scale(1.05);
}
@media (min-width: 1024px) {
  .latest-posts__content {
    padding-top: 100px;
  }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .latest-posts {
    margin-top: 20px;
  }
  .latest-posts__content {
    padding-top: 0 !important;
  }
}
@media (min-width: 1280px) {
  .latest-posts__wrapper {
    flex-wrap: nowrap; /* Bắt buộc KHÔNG rớt dòng */
  }

  .latest-posts__image {
    flex: 0 0 calc(55% - 20px);
    max-width: calc(55% - 20px);
    margin-bottom: 0;
  }

  .latest-posts__content {
    flex: 0 0 calc(45% - 20px);
    max-width: calc(45% - 20px);
  }
  .latest-posts__nav {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
  }
}

#main-post-image {
  visibility: hidden;
}
#main-post-image.loaded {
  visibility: visible;
}
