/* CVS Lane Agentic AI Strategy - Shared Styles */

:root {
  --primary-teal: #00a8b5;
  --pure-white: #ffffff;
  --rich-black: #111111;
  --bright-cyan: #00d7e8;
  --deep-teal: #007982;
  --light-gray: #e6e6e6;
  --medium-gray: #666666;
  --coming-soon-bg: #f5f5f5;
  --coming-soon-text: #999999;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--light-gray);
  color: var(--rich-black);
  line-height: 1.6;
  min-height: 100vh;
}

/* ================================
   LANDING PAGE STYLES
   ================================ */

.landing-header {
  background: linear-gradient(135deg, var(--primary-teal), var(--deep-teal));
  color: var(--pure-white);
  padding: 3rem 2rem;
  text-align: center;
}

.header-logo {
  height: 65px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.landing-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.landing-header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.section-card {
  background: var(--pure-white);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--rich-black);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
}

.section-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 168, 181, 0.15);
  border-color: var(--primary-teal);
}

.section-card .section-number {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.section-card h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.section-card p {
  font-size: 0.9rem;
  color: var(--medium-gray);
  flex-grow: 1;
}

.section-card .card-arrow {
  margin-top: 1rem;
  color: var(--primary-teal);
  font-size: 1.2rem;
  align-self: flex-end;
}

/* Coming Soon Cards */
.section-card.coming-soon {
  background: var(--coming-soon-bg);
  cursor: default;
  pointer-events: none;
}

.section-card.coming-soon .section-number {
  color: var(--coming-soon-text);
}

.section-card.coming-soon h2 {
  color: var(--coming-soon-text);
}

.section-card.coming-soon p {
  color: var(--coming-soon-text);
}

.section-card.coming-soon .card-arrow {
  display: none;
}

.section-card.coming-soon .coming-soon-badge {
  display: inline-block;
  background: var(--light-gray);
  color: var(--coming-soon-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-top: 1rem;
  align-self: flex-start;
}

/* Featured Card (Interactive Roadmap) */
.section-card.featured-card {
  background: linear-gradient(135deg, var(--deep-teal), var(--primary-teal));
  color: var(--pure-white);
  grid-column: span 2;
}

.section-card.featured-card:hover {
  border-color: var(--bright-cyan);
  box-shadow: 0 8px 24px rgba(0, 168, 181, 0.3);
}

.section-card.featured-card .section-number {
  color: var(--bright-cyan);
}

.section-card.featured-card h2 {
  color: var(--pure-white);
  font-size: 1.4rem;
}

.section-card.featured-card p {
  color: rgba(255, 255, 255, 0.9);
}

.section-card.featured-card .card-arrow {
  color: var(--bright-cyan);
}

/* ================================
   SECTION VIEWER STYLES
   ================================ */

.section-header {
  background: linear-gradient(135deg, var(--primary-teal), var(--deep-teal));
  color: var(--pure-white);
  padding: 1.5rem 2rem;
}

.section-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 950px;
  margin: 0 auto 1rem;
}

.header-logo-small {
  height: 42px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.section-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--pure-white);
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0;
  transition: opacity 0.2s;
}

.section-header .back-link:hover {
  opacity: 1;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 950px;
  margin: 0 auto;
  gap: 1rem;
}

.section-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.expand-toggle {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--pure-white);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.expand-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.section-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.reading-time {
  font-size: 0.85rem;
  opacity: 0.9;
  white-space: nowrap;
}

/* Main content - stays centered */
.section-content {
  max-width: 950px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--pure-white);
  min-height: calc(100vh - 150px);
}

/* TOC Sidebar - positioned to the right of centered content */
.toc-sidebar {
  position: fixed;
  left: calc(50% + 495px);
  top: 280px;
  width: 200px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  z-index: 100;
}

.toc-nav {
  background: var(--pure-white);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.toc-nav h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--medium-gray);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--light-gray);
}

.toc-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-nav li {
  margin-bottom: 0.25rem;
}

.toc-nav a {
  display: block;
  padding: 0.4rem 0.5rem;
  font-size: 0.8rem;
  color: var(--medium-gray);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1.3;
}

.toc-nav a:hover {
  color: var(--primary-teal);
  background: rgba(0, 168, 181, 0.08);
}

