/* Shared styles for FriendChise portfolio pages */

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  color: #000000;
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

*, *::before, *::after { border-color: #000000 !important; background: transparent !important; }

body, .hero, .container, .content-section, .tech-section, .footer-cta, .navbar { background: #ffffff !important; }

h1, h2, h3, h4, h5, h6, p, li, span, div, a, blockquote { color: #000000 !important; }

.badge, .tech-card, .feature-card, .stat-card, .tech-category, .persona-card, .story-card, .flow-card, .challenge-card, .outcome-card, .learning-note {
  border: 1px solid #000000 !important;
  background: #ffffff !important;
}

/* Misc shared elements used across project pages */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; font-weight: 600; font-size: 0.95em; text-decoration: none; border: 2px solid #000000; color: #000000; background: #ffffff; cursor: pointer; }
.btn:hover { background: #000000 !important; color: #ffffff !important; }
.feature-icon { font-size: 1.5em; margin-bottom: 10px; }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none !important; }
.screenshots-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 20px 0; }
.screenshot-item img { width: 100%; border: 1px solid #000000; display: block; }
.screenshot-item p { font-size: 0.78em; color: #555555; text-align: center; margin-top: 6px; }
.learning-note { border: 2px solid #000000; border-left: 6px solid #000000; padding: 20px 25px; margin-bottom: 30px; }
.learning-note p { color: #333333; font-size: 0.95em; margin: 0; }
.challenge-card { border: 1px solid #000000; padding: 22px; margin-bottom: 20px; }
.challenge-card .challenge-label { font-size: 0.8em; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.challenge-card p { color: #333333; font-size: 0.95em; line-height: 1.6; margin: 0; }
.outcome-card { border: 2px solid #000000; border-left: 6px solid #000000; padding: 20px 25px; margin-bottom: 20px; }
.outcome-card p { color: #333333; font-size: 0.95em; margin: 0; }

/* Hero */
.hero { border-bottom: 2px solid #000000; padding: 40px 0; text-align: center; margin-bottom: 40px; }
.back-link { display: inline-block; margin-bottom: 20px; color: #000000; text-decoration: none; font-weight: 600; font-size: 0.9em; }
.back-link:hover { text-decoration: underline; }
.hero h1 { font-size: 2.5em; margin-bottom: 10px; font-weight: 700; }
.hero-subtitle { font-size: 1.05em; color: #333333; margin-bottom: 20px; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero-badges { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.badge { background: #ffffff; border: 1px solid #000000; padding: 6px 12px; font-size: 0.85em; font-weight: 600; }
.badge.wip { background: #fff3cd !important; color: #856404 !important; border-color: #856404 !important; }
.hero-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  font-size: 0.9em;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid #000000;
  color: #000000;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  letter-spacing: 0.02em;
}
.cta-btn:hover { background: #000000 !important; color: #ffffff !important; }
.cta-btn.primary { background: #000000 !important; color: #ffffff !important; }
.cta-btn.primary:hover { background: #333333 !important; }

/* Container */
.container { max-width: 900px; margin: 0 auto; padding: 40px 0; }
.section-title { font-size: 1.5em; margin: 50px 0 20px 0; font-weight: 700; border-bottom: 2px solid #000000; padding-bottom: 10px; }
.subsection-title { font-size: 1.15em; margin: 25px 0 12px 0; font-weight: 700; }

/* Content Sections */
.content-section { border: 1px solid #000000; padding: 30px; margin-bottom: 30px; }
.content-section h3 { margin-bottom: 15px; font-size: 1.3em; font-weight: 700; }
.content-section p { color: #333333; margin-bottom: 15px; line-height: 1.8; }
.content-section ul { padding-left: 25px; margin-bottom: 15px; }
.content-section li { color: #333333; margin-bottom: 10px; line-height: 1.6; overflow-wrap: break-word; word-break: break-word; }
.content-section strong { color: #000000; font-weight: 600; }

/* Blockquote */
blockquote { border-left: 4px solid #000000 !important; padding: 20px 25px; margin: 20px 0; font-style: italic; background: #f9f9f9 !important; }
blockquote p { margin-bottom: 10px; }
blockquote p:last-child { margin-bottom: 0; }

/* Tech Stack */
.tech-section { border: 1px solid #000000; padding: 30px 20px; margin-bottom: 40px; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 30px; }
.tech-card { border: 1px solid #000000; padding: 20px; text-align: center; }
.tech-card h4 { margin-bottom: 8px; font-size: 1em; font-weight: 700; }
.tech-card p { color: #333333; font-size: 0.85em; line-height: 1.5; }
.tech-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.tech-category { border: 1px solid #000000; padding: 15px; }
.tech-category h5 { margin-bottom: 12px; font-size: 1.05em; font-weight: 700; }
.tech-category p { color: #333333; font-size: 0.95em; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; margin-bottom: 40px; }
.feature-card { border: 1px solid #000000; padding: 25px; }
.feature-card h3 { margin-bottom: 12px; font-size: 1.1em; font-weight: 700; }
.feature-card p { color: #333333; font-size: 0.95em; line-height: 1.6; }
.priority-label { display: inline-block; font-size: 0.75em; font-weight: 700; padding: 2px 8px; margin-bottom: 8px; border: 1px solid #000000; }
.priority-must { background: #f8d7da !important; color: #721c24 !important; border-color: #721c24 !important; }
.priority-should { background: #fff3cd !important; color: #856404 !important; border-color: #856404 !important; }
.priority-nice { background: #d4edda !important; color: #155724 !important; border-color: #155724 !important; }

/* Personas */
.personas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 40px; }
.persona-card { border: 1px solid #000000; padding: 20px; }
.persona-card h4 { font-size: 1.1em; margin-bottom: 5px; font-weight: 700; }
.persona-card .role { font-size: 0.85em; color: #666 !important; margin-bottom: 10px; }
.persona-card .goals { font-size: 0.85em; color: #333333; margin-top: 8px; }
.persona-card .goals strong { font-weight: 700; }
.persona-card p { font-size: 0.9em; color: #333333; }

/* User Stories */
.stories-grid { display: grid; grid-template-columns: 1fr; gap: 15px; margin-bottom: 30px; }
.story-card { border: 1px solid #000000; padding: 15px 20px; }
.story-card .story-role { font-size: 0.8em; font-weight: 700; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px; }
.story-card p { font-size: 0.9em; color: #333333; line-height: 1.6; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card { border: 1px solid #000000; padding: 25px; text-align: center; }
.stat-number { font-size: 2em; font-weight: 700; margin-bottom: 10px; }
.stat-label { color: #333333; font-size: 0.85em; }

/* Tables */
.permission-table, .generic-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 0.9em; }
.permission-table th, .permission-table td,
.generic-table th, .generic-table td { border: 1px solid #000000; padding: 10px; text-align: left; }
.permission-table th, .generic-table th { background: #f4f4f4 !important; font-weight: 700; }
.permission-table td:not(:first-child) { text-align: center; }

/* Code */
code { background: #f4f4f4 !important; padding: 3px 8px; font-family: 'Courier New', monospace; font-size: 0.9em; border: 1px solid #ddd !important; }
pre { background: #f4f4f4 !important; padding: 20px; overflow-x: auto; font-family: 'Courier New', monospace; font-size: 0.85em; line-height: 1.5; border: 1px solid #000000; margin: 15px 0; }

/* Flow Cards */
.flow-card { border: 1px solid #000000; padding: 20px; margin-bottom: 15px; }
.flow-card h4 { font-size: 1.05em; font-weight: 700; margin-bottom: 10px; }
.flow-card ol { padding-left: 25px; }
.flow-card li { font-size: 0.9em; color: #333333; margin-bottom: 6px; }

/* Footer CTA */
.footer-cta { border: 2px solid #000000; padding: 40px 30px; text-align: center; margin-bottom: 40px; }
.footer-cta h2 { margin-bottom: 15px; font-size: 1.8em; }
.footer-cta p { color: #333333; margin-bottom: 25px; font-size: 1em; }
.button-group { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* Roadmap */
.roadmap-list { list-style: none; padding: 0; }
.roadmap-list li { padding: 8px 0; border-bottom: 1px solid #eee !important; display: flex; align-items: center; gap: 10px; }
.roadmap-list li:last-child { border-bottom: none !important; }
.status-done { color: #28a745 !important; }
.status-wip { color: #ffc107 !important; }
.status-todo { color: #6c757d !important; }

/* Collapsible */
details { border: 1px solid #000000; margin-bottom: 15px; }
details summary { padding: 15px 20px; font-weight: 700; cursor: pointer; font-size: 1em; }
details summary:hover { background: #f4f4f4 !important; }
details .details-content { padding: 0 20px 20px 20px; }
details.collapsible-section { border: none; margin-bottom: 0; }
details.collapsible-section > summary {
  font-size: 1.5em;
  margin: 50px 0 20px 0;
  font-weight: 700;
  border-bottom: 2px solid #000000;
  padding-bottom: 10px;
  cursor: pointer;
  list-style: revert;
}
details.collapsible-section > summary:hover { background: transparent !important; }

/* TOC Grid */
.toc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin-top: 8px; }
.toc-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #000000;
  text-decoration: none;
  color: #000000;
  font-weight: 600;
  font-size: 0.88em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1.35;
}
.toc-link:hover { background: #000000 !important; color: #ffffff !important; }
.toc-link i { margin-top: 3px; flex-shrink: 0; width: 16px; text-align: center; }
.toc-sub { font-size: 0.78em; font-weight: 400; opacity: 0.65; display: block; margin-top: 2px; line-height: 1.2; }

/* Back to top button */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border: 2px solid #000000;
  background: #ffffff !important;
  color: #000000;
  font-size: 1.4em;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 2em; }
  .hero-subtitle { font-size: 1em; }
  .section-title { font-size: 1.3em; }
  .tech-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .features-grid { grid-template-columns: 1fr; }
  .personas-grid { grid-template-columns: 1fr; }
  .hero { padding: 30px 0; }
  .container { padding: 30px 0; }
  .cta-btn { width: 100%; text-align: center; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .permission-table, .generic-table { font-size: 0.78em; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-section { padding: 20px 16px; }
  .content-section ol { padding-left: 18px; }
  .content-section li { word-break: break-word; overflow-wrap: break-word; }
  .tech-section { padding: 20px 16px; }
  .footer-cta { padding: 24px 16px; }
  .flow-card { padding: 15px; }
  .permission-table, .generic-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  details.collapsible-section > summary { font-size: 1.15em; padding-bottom: 8px; }
  .button-group { flex-direction: column; align-items: stretch; }
  .button-group .cta-btn { text-align: center; }
  .screenshots-grid { grid-template-columns: 1fr; }
}
