/* assets/style.css */

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f6fa;
    color: #222;
    line-height: 1.6;
}

a {
    color: #1c7ed6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 94%;
    max-width: 1100px;
    margin: 0 auto;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    margin-bottom: 1rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.logo a {
    font-weight: 700;
    font-size: 1.4rem;
    color: #111;
}

.main-nav a {
    margin-left: 1rem;
    font-size: 0.95rem;
}

/* Improve contrast on links */
.main-nav a, .cta, .page-link {
    outline-color: #0b7285;
}
a { color: #1864ab; }
a:hover { color: #0b7285; }

.site-main {
    padding-bottom: 2rem;
}

.layout {
    display: grid;
    grid-template-columns: 3fr 1.2fr;
    gap: 1.5rem;
}

/* Accessibility: visible focus outlines */
:focus-visible {
    outline: 3px solid #1c7ed6;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: -9999px;
}
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    background: #1c7ed6;
    color: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    z-index: 1000;
}

/* Content / posts */

.content h1 {
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.post-card {
    background: #fff;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.post-card h2 {
    margin-bottom: 0.4rem;
    font-size: 1.25rem;
}

.post-card .meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.6rem;
}

.post-card p {
    margin-bottom: 0.75rem;
}

.read-more {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Single article */

.post-single {
    background: #fff;
    border-radius: 6px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.post-single h1 {
    margin-bottom: 0.5rem;
}

.post-single .meta {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1rem;
}

.post-body h2 {
    margin-top: 1.1rem;
    margin-bottom: 0.4rem;
    font-size: 1.1rem;
}

.post-body p {
    margin-bottom: 0.7rem;
}

/* Sidebar */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-widget {
    background: #fff;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.sidebar-widget h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li + li {
    margin-top: 0.3rem;
}

/* Newsletter form */

.newsletter-form {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.newsletter-form input[type="email"] {
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
}

.newsletter-form button {
    padding: 0.45rem 0.5rem;
    border-radius: 4px;
    border: none;
    background: #1c7ed6;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
}

.newsletter-form button:hover {
    background: #1864ab;
}

/* Ads */

.ad {
    background: #f1f3f5;
    border: 1px dashed #ced4da;
    border-radius: 4px;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    color: #495057;
}

.ad-top {
    margin-top: 0.5rem;
}

.ad-sidebar {
    min-height: 120px;
}

.ad-in-article {
    margin: 1rem 0;
}

.ad-footer {
    margin-top: 1rem;
}

/* Footer */

.site-footer {
    border-top: 1px solid #ddd;
    background: #fff;
    padding: 1rem 0;
    font-size: 0.85rem;
    color: #555;
    margin-top: 1rem;
}

/* Consent banner */
.consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #212529;
    color: #fff;
    padding: 0.75rem 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.2);
}
.consent-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.consent-actions button {
    margin-left: 0.5rem;
    background: #1c7ed6;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}
.consent-actions button#consent-decline { background: #495057; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}
.page-link {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
}
.page-status {
    font-size: 0.9rem;
    color: #555;
}

/* Affiliate product card */
.affiliate-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.8rem;
    align-items: center;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.8rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.affiliate-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}
.affiliate-card h4 { margin-bottom: 0.3rem; font-size: 1.05rem; }
.affiliate-card p { margin-bottom: 0.5rem; color: #555; }
.affiliate-card .cta {
    display: inline-block;
    background: #0ca678;
    color: #fff;
    border-radius: 4px;
    padding: 0.45rem 0.7rem;
    font-weight: 600;
}
.affiliate-card .cta:hover { background: #099268; }

@media (max-width: 600px) {
    .affiliate-card { grid-template-columns: 1fr; }
    .affiliate-card img { width: 100%; height: auto; }
}

/* Responsive */

@media (max-width: 800px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    .main-nav a {
        margin-left: 0;
        margin-right: 0.8rem;
    }
}
