.hcp-hospital-grid {
    display: grid;
    gap: 24px;
    margin-top: 30px;
}

/**
 * Dynamic Columns
 */
.hcp-hospital-grid.columns-1 {
    grid-template-columns: repeat(1, 1fr);
}

.hcp-hospital-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.hcp-hospital-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.hcp-hospital-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/**
 * Card
 */
.hcp-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.hcp-card:hover {
    transform: translateY(-5px);
}

/**
 * Image
 */
.hcp-card-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

/**
 * Content
 */
.hcp-card-content {
    padding: 20px;
}

.hcp-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111827;
    line-height: 1.3;
}

.hcp-location {
    color: #6b7280;
    margin-bottom: 16px;
    font-size: 14px;
}

/**
 * Tags
 */
.hcp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hcp-tags span {
    background: #f3f4f6;
    padding: 8px 14px;
    border-radius: 30px;
    font-size: 13px;
    color: #111827;
}

/**
 * Buttons
 */
.hcp-actions {
    padding: 20px;
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.hcp-actions a {
    flex: 1;
    text-align: center;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
}

/**
 * Primary Button
 */
.hcp-actions .hcp-btn-primary {
    background: #2563eb;
    color: white;
}

.hcp-actions .hcp-btn-primary:hover {
    background: #1d4ed8;
}

/**
 * Secondary Button
 */
.hcp-actions .hcp-btn-secondary {
    background: #f3f4f6;
    color: #111827;
}

.hcp-actions .hcp-btn-secondary:hover {
    background: #e5e7eb;
}

/**
 * Tablet
 */
@media(max-width: 1024px) {

    .hcp-hospital-grid.columns-4,
    .hcp-hospital-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/**
 * Mobile
 */
@media(max-width: 767px) {

    .hcp-hospital-grid.columns-4,
    .hcp-hospital-grid.columns-3,
    .hcp-hospital-grid.columns-2,
    .hcp-hospital-grid.columns-1 {
        grid-template-columns: 1fr;
    }

    .hcp-actions {
        flex-direction: column;
    }
}

/* =============================================================================
   Customisable Cards Widget  (.cc- prefix)
   ============================================================================= */

.cc-card-grid {
    display: grid;
    gap: 24px;
    margin-top: 30px;
}

.cc-card-grid.columns-1 { grid-template-columns: repeat(1, 1fr); }
.cc-card-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.cc-card-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.cc-card-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

.cc-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14);
}

.cc-card-image {
    overflow: hidden;
}

.cc-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

.cc-card-image.cc-img-circle img {
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
}

/* Shown instead of the image when a card has no featured/placeholder image
   and "Reserve Space When No Image" is enabled — keeps content aligned with
   sibling cards that do have an image, instead of the content shifting up. */
.cc-card-image-placeholder-inner {
    width: 100%;
    height: 220px;
    background: #f3f4f6;
    display: block;
}

.cc-card-image.cc-img-circle .cc-card-image-placeholder-inner {
    border-radius: 50%;
    margin: 0 auto;
}

.cc-card-content {
    padding: 20px 20px 0;
    flex: 1;
}

/* Restore the bottom padding here only when there's no button row after it —
   when there is one, its own top padding already provides the spacing, so
   both together no longer double up into an oversized gap. */
.cc-card-content:last-child {
    padding-bottom: 20px;
}

.cc-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #111827;
    line-height: 1.3;
}

.cc-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin: 0 0 14px;
}

.cc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.cc-tags span {
    background: #f3f4f6;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 13px;
    color: #374151;
}

.cc-description {
    font-size: 14px;
    color: #374151;
    margin: 0 0 10px;
    line-height: 1.6;
}

.cc-actions {
    padding: 16px 20px;
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.cc-btn-primary,
.cc-btn-secondary {
    flex: 1;
    text-align: center;
    padding: 11px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
}

.cc-btn-primary {
    background: #2563eb;
    color: #ffffff;
}

.cc-btn-primary:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.cc-btn-secondary {
    background: #f3f4f6;
    color: #111827;
}

.cc-btn-secondary:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Loading state */
.cc-card-grid.canasa-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* No results */
.canasa-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
}

.canasa-no-results p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

@media (max-width: 1024px) {
    .cc-card-grid.columns-4,
    .cc-card-grid.columns-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .cc-card-grid.columns-4,
    .cc-card-grid.columns-3,
    .cc-card-grid.columns-2,
    .cc-card-grid.columns-1 { grid-template-columns: 1fr; }

    .cc-actions { flex-direction: column; }
}

/* =============================================================================
   Customisable Cards — Carousel mode
   ============================================================================= */

.cc-carousel-wrapper {
    position: relative;
}

.cc-carousel-track.cc-card-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cc-carousel-track.cc-card-grid::-webkit-scrollbar {
    display: none;
}

.cc-carousel-track.cc-card-grid > .cc-card {
    flex: 0 0 calc((100% - (var(--cc-slides, 3) - 1) * var(--cc-gap, 24px)) / var(--cc-slides, 3));
    scroll-snap-align: start;
}

.cc-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    transition: background-color 0.2s ease;
}

.cc-carousel-arrow:hover {
    background: #f3f4f6;
}

.cc-carousel-prev { left: -20px; }
.cc-carousel-next { right: -20px; }

.cc-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.cc-carousel-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cc-carousel-dots button.cc-dot-active {
    width: 22px;
    background: #2563eb;
}

@media (max-width: 767px) {
    .cc-carousel-prev { left: 4px; }
    .cc-carousel-next { right: 4px; }
}

/* =============================================================================
   Search & Filter Widget
   ============================================================================= */

.canasa-search-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.canasa-search-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

/**
 * Filter group (label + field)
 */
.canasa-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}

.canasa-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: block;
}

.canasa-filter-input,
.canasa-filter-select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.canasa-filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.canasa-filter-input::placeholder {
    color: #9ca3af;
}

.canasa-filter-input:focus,
.canasa-filter-select:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/**
 * Buttons group
 */
.canasa-filter-buttons {
    flex-direction: row;
    flex: 0 0 auto;
    min-width: auto;
}

.canasa-search-btn,
.canasa-reset-btn {
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.canasa-search-btn {
    background: #2563eb;
    color: #ffffff;
}

.canasa-search-btn:hover {
    background: #1d4ed8;
}

.canasa-reset-btn {
    background: #f3f4f6;
    color: #374151;
}

.canasa-reset-btn:hover {
    background: #e5e7eb;
}

/**
 * Loading state
 */
.hcp-hospital-grid.canasa-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/**
 * No results
 */
.canasa-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
}

.canasa-no-results p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/**
 * Responsive – stack filters vertically on small screens
 */
@media (max-width: 767px) {

    .canasa-search-inner {
        flex-direction: column;
    }

    .canasa-filter-group {
        min-width: 100%;
    }

    .canasa-filter-buttons {
        width: 100%;
    }

    .canasa-search-btn,
    .canasa-reset-btn {
        flex: 1;
    }
}