/* ===== CSS Variables ===== */
:root {
  --primary: #009B3A;
  --primary-dark: #007A2E;
  --primary-light: #e6f7ed;
  --accent: #FED100;
  --accent-dark: #E0B800;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-dark: #0f172a;
  --text: #1e293b;
  --text-light: #64748b;
  --text-white: #f8fafc;
  --border: #e2e8f0;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 8px 25px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --success: #10b981;
  --gradient: linear-gradient(135deg, #009B3A 0%, #007A2E 50%, #005A22 100%);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== Base ===== */
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ===== Typography ===== */
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.2; margin-bottom: 0.5rem; }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 700; margin-bottom: 0.5rem; }
h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.25rem; }
p { margin-bottom: 1rem; }

/* ===== Navigation ===== */
.nav { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 800; font-size: 1.25rem; color: var(--primary); text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }
.nav-links { display: none; list-style: none; gap: 0.25rem; }
.nav-links a {
  display: block; padding: 0.5rem 0.75rem; border-radius: var(--radius);
  color: var(--text); font-size: 0.875rem; font-weight: 500; transition: background 0.15s;
}
.nav-links a:hover { background: var(--bg-alt); text-decoration: none; }
.nav-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: none; background: none; cursor: pointer; border-radius: var(--radius);
}
.nav-toggle:hover { background: var(--bg-alt); }
.nav-toggle svg { width: 24px; height: 24px; color: var(--text); }
.nav-mobile { display: none; padding: 0.5rem 1rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.nav-mobile.open { display: block; }
.nav-mobile a { display: block; padding: 0.625rem 0.75rem; border-radius: var(--radius); color: var(--text); font-size: 0.9375rem; }
.nav-mobile a:hover { background: var(--bg-alt); text-decoration: none; }
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ===== Container ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }

/* ===== Hero ===== */
.hero {
  background: var(--gradient); color: white;
  padding: 4rem 1rem 3rem; text-align: center;
}
.hero h1 { color: white; font-size: clamp(2rem, 5vw, 3.25rem); }
.hero p { color: rgba(255,255,255,0.9); font-size: clamp(1rem, 2.5vw, 1.25rem); max-width: 650px; margin: 0.75rem auto 1.5rem; }
.hero-search { max-width: 500px; margin: 0 auto; position: relative; }
.hero-search input {
  width: 100%; padding: 0.875rem 1.25rem; padding-right: 3rem;
  border: 2px solid rgba(255,255,255,0.3); border-radius: 50px;
  font-size: 1rem; background: rgba(255,255,255,0.15); color: white;
  outline: none; transition: border-color 0.2s;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.6); }
.hero-search input:focus { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.2); }
.hero-stats {
  display: flex; justify-content: center; gap: 2rem; margin-top: 2rem;
  font-size: 0.875rem; color: rgba(255,255,255,0.85);
}
.hero-stat-num { font-size: 1.5rem; font-weight: 800; display: block; }

/* ===== Category Pills ===== */
.category-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  justify-content: center; padding: 1.5rem 0;
}
.category-pill {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.5rem 1rem; border-radius: 50px;
  background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--text); font-size: 0.875rem; font-weight: 500;
  text-decoration: none; transition: all 0.15s;
}
.category-pill:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); text-decoration: none; }
.category-pill.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ===== Tool Card Grid ===== */
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; padding: 1rem 0 2rem; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }

