/* ================================================
   Global Styles - Consistent Theme for All Pages
   ================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* ================================================
   Typography
   ================================================ */

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #667eea;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #444;
}

h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #555;
}

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #764ba2;
}

ul {
    list-style: none;
}

/* ================================================
   Header
   ================================================ */

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

header p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 0;
}

/* ================================================
   Navigation Bar
   ================================================ */

nav {
    background-color: white;
    border-bottom: 2px solid #e0e0e0;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

nav li {
    flex: 1;
    min-width: 100px;
    text-align: center;
}

nav a {
    display: block;
    padding: 1rem;
    color: #667eea;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.active {
    color: #764ba2;
    border-bottom-color: #764ba2;
    background-color: #f8f9fa;
}

/* ================================================
   Main Content
   ================================================ */

main {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 300px);
}

section {
    margin-bottom: 4rem;
}

.breadcrumb {
    background-color: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 2rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #667eea;
}

.breadcrumb span {
    color: #999;
    margin: 0 0.5rem;
}

/* ================================================
   Card Styles
   ================================================ */

.card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

article.card {
    border-left: 4px solid #667eea;
}

.dataset-info {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.dataset-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dataset-icon {
    font-size: 2.5rem;
}

.dataset-description {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.dataset-purpose {
    background-color: #f0f4ff;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.dataset-purpose h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dataset-purpose p {
    color: #555;
    margin: 0;
}

/* ================================================
   Grid Layout
   ================================================ */

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

/* ================================================
   Statistics Cards
   ================================================ */

.dataset-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-card .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ================================================
   Tables
   ================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 1.2rem;
    text-align: left;
    font-weight: 600;
    border: none;
}

td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e0e0e0;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.3s ease;
}

.field-type {
    font-family: 'Courier New', monospace;
    background-color: #f0f0f0;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
}

.field-description {
    color: #666;
    font-size: 0.95rem;
}

/* ================================================
   Buttons
   ================================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
    color: #333;
}

/* ================================================
   Forms
   ================================================ */

input,
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

/* ================================================
   Footer
   ================================================ */

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid #e0e0e0;
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

footer a {
    color: #667eea;
}

footer a:hover {
    text-decoration: underline;
}

footer ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

footer li {
    margin: 0;
}

/* ================================================
   Utility Classes
   ================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-subtitle {
    color: #667eea;
    font-size: 0.95rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.highlight {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 4px solid #667eea;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

/* ================================================
   Responsive Design
   ================================================ */

@media (max-width: 768px) {
    header {
        padding: 2rem 1rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    nav ul {
        flex-direction: row;
    }

    nav li {
        min-width: auto;
        flex: 1;
    }

    nav a {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    main {
        margin: 1.5rem auto;
        padding: 0 1rem;
    }

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

    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 0.8rem;
    }

    .field-type {
        display: block;
        margin-top: 0.25rem;
    }

    .dataset-stats {
        grid-template-columns: 1fr;
    }

    .breadcrumb {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    footer {
        padding: 2rem 1rem;
    }

    footer ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    nav a {
        padding: 0.6rem 0.3rem;
        font-size: 0.8rem;
    }

    main {
        padding: 0 1rem;
    }

    table {
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 0.6rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    input,
    textarea,
    select {
        padding: 0.6rem;
    }
}

/* ================================================
   Print Styles
   ================================================ */

@media print {
    nav,
    footer {
        display: none;
    }

    body {
        background-color: white;
    }

    a {
        color: #667eea;
    }

    table,
    .card {
        page-break-inside: avoid;
        box-shadow: none;
    }
}
