/*
Theme Name:   The Cancer Conversations
Theme URI:    https://thecancerconversations.com
Description:  Child theme of Astra for TheCancerConversations.com. Astra supplies base markup and update reliability; all real layout, taxonomy display, and design logic lives in this child theme's functions.php and this stylesheet — not in a page builder or block plugin.
Author:       AOMedix.ai
Template:     astra
Version:      1.9.0
Text Domain:  cancer-conversations-child
*/

/* ==========================================================================
   Brand variables — black / white / grey base, terracotta accent
   ========================================================================== */
:root {
  --cc-black: #1a1a1a;
  --cc-white: #ffffff;
  --cc-grey-light: #f4f4f4;
  --cc-grey-mid: #8a8a8a;
  --cc-grey-dark: #4a4a4a;
  --cc-terracotta: #B8683F;
}

body {
  color: var(--cc-black);
  background: var(--cc-white);
}

a {
  color: var(--cc-terracotta);
}

/* ==========================================================================
   Header / logo lockup
   ========================================================================== */
.site-logo-wordmark {
  text-transform: lowercase;
  letter-spacing: 0.01em;
}

.site-logo-tagline {
  color: var(--cc-grey-dark);
  border-top: 1px solid var(--cc-terracotta);
  padding-top: 0.25em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   Homepage panels (3+3+2+2 topic grid, v1.9.0)
   Markup rendered by cc_render_topic_panels() in functions.php as three
   row-groups: one 3-column grid (rows 1-2, six panels), followed by two
   2-column grids (row 3: Caregivers/Family; row 4: Cancer Types/Stories).
   Replaces the earlier 8-panel single-grid + :last-child span hack, which
   doesn't generalize to a second short row.
   ========================================================================== */
.cc-topic-grid,
.cc-topic-grid-secondary {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.cc-topic-grid {
  grid-template-columns: repeat(3, 1fr);
}

.cc-topic-grid-secondary {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 0; /* consecutive row-groups sit closer together than the gap before/after the whole panel section */
}

.cc-topic-grid-secondary + .cc-topic-grid-secondary {
  margin-top: -0.5rem;
}

.cc-topic-panel {
  border: 1px solid var(--cc-grey-light);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--cc-black);
  transition: border-color 0.2s ease;
}

.cc-topic-panel:hover {
  border-color: var(--cc-terracotta);
}

.cc-topic-panel-icon {
  color: var(--cc-terracotta);
  display: block;
  margin-bottom: 0.6rem;
}

.cc-topic-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.cc-topic-panel p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--cc-grey-dark);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .cc-topic-grid,
  .cc-topic-grid-secondary {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Homepage container — shared gutter for hero, topics, and spotlight
   Previously .cc-hero carried its own 1rem side padding while
   .cc-topic-grid and .cc-spotlight had none, relying on whatever Astra's
   own container provided — an inconsistency that could misalign the hero
   against the rest. One shared container fixes that and gives all three
   sections the same inset, tapering down on smaller screens.
   ========================================================================== */
#primary.cc-homepage {
  float: none;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
}

.cc-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2.5rem;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .cc-container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 600px) {
  .cc-container {
    padding: 0 1rem;
  }
}

/* ==========================================================================
   Hero — Start Here (wider, dominant) + headline/search (narrower, secondary)
   Ratio was previously 1fr 2fr (inverted from this comment's own intent) —
   the search column ended up wide but underfilled, and the 5-item Start
   Here list was cramped into the narrow column. Swapped to 2fr 1fr so the
   dominant column actually carries the denser content.
   ========================================================================== */
.cc-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.75rem;
  padding: 1.5rem 0;
  align-items: stretch;
}

.cc-start-here-panel {
  display: flex;
}

.cc-hero-secondary {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cc-hero-headline {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 0.8rem;
  text-align: left;
}

.cc-hero-search {
  display: flex;
  gap: 0.5rem;
  max-width: 100%;
}

.cc-hero-search input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--cc-grey-mid);
}

.cc-hero-search button {
  background: var(--cc-black);
  color: var(--cc-white);
  border: none;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}

.cc-hero-search button:hover {
  background: var(--cc-terracotta);
}

.cc-start-here {
  padding: 1.25rem 0;
  background: transparent;
  width: 100%;
}