.tool-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem; transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 0.75rem;
}
.tool-card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-3px); text-decoration: none; }
.tool-card-header { display: flex; align-items: center; gap: 0.75rem; }
.tool-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; background: var(--primary-light); flex-shrink: 0;
}
.tool-card-header h3 { color: var(--text); font-size: 1.0625rem; }
.tool-card-header .tool-badge {
  margin-left: auto; font-size: 0.6875rem; font-weight: 600;
  padding: 0.2rem 0.5rem; border-radius: 50px; white-space: nowrap;
}
.badge-free { background: #dcfce7; color: #16a34a; }
.badge-freemium { background: #fef3c7; color: #b45309; }
.badge-paid { background: #fee2e2; color: #dc2626; }
.tool-card p { font-size: 0.875rem; color: var(--text-light); margin: 0; flex: 1; }
.tool-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.tool-card-category {
  font-size: 0.75rem; color: var(--text-light);
  background: var(--bg-alt); padding: 0.2rem 0.625rem; border-radius: 50px;
}
.tool-card-rating { font-size: 0.8125rem; color: var(--accent); font-weight: 600; }

/* ===== Section Heading ===== */
.section-heading {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2rem 0 0.75rem; border-bottom: 2px solid var(--border); margin-bottom: 1rem;
}
.section-heading h2 { margin-bottom: 0; }
.section-heading a { font-size: 0.875rem; font-weight: 500; }

/* ===== Featured Banner ===== */
.featured-banner {
  background: var(--gradient); border-radius: var(--radius-lg);
  padding: 2rem; color: white; margin: 2rem 0;
  display: flex; flex-direction: column; gap: 1rem;
}
@media (min-width: 768px) {
  .featured-banner { flex-direction: row; align-items: center; }
  .featured-banner-text { flex: 1; }
}
.featured-banner h2 { color: white; }
.featured-banner p { color: rgba(255,255,255,0.9); margin-bottom: 0.5rem; }

/* ===== Tool Detail Page ===== */
.tool-detail { padding: 2rem 0 3rem; }
.tool-detail-header {
  display: flex; flex-direction: column; gap: 1rem;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .tool-detail-header { flex-direction: row; align-items: flex-start; }
}
.tool-detail-icon {
  width: 72px; height: 72px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; background: var(--primary-light); flex-shrink: 0;
}
.tool-detail-info { flex: 1; }
.tool-detail-info h1 { margin-bottom: 0.25rem; }
.tool-detail-meta {
  display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.875rem; color: var(--text-light); margin-top: 0.5rem;
}
.tool-detail-meta span { display: flex; align-items: center; gap: 0.25rem; }
.tool-detail-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }

.tool-detail-body { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 768px) {
  .tool-detail-body { flex-direction: row; }
  .tool-detail-main { flex: 2; }
  .tool-detail-sidebar { flex: 1; }
}

/* ===== Pros/Cons ===== */
.pros-cons { display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 1rem 0; }
@media (min-width: 640px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.pros-list, .cons-list {
  padding: 1rem 1.25rem; border-radius: var(--radius); list-style: none;
}
.pros-list { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cons-list { background: #fef2f2; border: 1px solid #fecaca; }
.pros-list h3 { color: #16a34a; margin-bottom: 0.5rem; }
.cons-list h3 { color: #dc2626; margin-bottom: 0.5rem; }
.pros-list li, .cons-list li {
  padding: 0.25rem 0; font-size: 0.9375rem; padding-left: 1.25rem; position: relative;
}
.pros-list li::before { content: '+'; position: absolute; left: 0; color: #16a34a; font-weight: 700; }
.cons-list li::before { content: '-'; position: absolute; left: 0; color: #dc2626; font-weight: 700; }

/* ===== Pricing Table ===== */
.pricing-table {
  width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9375rem;
}
.pricing-table th, .pricing-table td {
  padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border);
}
.pricing-table th { background: var(--bg-alt); font-weight: 600; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); }
.pricing-table tr:hover { background: var(--bg-alt); }

/* ===== Sidebar Card ===== */
.sidebar-card {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.25rem; margin-bottom: 1rem;
}
.sidebar-card h3 { font-size: 0.9375rem; margin-bottom: 0.75rem; }

/* ===== CTA Box ===== */
.cta-box {
  background: var(--gradient); border-radius: var(--radius-lg);
  padding: 1.5rem; color: white; text-align: center;
}
.cta-box h3 { color: white; font-size: 1.125rem; margin-bottom: 0.5rem; }
.cta-box p { color: rgba(255,255,255,0.9); font-size: 0.875rem; margin-bottom: 1rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.75rem 1.5rem; border: none; border-radius: var(--radius);
  font-size: 0.9375rem; font-weight: 600; cursor: pointer;
  transition: background 0.15s, transform 0.1s; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-white { background: white; color: var(--primary-dark); }
.btn-white:hover { background: var(--bg-alt); }
.btn-lg { padding: 0.875rem 2rem; font-size: 1.0625rem; }

/* ===== Breadcrumbs ===== */
.breadcrumbs { padding: 1rem 0 0; font-size: 0.875rem; color: var(--text-light); }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs span { margin: 0 0.375rem; }

/* ===== Content ===== */
.content-section { margin: 1.5rem 0; }
.content-section h2 { margin-bottom: 0.75rem; }
.content-section p { color: var(--text-light); }
.content-section ul, .content-section ol { color: var(--text-light); padding-left: 1.5rem; margin-bottom: 1rem; }
.content-section li { margin-bottom: 0.375rem; }

/* ===== Ad Slots ===== */
.ad-slot { text-align: center; padding: 1rem 0; max-width: 100%; overflow: hidden; }

/* ===== Newsletter ===== */
.newsletter {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; text-align: center; margin: 2rem 0;
}
.newsletter h2 { margin-bottom: 0.5rem; }
.newsletter p { color: var(--text-light); margin-bottom: 1rem; }
.newsletter-form { display: flex; gap: 0.5rem; max-width: 450px; margin: 0 auto; }
.newsletter-form input {
  flex: 1; padding: 0.75rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.9375rem;
}
.newsletter-form input:focus { outline: none; border-color: var(--primary); }

/* ===== Footer ===== */
.footer { background: var(--bg-dark); color: var(--text-white); padding: 3rem 1rem 2rem; margin-top: auto; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid h4 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; color: rgba(255,255,255,0.7); }
.footer-grid a { display: block; color: rgba(255,255,255,0.85); font-size: 0.9375rem; padding: 0.25rem 0; }
.footer-grid a:hover { color: white; text-decoration: none; }
.footer-grid p { color: rgba(255,255,255,0.6); font-size: 0.875rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem; align-items: center; text-align: center;
  font-size: 0.8125rem; color: rgba(255,255,255,0.5);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; justify-content: space-between; } }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { color: rgba(255,255,255,0.85); font-size: 0.875rem; font-weight: 500; }
.footer-social a:hover { color: white; text-decoration: none; }

/* ===== Utility ===== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-light); }

/* ===== Parishes Grid ===== */
.parishes-grid {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: center; padding: 1.5rem 0 2rem;
}
.parish-tag {
  display: inline-block; padding: 0.5rem 1.25rem;
  background: var(--primary-light); border: 1px solid var(--primary);
  border-radius: 50px; font-size: 0.875rem; font-weight: 500;
  color: var(--primary-dark);
}

/* ===== Nav Logo Tag ===== */
.nav-logo-tag {
  font-size: 0.625rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; background: var(--accent); color: #1a1a1a;
  padding: 0.125rem 0.5rem; border-radius: 50px; margin-left: 0.25rem;
}
