/* ============================================================================
 * Quiltler 3 - Shared content styling for SEO article, guide, block and tool
 * pages. Layered on top of styles.css. Reuses the existing color tokens.
 * ==========================================================================*/

/* ---- Page hero ---------------------------------------------------------- */
.page-hero {
  background: linear-gradient(135deg, #e2725b 0%, #d94a2e 55%, #c63d1f 100%);
  color: #fff;
  padding: 140px 0 64px;
  text-align: center;
}

.page-hero.hero-indigo {
  background: linear-gradient(135deg, #2e3a59 0%, #3c4a6e 50%, #7ea8be 100%);
}

.page-hero.hero-sage {
  background: linear-gradient(135deg, #5f7150 0%, #7e9a78 50%, #a4b494 100%);
}

.page-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 18px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.page-hero .lead {
  font-size: 1.25rem;
  max-width: 760px;
  margin: 0 auto 28px;
  opacity: 0.98;
  line-height: 1.6;
}

.page-hero .hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-hero .btn-secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.page-hero .btn-secondary:hover {
  background: #fff;
  color: var(--text-primary);
}

/* ---- Breadcrumbs -------------------------------------------------------- */
.breadcrumbs {
  font-size: 0.9rem;
  padding: 16px 0;
  color: var(--text-secondary);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.breadcrumbs li::after {
  content: "/";
  margin-left: 8px;
  opacity: 0.5;
}

.breadcrumbs li:last-child::after {
  content: "";
}

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

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

/* ---- Article layout ----------------------------------------------------- */
.article {
  background: #fff;
  padding: 56px 0 72px;
}

.article-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

.article-inner.wide {
  max-width: 1080px;
}

.article-inner h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: 48px 0 16px;
  color: var(--text-primary);
  scroll-margin-top: 100px;
}

.article-inner h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--text-primary);
}

.article-inner p,
.article-inner li {
  font-size: 1.075rem;
  line-height: 1.75;
  color: #3d4763;
}

.article-inner p {
  margin-bottom: 18px;
}

.article-inner ul,
.article-inner ol {
  margin: 0 0 20px 1.25rem;
}

.article-inner li {
  margin-bottom: 10px;
}

.article-inner a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.article-inner a:hover {
  text-decoration: underline;
}

.article-inner strong {
  color: var(--text-primary);
}

.article-inner img {
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  margin: 24px auto;
}

.intro-text {
  font-size: 1.2rem !important;
  color: var(--text-secondary) !important;
  line-height: 1.7 !important;
}

/* ---- Table of contents -------------------------------------------------- */
.toc {
  background: var(--background);
  border: 1px solid rgba(46, 58, 89, 0.1);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 8px 0 36px;
}

.toc h2 {
  font-size: 1.1rem !important;
  margin: 0 0 12px !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.toc ol {
  margin: 0 0 0 1.1rem;
  columns: 2;
}

@media (max-width: 640px) {
  .toc ol {
    columns: 1;
  }
}

/* ---- Tables ------------------------------------------------------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
  border-radius: 12px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(46, 58, 89, 0.08);
}

.data-table th {
  background: var(--midnight-indigo);
  color: #fff;
  font-weight: 600;
}

.data-table tr:nth-child(even) td {
  background: var(--background);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ---- Callouts ----------------------------------------------------------- */
.callout {
  border-left: 4px solid var(--primary);
  background: rgba(226, 114, 91, 0.08);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 24px 0;
}

.callout.tip {
  border-left-color: var(--sage-thread);
  background: rgba(164, 180, 148, 0.14);
}

.callout.app {
  border-left-color: var(--patch-blue);
  background: rgba(126, 168, 190, 0.14);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ---- Card grids (blocks, tools, related) -------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.link-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(46, 58, 89, 0.1);
  border-radius: 18px;
  padding: 26px;
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.link-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  text-decoration: none !important;
}

.link-card .swatch {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
}

.link-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.link-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

/* ---- FAQ ---------------------------------------------------------------- */
.faq-section {
  background: var(--background);
  padding: 64px 0;
}

.faq-item {
  background: #fff;
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.faq-item p {
  margin: 0;
  color: #3d4763;
  line-height: 1.7;
}

/* ---- CTA banner --------------------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, var(--midnight-indigo) 0%, #7ea8be 100%);
  color: #fff;
  text-align: center;
  padding: 72px 0;
}

.cta-banner h2 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-banner p {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 28px;
  opacity: 0.95;
}

.cta-banner .app-rating {
  margin-top: 18px;
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ---- Interactive calculator tool --------------------------------------- */
.calc-tool {
  background: #fff;
  border: 1px solid rgba(46, 58, 89, 0.1);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 32px;
  margin: 0 auto 40px;
  max-width: 720px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 560px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-field label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.calc-field input,
.calc-field select {
  padding: 12px 14px;
  border: 1.5px solid rgba(46, 58, 89, 0.18);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--text-primary);
}

.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--primary);
}

.calc-tool .btn-primary {
  margin-top: 24px;
  width: 100%;
  justify-content: center;
}

.calc-result {
  margin-top: 28px;
  background: var(--background);
  border-radius: 14px;
  padding: 24px;
  display: none;
}

.calc-result.show {
  display: block;
}

.calc-result .headline {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.calc-result .result-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(46, 58, 89, 0.08);
}

.calc-result .result-row:last-child {
  border-bottom: none;
}

.calc-result .result-row span:last-child {
  font-weight: 700;
}

/* ---- Comparison table emphasis ----------------------------------------- */
.data-table .highlight-col {
  background: rgba(226, 114, 91, 0.1);
  font-weight: 600;
}

.check {
  color: #2e8b57;
  font-weight: 700;
}

.cross {
  color: #c0392b;
  font-weight: 700;
}

/* ---- Mega footer layout ------------------------------------------------- */
.site-footer .footer-content {
  display: grid;
  grid-template-columns: 1.4fr 3.6fr;
  gap: 48px;
}

.site-footer .footer-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

@media (max-width: 968px) {
  .site-footer .footer-content {
    grid-template-columns: 1fr;
  }
  .site-footer .footer-links {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .site-footer .footer-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-hero h1 {
    font-size: 2.1rem;
  }
  .page-hero .lead {
    font-size: 1.05rem;
    padding: 0 12px;
  }
  .article-inner h2 {
    font-size: 1.6rem;
  }
  .cta-banner h2 {
    font-size: 1.7rem;
  }
}
