/* GridironDraftCompanion.com - Main Stylesheet */

:root {
  --color-primary: #1a472a;
  --color-primary-dark: #0f2d1a;
  --color-accent: #c9a227;
  --color-accent-hover: #e0b830;
  --color-bg: #f8f9fa;
  --color-surface: #ffffff;
  --color-text: #1a1a2e;
  --color-text-muted: #5a6270;
  --color-border: #e2e8f0;
  --color-success: #2d6a4f;
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent); }

img { max-width: 100%; height: auto; }

/* ── Header ── */
.site-header {
  background: var(--color-primary-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.logo:hover { color: var(--color-accent); }

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.75rem;
}

.main-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active { color: var(--color-accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ── Main Content ── */
main { flex: 1; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero / Tool Section ── */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, #2d5a3d 100%);
  color: #fff;
  padding: 3rem 0 2.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 640px;
}

.tool-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  color: var(--color-text);
}

.tool-card h2 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
}

.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  width: 100%;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
}

.btn-secondary:hover { background: var(--color-primary-dark); }

/* ── AdSense Placeholders ── */
.ad-slot {
  background: #f0f0f0;
  border: 2px dashed #ccc;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 0.8rem;
  text-align: center;
  margin: 1.5rem 0;
}

.ad-banner {
  min-height: 90px;
  width: 100%;
}

.ad-rectangle {
  min-height: 250px;
  width: 100%;
}

.ad-sticky {
  position: sticky;
  top: 80px;
}

/* ── Results Grid ── */
.results-section {
  padding: 2.5rem 0;
  display: none;
}

.results-section.visible { display: block; }

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.results-header h2 {
  font-size: 1.4rem;
  color: var(--color-primary);
}

.results-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.table-wrapper {
  overflow-x: auto;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.rankings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.rankings-table thead {
  background: var(--color-primary-dark);
  color: #fff;
}

.rankings-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.rankings-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.rankings-table tbody tr:hover { background: #f0f7f2; }

.rankings-table tbody tr:nth-child(even) { background: #fafbfc; }
.rankings-table tbody tr:nth-child(even):hover { background: #f0f7f2; }

.pos-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pos-QB { background: #dbeafe; color: #1e40af; }
.pos-RB { background: #dcfce7; color: #166534; }
.pos-WR { background: #fef3c7; color: #92400e; }
.pos-TE { background: #fce7f3; color: #9d174d; }
.pos-K  { background: #e0e7ff; color: #3730a3; }
.pos-DST { background: #f3e8ff; color: #6b21a8; }

.rank-num {
  font-weight: 700;
  color: var(--color-primary);
  width: 50px;
}

/* ── SEO Content Wall ── */
.seo-content {
  padding: 3rem 0 4rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.seo-content article {
  max-width: 800px;
}

.seo-content h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.seo-content h3 {
  font-size: 1.25rem;
  color: var(--color-primary-dark);
  margin: 2rem 0 0.75rem;
}

.seo-content p {
  margin-bottom: 1rem;
  color: var(--color-text);
  line-height: 1.75;
}

.seo-content ul, .seo-content ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}

.seo-content li { margin-bottom: 0.5rem; line-height: 1.65; }

/* ── Blog Layout ── */
.page-header {
  background: var(--color-primary-dark);
  color: #fff;
  padding: 2.5rem 0;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
}

.page-header p {
  opacity: 0.85;
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
  align-items: start;
}

.blog-main { min-width: 0; }

/* Blog List Cards */
.blog-grid {
  display: grid;
  gap: 1.5rem;
}

.blog-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  padding: 1.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.blog-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.blog-card h2 a { color: var(--color-text); }
.blog-card h2 a:hover { color: var(--color-primary); }

.blog-card-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.blog-card-excerpt {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Article Detail */
.article-content {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 2.5rem;
  border: 1px solid var(--color-border);
  line-height: 1.75;
}

.article-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.article-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.article-content h2 {
  font-size: 1.35rem;
  color: var(--color-primary);
  margin: 2rem 0 0.75rem;
}

.article-content h3 {
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  margin: 1.5rem 0 0.5rem;
}

.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin: 0.75rem 0 1.25rem 1.5rem; }
.article-content li { margin-bottom: 0.4rem; }

/* ── Legal / Static Pages ── */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.legal-content h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-primary-dark);
  margin-bottom: 1.5rem;
}

.legal-content h2 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin: 2rem 0 0.75rem;
}

.legal-content p { margin-bottom: 1rem; line-height: 1.75; }

/* Contact Form */
.contact-form {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--color-border);
  max-width: 560px;
}

.contact-form .form-group { margin-bottom: 1.25rem; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

.contact-form textarea { resize: vertical; min-height: 140px; }

.form-success {
  background: #dcfce7;
  color: #166534;
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  display: none;
}

/* ── Footer ── */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand .logo { margin-bottom: 0.75rem; }

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer-col a:hover { color: var(--color-accent); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding: 1.25rem 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
}

/* ── Print Styles ── */
@media print {
  .site-header, .site-footer, .hero, .ad-slot, .btn, .seo-content, .results-header .btn-secondary { display: none !important; }
  .results-section { display: block !important; padding: 0; }
  body { background: #fff; }
  .rankings-table thead { background: #333 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .blog-layout { grid-template-columns: 1fr; }
  .ad-sticky { position: static; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .main-nav.open {
    display: block;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-primary-dark);
    padding: 1rem 1.5rem;
  }
  .main-nav.open ul { flex-direction: column; gap: 0.75rem; }
  .nav-toggle { display: block; }
  .article-content { padding: 1.5rem; }
  .tool-card { padding: 1.25rem; }
}
