/* RISC OS-inspired design with Acorn green accent */
/* Color palette:
   - Cream: #F5EFE0
   - Light grey: #E8E8E8
   - Deep navy: #1B365D
   - Acorn green: #00A651
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1B365D;
    background-color: #E8E8E8;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - inspired by RISC OS icon bar */
body > header {
    background-color: #ffffff;
    color: #1B365D;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 3px solid #00A651;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.logo-link {
    display: block;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    text-decoration: none;
}

.site-logo-full {
    display: block;
    max-width: 100%;
}

.site-logo-full img {
    width: 600px;
    height: auto;
    max-width: 100%;
    display: block;
}

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

.site-logo-icon {
    display: block;
}

.site-logo-icon img {
    height: 60px;
    width: auto;
    display: block;
}

.site-title-compact {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1B365D;
    white-space: nowrap;
}

nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

nav a {
    color: #1B365D;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background-color: #E8E8E8;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

nav a:hover,
nav a:focus {
    background-color: #00A651;
    color: white;
    border-color: #00A651;
}

/* Main content */
main.container {
    background-color: #F5EFE0;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    min-height: 400px;
}

/* News list */
.news-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

/* News items styled as RISC OS windows */
.news-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #D0D0D0;
    display: flex;
    flex-direction: column;
}

.news-item-header {
    background-color: #F5EFE0;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #D0D0D0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-item-dots {
    display: flex;
    gap: 0.4rem;
}

.window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-green {
    background-color: #00A651;
}

.dot-navy {
    background-color: #1B365D;
}

.dot-grey {
    background-color: #B0B0B0;
}

.news-item-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.news-item h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.news-item h2 a {
    color: #1B365D;
    text-decoration: none;
}

.news-item h2 a:hover {
    color: #00A651;
}

.post-meta {
    color: #1B365D;
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    background-color: #E8E8E8;
    color: #1B365D;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid #D0D0D0;
}

.summary {
    color: #1B365D;
    opacity: 0.85;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-item-footer {
    margin-top: auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.tag-icon {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #1B365D;
    opacity: 0.18;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.news-item:hover .tag-icon {
    color: #00A651;
    opacity: 0.6;
}

.read-more {
    color: #00A651;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #008741;
    text-decoration: underline;
}

.no-posts {
    color: #1B365D;
    opacity: 0.6;
    font-style: italic;
    text-align: center;
    padding: 3rem 0;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 2rem 0 1rem;
    padding: 1rem 0;
}

.pagination-prev,
.pagination-next {
    flex: 1;
}

.pagination-next {
    text-align: right;
}

.pagination a {
    color: #1B365D;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.pagination a:hover,
.pagination a:focus {
    color: #00A651;
    text-decoration: underline;
}

.pagination-status {
    flex: 0 0 auto;
    margin: 0;
    color: #1B365D;
    font-weight: 500;
    font-size: 0.95rem;
}

.pagination-disabled {
    color: #1B365D;
    opacity: 0.35;
    font-weight: 600;
}

/* Individual post */
.post {
    max-width: 100%;
}

.post-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #00A651;
}

.post-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    color: #1B365D;
    font-weight: 700;
}

.post-summary {
    background-color: #E8E8E8;
    padding: 1.25rem;
    border-left: 4px solid #00A651;
    margin-bottom: 2rem;
    font-style: italic;
    border-radius: 4px;
}

.post-content {
    line-height: 1.8;
    color: #1B365D;
}

.post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1B365D;
    font-weight: 700;
}

.post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1B365D;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5em auto;
    border: 1px solid #D0D0D0;
    border-radius: 4px;
}

.post-content a:has(> img) {
    display: block;
}

.post-content ul, .post-content ol {
    margin-bottom: 1rem;
    margin-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content a {
    color: #00A651;
    text-decoration: none;
    font-weight: 500;
}

.post-content a:hover {
    text-decoration: underline;
    color: #008741;
}

.post-content code {
    background-color: #E8E8E8;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: "Monaco", "Courier New", monospace;
    font-size: 0.9em;
    color: #1B365D;
    border: 1px solid #D0D0D0;
}

.post-content pre {
    background-color: #E8E8E8;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid #D0D0D0;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
}

.post-content hr {
    border: none;
    border-top: 2px solid #D0D0D0;
    margin: 2rem 0;
}

.post-content blockquote {
    border-left: 4px solid #00A651;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #1B365D;
    opacity: 0.85;
    font-style: italic;
}

.post-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #D0D0D0;
    color: #1B365D;
    opacity: 0.8;
}

.post-footer a {
    color: #00A651;
    text-decoration: none;
    font-weight: 500;
}

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

.post-navigation {
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background-color: #1B365D;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #00A651;
}

/* Footer */
body > footer {
    background-color: #1B365D;
    color: #F5EFE0;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 3px solid #00A651;
}

body > footer a {
    color: #00A651;
    text-decoration: none;
    font-weight: 500;
}

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

/* About page styling */
.about-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #D0D0D0;
}

.about-content h1,
.about-content h2,
.about-content h3 {
    color: #1B365D;
}

.about-content h1 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    border-bottom: 3px solid #00A651;
    padding-bottom: 0.75rem;
}

.about-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-content p,
.about-content ul {
    margin-bottom: 1rem;
}

.about-content ul {
    margin-left: 1.5rem;
}

.about-content a {
    color: #00A651;
    font-weight: 500;
}

.about-content code {
    background-color: #E8E8E8;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #D0D0D0;
    font-family: "Monaco", "Courier New", monospace;
    font-size: 0.95em;
    overflow-wrap: anywhere;
}

.about-content a.btn {
    color: white;
    text-decoration: none;
}

.about-content a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (min-width: 1024px) {
    .home main.container {
        max-width: 1200px;
    }

    .news-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .news-item h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 1023px) {
    .site-logo-full img {
        width: 440px;
    }
}

@media (max-width: 768px) {

    nav a {
        flex: 1;
        text-align: center;
        min-width: 100px;
    }
    
    main.container {
        padding: 1.5rem;
    }
    
    .post-header h1 {
        font-size: 1.75rem;
    }
    
    .news-item h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .site-logo-full img {
        width: 100%;
    }
    
    .news-item-content {
        padding: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
}

/* Extra small screens - use compact logo with icon and text */
@media (max-width: 339px) {
    .site-logo-full {
        display: none;
    }
    
    .site-logo-compact {
        display: flex;
        justify-content: center;
    }
    
    .site-header-content {
        gap: 0.75rem;
    }
}
