/**
 * Card Cluster Component Styles
 * 
 * This file contains styles for the "Lead & Support" multi-article card cluster.
 * It implements a responsive layout with a featured card and supporting links.
 * Integrated with the hybrid typographic system.
 */

/* Base Card Cluster Container */
.card-cluster {
    margin-bottom: var(--spacing-xl);
    border-top: 2px solid var(--color-border-light);
    padding-top: var(--spacing-l);
}

/* Spacing for section header */
.card-cluster .typography-section-h2 {
    margin-bottom: var(--spacing-l);
}

/* Cluster Content - Mobile First (Stacked) */
.cluster-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

/* Desktop Layout (2-column) */
@media (min-width: 768px) {
    .cluster-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Featured Card Styling */
.cluster-featured-card {
    background-color: var(--color-background-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--color-shadow-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cluster-featured-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--color-shadow-medium);
}

.featured-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.featured-card-image {
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.featured-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-card-content {
    padding: var(--spacing-m);
}

/* Spacing for typography elements */
.featured-card-content .typography-category-tag {
    margin-bottom: var(--spacing-xs);
    display: inline-block;
}

.featured-card-content .typography-card-h3 {
    margin: var(--spacing-s) 0;
}

.featured-card-content .typography-article-summary {
    margin-bottom: var(--spacing-m);
}

/* Author and metadata styling */
.card-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-s);
    margin-top: var(--spacing-m);
}

.author-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-meta {
    display: flex;
    flex-direction: column;
}

/* Supporting Links Container */
.cluster-supporting-links {
    display: flex;
    flex-direction: column;
}

/* Supporting Articles List */
.supporting-articles-list,
.tertiary-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Supporting Item Styling */
.cluster-supporting-item,
.supporting-item,
.tertiary-item {
    padding: var(--spacing-m) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.supporting-articles-list li:first-child,
.tertiary-articles-list li:first-child {
    padding-top: 0;
}

.supporting-articles-list li:last-child,
.tertiary-articles-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.supporting-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.supporting-item-link:hover {
    transform: translateY(-2px);
}

.supporting-item-link:hover .typography-link-h4 {
    color: var(--color-accent-primary);
}

.supporting-item-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-s);
}

/* Spacing for typography elements in supporting items */
.supporting-item-content .typography-category-tag {
    margin-bottom: 0;
}

.supporting-item-content .typography-link-h4 {
    margin: 0;
    transition: color 0.2s ease;
}

.supporting-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-s);
}

/* Visually hidden class for screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Special styling for the cluster when it spans more columns */
@media (min-width: 1024px) {
    .grid-col-span-8 .cluster-content {
        grid-template-columns: 2fr 1fr; /* Adjust the ratio for larger spans */
    }
    
    .grid-col-span-12 .cluster-content {
        grid-template-columns: 3fr 2fr; /* Adjust the ratio for full width */
    }
} 