/*
Theme Name: SheetFinds Spreadsheet Hub
Theme URI: https://sheetfinds.com/
Author: SheetFinds
Author URI: https://sheetfinds.com/
Description: A clean, light, SEO-focused WordPress theme built around the cnfans spreadsheet niche. Includes a homepage with category dropdown, CTA buttons, article hub, and 10 pre-built SEO article templates with full internal linking. Designed for fast Google indexing and a fresh Western aesthetic.
Version: 1.1.0
Requires at least: 5.5
Tested up to: 6.5
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sheetfinds
Tags: blog, light, clean, seo, ecommerce, one-column, custom-menu, responsive
*/

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #2c3e50;
    background: #fafbfd;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sky-blue homepage background (only on front page) */
body.home {
    background:
        radial-gradient(1200px 700px at 80% -5%, #bee3fb 0%, transparent 60%),
        radial-gradient(1100px 600px at 0% 100%, #c7e9fd 0%, transparent 65%),
        linear-gradient(180deg, #d6eefe 0%, #e8f5ff 45%, #f2faff 100%);
    background-attachment: fixed;
}

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

a {
    color: #4a7dde;
    text-decoration: none;
    transition: color .2s ease;
}

a:hover { color: #2f5fc4; }

h1, h2, h3, h4, h5 {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    color: #1f2d3d;
    line-height: 1.3;
    margin: 0 0 .6em;
    font-weight: 700;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================
   Header
============================ */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #eef0f5;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(20, 40, 80, .04);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 24px;
    flex-wrap: wrap;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2d3d;
    letter-spacing: -.4px;
}

.site-logo span {
    color: #4a7dde;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}

.site-nav a {
    color: #4f5b6b;
    font-weight: 500;
    font-size: .95rem;
}

.site-nav a:hover { color: #1f2d3d; }

/* Dropdown */
.category-dropdown {
    position: relative;
    display: inline-block;
}

.category-dropdown-btn {
    background: #f1f5fb;
    border: 1px solid #dbe4f1;
    color: #1f2d3d;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .2s ease;
}

.category-dropdown-btn:hover { background: #e6eef9; }

.category-dropdown-btn::after {
    content: "▾";
    font-size: .9rem;
    color: #6b7a90;
}

.category-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    min-width: 260px;
    box-shadow: 0 12px 40px rgba(15, 30, 60, .1);
    border: 1px solid #eef0f5;
    padding: 8px;
    display: none;
    z-index: 200;
}

.category-dropdown-menu.is-open { display: block; }

.category-dropdown-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: #2c3e50;
    font-size: .94rem;
}

.category-dropdown-menu a:hover {
    background: #f3f7fd;
    color: #2f5fc4;
}

/* ============================
   Buttons
============================ */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    border: 1px solid transparent;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: linear-gradient(135deg, #4a7dde 0%, #6a99ec 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(74, 125, 222, .25);
}

.btn-primary:hover {
    color: #fff;
    box-shadow: 0 10px 24px rgba(74, 125, 222, .32);
}

.btn-secondary {
    background: #fff;
    color: #1f2d3d;
    border: 1px solid #d8dfe9;
    box-shadow: 0 4px 12px rgba(20, 40, 80, .05);
}

.btn-secondary:hover { background: #f6f8fc; }

.btn-ghost {
    background: transparent;
    color: #4a7dde;
    border: 1px solid #4a7dde;
}

.btn-ghost:hover { background: #4a7dde; color: #fff; }

.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

/* ============================
   Hero
============================ */
.hero {
    padding: 80px 0 70px;
    background:
        radial-gradient(1200px 500px at 80% -10%, #e3edfc 0%, transparent 60%),
        radial-gradient(1000px 400px at 0% 110%, #f4e4f7 0%, transparent 60%),
        #fafbfd;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    max-width: 880px;
    margin: 0 auto 18px;
    background: linear-gradient(135deg, #1f2d3d 0%, #4a7dde 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p.lead {
    font-size: 1.18rem;
    color: #5a6878;
    max-width: 720px;
    margin: 0 auto 36px;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: .92rem;
    color: #6b7a90;
    flex-wrap: wrap;
}

.hero-meta span::before {
    content: "✓";
    color: #4a7dde;
    margin-right: 6px;
    font-weight: 700;
}

/* Hero on the homepage blends into the sky-blue body background */
body.home .hero {
    background: transparent;
}

/* On the homepage, the alt section uses a translucent white so the sky-blue still shows through */
body.home .section-alt {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 1px solid rgba(190, 220, 245, 0.6);
    border-bottom: 1px solid rgba(190, 220, 245, 0.6);
}

/* Cards on the homepage get a soft white so they pop against sky-blue */
body.home .category-card,
body.home .article-card {
    background: #ffffff;
}

/* ============================
   Section
============================ */
.section {
    padding: 72px 0;
}

.section-alt {
    background: #ffffff;
    border-top: 1px solid #eef0f5;
    border-bottom: 1px solid #eef0f5;
}

.section-head {
    text-align: center;
    margin-bottom: 44px;
}

.section-head .eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .82rem;
    color: #4a7dde;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}

.section-head h2 {
    font-size: 2.1rem;
    margin-bottom: 12px;
}

.section-head p {
    color: #5a6878;
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ============================
   Category Grid
============================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.category-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    border: 1px solid #eef0f5;
    box-shadow: 0 4px 14px rgba(20, 40, 80, .04);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    color: #1f2d3d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(20, 40, 80, .08);
    border-color: #c9d6ec;
    color: #2f5fc4;
}

.category-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef3fc 0%, #e6def4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.category-card-title {
    font-weight: 700;
    font-size: 1rem;
}

.category-card-sub {
    font-size: .82rem;
    color: #7a8699;
}

/* ============================
   Article Grid
============================ */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.article-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eef0f5;
    box-shadow: 0 6px 18px rgba(20, 40, 80, .05);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(20, 40, 80, .09);
}

.article-card-cover {
    height: 150px;
    background: linear-gradient(135deg, #cfe0fb 0%, #e6def4 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f2d3d;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -.3px;
}

.article-card-cover.alt-1 { background: linear-gradient(135deg, #d9ecff 0%, #f5d9ea 100%); }
.article-card-cover.alt-2 { background: linear-gradient(135deg, #fde6d3 0%, #fce8f3 100%); }
.article-card-cover.alt-3 { background: linear-gradient(135deg, #e3fbe5 0%, #d9ecff 100%); }
.article-card-cover.alt-4 { background: linear-gradient(135deg, #f0e6fb 0%, #d9ecff 100%); }
.article-card-cover.alt-5 { background: linear-gradient(135deg, #fff1d3 0%, #ffe2e2 100%); }

.article-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.article-card-tag {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #4a7dde;
    font-weight: 700;
    margin-bottom: 8px;
}

.article-card-title {
    font-size: 1.15rem;
    color: #1f2d3d;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 700;
}

.article-card-excerpt {
    color: #5a6878;
    font-size: .92rem;
    flex: 1;
    margin-bottom: 14px;
}

.article-card-link {
    font-size: .9rem;
    font-weight: 600;
    color: #4a7dde;
    align-self: flex-start;
}

.article-card-link::after { content: " →"; }

/* ============================
   Single Article Page
============================ */
.page-hero {
    background:
        radial-gradient(1000px 400px at 80% -10%, #e3edfc 0%, transparent 60%),
        radial-gradient(800px 300px at 0% 110%, #f4e4f7 0%, transparent 60%),
        #fafbfd;
    padding: 60px 0 50px;
    text-align: center;
}

.breadcrumbs {
    font-size: .9rem;
    color: #6b7a90;
    margin-bottom: 18px;
}

.breadcrumbs a { color: #4a7dde; }

.page-hero h1 {
    max-width: 880px;
    margin: 0 auto 14px;
    font-size: 2.6rem;
}

.page-hero .lead {
    color: #5a6878;
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.article-body {
    max-width: 820px;
    margin: 0 auto;
    padding: 60px 24px;
}

.article-body h2 {
    font-size: 1.7rem;
    margin-top: 1.8em;
}

.article-body h3 {
    font-size: 1.3rem;
    margin-top: 1.6em;
}

.article-body ul, .article-body ol {
    padding-left: 22px;
    margin-bottom: 1.1em;
}

.article-body li { margin-bottom: 8px; }

.article-body blockquote {
    border-left: 4px solid #4a7dde;
    background: #f3f7fd;
    padding: 16px 22px;
    border-radius: 8px;
    margin: 22px 0;
    color: #3a4a60;
    font-style: italic;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(20, 40, 80, .04);
}

.article-body th, .article-body td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eef0f5;
}

.article-body th {
    background: #f3f7fd;
    color: #1f2d3d;
    font-weight: 700;
}

.article-body a {
    color: #2f5fc4;
    border-bottom: 1px solid #c9d6ec;
}

.article-body a:hover {
    color: #1f2d3d;
    border-bottom-color: #1f2d3d;
}

.cta-box {
    background: linear-gradient(135deg, #4a7dde 0%, #6a99ec 100%);
    color: #fff;
    padding: 36px;
    border-radius: 16px;
    margin: 36px 0;
    text-align: center;
}

.cta-box h3 {
    color: #fff;
    margin-bottom: 10px;
}

.cta-box p { color: #e2eaf7; margin-bottom: 20px; }

.cta-box .btn-secondary {
    background: #fff;
    color: #2f5fc4;
}

.related-articles {
    background: #f5f7fb;
    padding: 60px 0;
    border-top: 1px solid #eef0f5;
}

.related-articles h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.6rem;
}

/* ============================
   Footer
============================ */
.site-footer {
    background: #1f2d3d;
    color: #b9c3d4;
    padding: 56px 0 24px;
}

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

.site-footer h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 16px;
    letter-spacing: .3px;
}

.site-footer a {
    color: #b9c3d4;
    display: block;
    padding: 4px 0;
    font-size: .92rem;
}

.site-footer a:hover { color: #fff; }

.site-footer-brand p {
    font-size: .92rem;
    line-height: 1.7;
    color: #9aa6ba;
    max-width: 360px;
}

.site-footer-bottom {
    border-top: 1px solid #2c3e54;
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    color: #8a96aa;
    flex-wrap: wrap;
    gap: 12px;
}

/* ============================
   Responsive
============================ */
@media (max-width: 960px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .site-footer-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 2.3rem; }
    h1 { font-size: 2rem; }
}

@media (max-width: 640px) {
    .container { padding: 0 18px; }
    .site-header-inner { padding: 14px 0; }
    .site-nav { gap: 14px; width: 100%; justify-content: space-between; }
    .hero { padding: 60px 0 50px; }
    .hero h1 { font-size: 1.9rem; }
    .hero p.lead { font-size: 1rem; }
    .section { padding: 56px 0; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: 1fr; }
    .site-footer-grid { grid-template-columns: 1fr; }
    .page-hero h1 { font-size: 2rem; }
    .article-body { padding: 40px 18px; }
    .category-dropdown-menu { left: 0; right: auto; }
}
