/* ================= RESET ================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

/* ================= BLOG HERO ================= */
.blog-hero {
  padding: 90px 20px;
  background: linear-gradient(rgba(15,23,42,0.88), rgba(15,23,42,0.88)),
              url('../hero.png') center/cover no-repeat;
  color: #fff;
  text-align: center;
}

.blog-hero h1 {
  font-size: 44px;
  font-family: 'Poppins', sans-serif;
  margin-bottom: 12px;
}

.blog-hero p {
  max-width: 700px;
  margin: auto;
  opacity: 0.9;
}

/* ================= BLOG SECTION ================= */
.blog-section {
  padding: 70px 0;
}

/* ================= BLOG GRID ================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* ✅ 3 cards desktop */
  gap: 32px;
}

/* ================= BLOG CARD ================= */
.blog-card {
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 12px 35px rgba(0,0,0,0.08);
  transition: all 0.35s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 70px rgba(0,0,0,0.18);
}

/* IMAGE */
.blog-card img {
  width: 100%;
  height: 240px;                /* SAME HEIGHT */
  object-fit: cover;            /* AUTO CROP */
  display: block;
}

/* CONTENT */
.blog-info {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-info h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-info p {
  font-size: 15px;
  color: #475569;
  line-height: 1.7;
  flex-grow: 1;                 /* equal height cards */
}

.read-more {
  margin-top: 16px;
  font-weight: 600;
  color: #0ea5e9;
  font-size: 14px;
}

/* ================= FULL SCREEN MODAL ================= */
.blog-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.blog-modal.active {
  display: flex;
}

.modal-box {
  width: 95%;
  max-width: 1000px;
  height: 95vh;
  background: #ffffff;
  border-radius: 22px;
  overflow-y: auto;
  position: relative;
  animation: modalZoom 0.3s ease;
}

/* Image */
.modal-box img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

/* Text */
.modal-content {
  padding: 30px;
}

.modal-content h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 32px;
  margin-bottom: 18px;
}

.modal-content p {
  font-size: 16px;
  line-height: 1.9;
  color: #334155;
  white-space: pre-line; /* IMPORTANT: show full content */
}

/* Close */
.close-modal {
  position: fixed;
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  font-size: 28px;
  line-height: 42px;
  text-align: center;
  cursor: pointer;
  z-index: 100000;
}

/* Animation */
@keyframes modalZoom {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Mobile */
@media (max-width: 576px) {
  .modal-box img {
    height: 260px;
  }

  .modal-content h2 {
    font-size: 24px;
  }
}

/* ================= RESPONSIVE ================= */

/* TABLET */
@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 cards */
  }

  .blog-hero h1 {
    font-size: 36px;
  }
}

/* MOBILE */
@media (max-width: 576px) {
  .blog-grid {
    grid-template-columns: 1fr; /* 1 card */
  }

  .blog-card img {
    height: 220px;
  }

  .modal-box img {
    height: 260px;
  }

  .blog-hero h1 {
    font-size: 30px;
  }
}