.toc-nav a.active {
  color: var(--primary-teal);
  background: rgba(0, 168, 181, 0.12);
  font-weight: 500;
}

/* Hide TOC on screens where it would overlap content */
@media (max-width: 1400px) {
  .toc-sidebar {
    display: none;
  }
}

/* Markdown Content Typography */
.section-content h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--rich-black);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-teal);
}

.section-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-teal);
  margin: 2rem 0 0;
  padding: 0.75rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--light-gray);
  transition: color 0.2s;
}

.section-content h2:hover {
  color: var(--deep-teal);
}

.section-content h2::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary-teal);
  border-bottom: 2px solid var(--primary-teal);
  transform: rotate(-45deg);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.section-content h2.collapsed::after {
  transform: rotate(45deg);
}

.section-content .collapsible-content {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
  max-height: 10000px;
  opacity: 1;
  padding-top: 1rem;
}

.section-content .collapsible-content.hidden {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
}

.section-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--rich-black);
  margin: 1.5rem 0 0.75rem;
}

.section-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--medium-gray);
  margin: 1rem 0 0.5rem;
}

.section-content p {
  margin-bottom: 1rem;
  color: var(--rich-black);
}

.section-content ul,
.section-content ol {
  margin: 1rem 0 1rem 1.5rem;
}

.section-content li {
  margin-bottom: 0.5rem;
}

.section-content strong {
  font-weight: 600;
  color: var(--rich-black);
}

.section-content h2 strong {
  color: inherit;
}

.section-content em {
  font-style: italic;
}

.section-content hr {
  border: none;
  border-top: 1px solid var(--light-gray);
  margin: 2rem 0;
}

.section-content blockquote {
  border-left: 4px solid var(--primary-teal);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--medium-gray);
  font-style: italic;
}

.section-content code {
  background: var(--light-gray);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9em;
}

.section-content pre {
  background: var(--rich-black);
  color: var(--pure-white);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

.section-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Tables */
.section-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.section-content th,
.section-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--light-gray);
}

.section-content th {
  background: var(--primary-teal);
  color: var(--pure-white);
  font-weight: 600;
}

.section-content tr:nth-child(even) {
  background: #f9fafa;
}

.section-content tr:hover {
  background: #f0f7f8;
}

/* Roadmap Link (Section 9) */
.roadmap-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-teal), var(--bright-cyan));
  color: var(--pure-white);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  margin: 1.5rem 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.roadmap-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 168, 181, 0.3);
}

/* Loading State */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem;
  color: var(--medium-gray);
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 3px solid var(--light-gray);
  border-top-color: var(--primary-teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error State */
.error {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--medium-gray);
}

.error h2 {
  color: var(--rich-black);
  margin-bottom: 1rem;
}

/* ================================
   RESPONSIVE STYLES
   ================================ */

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
  }

  .section-card.featured-card {
    grid-column: span 1;
  }

  .landing-header {
    padding: 2rem 1rem;
  }

  .landing-header h1 {
    font-size: 1.8rem;
  }

  .section-content {
    padding: 1.5rem 1rem;
  }

  .section-content table {
    font-size: 0.85rem;
  }

  .section-content th,
  .section-content td {
    padding: 0.5rem;
  }
}

/* ================================
   FOOTER
   ================================ */

.footer {
  text-align: center;
  padding: 2rem;
  color: var(--medium-gray);
  font-size: 0.85rem;
}

.footer a {
  color: var(--primary-teal);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-credit {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 950px;
  margin: 0 auto;
}

.footer-nav.section-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  max-width: 950px;
  margin: 0 auto;
}

.footer-nav.section-nav .home-link {
  flex: 1;
  text-align: left;
  font-weight: 600;
}

.footer-nav.section-nav .roadmap-link {
  flex: 0 0 auto;
}

.footer-nav.section-nav .nav-link {
  flex: 1;
  text-align: right;
}

.footer-link {
  color: var(--primary-teal);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--deep-teal);
  text-decoration: underline;
}

.footer-link.roadmap-link {
  background: linear-gradient(135deg, var(--deep-teal), var(--primary-teal));
  color: var(--pure-white);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
}

.footer-link.roadmap-link:hover {
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 168, 181, 0.3);
}

