/* Blog Hub Specific Layout - Grid of Square Cards */

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 3.5rem;
}

.hub-grid .hub-card {
    aspect-ratio: 1 / 1.1; /* slightly rectangular to accommodate icon, text and button */
    min-height: 380px;
    border-radius: 20px;
    justify-content: flex-start;
    padding: 2.5rem 2rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Premium Icon styling inside cards */
.hub-grid .hub-card .card-icon {
    color: var(--primary);
    background: rgba(234, 88, 12, 0.06);
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hub-grid .hub-card:hover .card-icon {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.2);
}

.hub-grid .hub-card h3 {
    margin-bottom: 0.85rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.hub-grid .hub-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 6; /* limit lines to keep card neat */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Slick Read More Button */
.hub-grid .hub-card .read-more-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    align-self: flex-start;
    margin-top: auto;
    z-index: 5;
}

.hub-grid .hub-card .read-more-btn:hover {
    color: var(--primary-dark, #c2410c);
}

.hub-grid .hub-card .read-more-btn::after {
    content: '↓';
    font-size: 1rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

/* Expanded Card State overrides */
.hub-grid .hub-card.expanded {
    aspect-ratio: auto !important;
    min-height: auto !important;
    height: auto !important;
}

.hub-grid .hub-card.expanded p {
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
}

.hub-grid .hub-card.expanded .read-more-btn::after {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .hub-grid {
        grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
        gap: 1.5rem;
    }
    .hub-grid .hub-card {
        min-height: 360px;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hub-grid .hub-card {
        aspect-ratio: auto;
        min-height: auto;
    }
    .hub-grid .hub-card p {
        -webkit-line-clamp: unset;
    }
}
