﻿/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a365d;
    --primary-hover: #2c5282;
    --accent-color: #c53030;
    --text-color: #1a202c;
    --bg-color: #f7fafc;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.15);
}

html {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-image: url('../images/relief.gif');
    background-attachment: fixed;
    background-size: cover;
    line-height: 1.6;
}

body {
    color: var(--text-color);
    padding: 20px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--accent-color);
}

.back-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.back-button::before {
    content: "← ";
    margin-right: 5px;
}

/* Typography */
h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    font-weight: 700;
}

h2 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-color);
}

/* Card Styles */
.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

/* Grid Layouts - Consolidated */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.full-width {
    grid-column: 1 / -1;
}

/* Universal Grid for Items - Replaces year-grid, changes-grid, trades-grid */
.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

/* Universal Item Link - Replaces year-link, changes-grid a, trade-link */
.item-link {
    display: block;
    padding: 12px;
    background: var(--bg-color);
    color: var(--primary-color);
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.item-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Item Link Variants */
.item-link.current {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    font-weight: 700;
}

.item-link.current:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
}

.item-link.recent {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    font-size: 1.05em;
}

.item-link.recent:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    transform: translateY(-3px) scale(1.02);
}

.item-link.multi-year {
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
}

/* Wider Item Grid (for trades, stats sections) */
.item-grid.wide {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.item-grid.wide .item-link {
    padding: 16px 20px;
    font-size: 1.1em;
    box-shadow: var(--shadow);
}

.item-grid.wide .item-link:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

/* Links List */
.links-list {
    list-style: none;
}

.links-list li {
    margin-bottom: 12px;
}

.links-list a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.links-list a:hover {
    background: var(--bg-color);
    color: var(--accent-color);
    padding-left: 20px;
}

/* Decade/Year Sections - Consolidated */
.decade-section,
.year-section {
    margin-bottom: 30px;
}

.decade-section:last-child,
.year-section:last-child {
    margin-bottom: 0;
}

.decade-title {
    font-size: 1.3em;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--bg-color);
}

/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.photo-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.photo-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.photo-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.photo-link:hover {
    color: var(--accent-color);
}

.photo-date {
    color: #718096;
    font-size: 0.9em;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--bg-color);
}

.featured-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    grid-column: 1 / -1;
}

.featured-card .photo-link {
    color: white;
    font-size: 1.2em;
}

.featured-card .photo-link:hover {
    color: #ffd700;
}

.featured-card .photo-date {
    color: rgba(255, 255, 255, 0.9);
    border-top-color: rgba(255, 255, 255, 0.2);
}

/* Featured Links */
.featured-links {
    list-style: none;
    margin-bottom: 20px;
}

.featured-links li {
    margin-bottom: 15px;
}

.featured-links a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    padding: 12px 16px;
    background: var(--bg-color);
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
}

.featured-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .content-grid,
    .photo-grid {
        grid-template-columns: 1fr;
    }

    .item-grid,
    .item-grid.wide {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .featured-card {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.5em;
    }

    .item-grid,
    .item-grid.wide {
        grid-template-columns: 1fr;
    }
}