/*
Theme Name: Kakobuy Spreadsheet SEO
Theme URI: https://sheetfinds.com/
Author: Sheetfinds
Author URI: https://sheetfinds.com/
Description: A clean, light, SEO-optimized WordPress theme built around the Kakobuy Spreadsheet topic. Ships with a dropdown category navigation, a Guide dropdown that lists every article, two call-to-action buttons ("Kakobuy Spreadsheet" and "Buy It Now") pointing to sheetfinds.com, and 10 pre-written original SEO articles fully interlinked with the homepage.
Version: 1.0.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kakobuy-seo
Tags: blog, one-column, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   RESET & BASE  — clean sky-blue + warm amber palette
   Primary: sky #0284c7   Accent: amber #f59e0b
   ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

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

a {
    color: #0284c7;
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: #0369a1; text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    color: #0c1e2e;
    line-height: 1.25;
    margin: 0 0 .6em;
    font-weight: 700;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.35rem; }

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 #e2ecf5;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(8px);
}

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

.site-logo a {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0c1e2e;
    letter-spacing: -0.02em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.site-logo a::before {
    content: "";
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: linear-gradient(135deg, #0ea5e9 0%, #f59e0b 100%);
    box-shadow: 0 4px 12px rgba(14, 165, 233, .28);
}
.site-logo span { color: #f59e0b; }

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

.site-nav a:not(.btn) {
    color: #334155;
    font-weight: 500;
    font-size: 0.95rem;
}
.site-nav a:not(.btn):hover { color: #0284c7; text-decoration: none; }

/* Dropdown */
.dropdown {
    position: relative;
}
.dropdown__toggle {
    background: none;
    border: 1px solid #e2ecf5;
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #334155;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s ease;
    font-family: inherit;
}
.dropdown__toggle:hover { border-color: #0284c7; color: #0284c7; }
.dropdown__toggle::after {
    content: "";
    width: 8px; height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform .2s ease;
}
.dropdown.is-open .dropdown__toggle::after { transform: rotate(-135deg); margin-top: 3px; }

.dropdown__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 260px;
    background: #fff;
    border: 1px solid #e2ecf5;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(2, 132, 199, .12);
    padding: 8px;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
}
.dropdown.is-open .dropdown__menu { display: block; }

.dropdown__menu a {
    display: block;
    padding: 10px 14px;
    color: #334155;
    border-radius: 8px;
    font-size: 0.95rem;
    text-decoration: none;
}
.dropdown__menu a:hover { background: #e0f2fe; color: #0369a1; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.98rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    line-height: 1.2;
    font-family: inherit;
}

.btn--primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, .30);
}
.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 132, 199, .40);
    color: #fff;
    text-decoration: none;
}

.btn--secondary {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #422006;
    box-shadow: 0 4px 14px rgba(245, 158, 11, .30);
}
.btn--secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(245, 158, 11, .40);
    color: #422006;
    text-decoration: none;
}

