:root {
  --primary: #ff7f50;
  --accent1: #0a2540;
  --accent2: #1a4e89;
  --light-bg: #fcfdfd;
  --medium-bg: #f8f8f8;
  --dark-bg: #222222;
  --alt-bg: #eef2f5;
  --check: #28a745;
  --text: #333;
  --light-text: #cccccc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text);
  background: #fff;
  padding-top: 60px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', Arial, sans-serif;
}

.toolbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--dark-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 1100;
}

.hero {
  background: linear-gradient(to right, var(--accent1), var(--accent2));
  color: var(--light-bg);
  text-align: center;
  padding: 40px 20px;
  margin-bottom: 100px;
  transition: transform .3s;
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.hero:hover { transform: scale(1.02); }
.hero h1 { font-size: 3rem; margin: 0 0 10px; }
.hero p { font-size: 1.2rem; margin: 0 0 30px; }

.btn {
  background: var(--primary);
  color: #fff;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s;
  display: inline-block;
}

.btn:hover { opacity: .9; }

section {
  padding: 60px 20px;
  transition: transform .3s;
  max-width: 1200px;
  margin: 40px auto;
}

section:hover { transform: translateY(-5px); }

.primary { background: var(--light-bg); }
.benefits { background: #fff; }
.audience { background: var(--light-bg); }

footer {
  background: var(--dark-bg);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

footer a {
  color: var(--light-text);
  text-decoration: none;
  margin-left: 15px;
}

footer a:first-child {
  margin-left: 0;
}

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

/* Table styles */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { padding: 12px; border: 1px solid #ddd; text-align: center; }
th {
  background: var(--primary);
  color: #fff;
}
td:first-child, th:first-child {
  background: var(--accent1);
  color: #fff;
  text-align: left;
}
table th:first-child {
  background: transparent;
  border-top: none;
  border-left: none;
}
tr:hover { background: var(--alt-bg); }
.checkmark {
  color: var(--check);
  font-size: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* List styles */
ul { list-style: none; padding: 0; margin: 0; }
.show-bullets { list-style: disc; padding-left: 40px; margin: 15px 0; }
.show-bullets li { margin-bottom: 6px; }
.benefits ul, .audience ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.benefits li, .audience li {
  display: flex;
  align-items: center;
  transition: transform .2s;
}
.benefits li:hover, .audience li:hover { transform: translateX(5px); }
.icon { width: 24px; height: 24px; margin-right: 10px; flex-shrink: 0; }

/* Grid container styles */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  background: var(--light-bg);
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.grid-item:hover {
  transform: translateY(-5px);
}

.grid-item .icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.highlight {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.subtext {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.4;
}

/* Scroll offset for anchor links to account for fixed header */
section[id] {
  scroll-margin-top: 80px; /* Adjust this value as needed */
}

/* Alternative method for older browsers */
section[id]::before {
  content: '';
  display: block;
  height: 80px; /* Same as scroll-margin-top */
  margin-top: -80px;
  visibility: hidden;
  pointer-events: none;
}

/* Blog-specific styles */
.blog-container {
  /* Responsive clamp: ensures readable line length while allowing wider media on large screens */
  max-width: clamp(820px, 68ch, 1000px);
  margin: 0 auto;
  padding: 20px;
}

.blog-post {
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 40px;
}

.blog-post h1 {
  color: var(--accent1);
  margin-bottom: 10px;
  /* Reduced from 2.5rem for tighter visual hierarchy */
  font-size: 1.8rem;
  line-height: 1.2;
}

.blog-post h2 {
  font-size: 1.6rem;
}

.blog-post h3 {
  font-size: 1.4rem;
}

.blog-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.blog-content {
  font-size: 0.9rem;
  line-height: 1.7;
}

.blog-content h2 {
  color: var(--accent1);
  margin-top: 40px;
  margin-bottom: 20px;
  /* Explicit smaller size */
  font-size: 1.55rem;
  line-height: 1.3;
}

.blog-content h3 {
  color: var(--accent2);
  margin-top: 30px;
  margin-bottom: 15px;
  font-size: 1.3rem;
  line-height: 1.35;
}

.blog-content p {
  margin-bottom: 20px;
}

.blog-content ul, .blog-content ol {
  margin-bottom: 20px;
  padding-left: 30px;
}
/* Ensure Markdown lists in blog posts show bullets/numbers by default */
.blog-content ul { list-style: disc; }
.blog-content ol { list-style: decimal; }
/* Provide reasonable styles for nested lists */
.blog-content ul ul { list-style-type: circle; }
.blog-content ul ul ul { list-style-type: square; }

.blog-content li {
  margin-bottom: 8px;
}

.blog-content blockquote {
  border-left: 4px solid var(--primary);
  margin: 30px 0;
  padding: 20px 30px;
  background: var(--light-bg);
  font-style: italic;
}

.blog-content code {
  background: var(--light-bg);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.9em;
}

.blog-content pre {
  background: var(--light-bg);
  padding: 20px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 20px 0;
}

.blog-content pre code {
  background: none;
  padding: 0;
}

/* Ensure images in blog posts never overflow their container */
.blog-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 25px auto; /* center and add vertical spacing */
  border: 1px solid #d9d9d9; /* light gray outline */
  border-radius: 6px; /* subtle rounding to match card aesthetics */
  background: #fff; /* ensures transparent PNGs sit on white */
  box-shadow: 0 1px 2px rgba(0,0,0,0.04); /* very light depth without heaviness */
}

/* Optional per-image scaling via Markdown title token, e.g.,
   ![alt](/path.webp "scale-70") */
.blog-content img[title~="scale-70"] {
  max-width: 70%;
}

/* Optional per-image scaling via Markdown title token, e.g.,
   ![alt](/path.webp "scale-100") */
.blog-content img[title~="scale-100"] {
  max-width: 100%;
}

/* Figure + caption for blog images rendered from Markdown */
.blog-figure {
  margin: 25px auto; /* matches image spacing */
  display: block;
  text-align: center;
}
.blog-figure img {
  margin: 0 auto; /* avoid double top/bottom spacing since figure provides it */
}
.blog-figure figcaption {
  margin-top: 8px;
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Optional helper: ensure hero images look substantial on large screens */
.blog-hero img {
  width: 100%;
  max-width: 1200px; /* visual cap; social scrapers use meta tags */
}

.blog-index {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.blog-post-preview {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  transition: transform 0.2s;
}

.blog-post-preview:hover {
  transform: translateY(-3px);
}

.blog-post-preview h2 {
  margin: 0 0 10px 0;
  color: var(--accent1);
}

.blog-post-preview h2 a {
  color: var(--accent1);
  text-decoration: none;
}
.blog-post-preview-inner {
  display: block; /* default single-column; enhanced to grid when an image exists */
}

/* When a preview image exists, switch to a two-column layout */
.blog-post-preview-inner.has-image {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

.blog-post-preview .preview-image {
  display: block;
}

.blog-post-preview .preview-image img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.blog-post-preview .preview-content h2 {
  margin-top: 0;
}


.blog-post-preview h2 a:hover {
  color: var(--accent2);
}

.blog-post-preview .date {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.blog-post-preview .excerpt {
  color: var(--text);
  line-height: 1.6;
}

.blog-nav {
  text-align: center;
  margin: 40px 0;
}

.blog-nav a {
  color: var(--accent1);
  text-decoration: none;
  font-weight: 600;
}

.blog-nav a:hover {
  color: var(--accent2);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  /* Hide only the text navigation links on mobile, keep the Get Started button */
  .toolbar .nav-links a:not(.btn) {
    display: none !important;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .blog-post {
    padding: 20px;
  }
  
  .blog-post h1 {
    font-size: 2rem;
  }
  
  .blog-post-preview {
    padding: 20px;
  }

  .blog-post-preview-inner {
    display: block;
  }
  /* Override grid on small screens to stack */
  .blog-post-preview-inner.has-image {
    display: block !important;
    grid-template-columns: 1fr !important;
  }
  .blog-post-preview .preview-image {
    display: block;
    margin-bottom: 12px;
  }
}

/* Prompt Form Styles */
.sc-prompt-form {
  background: var(--light-bg);
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  padding: 30px;
  margin: 30px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.sc-form-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.sc-prompt-form-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 25px;
}

.sc-prompt-field {
  display: flex;
  flex-direction: column;
}

.sc-prompt-field label {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--accent1);
  font-size: 0.95rem;
}

.sc-prompt-field label .required {
  color: var(--primary);
}

.sc-prompt-field input[type="text"] {
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Inter', Arial, sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sc-prompt-field input[type="text"]:focus {
  outline: none;
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(26, 78, 137, 0.1);
}

.sc-prompt-field input[type="text"]::placeholder {
  color: #9ca3af;
}

.sc-example-button {
  background: transparent;
  color: var(--accent2);
  border: 1px solid var(--accent2);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.sc-example-button:hover {
  background: var(--accent2);
  color: #fff;
}

.sc-example-button:active {
  transform: scale(0.98);
}

.sc-prompt-submit {
  background: var(--primary);
  color: #fff;
  padding: 14px 32px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  align-self: flex-start;
}

.sc-prompt-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.sc-prompt-submit:active {
  transform: translateY(0);
}

/* Highlight animation for filled fields */
@keyframes fieldFill {
  0% { background-color: var(--light-bg); }
  50% { background-color: #e8f4f8; }
  100% { background-color: var(--light-bg); }
}

.sc-field-filled {
  animation: fieldFill 0.6s ease;
}

/* Prompt Lightbox Modal */
.sc-prompt-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.sc-prompt-modal[hidden] {
  display: none;
}

.sc-prompt-modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.sc-prompt-modal .close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: opacity 0.2s;
}

.sc-prompt-modal .close:hover {
  opacity: 0.8;
}

.sc-prompt-modal .close:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sc-prompt-modal h3 {
  color: var(--accent1);
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.sc-prompt-preview {
  background: var(--alt-bg);
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 25px;
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 50vh;
  overflow-y: auto;
}

.sc-chatgpt-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent2);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.1s;
}

.sc-chatgpt-link:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.sc-chatgpt-link svg {
  width: 20px;
  height: 20px;
}

/* Before/After Comparison Containers for Blog Posts */
.before-after-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 30px 0;
  padding: 0;
  background: linear-gradient(to bottom, #fef5e7 0%, #fef5e7 48%, #e8f5e9 52%, #e8f5e9 100%);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}

.before-state, .after-state {
  flex: 1;
  padding: 15px 25px;
}

.before-state {
  border-left: 4px solid #e67e22;
  background: rgba(254, 245, 231, 0.5);
}

.after-state {
  border-left: 4px solid #27ae60;
  background: rgba(232, 245, 233, 0.5);
}

.before-state strong, .after-state strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--accent1);
}

.before-state ul, .after-state ul,
.before-state ol, .after-state ol {
  margin: 5px 0;
  padding-left: 20px;
}

.before-state li, .after-state li {
  margin: 3px 0;
  line-height: 1.4;
}

/* Standalone links (not inside list items) */
.before-state > a, .after-state > a,
.before-state > p > a:only-child, .after-state > p > a:only-child {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent2);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

/* Inline links within text/lists */
.before-state li a, .after-state li a,
.before-state p a, .after-state p a {
  color: var(--accent2);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.before-state > a:hover, .after-state > a:hover,
.before-state > p > a:hover, .after-state > p > a:hover,
.before-state li a:hover, .after-state li a:hover,
.before-state p a:hover, .after-state p a:hover {
  border-bottom-color: var(--accent2);
}

.arrow-divider {
  font-size: 1.5rem;
  color: #666;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 0;
  background: #fff;
}

@media (max-width: 768px) {
  .sc-prompt-form {
    padding: 20px;
  }
  
  .sc-prompt-modal-content {
    padding: 30px 20px;
  }
  
  .sc-prompt-submit {
    width: 100%;
  }
  
  .before-after-container {
    padding: 0;
  }
  
  .arrow-divider {
    padding: 10px 0;
  }
  
  .before-state, .after-state {
    padding: 20px;
  }
}