/*
 * Stylesheet for the Case Studies Hub Page
 */

/* 1. Page Layout & Header */
.page-template-template-case-studies-archive .site-content .ast-container {
    max-width: 100%;
    padding: 0;
}
.page-template-template-case-studies-archive .entry-header {
    display: none; /* Hides the default page title from Astra */
}

.cs-hub-main {
    background-color: var(--background-color);
}

.cs-hub-header {
    padding: 80px 0;
    text-align: center;
    background-color: var(--white-color);
    border-bottom: 1px solid var(--border-color);
}
.cs-hub-header .container {
    max-width: 800px;
}
.cs-hub-header .section-title {
    margin-bottom: 1rem;
}

.cs-hub-grid-section {
    padding: 80px 0;
}

/* 2. Case Study Grid */
.cs-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2.5rem;
}

.cs-hub-card {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Ensures content respects border-radius */
}

.cs-hub-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.cs-hub-card-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--light-gray);
}

.cs-hub-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cs-hub-card:hover .cs-hub-card-thumbnail img {
    transform: scale(1.05);
}

.cs-hub-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes card content fill available space */
}

.cs-hub-card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    line-height: 1.3;
}

.cs-hub-card-excerpt {
    color: var(--medium-gray);
    flex-grow: 1; /* Pushes the CTA to the bottom */
    margin-bottom: 1.5rem;
}

.cs-hub-card-cta {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    margin-top: auto; /* Aligns CTA at the bottom */
}

.cs-hub-card-cta::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.cs-hub-card:hover .cs-hub-card-cta::after {
    transform: translateX(4px);
}

/* 3. Responsive Styles */
@media (max-width: 768px) {
    .cs-hub-header,
    .cs-hub-grid-section {
        padding: 60px 0;
    }
    .cs-hub-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}