/* LX521 Polar Analysis - Shared Styles */

/* CSS Variables - Default Theme (Blue) */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --green: #059669;
    --highlight-bg: #fef3c7;
    --highlight-border: #f59e0b;
    --highlight-text: #92400e;
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
    color: white;
    opacity: 0.9;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 6px;
    transition: all 0.2s;
}

.back-link:hover {
    background: rgba(255,255,255,0.1);
    opacity: 1;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Card Grid */
.measurement-sets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Card Component */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.card-header {
    background: var(--primary);
    color: white;
    padding: 1.5rem;
}

.card-header.green {
    background: var(--green);
}

.card-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.card-header .subtitle {
    opacity: 0.9;
    font-size: 0.9rem;
}

.card-body {
    padding: 1.5rem;
}

.card-body h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Link List Component */
.link-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.link-list li {
    margin-bottom: 0.5rem;
}

.link-list a {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    transition: color 0.2s;
}

.link-list a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.link-list a::before {
    content: ">";
    font-weight: bold;
}

/* Section Titles */
.section-title {
    font-size: 1.25rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.subsection {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.subsection h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Driver Tags */
.drivers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.driver-tag {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Highlight Box */
.highlight {
    background: var(--highlight-bg);
    border-left: 4px solid var(--highlight-border);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
}

.highlight strong {
    color: var(--highlight-text);
}

/* Image Grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.image-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.image-card:hover {
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
}

.image-card a {
    display: block;
}

.image-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.image-card .caption {
    padding: 0.75rem;
    font-size: 0.875rem;
    color: var(--text);
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

footer a {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }

    .measurement-sets {
        grid-template-columns: 1fr;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }
}
