.xperia-blog-hero-image {
  width: 100%;
  max-width: 1240px;
  margin: 40px auto;
  overflow: hidden;
}

.xperia-blog-hero-image img {
  width: 100%;
  height: 494px;
  object-fit: cover;
  display: block;
}

@media (max-width: 1240px) {
  .xperia-blog-hero-image {
    border-radius: 12px;
    padding: 0 20px;
  }
  .xperia-blog-hero-image img {
    height: auto;
  }
}

.xperia-blog-content-body {
  max-width: 1040px;
  margin: 0 auto;
  font-family: "Inter", sans-serif;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  line-height: 1.6;
}

.xperia-blog-content-body h2,
.xperia-blog-content-body h3 {
  color: #ffffff;
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: 500;
}

.related-blogs-section {
  max-width: 1240px;
  margin: 80px auto;
  padding: 0 20px;
}

.related-main-title {
  font-family: "Inter", sans-serif;
  font-size: 32px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 40px;
}

.blog-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #1e1e1e, #141414);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-img {
  height: 260px;
  overflow: hidden;
}

.blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.4s;
}

.blog-card:hover .blog-img img {
  transform: scale(1.08);
}

.blog-content {
  padding: 24px 20px 32px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-content h3 {
  color: #fff;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  margin-bottom: 0;
}

.blog-desc {
  margin-top: 16px;
  color: #aaaaaa;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 160%;
  flex-grow: 1;
}

.blog-btn {
  margin-top: 24px;
  color: #5edace;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  display: inline-block;
}

.blog-btn::after {
  content: " >";
  display: inline-block;
  transition: 0.3s;
}

.blog-card:hover .blog-btn::after {
  transform: translateX(6px);
}

/* Responsive */
@media (max-width: 1024px) {
  .blog-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .blog-container {
    grid-template-columns: 1fr;
  }
}

/* Container Spacing */
.related-blogs-section {
  max-width: 1240px;
  margin: 80px auto;
  padding: 0 20px;
}

/* Grid Layout */
.related-blogs-section .blog-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

/* Card Styling */
.related-blogs-section .blog-card {
  background: linear-gradient(180deg, #1e1e1e, #141414);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
}

.related-blogs-section .blog-img {
  width: 100%;
  height: 240px;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.related-blogs-section .blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content Area */
.related-blogs-section .blog-content {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.related-blogs-section .blog-content h3 {
  font-size: 20px;
  color: #ffffff;
  line-height: 1.3;
  margin: 0 0 12px 0;
  min-height: 52px;
}

.related-blogs-section .blog-desc {
  font-size: 14px;
  color: #aaaaaa;
  line-height: 1.6;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

/* Button */
.related-blogs-section .blog-btn {
  color: #5edace;
  font-size: 16px;
  font-weight: 500;
  margin-top: auto;
}

/* =========================
   GLOBAL FIX
   ========================= */
* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

/* =========================
   TABLET (1024px)
   ========================= */
@media (max-width: 1024px) {
  .xperia-blog-hero-image {
    margin: 30px auto;
    padding: 0 20px;
  }

  .xperia-blog-content-body {
    padding: 0 20px;
    font-size: 16px;
  }

  .related-blogs-section {
    margin: 60px auto;
    padding: 0 20px;
  }

  .blog-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .blog-img {
    height: 220px;
  }
}

/* =========================
   MOBILE (768px)
   ========================= */
@media (max-width: 768px) {
  .xperia-blog-hero-image {
    margin: 20px auto;
    padding: 0 15px;
  }

  .xperia-blog-content-body {
    padding: 0 15px;
    font-size: 15px;
  }

  .related-blogs-section {
    margin: 50px auto;
    padding: 0 15px;
  }

  .related-main-title {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .blog-container {
    grid-template-columns: 1fr; /*  card */
    justify-items: center; /*  center */
    gap: 16px;
  }

  .blog-card {
    width: 100%;
    max-width: 360px; /*  center feel */
  }

  .blog-img {
    height: 200px;
  }

  .blog-content {
    padding: 20px 16px;
  }

  .blog-content h3 {
    font-size: 18px;
  }

  .blog-desc {
    font-size: 14px;
  }

  .blog-btn {
    font-size: 14px;
  }
}

/* =========================
   SMALL MOBILE (480px)
   ========================= */
@media (max-width: 480px) {
  .blog-card {
    max-width: 100%; /* full width on very small screens */
  }

  .blog-img {
    height: 180px;
  }

  .related-main-title {
    font-size: 22px;
  }
}
