/* Priority Custom Page Cards Grid & Styling v1.0.3 */

.priority-cards-grid {
    display: grid;
    gap: 24px;
    width: 100%;
    margin-bottom: 30px;
    box-sizing: border-box;
}

/* Card Styling */
.priority-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.priority-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.priority-card__link {
    display: flex;
    text-decoration: none;
    color: inherit;
    height: 100%;
    box-sizing: border-box;
}

.priority-card__link:hover {
    text-decoration: none;
    color: inherit;
}

.priority-card__image-wrap {
    overflow: hidden;
    background-color: #f7fafc;
    flex-shrink: 0;
}

.priority-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.priority-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.priority-card__title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1a202c;
}

.priority-card__text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #4a5568;
    margin: 0;
}

/* Vertical Layout */
.priority-layout-vertical .priority-card__link {
    flex-direction: column;
}

.priority-layout-vertical .priority-card__image-wrap {
    width: 100%;
    height: 220px;
}

/* Horizontal Layout */
.priority-layout-horizontal .priority-card__link {
    flex-direction: row;
    align-items: stretch;
}

.priority-layout-horizontal .priority-card__image-wrap {
    width: 40%;
    min-width: 160px;
    max-width: 240px;
}

/* Responsive Columns */

/* Desktop (> 992px) */
@media (min-width: 993px) {
    .cols-desktop-1 { grid-template-columns: repeat(1, 1fr); }
    .cols-desktop-2 { grid-template-columns: repeat(2, 1fr); }
    .cols-desktop-3 { grid-template-columns: repeat(3, 1fr); }
    .cols-desktop-4 { grid-template-columns: repeat(4, 1fr); }
    .cols-desktop-6 { grid-template-columns: repeat(6, 1fr); }
}

/* Tablet (768px - 992px) */
@media (min-width: 768px) and (max-width: 992px) {
    .cols-tablet-1 { grid-template-columns: repeat(1, 1fr); }
    .cols-tablet-2 { grid-template-columns: repeat(2, 1fr); }
    .cols-tablet-3 { grid-template-columns: repeat(3, 1fr); }
    .cols-tablet-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Mobile (< 767px) */
@media (max-width: 767px) {
    .cols-mobile-1 { grid-template-columns: repeat(1, 1fr); }
    .cols-mobile-2 { grid-template-columns: repeat(2, 1fr); }
    
    /* Auto-collapse horizontal cards on mobile for readability */
    .priority-layout-horizontal .priority-card__link {
        flex-direction: column;
    }
    .priority-layout-horizontal .priority-card__image-wrap {
        width: 100%;
        max-width: 100%;
        height: 180px;
    }
}
