@font-face {
    font-family: 'AtkinsonHyperlegible';
    src: url('./fonts/AtkinsonHyperlegible-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AtkinsonHyperlegible';
    src: url('./fonts/AtkinsonHyperlegible-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AtkinsonHyperlegible';
    src: url('./fonts/AtkinsonHyperlegible-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

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


:root {
    --background-color: rgb(248, 223, 219);
    --primary-color: rgb(252, 34, 28);
    --text-color: rgb(0, 0, 0);
}

body {
    font-family: 'AtkinsonHyperlegible', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 18px;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
}

p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1em;
}

a, a:visited {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}



div.container {
    max-width: 1200px;
    min-width: 600px;
    margin: 0 auto;
    padding: 2em 4em;
}

header {
    text-align: left;
    padding: 24px;
}

header h1 {
    font-size: 1.2em;
    margin-bottom: 8px;
    float: left;
}

nav {
    text-align: right;
    float: right;
}

nav a {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 1em;
    font-weight: bold;
}

nav ul {
    list-style-type: none;
}

nav ul li {
    display: inline;
}

main {
    padding: 24px 0;
    min-height: 90vh;
}

main .hero {
    text-align: left;
    padding: 4em 0em 0 4em;
}

main .hero h1 {
    font-size: 4em;
    margin-bottom: 1em;
    padding: 0 4em 0 0;
}

main .hero p {
    font-size: 1.5em;
    line-height: 1.6;
}

footer .alert {
    text-align: center;
    padding: 1em 4em;
    width: 100%;
    font-style: italic;;
}

footer {
    text-align: center;
    padding: 1em 0;
    position: relative;
    bottom: 0;
    width: 100%;
    border-top: 1px solid var(--primary-color);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5em;
    margin-top: 2em;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 1.5em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(252, 34, 28, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card h4 {
    color: var(--primary-color);
    margin-bottom: 0.75em;
    margin-top: 0;
    font-size: 1.2em;
    font-weight: bold;
}

.card p {
    margin-bottom: 0.75em;
    line-height: 1.5;
}

.card p:last-child {
    margin-bottom: 0;
}

/* Filter Section Styles */
.filter-section {
    margin: 2em 0;
    background: white;
    padding: 1.5em;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    min-width: 150px;
}

.filter-group label {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9em;
}

.filter-select {
    padding: 0.5em;
    border: 2px solid rgba(252, 34, 28, 0.2);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9em;
    background: white;
    color: var(--text-color);
}

.filter-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.clear-filters-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5em 1em;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: background 0.2s ease;
}

.clear-filters-btn:hover {
    background: rgba(252, 34, 28, 0.8);
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5em;
    margin: 2em 0;
    flex-wrap: wrap;
}

.pagination button {
    padding: 0.5em 0.75em;
    border: 2px solid rgba(252, 34, 28, 0.2);
    background: white;
    color: var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 40px;
}

.pagination button:hover {
    background: rgba(252, 34, 28, 0.1);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-info {
    color: var(--text-color);
    font-size: 0.9em;
    margin: 0 1em;
}

/* Loading and empty states */
.loading {
    text-align: center;
    padding: 2em;
    color: var(--text-color);
    font-style: italic;
}

.no-results {
    text-align: center;
    padding: 2em;
    color: var(--text-color);
    background: white;
    border-radius: 12px;
    margin: 1em 0;
}

/* Enhanced Card Styles */
.card-meta {
    font-size: 0.85em;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 0.75em;
    font-weight: bold;
}

.card-meta .category {
    color: var(--primary-color);
}

.action-steps {
    margin-top: 1em;
    background: rgba(248, 223, 219, 0.3);
    padding: 1em;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.action-steps ul {
    margin: 0.5em 0 0 1em;
    padding: 0;
}

.action-steps li {
    margin-bottom: 0.25em;
    line-height: 1.4;
}

.instructions {
    margin-top: 1em;
    background: rgba(248, 223, 219, 0.3);
    padding: 1em;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.instructions ol {
    margin: 0.5em 0 0 1em;
    padding: 0;
}

.instructions li {
    margin-bottom: 0.25em;
    line-height: 1.4;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-top: 1em;
}

.tag {
    background: rgba(252, 34, 28, 0.1);
    color: var(--primary-color);
    padding: 0.25em 0.5em;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
    border: 1px solid rgba(252, 34, 28, 0.2);
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    header h1 {
        font-size: 1em;
    }

    main .hero h1 {
        font-size: 2.5em;
        padding: 0 2em 0 0;
    }

    main .hero p {
        font-size: 1.2em;
        padding: 0 2em 0 0;
    }
}

@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1em;
    }

    .card {
        padding: 1.25em;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: auto;
    }

    .clear-filters-btn {
        margin-top: 1em;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    header h1 {
        font-size: 0.9em;
    }

    main .hero h1 {
        font-size: 2em;
        padding: 0 1em 0 0;
    }

    main .hero p {
        font-size: 1em;
        padding: 0 1em 0 0;
    }

    div.container {
        padding: 1em 2em;
        min-width: auto;
    }

    nav {
        font-size: 0.7em;
    }

    .card-grid {
        gap: 0.75em;
    }

    .card {
        padding: 1em;
    }
}