/* =========================================================
   GRID LAYOUT — EVEN ROWS ON ALL DEVICES
   Desktop: 4 cols | Tablet: 2 cols | Mobile: 1 col
========================================================= */
.hydrostor-blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Desktop: 4 cards per row */
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Tablet (Divi breakpoint: below 981px) → 2 columns */
@media (max-width: 980px) {
  .hydrostor-blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (< 600px) → 1 column */
@media (max-width: 600px) {
  .hydrostor-blog-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   CARD BASE
========================================================= */
.hydrostor-card {
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

/* Newly loaded cards animation */
.hydrostor-card.is-new {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.5s forwards ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   HEADER (category + date)
========================================================= */
.hydrostor-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  background: #f2f2f2;
  border-radius: 6px;
}

.hydrostor-cat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: #333;
  padding: 0.1rem 0.75rem;
}

.hydrostor-cat .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.hydrostor-card-header .post-date {
  color: #444;
  padding: 0.1rem 0.75rem;
  font-weight: 500;
  font-size: 0.85rem;
}

/* =========================================================
   THUMBNAIL
========================================================= */
.hydrostor-thumb {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.hydrostor-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

/* Responsive thumbnail height */
@media (max-width: 768px) {
  .hydrostor-thumb img {
    height: 160px;
  }
}

/* =========================================================
   TITLE + EXCERPT
========================================================= */
.hydrostor-title {
  font-size: 1.05rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.hydrostor-title a {
  text-decoration: none;
  color: #0c284c;
  font-weight: 400;
}

.hydrostor-title a:hover {
  text-decoration: underline;
}

.hydrostor-excerpt {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.5;
  display: none;
}

/* =========================================================
   CATEGORY FILTER DROPDOWN
========================================================= */
.hydrostor-blog-filter {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.hydrostor-blog-filter select.hydrostor-category-filter {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #1c2a43;
  color: #f1f4fa;
  font-size: 0.8rem;
  border: 1px solid #2e405f;
  border-radius: 100px;
  padding: 1rem 2.75rem 1rem 1.5rem;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 400;
  transition:
    background 0.25s ease,
    border-color 0.25s ease;
}

.hydrostor-blog-filter select.hydrostor-category-filter:hover,
.hydrostor-blog-filter select.hydrostor-category-filter:focus {
  background-color: #243759;
  border-color: #3f5680;
  outline: none;
}

/* Custom arrow */
.hydrostor-blog-filter::after {
  content: '▾';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #f1f4fa;
  font-size: 0.9rem;
}

/* =========================================================
   LOAD MORE BUTTON
========================================================= */
.hydrostor-loadmore-wrap {
  text-align: center;
  margin-top: 2rem;
}

.hydrostor-loadmore {
  background: #0c284c;
  color: #fff;
  font-size: 0.9em;
  text-transform: uppercase;
  font-weight: 400;
  padding: 1rem 1.75rem;
  border: 0;
  border-radius: 100px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.hydrostor-loadmore:hover {
  background: #29abe2;
  color: #0c284c;
  transform: translateY(-1px);
}

.hydrostor-loadmore[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* =========================================================
   OPTIONAL LOADING TEXT
========================================================= */
.hydrostor-loading {
  text-align: center;
  color: #0c284c;
  margin: 0.75rem 0;
}

/* --- MOBILE CARD MIN HEIGHT FIX --- */
@media (max-width: 600px) {
  .hydrostor-thumb img {
    height: 300px !important;
    /* taller image on mobile */
  }
}
