/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ================================================================
   ARCHIVE & BLOG GRID CARD STYLING (GPLAstra Directory)
   ================================================================ */

/* ── Card Container ─────────────────────────────────────────── */
.entries[data-layout="grid"] .entry-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px -2px rgba(17, 24, 39, 0.04);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 0;
}

/* Card Hover Lift */
.entries[data-layout="grid"] .entry-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(17, 24, 39, 0.08), 0 4px 8px -2px rgba(17, 24, 39, 0.03);
    border-color: #cbd5e1;
}

/* ── Shimmer Skeleton Loading Animation on Thumbnail ─────────── */
@keyframes gpa-skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.entries[data-layout="grid"] .entry-card .ct-media-container {
    overflow: hidden;
    position: relative;
    aspect-ratio: 73 / 50;
    background: #eef2f6 linear-gradient(
        90deg,
        #eef2f6 0%,
        #f8fafc 40%,
        #e2e8f0 60%,
        #eef2f6 100%
    );
    background-size: 200% 100%;
    animation: gpa-skeleton-shimmer 1.6s ease-in-out infinite;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0 !important;
}

/* Thumbnail initially hidden while skeleton is active */
.entries[data-layout="grid"] .entry-card .ct-media-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.35s ease-in-out, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When loaded, fade in smoothly and stop skeleton */
.entries[data-layout="grid"] .entry-card .ct-media-container.is-loaded {
    animation: none;
    background: #f8fafc;
}

.entries[data-layout="grid"] .entry-card .ct-media-container.is-loaded img,
.entries[data-layout="grid"] .entry-card .ct-media-container img.is-loaded {
    opacity: 1;
}

/* Fallback for no-js environments / search crawlers */
.no-js .entries[data-layout="grid"] .entry-card .ct-media-container img {
    opacity: 1;
}

/* Interactive hover zoom after image is loaded */
.entries[data-layout="grid"] .entry-card:hover .ct-media-container.is-loaded img {
    transform: scale(1.025);
}

/* ── Category Pill Badge ─────────────────────────────────────── */
.entries[data-layout="grid"] .entry-card .entry-meta[data-id="t_SJ06"],
.entries[data-layout="grid"] .entry-card .entry-meta:first-of-type {
    margin: 10px 14px 4px !important;
    padding: 0 !important;
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 6px;
    position: relative;
    z-index: 2;
}

.entries[data-layout="grid"] .entry-card .meta-categories[data-type="pill"] a {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #dbeafe;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: capitalize;
    padding: 3px 11px;
    border-radius: 20px;
    line-height: 1.4;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.entries[data-layout="grid"] .entry-card .meta-categories[data-type="pill"] a:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Themes category variant (soft purple) */
.entries[data-layout="grid"] .entry-card.category-wordpress-themes .meta-categories[data-type="pill"] a {
    background: #f5f3ff;
    color: #7c3aed;
    border-color: #ede9fe;
}

.entries[data-layout="grid"] .entry-card.category-wordpress-themes .meta-categories[data-type="pill"] a:hover {
    background: #7c3aed;
    color: #ffffff;
    border-color: #7c3aed;
}

/* ── Post Title ──────────────────────────────────────────────── */
.entries[data-layout="grid"] .entry-card .entry-title {
    margin: 4px 14px 6px !important;
    padding: 0 !important;
    text-align: center;
}

.entries[data-layout="grid"] .entry-card .entry-title a {
    transition: color 0.15s ease;
}

.entries[data-layout="grid"] .entry-card:hover .entry-title a {
    color: #2563eb;
}

/* Whole-card clickability (stretched link) */
.entries[data-layout="grid"] .entry-card .entry-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* ── Updated Date Stamp ──────────────────────────────────────── */
.entries[data-layout="grid"] .entry-card .entry-meta[data-id="H3peYF"],
.entries[data-layout="grid"] .entry-card .entry-meta:last-of-type {
    margin: 4px 14px 12px !important;
    padding: 0 !important;
    list-style: none;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.entries[data-layout="grid"] .entry-card .meta-updated-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.entries[data-layout="grid"] .entry-card .meta-updated-date svg {
    width: 13px;
    height: 13px;
    fill: #94a3b8;
    flex-shrink: 0;
}

.entries[data-layout="grid"] .entry-card .meta-updated-date time::before {
    content: "Updated ";
    color: #94a3b8;
    font-weight: 400;
}
