/* ══════════════════════════════════════
   TeacherAI — Cloudflare Pages Static Site
   File: style.css
══════════════════════════════════════ */

:root {
  --font-display: 'Merriweather', Georgia, serif;
  --font-body: 'Source Sans 3', sans-serif;
  --c-bg: #f5f0e8;
  --c-card: rgba(255,255,255,0.94);
  --c-border: rgba(139,109,71,0.15);
  --c-text: #2c2416;
  --c-muted: #8a7a62;
  --c-accent: #2a6b4f;
  --c-accent-light: #e6f2ed;
  --c-gradient: linear-gradient(135deg, #2a6b4f 0%, #3d9970 100%);
  --c-chalkboard: #2a3a2e;
  --c-chalk: #e8e4d8;
  --c-green: #2a6b4f;
  --c-red: #b5423a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--c-text);
  line-height: 1.7;
  background: var(--c-bg);
}

a { color: inherit; }

/* ── HERO ── */
.hero {
  position: relative;
  background: var(--c-chalkboard);
  background-image: url('https://images.unsplash.com/photo-1577896851231-70ef18881754?w=1400&q=80');
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 60px 20px 56px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,30,25,0.7), rgba(20,30,25,0.85));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.hero-icon {
  font-size: 44px;
  display: block;
  margin-bottom: 12px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 900;
  color: var(--c-chalk);
  margin-bottom: 12px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 15px;
  color: #b8c4ba;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── NAV ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}

.site-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  color: var(--c-accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--c-muted);
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 20px;
  transition: all 0.15s;
}

.nav-links a:hover {
  background: var(--c-accent-light);
  color: var(--c-accent);
}

/* ── MAIN ── */
.main-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px;
}

/* ── INFO CARDS ── */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}

.info-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(42,107,79,0.08);
}

.info-icon {
  font-size: 30px;
  display: block;
  margin-bottom: 10px;
}

.info-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.info-card p {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.5;
}

/* ── SECTION HEADING ── */
.section-heading {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-accent);
  display: inline-block;
}

/* ── POSTS GRID ── */
.posts-grid {
  display: grid;
  gap: 22px;
}

.post-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(42,107,79,0.12);
}

.post-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.post-card-body {
  padding: 20px 24px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}

.post-card-title a {
  color: var(--c-text);
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--c-accent);
}

.post-meta {
  font-size: 12px;
  color: var(--c-muted);
  margin-bottom: 8px;
}

.post-card-snippet {
  font-size: 14px;
  color: #5a5040;
  line-height: 1.6;
  margin-bottom: 14px;
}

.read-more {
  display: inline-block;
  background: var(--c-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.read-more:hover {
  opacity: 0.85;
}

/* ── SINGLE POST ── */
.single-post {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 36px 40px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
  margin-bottom: 24px;
}

.single-post .post-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 10px;
}

.single-post .featured-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 12px;
  margin: 18px 0 22px;
}

.single-post .intro {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.single-post h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(42,107,79,0.2);
}

/* ── AI TOOL CARDS ── */
.ai-tool-card {
  background: #fff;
  border: 1px solid rgba(42,107,79,0.12);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 20px 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ai-tool-card:hover {
  border-color: var(--c-accent);
  box-shadow: 0 6px 20px rgba(42,107,79,0.1);
}

.ai-tool-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ai-tool-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-tool-rank {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--c-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-accent);
  flex-shrink: 0;
}

.ai-tool-rank.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #2c2416; }
.ai-tool-rank.silver { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.ai-tool-rank.bronze { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }

.ai-tool-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.ai-tool-meta {
  font-size: 12px;
  color: var(--c-muted);
  margin-top: 2px;
}

.ai-tool-score {
  text-align: right;
  flex-shrink: 0;
}

.ai-tool-score-num {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--c-accent);
}

.ai-tool-score-denom {
  font-size: 12px;
  color: var(--c-muted);
}

.ai-bar-wrap {
  width: 70px;
  height: 3px;
  background: #e0ebe5;
  border-radius: 2px;
  margin: 4px 0 0 auto;
}

.ai-bar {
  height: 3px;
  border-radius: 2px;
  background: var(--c-gradient);
}

.ai-tool-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 14px;
}

.ai-tool-desc {
  font-size: 14px;
  color: #5a5040;
  line-height: 1.65;
  margin-bottom: 12px;
}

.ai-pc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.ai-pros {
  background: #edf7ee;
  border: 1px solid #c3e6c5;
  border-radius: 10px;
  padding: 12px 14px;
}

.ai-cons {
  background: #fef5f5;
  border: 1px solid #f5c0c0;
  border-radius: 10px;
  padding: 12px 14px;
}

.ai-pros h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-green);
  margin-bottom: 6px;
}

.ai-cons h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-red);
  margin-bottom: 6px;
}

.ai-pros ul, .ai-cons ul {
  list-style: none;
}

.ai-pros li, .ai-cons li {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 3px;
  padding-left: 15px;
  position: relative;
}

.ai-pros li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--c-green);
  font-weight: 700;
}

.ai-cons li::before {
  content: '✗';
  position: absolute;
  left: 0;
  color: var(--c-red);
  font-weight: 700;
}

.ai-visit-btn {
  display: inline-block;
  background: var(--c-gradient);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.ai-visit-btn:hover {
  opacity: 0.85;
}

.ai-verdict {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--c-muted);
  margin: 10px 0 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(42,107,79,0.12);
}

/* ── AD SLOT ── */
.ad-slot {
  background: rgba(245,240,232,0.7);
  border: 1px dashed rgba(139,109,71,0.3);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin: 28px 0;
  color: var(--c-muted);
  font-size: 13px;
}

.ad-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

/* ── BACK LINK ── */
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--c-accent);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* ── FOOTER ── */
.site-footer {
  text-align: center;
  padding: 28px 16px;
  font-size: 12px;
  color: var(--c-muted);
  border-top: 1px solid var(--c-border);
  background: rgba(255,255,255,0.6);
  margin-top: 40px;
}

/* ── DISCLOSURE ── */
.disclosure {
  font-size: 12px;
  color: #999;
  border-top: 1px solid var(--c-border);
  padding-top: 16px;
  margin-top: 32px;
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .hero-title { font-size: 24px; }
  .info-cards { grid-template-columns: 1fr; }
  .single-post { padding: 22px 18px; }
  .ai-pc-grid { grid-template-columns: 1fr; }
  .ai-tool-header { flex-direction: column; gap: 8px; }
  .ai-tool-score { text-align: left; }
  .nav-links { display: none; }
}
