/*
Theme Name: Usfans Spreadsheet SEO
Theme URI: https://sheetfinds.com/
Author: Usfans Team
Author URI: https://sheetfinds.com/
Description: A clean, SEO-focused WordPress theme built around the Usfans Spreadsheet niche. American-classic navy & red design, category dropdown, Guide article hub, and homepage CTA buttons that link to sheetfinds.com.
Version: 1.0.0
Requires at least: 5.6
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: usfans-seo
Tags: seo, one-column, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #1a2440;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: #0a1f44; text-decoration: none; transition: color .2s ease; }
a:hover { color: #c8102e; }
h1, h2, h3, h4, h5, h6 { font-family: "Georgia", "Times New Roman", serif; color: #0a1f44; line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.35rem; }
p  { margin: 0 0 1em; }
.container { width: 92%; max-width: 1200px; margin: 0 auto; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  background: #0a1f44;
  color: #fff;
  border-bottom: 3px solid #c8102e;
  position: sticky; top: 0; z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 20px;
}
.site-branding a {
  color: #fff; font-size: 1.4rem; font-weight: 800; letter-spacing: .3px;
  display: flex; align-items: center; gap: 10px;
}
.site-branding .brand-mark {
  background: #c8102e; color: #fff; padding: 4px 10px; border-radius: 4px;
  font-family: Georgia, serif; font-size: 1.1rem;
}
.site-tagline { font-size: .8rem; color: #b7c4dc; margin-top: 2px; }

/* Nav */
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  color: #fff; padding: 10px 14px; font-weight: 600; font-size: .95rem;
  border-radius: 4px;
}
.main-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-toggle {
  background: none; border: none; color: #fff; cursor: pointer;
  padding: 10px 14px; font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; border-radius: 4px;
}
.dropdown-toggle:hover, .dropdown.open .dropdown-toggle { background: rgba(255,255,255,.08); }
.dropdown-toggle::after {
  content: ""; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 5px solid #fff; margin-left: 4px;
}
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: #fff; min-width: 240px;
  border: 1px solid #e2e8f0; border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  padding: 6px 0; display: none; z-index: 1000;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 10px 16px; color: #0a1f44;
  font-size: .92rem; font-weight: 500;
}
.dropdown-menu a:hover { background: #f4f6fb; color: #c8102e; }

/* Mobile nav toggle */
.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.4);
  color: #fff; padding: 8px 12px; border-radius: 4px; cursor: pointer;
  font-family: inherit;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px; font-weight: 700; font-size: 1rem;
  border-radius: 6px; border: 2px solid transparent; cursor: pointer;
  text-transform: uppercase; letter-spacing: .5px;
  transition: all .2s ease; text-decoration: none;
}
.btn-primary { background: #c8102e; color: #fff; border-color: #c8102e; }
.btn-primary:hover { background: #a10d24; border-color: #a10d24; color: #fff; }
.btn-secondary { background: #fff; color: #0a1f44; border-color: #0a1f44; }
.btn-secondary:hover { background: #0a1f44; color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: #0a1f44; }
.btn-lg { padding: 16px 40px; font-size: 1.1rem; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background-color: #0a1f44;
  background-image:
    linear-gradient(135deg, rgba(10,31,68,.78) 0%, rgba(26,58,112,.72) 100%),
    url('assets/img/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff; padding: 90px 0 110px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(200,16,46,.18) 0, transparent 45%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,.06) 0, transparent 45%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }
.hero .badge {
  display: inline-block; background: rgba(200,16,46,.25); color: #ffd6dd;
  padding: 6px 16px; border-radius: 20px; font-size: .85rem;
  font-weight: 600; letter-spacing: 1px; margin-bottom: 20px;
  border: 1px solid rgba(200,16,46,.5);
  backdrop-filter: blur(4px);
}
.hero h1 { color: #fff; margin-bottom: 20px; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.hero .lede { font-size: 1.15rem; color: #eef2fa; margin-bottom: 32px; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 70px 0; }
.section-alt { background: #f4f6fb; }
.section-dark { background: #0a1f44; color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-title { text-align: center; margin-bottom: 12px; }
.section-sub {
  text-align: center; color: #4a5878; max-width: 640px; margin: 0 auto 42px;
  font-size: 1.05rem;
}
.section-dark .section-sub { color: #b7c4dc; }

/* Category grid */
.category-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.category-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  overflow: hidden; display: block; text-align: center;
  color: #0a1f44; font-weight: 600;
  transition: all .25s ease;
  text-decoration: none;
}
.category-card:hover {
  border-color: #c8102e; transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(10,31,68,.15);
  color: #c8102e;
}
.category-card .cat-img {
  display: block; width: 100%; aspect-ratio: 1 / 1;
  background-color: #e2e8f0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  border-bottom: 1px solid #e2e8f0;
  transition: transform .35s ease;
}
.category-card:hover .cat-img { transform: scale(1.05); }
.category-card .cat-body {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 12px 18px;
}
.category-card .cat-name { font-size: 1.05rem; line-height: 1.3; }
.category-card .cat-cta { font-size: .78rem; color: #7686a5; text-transform: uppercase; letter-spacing: .5px; font-weight: 500; }
.category-card:hover .cat-cta { color: #c8102e; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(90deg, #c8102e 0%, #8a0a1e 100%);
  color: #fff; padding: 56px 0; text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { color: #ffe4e8; margin-bottom: 26px; font-size: 1.05rem; }

/* Article grid */
.article-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}
.article-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
  transition: all .25s ease;
}
.article-card:hover { border-color: #0a1f44; box-shadow: 0 10px 24px rgba(10,31,68,.1); transform: translateY(-3px); }
.article-card .article-tag {
  display: inline-block; background: #0a1f44; color: #fff;
  padding: 4px 10px; border-radius: 3px; font-size: .72rem;
  text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
  align-self: flex-start;
}
.article-card h3 { margin: 0; font-size: 1.2rem; }
.article-card h3 a { color: #0a1f44; }
.article-card h3 a:hover { color: #c8102e; }
.article-card .article-excerpt { color: #4a5878; font-size: .95rem; margin: 0; }
.article-card .read-more {
  margin-top: auto; font-weight: 700; color: #c8102e; font-size: .9rem;
  text-transform: uppercase; letter-spacing: .5px;
}
.article-card .read-more::after { content: " \2192"; }

/* Feature blocks */
.feature-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px; margin-top: 20px;
}
.feature-block { text-align: center; padding: 20px; }
.feature-block .feature-num {
  display: inline-block; background: #c8102e; color: #fff;
  width: 46px; height: 46px; border-radius: 50%; line-height: 46px;
  font-weight: 800; margin-bottom: 14px; font-family: Georgia, serif;
}
.feature-block h3 { color: inherit; margin-bottom: 8px; font-size: 1.15rem; }
.feature-block p { color: inherit; opacity: .85; font-size: .95rem; margin: 0; }

/* ==========================================================================
   Single article
   ========================================================================== */
.entry-header {
  background: #f4f6fb; padding: 60px 0 40px; text-align: center;
  border-bottom: 1px solid #e2e8f0;
}
.entry-header .entry-tag {
  display: inline-block; background: #c8102e; color: #fff;
  padding: 4px 14px; border-radius: 3px; font-size: .75rem;
  text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
  margin-bottom: 16px;
}
.entry-header h1 { max-width: 820px; margin: 0 auto 12px; }
.entry-meta { color: #7686a5; font-size: .9rem; }
.entry-content {
  max-width: 780px; margin: 0 auto; padding: 50px 20px 30px;
  font-size: 1.05rem;
}
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; color: #0a1f44; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em 1.4em; padding: 0; }
.entry-content li { margin-bottom: .5em; }
.entry-content blockquote {
  border-left: 4px solid #c8102e; padding: 8px 20px;
  margin: 1.5em 0; background: #f4f6fb; color: #0a1f44;
  font-style: italic;
}
.entry-content a { color: #c8102e; text-decoration: underline; }
.entry-content a:hover { color: #0a1f44; }

.related-cta {
  background: #f4f6fb; border-left: 4px solid #0a1f44;
  padding: 22px 26px; margin: 32px 0; border-radius: 4px;
}
.related-cta h4 { margin: 0 0 6px; color: #0a1f44; font-family: inherit; font-size: 1.05rem; }
.related-cta p { margin: 0; color: #4a5878; }
.related-cta a { color: #c8102e; font-weight: 700; }

.post-nav-back {
  max-width: 780px; margin: 0 auto; padding: 0 20px 60px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0a1f44; color: #b7c4dc; padding: 50px 0 24px;
  border-top: 3px solid #c8102e;
}
.footer-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 36px; margin-bottom: 32px;
}
.footer-col h4 { color: #fff; font-family: inherit; font-size: 1rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; font-size: .92rem; }
.footer-col a { color: #b7c4dc; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: .85rem; color: #7686a5;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #0a1f44; padding: 12px 5%; flex-direction: column;
    align-items: stretch; border-top: 1px solid rgba(255,255,255,.1);
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; gap: 0; width: 100%; }
  .main-nav a { padding: 12px 8px; display: block; }
  .dropdown { width: 100%; }
  .dropdown-toggle { width: 100%; justify-content: space-between; padding: 12px 8px; }
  .dropdown-menu {
    position: static; box-shadow: none; border: none; background: rgba(255,255,255,.05);
    margin-top: 4px;
  }
  .dropdown-menu a { color: #fff; }
  .dropdown-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .hero { padding: 60px 0 70px; }
  .section { padding: 50px 0; }
}