.cc-start-here-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--cc-black);
  margin: 0 0 0.9rem;
}

.cc-start-here ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

.cc-start-here li {
  padding: 0.4rem 0;
  font-size: 15px;
  line-height: 1.4;
  border-bottom: 0.5px solid var(--cc-grey-mid);
  break-inside: avoid;
}

.cc-start-here li:last-child {
  border-bottom: none;
}

@media (max-width: 640px) {
  .cc-start-here ul {
    columns: 1;
  }
}

.cc-start-here a {
  color: var(--cc-terracotta);
  text-decoration: none;
}

.cc-start-here a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .cc-hero {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Section dividers — hairline rule between the three homepage sections
   ========================================================================== */
.cc-section-divider {
  border: none;
  border-top: 0.5px solid var(--cc-grey-mid);
  margin: 2rem 0;
}

/* ==========================================================================
   Spotlight — editorial picks (Spotlight category), newest 6, 2x3 grid —
   now paired with a sidebar (About teaser + books-coming-soon) instead of
   sitting alone in a narrow centered column
   ========================================================================== */
.cc-spotlight {
  margin: 2rem 0;
}

.cc-spotlight h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cc-black);
  margin: 0 0 1rem;
}

.cc-spotlight-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.75rem;
  align-items: start;
}

.cc-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.cc-spotlight-card {
  border: 0.5px solid var(--cc-grey-light);
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--cc-black);
  transition: border-color 0.2s ease;
}

.cc-spotlight-card:hover {
  border-color: var(--cc-terracotta);
}

.cc-spotlight-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.cc-spotlight-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--cc-grey-dark);
  line-height: 1.5;
}

.cc-spotlight-empty {
  color: var(--cc-grey-dark);
  font-size: 0.9rem;
}

.cc-spotlight-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cc-sidebar-card {
  border: 0.5px solid var(--cc-grey-light);
  border-radius: 12px;
  padding: 1.25rem;
}

.cc-sidebar-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.cc-sidebar-card p {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  color: var(--cc-grey-dark);
  line-height: 1.5;
}

.cc-sidebar-card a {
  font-size: 0.85rem;
  color: var(--cc-terracotta);
  text-decoration: none;
}

.cc-sidebar-card a:hover {
  text-decoration: underline;
}

.cc-books-teaser {
  background: var(--cc-grey-light);
  border-color: var(--cc-grey-light);
}

.cc-books-teaser h3 {
  color: var(--cc-black);
}

.cc-books-teaser p {
  margin: 0;
  color: var(--cc-grey-dark);
}

@media (max-width: 700px) {
  .cc-spotlight-row {
    grid-template-columns: 1fr;
  }

  .cc-spotlight-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Cancer-type hub pages (Query Loop grouped by aspect)
   ========================================================================== */
.cc-hub-aspect-section {
  margin: 2.5rem 0;
}

.cc-hub-aspect-section h2 {
  border-bottom: 1px solid var(--cc-grey-light);
  padding-bottom: 0.5rem;
}

/* ==========================================================================
   Our Stories page
   ========================================================================== */
.cc-page-header {
  max-width: 720px;
  margin: 2rem auto 1rem;
  text-align: center;
}

.cc-page-intro {
  color: var(--cc-grey-dark);
}

.cc-stories-list {
  max-width: 720px;
  margin: 0 auto 3rem;
}

.cc-story-card {
  border-bottom: 1px solid var(--cc-grey-light);
  padding: 1.5rem 0;
}

.cc-story-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
}

.cc-story-card h2 a {
  color: var(--cc-black);
  text-decoration: none;
}

.cc-story-card h2 a:hover {
  color: var(--cc-terracotta);
}

/* ==========================================================================
   Native collapsible "See all cancer types" — no JS
   ========================================================================== */
.cc-collapsible summary {
  cursor: pointer;
  color: var(--cc-terracotta);
  font-weight: 600;
}

/* ==========================================================================
   About page — constrain to a comfortable reading width
   720px targets ~60-75 characters per line regardless of viewport width,
   rather than a percentage split that would scale unpredictably between
   a laptop and an ultra-wide monitor.
   ========================================================================== */
.cc-about-page .entry-content {
  max-width: 720px;
  margin: 0 auto;
}