.btn--ghost {
    background: #ffffff;
    color: #0284c7;
    border-color: #bae6fd;
}
.btn--ghost:hover { background: #e0f2fe; border-color: #0284c7; text-decoration: none; }

.btn--lg { padding: 14px 28px; font-size: 1.05rem; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background:
        radial-gradient(circle at 12% 22%, rgba(14, 165, 233, .18), transparent 45%),
        radial-gradient(circle at 88% 78%, rgba(245, 158, 11, .14), transparent 45%),
        linear-gradient(180deg, #f5faff 0%, #cee6f7 100%);
    padding: 96px 0 84px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .38;
    pointer-events: none;
}
.hero::before {
    width: 340px; height: 340px;
    background: #bae6fd;
    top: -80px; left: -60px;
}
.hero::after {
    width: 260px; height: 260px;
    background: #fde68a;
    bottom: -60px; right: -40px;
}
.hero .container { position: relative; z-index: 1; }

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 18px;
    background: linear-gradient(135deg, #0c1e2e 0%, #0284c7 55%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p.lead {
    font-size: 1.15rem;
    color: #475569;
    max-width: 700px;
    margin: 0 auto 32px;
}

.hero__cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.hero__badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 18px;
    letter-spacing: 0.02em;
    border: 1px solid #bae6fd;
}

.hero__stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 36px;
    color: #475569;
    font-size: 0.95rem;
}
.hero__stats strong { color: #0369a1; font-size: 1.4rem; display: block; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    padding: 74px 0;
}
.section--alt { background: #ffffff; }

.section__header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}
.section__header p { color: #64748b; font-size: 1.05rem; }

/* ============================================================
   CATEGORY GRID
   ============================================================ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.cat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e2ecf5;
    border-radius: 14px;
    color: #0c1e2e;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}
.cat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, .05), rgba(245, 158, 11, .05));
    opacity: 0;
    transition: opacity .25s ease;
}
.cat-card:hover {
    border-color: #0ea5e9;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(2, 132, 199, .12);
    text-decoration: none;
    color: #0369a1;
}
.cat-card:hover::before { opacity: 1; }

.cat-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.cat-card__icon svg { display: block; width: 24px; height: 24px; }
.cat-card__label { position: relative; z-index: 1; }

/* Every 3rd card gets the amber accent */
.cat-card:nth-child(3n) .cat-card__icon {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    color: #92400e;
}

/* ============================================================
   ARTICLES GRID
   ============================================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.article-card {
    background: #ffffff;
    border: 1px solid #e2ecf5;
    border-radius: 16px;
    overflow: hidden;
    transition: all .25s ease;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(2, 132, 199, .12);
    border-color: #bae6fd;
}

.article-card__cover {
    height: 160px;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #fef3c7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0369a1;
    position: relative;
}
.article-card__cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.55), transparent 55%);
}
.article-card:nth-child(2n) .article-card__cover {
    background: linear-gradient(135deg, #fde68a 0%, #fef3c7 50%, #e0f2fe 100%);
    color: #92400e;
}
.article-card__icon-wrap {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #ffffff;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.18);
    position: relative;
    z-index: 1;
}
.article-card__icon-wrap svg { display: block; width: 40px; height: 40px; }

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

.article-card__tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #0284c7;
    margin-bottom: 10px;
}
.article-card:nth-child(2n) .article-card__tag { color: #d97706; }

.article-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: #0c1e2e;
}

.article-card p {
    color: #64748b;
    font-size: 0.95rem;
    flex: 1;
    margin-bottom: 16px;
}

.article-card__link {
    color: #0284c7;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}
.article-card__link:hover { color: #0369a1; gap: 8px; text-decoration: none; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 50%, #f59e0b 100%);
    color: #fff;
    border-radius: 24px;
    padding: 64px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.15), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,.10), transparent 50%);
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { color: #fff; font-size: 2.1rem; margin-bottom: 14px; }
.cta-banner p { color: #e0f2fe; font-size: 1.1rem; max-width: 640px; margin: 0 auto 28px; }
.cta-banner .btn--primary {
    background: #fff;
    color: #0369a1;
    box-shadow: 0 4px 14px rgba(0,0,0,.10);
}
.cta-banner .btn--primary:hover {
    background: #f0f9ff;
    color: #0c4a6e;
    box-shadow: 0 8px 22px rgba(0,0,0,.16);
}
.cta-banner .btn--secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.5);
    box-shadow: none;
}
.cta-banner .btn--secondary:hover {
    background: rgba(255,255,255,.12);
    border-color: #fff;
    color: #fff;
    box-shadow: none;
}

/* ============================================================
   FEATURE LIST
   ============================================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}
.feature {
    background: #ffffff;
    border: 1px solid #e2ecf5;
    border-radius: 16px;
    padding: 28px;
    transition: all .25s ease;
}
.feature:hover {
    border-color: #bae6fd;
    box-shadow: 0 8px 22px rgba(2, 132, 199, .10);
    transform: translateY(-2px);
}
.feature__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.feature:nth-child(2n) .feature__icon {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    color: #92400e;
}
.feature__icon svg { display: block; width: 22px; height: 22px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: #64748b; margin: 0; font-size: 0.95rem; }

/* ============================================================
   ARTICLE / PAGE BODY
   ============================================================ */
.entry {
    background: #ffffff;
    border-radius: 20px;
    padding: 56px;
    margin: 40px auto 60px;
    box-shadow: 0 4px 24px rgba(2, 132, 199, .06);
    max-width: 860px;
}

.entry__meta {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.entry__meta .tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #bae6fd;
}

.entry h1 { font-size: 2.4rem; margin-bottom: 20px; }
.entry h2 { font-size: 1.6rem; margin: 40px 0 14px; padding-bottom: 10px; border-bottom: 2px solid #e0f2fe; }
.entry h3 { font-size: 1.2rem; margin: 28px 0 10px; color: #0369a1; }
.entry p, .entry li { color: #334155; }
.entry ul, .entry ol { padding-left: 22px; margin: 0 0 1.4em; }
.entry li { margin-bottom: .5em; }
.entry strong { color: #0c1e2e; }
.entry blockquote {
    border-left: 4px solid #0ea5e9;
    padding: 14px 22px;
    background: #f0f9ff;
    border-radius: 0 12px 12px 0;
    margin: 24px 0;
    color: #334155;
    font-style: italic;
}
.entry a { color: #0284c7; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.entry a:hover { color: #d97706; }

.entry .inline-cta {
    background: linear-gradient(135deg, #e0f2fe, #fef3c7);
    border: 1px solid #bae6fd;
    border-radius: 14px;
    padding: 22px 26px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.entry .inline-cta p { margin: 0; font-weight: 600; color: #0c4a6e; }

.related-articles {
    border-top: 1px solid #e2ecf5;
    margin-top: 50px;
    padding-top: 30px;
}
.related-articles h3 { font-size: 1.2rem; margin-bottom: 16px; color: #0c1e2e; }
.related-articles ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.related-articles li { margin: 0; }
.related-articles a {
    display: block;
    padding: 14px 18px;
    background: #f5faff;
    border: 1px solid #e2ecf5;
    border-radius: 10px;
    color: #334155;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all .2s ease;
    text-decoration: none;
}
.related-articles a:hover {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0369a1;
    text-decoration: none;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 12px;
}
.breadcrumb a { color: #64748b; }
.breadcrumb a:hover { color: #0284c7; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #0c1e2e;
    color: #cbd5e1;
    padding: 60px 0 24px;
    margin-top: 80px;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #ffffff; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; font-size: 0.95rem; }
.footer-col p { color: #94a3b8; font-size: 0.95rem; }

.footer-bottom {
    border-top: 1px solid #1e2f42;
    padding-top: 22px;
    text-align: center;
    color: #7b90a9;
    font-size: 0.9rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .entry { padding: 34px 24px; }
    .hero { padding: 64px 0 54px; }
    .section { padding: 54px 0; }
    .cta-banner { padding: 44px 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
}

@media (max-width: 640px) {
    .site-nav { gap: 10px; }
    .site-nav > a:not(.btn) { display: none; }
    .hero h1 { font-size: 1.8rem; }
    .hero p.lead { font-size: 1rem; }
    .btn { padding: 10px 18px; font-size: 0.95rem; }
    .entry h1 { font-size: 1.8rem; }
    .entry h2 { font-size: 1.35rem; }
}
