/* catalog preview styling */
#catalog-preview-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: var(--ms-navbar-height);
    width: 100%;
}

.cp-header {
    text-align: center;
    margin-bottom: 3rem;
}

.cp-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #00002D;
    margin-bottom: 1rem;
}

.cp-subtitle {
    font-size: 1.15rem;
    color: #6b7280;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.cp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2.5rem;
}

.cp-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
    cursor: pointer;
    position: relative;
    transform-origin: center bottom;
}

.cp-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Carousel Styling */
.cp-carousel-container {
    position: relative;
    height: 300px;
    background-color: #f8fafc;
    overflow: hidden;
}

.cp-carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
}

.cp-carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.cp-image {
    width: 100%;
    height: 90%;
    object-fit: contain;
    transition: transform 0.5s ease;
}



.cp-placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #94a3b8;
}

/* Carousel Controls */
.cp-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #00002D;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    font-weight: bold;
}

.cp-card:hover .cp-carousel-btn {
    opacity: 1;
}

.cp-carousel-btn:hover {
    background: #06ABEB;
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.cp-carousel-prev {
    left: 12px;
}

.cp-carousel-next {
    right: 12px;
}

/* Card Content */
.cp-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding-top: 0.5rem;
}

.cp-source-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background-color: rgba(6, 171, 235, 0.08);
    color: #06ABEB;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    align-self: flex-start;
    border: 1px solid rgba(6, 171, 235, 0.2);
}

.cp-dataset-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #00002D;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cp-dataset-desc {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Footer / Meta specs */
.cp-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    margin-bottom: 1.5rem;
}

.cp-meta-item {
    display: flex;
    flex-direction: column;
}

.cp-meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 0.4rem;
    letter-spacing: 0.05em;
}

.cp-meta-value {
    font-size: 0.85rem;
    color: #334155;
    font-weight: 600;
}

.cp-spatial-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.cp-spatial-tag {
    background: rgba(220, 41, 141, 0.05);
    border: 1px solid rgba(220, 41, 141, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #DC298D;
    font-weight: 500;
    text-transform: capitalize;
}

/* Action Button */
.cp-action-btn {
    display: block;
    width: 100%;
    padding: 0.9rem;
    text-align: center;
    background-color: transparent;
    color: #06ABEB;
    border: 2px solid #06ABEB;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    margin-top: auto;
}

.cp-card:hover .cp-action-btn {
    background-color: #06ABEB;
    color: #ffffff;
}

/* Carousel indicator dots */
.cp-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 3;
}

.cp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cp-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.cp-dot.active {
    background: #ffffff;
    transform: scale(1.3);
}

/* Search / Filter bar */
.cp-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
}

.cp-search-input {
    padding: 1rem 1.5rem;
    border-radius: 9999px;
    border: 2px solid #e2e8f0;
    width: 100%;
    max-width: 450px;
    background-color: #f8fafc;
    outline: none;
    transition: all 0.3s ease;
    font-size: 1.05rem;
}

.cp-search-input:focus {
    border-color: #06ABEB;
    background-color: #ffffff;
    box-shadow: 0 4px 20px rgba(6, 171, 235, 0.15);
}

.cp-count {
    font-size: 1rem;
    color: #475569;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cp-count::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #06ABEB;
}

/* Skeleton Loaders */
.cp-skeleton {
    cursor: default;
}

.cp-skeleton:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

@keyframes skeletonPulse {
    0% {
        background-color: #e2e8f0;
    }

    50% {
        background-color: #f1f5f9;
    }

    100% {
        background-color: #e2e8f0;
    }
}

.cp-skeleton-pulse {
    animation: skeletonPulse 1.5s infinite ease-in-out;
    background-color: #e2e8f0;
}

.cp-skeleton-badge {
    width: 80px;
    height: 24px;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
}

.cp-skeleton-title {
    width: 85%;
    height: 28px;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.cp-skeleton-desc {
    width: 100%;
    height: 14px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.cp-skeleton-label {
    width: 70px;
    height: 12px;
    border-radius: 3px;
    margin-bottom: 0.4rem;
}

.cp-skeleton-value {
    width: 90px;
    height: 16px;
    border-radius: 4px;
}

.cp-skeleton-btn {
    width: 100%;
    height: 48px;
    border-radius: 8px;
    margin-top: auto;
}