/*
 * Basic styling for the tag search application.
 *
 * This stylesheet provides a clean and lightweight layout without relying on
 * external CSS frameworks. It focuses on readability, responsive design and
 * accessibility. Colours are kept neutral to ensure sufficient contrast. Use
 * semantic HTML elements (header, main, section, article) for better SEO.
 */

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

header {
    background-color: #f8f8f8;
    border-bottom: 1px solid #e2e2e2;
    padding: 1rem 0;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    text-align: center;
}

main {
    padding: 1rem;
}

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

.section {
    margin-bottom: 2rem;
}

.section h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 0.3rem;
}

.tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-list li a {
    display: inline-block;
    background-color: #eef2ff;
    color: #003366;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.tag-list li a:hover {
    background-color: #d8e4ff;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.badge {
    background-color: #e7f3ff;
    color: #004080;
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    text-decoration: none;
}

.badge:hover {
    background-color: #d0e7ff;
}

.card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    background-color: #fff;
    margin-bottom: 1rem;
}

.news-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.video-card iframe {
    width: 100%;
    height: 250px;
    border: none;
    border-radius: 4px;
}

form.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

form.search-form input[type="text"] {
    flex: 1 1 300px;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form.search-form button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    background-color: #004080;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s;
}

form.search-form button:hover {
    background-color: #003366;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    margin-bottom: 0.6rem;
}

.tips-list code {
    background-color: #f5f5f5;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-family: "Courier New", monospace;
}

/* FAQ styles */
.faq-list details {
    margin-bottom: 0.8rem;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
}
.faq-list summary {
    cursor: pointer;
    font-weight: 600;
    outline: none;
}
.faq-list summary::-webkit-details-marker {
    display: none;
}
.faq-list details p {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Extras grid for fun and additional information */
.extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.extras-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.extras-item h3 {
    margin-top: 0;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.extras-item blockquote {
    margin: 0;
    font-style: italic;
    color: #555;
}

.extras-item blockquote footer {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.5rem;
}

.footer {
    background-color: #f8f8f8;
    border-top: 1px solid #e2e2e2;
    padding: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #555;
}

.footer a {
    color: #004080;
    text-decoration: none;
}

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