/* ==========================================================================
   GoodKit Ghost Theme - screen.css
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #fff;
    color: #374151;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #16a34a;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: #15803d;
}

/* Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: #111827;
    line-height: 1.25;
}

h1 { font-size: 2.25rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

/* Layout
   ========================================================================== */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.text-center {
    text-align: center;
}

/* Navigation
   ========================================================================== */
.site-nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #f3f4f6;
    z-index: 50;
}

.nav-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.nav-wordmark {
    font-size: 1.25rem;
    font-weight: 800;
}

.nav-wordmark-good {
    color: #111827;
}

.nav-wordmark-kit {
    color: #16a34a;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav-link:hover {
    color: #111827;
}

.nav-link-active {
    color: #16a34a;
}

.nav-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.15s ease;
}

.nav-search-btn:hover {
    color: #111827;
}

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #4b5563;
    cursor: pointer;
    padding: 0.25rem;
}

.nav-toggle:hover {
    color: #111827;
}

.nav-toggle-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.mobile-menu {
    display: none;
    border-top: 1px solid #f3f4f6;
    background: #fff;
}

.mobile-menu.is-open {
    display: block;
}

.mobile-menu-link {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.mobile-menu-link:hover {
    color: #111827;
    background: #f9fafb;
}

/* Hero
   ========================================================================== */
.hero {
    background: linear-gradient(to bottom, #f9fafb, #fff);
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 3rem 0 4rem;
}

.hero-content {
    max-width: 560px;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
}

.hero-categories {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Category Cards
   ========================================================================== */
.category-card {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: box-shadow 0.2s ease;
}

.category-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.category-rv {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.category-marine {
    background: #ecfeff;
    color: #0e7490;
    border-color: #a5f3fc;
}

.category-tools {
    background: #f9fafb;
    color: #374151;
    border-color: #e5e7eb;
}

.category-sensors {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.category-solar {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.category-electrical {
    background: #fefce8;
    color: #a16207;
    border-color: #fef08a;
}

/* Sections
   ========================================================================== */
.section {
    border-top: 1px solid #f3f4f6;
}

.section .container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.section-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #16a34a;
    text-decoration: none;
}

.section-link:hover {
    color: #15803d;
}

.section-about {
    border-top: 1px solid #f3f4f6;
}

.about-text {
    color: #6b7280;
    max-width: 640px;
    margin: 0 auto 1.5rem;
    line-height: 1.75;
}

/* Buttons
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #16a34a;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.15s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #15803d;
    color: #fff;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: border-color 0.15s ease;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: #d1d5db;
    color: #111827;
}

/* Article Cards
   ========================================================================== */
.article-card {
    display: block;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #d1d5db;
    color: inherit;
}

.article-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-body {
    padding: 1.5rem;
}

.article-card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: #f0fdf4;
    color: #15803d;
    text-decoration: none;
    transition: background 0.15s ease;
}

.tag-pill:hover {
    background: #dcfce7;
    color: #15803d;
}

.approved-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    line-height: 1.35;
    transition: color 0.15s ease;
}

.article-card:hover .article-card-title {
    color: #16a34a;
}

.article-card-excerpt {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.625;
    margin-bottom: 0.75rem;
}

.article-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Post Page
   ========================================================================== */
.post-full {
    padding: 3rem 0;
}

.post-container {
    max-width: 768px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-full {
    padding: 3rem 0;
}

.disclosure-banner {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 2rem;
}

.disclosure-banner p {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.disclosure-banner strong {
    color: #374151;
}

.disclosure-banner a {
    text-decoration: underline;
    color: #6b7280;
}

.disclosure-banner a:hover {
    color: #374151;
}

.feature-image {
    margin-bottom: 2.5rem;
}

.feature-image img {
    width: 100%;
    border-radius: 0.75rem;
    max-height: 400px;
    object-fit: cover;
}

.post-header {
    margin-bottom: 2rem;
}

.post-header-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.post-header-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.post-header-text {
    flex: 1;
}

.post-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: #9ca3af;
}

.post-seal {
    flex-shrink: 0;
    display: none;
}

.post-back {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #f3f4f6;
}

.related-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #f3f4f6;
}

.related-posts .section-title {
    margin-bottom: 1.5rem;
}

/* Prose (Article Content)
   ========================================================================== */
.prose {
    color: #374151;
}

/* Hide ALL H1s in post content - the theme renders the title separately in post-header */
.prose h1 {
    display: none;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.prose h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.prose ul,
.prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.25rem;
    line-height: 1.75;
}

.prose strong {
    font-weight: 600;
    color: #111827;
}

.prose a {
    color: #16a34a;
    text-decoration: underline;
    transition: color 0.15s ease, background 0.15s ease;
}

.prose a:hover {
    color: #15803d;
}

/* Affiliate / Amazon links */
.prose a[href*="amazon.com"],
.prose a[href*="amzn.to"],
.prose a[href*="amzn.com"] {
    font-weight: 600;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.prose a[href*="amazon.com"]:hover,
.prose a[href*="amzn.to"]:hover,
.prose a[href*="amzn.com"]:hover {
    background: #f0fdf4;
    border-radius: 2px;
    padding: 0 2px;
    margin: 0 -2px;
}

.prose blockquote {
    border-left: 3px solid #d1d5db;
    padding-left: 1rem;
    color: #6b7280;
    font-style: italic;
    margin: 1.5rem 0;
}

.prose hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.prose th,
.prose td {
    border: 1px solid #e5e7eb;
    padding: 0.625rem 1rem;
    text-align: left;
    font-size: 0.9375rem;
}

.prose th {
    background: #f3f4f6;
    font-weight: 600;
    color: #111827;
}

.prose tr:nth-child(even) {
    background: #f9fafb;
}

.prose img {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.prose pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 1.25rem 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
}

.prose code {
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.875rem;
}

.prose pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.prose figure {
    margin: 1.5rem 0;
}

.prose figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Tag Page
   ========================================================================== */
.tag-header {
    margin-bottom: 2rem;
}

.tag-header-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
}

.tag-header-description {
    color: #6b7280;
    max-width: 640px;
}

/* Author Page
   ========================================================================== */
.author-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.author-bio {
    color: #6b7280;
    font-size: 0.875rem;
}

.author-location {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Pagination
   ========================================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.875rem;
    color: #9ca3af;
}

.pagination a {
    color: #16a34a;
    font-weight: 500;
}

.pagination a:hover {
    color: #15803d;
}

/* Footer
   ========================================================================== */
.site-footer {
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    padding: 3.5rem 0 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    margin-bottom: 0.75rem;
}

.footer-tagline {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.625;
}

.footer-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: none;
}

.footer-links a:hover {
    color: #111827;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.footer-copyright {
    font-size: 0.75rem;
    color: #9ca3af;
}

.footer-credit {
    font-size: 0.75rem;
    color: #9ca3af;
}

.footer-credit a {
    color: #16a34a;
}

.footer-credit a:hover {
    color: #15803d;
}

/* Ghost Specific: kg-cards
   ========================================================================== */
.kg-image-card {
    margin: 1.5rem 0;
}

.kg-image-card img {
    margin: 0 auto;
}

.kg-width-wide img {
    max-width: 1040px;
    width: calc(100% + 200px);
    margin-left: min(0px, calc((768px - 100vw) / 2 + 1.5rem));
}

.kg-width-full img {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.kg-image-card figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
    margin-top: 0.75rem;
}

.kg-bookmark-card {
    margin: 1.5rem 0;
}

.kg-bookmark-container {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.kg-bookmark-content {
    flex: 1;
    padding: 1rem 1.25rem;
}

.kg-bookmark-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #111827;
}

.kg-bookmark-description {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.25rem;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.kg-bookmark-author {
    font-weight: 500;
}

.kg-bookmark-publisher {
    color: #9ca3af;
}

.kg-bookmark-icon {
    width: 16px;
    height: 16px;
}

.kg-bookmark-thumbnail {
    width: 160px;
    flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-gallery-card {
    margin: 1.5rem 0;
}

.kg-gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.kg-gallery-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.kg-gallery-image img {
    border-radius: 0.25rem;
}

/* Selection Color
   ========================================================================== */
::selection {
    background: #bbf7d0;
    color: #111827;
}

::-moz-selection {
    background: #bbf7d0;
    color: #111827;
}

/* Scroll Margin for Anchor Links
   ========================================================================== */
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id],
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    scroll-margin-top: 80px;
}

/* Post Comments
   ========================================================================== */
.post-comments {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid #f3f4f6;
}

.post-comments iframe {
    width: 100% !important;
}

/* Smooth Transitions on Interactive Elements
   ========================================================================== */
.category-card,
.btn-outline,
.section-link,
.pagination a,
.footer-links a,
.nav-toggle,
.approved-badge {
    transition: all 0.2s ease;
}

/* Responsive
   ========================================================================== */
@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .nav-toggle {
        display: none;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-categories {
        display: grid;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }

    .post-title {
        font-size: 2.5rem;
    }

    .post-seal {
        display: block;
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-inner {
        padding: 4rem 0;
    }
}

/* Mobile-specific improvements */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

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

    .article-card-image {
        height: 180px;
    }

    .article-card + .article-card {
        margin-top: 0;
    }

    .grid-3,
    .grid-2 {
        gap: 1.25rem;
    }

    .post-title {
        font-size: 1.75rem;
    }
}
