/* HabitView pSEO - habits.css */
:root {
  --primary: #2A94DB;
  --primary-hover: #1A7FD0;
  --accent: #34C759;
  --dark: #1a1a2e;
  --text: #333;
  --text-light: #666;
  --bg: #f4f9fd;
  --white: #fff;
  --card-shadow: 0 4px 20px rgba(0,0,0,0.06);
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, sans-serif; color: var(--text); background: var(--white); line-height: 1.7; }
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid #eee; padding: 12px 0; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; max-width: 800px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--dark); font-weight: 700; font-size: 18px; }
.logo img { border-radius: 8px; }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav a { text-decoration: none; color: var(--text-light); font-size: 14px; font-weight: 500; }
.btn-sm { background: var(--primary); color: var(--white) !important; padding: 6px 16px; border-radius: 20px; font-size: 13px; }
.btn-sm:hover { background: var(--primary-hover); }

/* Article */
.article-header { padding: 60px 0 30px; }
.article-header .breadcrumb { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
.article-header .breadcrumb a { color: var(--primary); text-decoration: none; }
.article-header h1 { font-family: 'Montserrat', sans-serif; font-size: clamp(28px, 5vw, 38px); font-weight: 800; color: var(--dark); line-height: 1.2; margin-bottom: 16px; }
.article-header .meta { font-size: 14px; color: var(--text-light); }
.article-header .meta span { margin-right: 16px; }

.article-body { padding-bottom: 40px; }
.article-body h2 { font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: 700; color: var(--dark); margin: 40px 0 16px; }
.article-body h3 { font-size: 20px; font-weight: 600; color: var(--dark); margin: 30px 0 12px; }
.article-body p { margin-bottom: 16px; font-size: 16px; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 8px; }

/* Tip boxes */
.tip-box { background: #e8f7ee; border-left: 4px solid var(--accent); padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 24px 0; }
.tip-box strong { color: #1b7a3a; }
.warning-box { background: #fff3e0; border-left: 4px solid #ff9800; padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 24px 0; }
.info-box { background: #e3f2fd; border-left: 4px solid var(--primary); padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 24px 0; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin: 24px 0; }
.stat-card { background: var(--bg); padding: 20px; border-radius: var(--radius); text-align: center; }
.stat-card .stat-value { font-size: 32px; font-weight: 800; color: var(--primary); display: block; }
.stat-card .stat-label { font-size: 13px; color: var(--text-light); }

/* Related links */
.related-section { background: var(--bg); padding: 30px; border-radius: var(--radius); margin: 40px 0; }
.related-section h3 { margin-top: 0; }
.related-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.related-links a { color: var(--primary); text-decoration: none; font-size: 14px; padding: 8px 0; }
.related-links a:hover { text-decoration: underline; }

/* CTA Banner */
.cta-banner { background: linear-gradient(135deg, #2A94DB, #34C759); padding: 60px 20px; text-align: center; color: var(--white); }
.cta-banner h2 { font-family: 'Montserrat', sans-serif; font-size: 28px; margin-bottom: 12px; }
.cta-banner p { opacity: 0.9; margin-bottom: 24px; }
.btn-primary { display: inline-block; background: var(--white); color: var(--primary); padding: 14px 32px; border-radius: 30px; text-decoration: none; font-weight: 700; font-size: 16px; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }

/* Hub page */
.hub-hero { padding: 60px 0 40px; text-align: center; }
.hub-hero h1 { font-family: 'Montserrat', sans-serif; font-size: clamp(32px, 5vw, 42px); color: var(--dark); margin-bottom: 12px; }
.hub-hero p { color: var(--text-light); font-size: 18px; max-width: 600px; margin: 0 auto; }
.category-section { margin: 40px 0; }
.category-section h2 { font-family: 'Montserrat', sans-serif; font-size: 24px; color: var(--dark); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.page-card { background: var(--white); border: 1px solid #eee; border-radius: var(--radius); padding: 20px; transition: all 0.2s; }
.page-card:hover { border-color: var(--primary); box-shadow: var(--card-shadow); transform: translateY(-2px); }
.page-card a { text-decoration: none; color: var(--dark); font-weight: 600; font-size: 15px; display: block; margin-bottom: 8px; }
.page-card p { font-size: 13px; color: var(--text-light); margin: 0; }

/* App CTA boxes */
.app-cta-box { background: linear-gradient(135deg, #e8f4fd, #edf9f0); border: 2px solid var(--primary); border-radius: var(--radius); padding: 24px; margin: 30px 0; text-align: center; }
.app-cta-box strong { font-size: 18px; color: var(--dark); display: block; margin-bottom: 8px; }
.app-cta-box p { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.app-cta-box .cta-link { display: inline-block; background: var(--primary); color: var(--white); padding: 10px 24px; border-radius: 25px; text-decoration: none; font-weight: 600; font-size: 15px; }
.app-cta-box .cta-link:hover { background: var(--primary-hover); }
.app-cta-box.final { background: linear-gradient(135deg, #2A94DB, #34C759); border: none; }
.app-cta-box.final strong { color: var(--white); }
.app-cta-box.final p { color: rgba(255,255,255,0.9); }
.app-cta-box.final .cta-link { background: var(--white); color: var(--primary); }
.app-cta-inline { background: var(--bg); padding: 14px 20px; border-radius: 10px; margin: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-cta-inline span { font-size: 15px; color: var(--text); font-weight: 500; }
.app-cta-inline a { color: var(--primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
.app-cta-inline a:hover { text-decoration: underline; }

/* Footer */
.site-footer { padding: 40px 20px; text-align: center; color: var(--text-light); font-size: 13px; }
.footer-links { margin-bottom: 12px; }
.footer-links a { color: var(--text-light); text-decoration: none; margin: 0 10px; }
.footer-links a:hover { color: var(--primary); }
.site-footer a { color: var(--text-light); }

@media (max-width: 600px) {
  .related-links { grid-template-columns: 1fr; }
  .site-header nav { gap: 12px; }
  .site-header nav a:first-child { display: none; }
}
