/* Skyward Tutors Blog Grid Styling */
.skyward-blog-grid {
    padding: 60px 20px;
    background: #ffffff;
}

.skyward-blog-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.skyward-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: flex-start;
}

/* Each blog card */
.skyward-card {
    flex: 1 1 calc(25% - 20px);
    /* 4 columns with gaps */
    min-width: 250px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    box-sizing: border-box;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skyward-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Image area */
.skyward-card figure {
    width: 100%;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    margin: 0;
    border-radius: 6px 6px 0 0;
}

/* Post title */
.skyward-card h3.skyward-title {
    color: #000000;
    font-size: 18px;
    margin: 15px 15px 10px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.skyward-card:hover h3.skyward-title {
    color: #ED3237;
}

/* Excerpt or description */
.skyward-card .skyward-excerpt {
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 15px 15px;
    flex-grow: 1;
}

/* Button area */
.skyward-btn-wrapper {
    margin: 10px 15px 15px;
}

.skyward-btn {
    display: inline-block;
    background: #000000;
    color: #ffffff;
    padding: 8px 16px;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.skyward-btn:hover {
    background: #ED3237;
}

/* Pagination */
.skyward-pagination {
    text-align: center;
    margin-top: 30px;
}

.skyward-page-btn {
    background: #000000;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 8px 14px;
    margin: 0 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.skyward-page-btn:hover,
.skyward-page-btn.active {
    background: #ED3237;
}


/* Landscape tablet: 2 columns */
@media (max-width: 1024px) {
    .skyward-card {
        flex: 1 1 calc(50% - 20px);
    }
}

/* Portrait tablet and smaller: 1 column */
@media (max-width: 768px) {
    .skyward-card {
        flex: 1 1 100%;
    }
}

/* === Skyward AJAX Spinner Overlay === */
.skyward-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6); /* translucent overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

/* make sure the parent is relatively positioned */
#skyward-blog-grid {
  position: relative;
}

/* the spinning circle */
.skyward-spinner .spinner-inner {
  width: 50px;
  height: 50px;
  border: 4px solid #000000;      /* black border */
  border-top-color: #ED3237;      /* red top segment */
  border-radius: 50%;
  animation: skyward-spin 1s linear infinite;
}

@keyframes skyward-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}