/* Photo-Manuals.com — Self-contained styles */

/* --- Design Tokens --- */
:root {
    --pm-accent: #1a73e8;
    --pm-accent-hover: #1557b0;
    --pm-accent-subtle: #e8f0fe;
    --pm-bg-subtle: #f8f9fa;
    --pm-border: #e1e4e8;
    --pm-text-muted: #596066;
    --pm-text: #1a1a2e;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--pm-text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--pm-accent);
}

a:hover {
    color: var(--pm-accent-hover);
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    margin-bottom: 0.5em;
    font-weight: 700;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

ul, ol {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

hr {
    border: none;
    border-top: 1px solid var(--pm-border);
    margin: 1.5rem 0;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--pm-border);
}

th {
    font-weight: 600;
}

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

nav a {
    text-decoration: none;
    color: var(--pm-text-muted);
}

nav a:hover {
    color: var(--pm-accent);
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 0.5rem 1rem;
    background: var(--pm-accent);
    color: #fff;
    z-index: 100;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Header */
header.container nav {
    padding: 0.75rem 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo strong {
    font-size: 1.25rem;
    color: var(--pm-text);
}

/* Breadcrumb */
.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    margin: 0 0 1.5rem 0;
    background: var(--pm-bg-subtle);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.breadcrumb li {
    display: inline;
    color: var(--pm-text-muted);
}

.breadcrumb li + li::before {
    content: "›";
    padding: 0 0.5rem;
    color: var(--pm-text-muted);
}

.breadcrumb li:last-child {
    color: var(--pm-text);
    font-weight: 500;
}

/* Page intro */
.page-intro {
    font-size: 1.125rem;
    color: var(--pm-text-muted);
    margin-bottom: 2rem;
}

/* Card grids — manufacturer list and type list share card styling */
.manufacturer-grid,
.type-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.manufacturer-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.type-list {
    list-style: none !important;
    padding: 0;
    margin: 1.5rem 0;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.type-list li {
    list-style: none !important;
}

.manufacturer-grid a,
.type-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: #fff;
    border: 1px solid var(--pm-border);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--pm-text);
    font-weight: 500;
    transition: all 0.15s ease;
}

.manufacturer-grid a:hover,
.type-list a:hover {
    border-color: var(--pm-accent);
    background: var(--pm-bg-subtle);
    color: var(--pm-accent);
}

.manufacturer-grid .count,
.type-list .count {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--pm-text-muted);
    background: var(--pm-bg-subtle);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.manufacturer-grid a:hover .count,
.type-list a:hover .count {
    background: var(--pm-accent-subtle);
    color: var(--pm-accent);
}

/* Model grid */
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.model-grid a {
    padding: 0.625rem 0.75rem;
    background: var(--pm-bg-subtle);
    border-radius: 0.375rem;
    text-decoration: none;
    color: var(--pm-text);
    font-size: 0.9375rem;
    transition: all 0.15s ease;
}

.model-grid a:hover {
    background: var(--pm-accent);
    color: #fff;
}

/* Summary table */
.summary-table {
    width: auto;
    margin: 1.5rem 0;
}

.summary-table th {
    width: 100px;
    font-weight: 500;
    color: var(--pm-text-muted);
    text-align: left;
    padding: 0.5rem 1rem 0.5rem 0;
    border: none;
    background: none;
}

.summary-table td {
    padding: 0.5rem 0;
    border: none;
    background: none;
}

/* Model detail page */
.model-detail {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin: 1.5rem 0;
}

.model-info {
    flex: 1;
    min-width: 0;
}

.model-info .summary-table {
    margin-top: 0;
}

.model-image {
    flex-shrink: 0;
    max-width: 250px;
    margin: 0;
}

.model-image img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 1px solid var(--pm-border);
}

/* Download button */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    padding: 0.875rem 1.5rem;
    background: var(--pm-accent);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.15s ease;
}

.download-btn:hover {
    background: var(--pm-accent-hover);
}

.download-btn::before {
    content: "↓";
    font-size: 1.125rem;
}

/* About section */
.about-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--pm-border);
}

.about-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.about-section p {
    color: var(--pm-text-muted);
    line-height: 1.7;
}

.about-section .source-link {
    font-size: 0.875rem;
}

/* Footer */
footer.container {
    margin-top: 4rem;
}

footer hr {
    margin-bottom: 1.5rem;
}

footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

footer nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
}

footer nav ul small {
    color: var(--pm-text-muted);
}

footer nav ul a {
    color: var(--pm-text-muted);
    text-decoration: none;
}

footer nav ul a:hover {
    color: var(--pm-accent);
}

/* Homepage hero */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    margin-bottom: 2rem;
}

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

.hero .tagline {
    font-size: 1.25rem;
    color: var(--pm-text-muted);
    margin-bottom: 2rem;
}

.hero .stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.hero .stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pm-accent);
}

.hero .stat-label {
    font-size: 0.875rem;
    color: var(--pm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero .cta {
    margin-top: 2rem;
}

.hero .cta a {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--pm-accent);
    color: #fff;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.hero .cta a:hover {
    background: var(--pm-accent-hover);
}

/* Mobile styles */
@media (max-width: 600px) {
    .site-logo strong {
        display: none;
    }

    .breadcrumb {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .manufacturer-grid,
    .type-list,
    .model-grid {
        grid-template-columns: 1fr;
    }

    .model-detail {
        flex-direction: column-reverse;
    }

    .model-image {
        max-width: 200px;
    }

    .hero {
        padding: 2rem 0.5rem;
    }

    .hero h1 {
        font-size: 1.5rem;
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
    }

    .hero .tagline {
        font-size: 1rem;
    }

    .hero .stats {
        gap: 1.5rem;
    }

    .hero .stat-value {
        font-size: 1.75rem;
    }

    .hero .stat-label {
        font-size: 0.75rem;
    }

    footer.container {
        margin-top: 2rem;
    }

    footer hr {
        margin-bottom: 1rem;
    }

    footer nav {
        font-size: 0.875rem;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    footer nav ul {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    footer nav ul:first-child {
        order: 2;
    }

    footer nav ul:last-child {
        order: 1;
    }
}
