/**
 * Category Grid Block Frontend Styles
 */

/* Category Grid Container */
.zonkey-category-grid {
    margin-bottom: 2rem;
}

/* Category Card */
.category-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all var(--transition-speed, 0.3s) ease;
    height: 100%;
    background-color: #ffffff;
}

.category-card.rounded {
    border-radius: 8px;
}

.category-card.has-shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

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

/* Card Media (Image) */
.category-card-media {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background-color: #f3f4f6;
}

.category-card-media a {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.category-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform var(--transition-speed, 0.3s) ease;
}

.category-card.has-hover:hover .category-card-image {
    transform: scale(1.05);
}

/* Card Body */
.category-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-card-title {
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.category-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed, 0.3s) ease;
}

.category-card-title a:hover {
    color: var(--color-primary, #2563eb);
}

.category-card-description {
    font-size: 0.938rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
    color: inherit;
    opacity: 0.9;
}

.category-card-description p {
    margin: 0 0 0.75rem 0;
}

.category-card-description p:last-child {
    margin-bottom: 0;
}

.category-card-count {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Card Footer / Link */
.category-card-footer {
    margin-top: auto;
}

/* Button styles are handled by buttons.css */
.category-card-link {
    /* Minimal positioning only - button styles come from .btn classes */
}

/* Responsive */
@media (max-width: 768px) {
    .category-card-title {
        font-size: 1.125rem;
    }

    .category-card-body {
        padding: 1.25rem;
    }

    .category-card-description {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .category-card-title {
        font-size: 1rem;
    }

    .category-card-body {
        padding: 1rem;
    }

    .category-card-link {
        width: 100%;
        text-align: center;
    }
}

/* Disable animations if requested */
.disable-animations .category-card,
.disable-animations .category-card-image {
    transition: none !important;
}

.disable-animations .category-card.has-hover:hover {
    transform: none;
}

.disable-animations .category-card.has-hover:hover .category-card-image {
    transform: none;
}
