/* ToolsRanked.com — Base Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --dark: #111827;
  --gray: #6b7280;
  --light: #f9fafb;
  --border: #e5e7eb;
  --max-w: 1100px;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--dark); background: #fff; line-height: 1.6; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
nav { background: #fff; border-bottom: 1px solid var(--border); padding: 0 1.5rem; position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.3rem; font-weight: 800; color: var(--dark); }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 1.5rem; font-size: 0.9rem; }
.nav-links a { color: var(--gray); font-weight: 500; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

/* HERO */
.hero { background: linear-gradient(135deg, #eff6ff 0%, #fff 60%); padding: 4rem 1.5rem 3rem; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; line-height: 1.2; max-width: 700px; margin: 0 auto 1rem; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { color: var(--gray); font-size: 1.1rem; max-width: 550px; margin: 0 auto 2rem; }
.search-bar { display: flex; max-width: 500px; margin: 0 auto; border: 2px solid var(--primary); border-radius: 8px; overflow: hidden; }
.search-bar input { flex: 1; padding: 0.75rem 1rem; border: none; outline: none; font-size: 1rem; }
.search-bar button { background: var(--primary); color: #fff; border: none; padding: 0.75rem 1.25rem; cursor: pointer; font-weight: 600; }

/* CATEGORIES */
.section { max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.5rem; }
.section-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.5rem; }
.section-title span { color: var(--primary); }
.cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.cat-card { border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; transition: box-shadow 0.2s, border-color 0.2s; }
.cat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); border-color: var(--primary); text-decoration: none; }
.cat-card .icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.cat-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--dark); margin-bottom: 0.25rem; }
.cat-card p { font-size: 0.8rem; color: var(--gray); }

/* ARTICLE LIST */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.article-card { border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem; }
.article-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); text-decoration: none; }
.article-card .tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); background: #eff6ff; padding: 0.2rem 0.5rem; border-radius: 4px; display: inline-block; margin-bottom: 0.5rem; }
.article-card h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 0.5rem; line-height: 1.4; }
.article-card p { font-size: 0.85rem; color: var(--gray); }

/* ARTICLE PAGE */
.article-layout { max-width: var(--max-w); margin: 0 auto; padding: 2rem 1.5rem; display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; }
.article-body h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 900; margin-bottom: 0.75rem; line-height: 1.3; }
.article-body .meta { font-size: 0.85rem; color: var(--gray); margin-bottom: 2rem; }
.article-body h2 { font-size: 1.25rem; font-weight: 800; margin: 2rem 0 0.75rem; }
.article-body h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.article-body p { margin-bottom: 1rem; color: #374151; }
.article-body ul { margin: 0.5rem 0 1rem 1.5rem; }
.article-body li { margin-bottom: 0.4rem; color: #374151; }

/* TOOL CARD */
.tool-card { border: 2px solid var(--border); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; position: relative; }
.tool-card.top-pick { border-color: var(--primary); }
.tool-card .badge { position: absolute; top: -12px; left: 1rem; background: var(--primary); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 20px; text-transform: uppercase; }
.tool-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.3rem; }
.tool-card .rating { color: var(--accent); margin-bottom: 0.5rem; font-size: 0.9rem; }
.tool-card p { font-size: 0.9rem; color: var(--gray); margin-bottom: 1rem; }
.tool-card .pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.tool-card .pros h4 { color: #16a34a; font-size: 0.8rem; font-weight: 700; margin-bottom: 0.3rem; }
.tool-card .cons h4 { color: #dc2626; font-size: 0.8rem; font-weight: 700; margin-bottom: 0.3rem; }
.tool-card .pros li, .tool-card .cons li { font-size: 0.82rem; color: #374151; }
.cta-btn { display: inline-block; background: var(--primary); color: #fff; padding: 0.6rem 1.25rem; border-radius: 7px; font-weight: 700; font-size: 0.9rem; }
.cta-btn:hover { background: var(--primary-dark); text-decoration: none; }
.cta-btn.secondary { background: transparent; color: var(--primary); border: 2px solid var(--primary); }

/* SIDEBAR */
.sidebar { position: sticky; top: 80px; }
.sidebar-box { border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; margin-bottom: 1.5rem; }
.sidebar-box h4 { font-size: 0.9rem; font-weight: 800; margin-bottom: 1rem; }
.sidebar-box ul { list-style: none; }
.sidebar-box li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.sidebar-box li:last-child { border-bottom: none; }
.sidebar-box a { color: var(--dark); }
.sidebar-box a:hover { color: var(--primary); }

/* FOOTER */
footer { background: var(--dark); color: #9ca3af; padding: 2.5rem 1.5rem; margin-top: 4rem; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 0.75rem; }
footer ul { list-style: none; }
footer li { margin-bottom: 0.4rem; font-size: 0.85rem; }
footer a { color: #9ca3af; }
footer a:hover { color: #fff; }
.footer-bottom { max-width: var(--max-w); margin: 1.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid #374151; font-size: 0.8rem; display: flex; justify-content: space-between; }

/* RESPONSIVE */
@media (max-width: 768px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr; }
  .tool-card .pros-cons { grid-template-columns: 1fr; }
}
