/* ==========================================================================
   ACF CPT Display - No Crop / Resize Thumbnails + Right Float Layout
   ========================================================================== */

/* General Container */
.acf-cpt-container {
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 15px;
}

.acf-cpt-item {
    background: #ffffff;
    border: 0px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 32px;
}

/* Featured Image - Resized, no crop */
.acf-cpt-thumbnail {
    overflow: hidden;
    background: #f9fafb;           /* subtle background for letterbox areas - optional */
    border-radius: 6px;
}

.acf-cpt-thumbnail img {
    width: 100%;
    height: auto;
    max-height: 280px;             /* prevents very tall images; adjust as needed */
    display: block;
    object-fit: contain;           /* key: full image visible, scaled down */
    border-radius: 6px;
}

/* LIST VIEW - Image floats right */
.acf-cpt-list .acf-cpt-thumbnail {
    float: right;
    width: 38%;
    max-width: 380px;
    margin: 24px 0 24px 32px;
}

.acf-cpt-list .acf-cpt-content {
    padding: 28px 32px;
    overflow: hidden;
}

/* Clearfix */
.acf-cpt-list .acf-cpt-item::after {
    content: "";
    display: table;
    clear: both;
}

/* GRID VIEW */
.acf-cpt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.acf-cpt-grid .acf-cpt-thumbnail {
    margin: 0 0 18px 0;
}

.acf-cpt-grid .acf-cpt-content {
    padding: 20px 24px;
}

/* Meta line: badge + date */
.acf-cpt-meta-line {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.94rem;
    color: #4b5563;
}

.acf-cpt-category-badge {
    font-size: 0.82rem;
    font-weight: 500;
    color: #ffffff;
    background: #3b82f6;
    padding: 4px 12px;
    border-radius: 999px;
    line-height: 1.3;
}

.acf-cpt-date {
    font-size: 0.86rem;
    color: #6b7280;
    font-weight: 400;
    display:none;
}

/* Title on new line */
.acf-cpt-title {
    margin: 0 0 16px 0;
    font-size: 1.58rem;
    line-height: 1.35;
    font-weight: 600;
    color: #111827;
}

.acf-cpt-title a {
    color: inherit;
    text-decoration: none;
}

.acf-cpt-title a:hover,
.acf-cpt-title a:focus {
    color: #2563eb;
    text-decoration: underline;
}

/* Content */
.acf-cpt-excerpt,
.acf-cpt-full-content {
    font-size: 1.02rem;
    line-height: 1.65;
    color: #4b5563;
    margin-bottom: 1.2em;
}

.acf-cpt-full-content p {
    margin: 0 0 1.1em 0;
}


/* Read More link - only after excerpt */
.acf-cpt-read-more {
    display: inline-block;
    margin-top: 14px;
    font-size: 0.96rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    transition: all 0.18s ease;
}

.acf-cpt-read-more:hover,
.acf-cpt-read-more:focus {
    color: #1d4ed8;
    text-decoration: underline;
}

.acf-cpt-mini .acf-cpt-read-more {
    font-size: 0.89rem;
    margin-top: 10px;
}

/* Optional: slight hover effect on the whole item when clickable */
.acf-cpt-item:hover {
    border-color: #cbd5e1;
    transition: border-color 0.2s ease;
}

/* ACF Fields */
.acf-cpt-fields {
    margin-top: 24px;
    padding: 18px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.acf-cpt-fields dt {
    font-weight: 600;
    color: #374151;
    margin-top: 1.1em;
    font-size: 0.98rem;
}

.acf-cpt-fields dt:first-child {
    margin-top: 0;
}

.acf-cpt-fields dd {
    margin: 0.4em 0 1.2em 0;
    line-height: 1.55;
    color: #4b5563;
}

/* MINI variant */
.acf-cpt-mini .acf-cpt-item {
    margin-bottom: 22px;
}

.acf-cpt-mini .acf-cpt-thumbnail {
    width: 30%;
    max-width: 160px;
    margin: 16px 0 16px 24px;
    background: #f9fafb;
}

.acf-cpt-mini .acf-cpt-thumbnail img {
    max-height: 120px;             /* smaller cap for mini */
    object-fit: contain;
}

.acf-cpt-mini .acf-cpt-content {
    padding: 16px 20px;
}

.acf-cpt-mini .acf-cpt-meta-line {
    margin-bottom: 8px;
    gap: 10px;
}

.acf-cpt-mini .acf-cpt-category-badge {
    font-size: 0.74rem;
    padding: 3px 9px;
}

.acf-cpt-mini .acf-cpt-date {
    font-size: 0.78rem;
}

.acf-cpt-mini .acf-cpt-title {
    font-size: 1.28rem;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 840px) {
    .acf-cpt-list .acf-cpt-thumbnail,
    .acf-cpt-mini .acf-cpt-thumbnail {
        float: none;
        width: 100%;
        max-width: none;
        margin: 0 0 20px 0;
    }

    .acf-cpt-list .acf-cpt-content,
    .acf-cpt-mini .acf-cpt-content {
        padding: 22px 24px;
    }

    .acf-cpt-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 480px) {
    .acf-cpt-title {
        font-size: 1.38rem;
    }

    .acf-cpt-mini .acf-cpt-title {
        font-size: 1.18rem;
    }

    .acf-cpt-meta-line {
        gap: 8px;
    }

    .acf-cpt-container {
        padding: 0 10px;
    }
}