/*
Theme Name: CPSC Newsletter
Author: Leanne
Version: 0.1
Text Domain: cpsc-newsletter
*/

:root{
  --bg: #ffffff;
  --card: #ffffff;
  --text: #101828;
  --muted: #475467;
  --accent: #1f4a8a; /* deep blue */
  --line: rgba(16,24,40,.10);
}

*{ box-sizing: border-box; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

a{ color: var(--accent); text-decoration: none; }
a:hover{ text-decoration: underline; }

.wrap{
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header{
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  background: #fff;
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.header-mark img{
  height: 54px;
  width: auto;
  display:block;
}

.header-wordmark img{
  height: 54px;
  width: auto;
  display:block;
}

@media (max-width: 640px){
  .header-inner{
    flex-direction: column;
    align-items: flex-start;
  }
  .header-wordmark img{
    height: 44px;
  }
  .header-mark img{
    height: 44px;
  }
}

.site-footer{
  border-top: 1px solid var(--line);
  border-bottom: 0;
  padding: 18px 0;
  margin-top: 48px;
}

.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 6px 22px rgba(16,24,40,.06);
}

.issue-hero{
  padding: 32px 0 10px;
}
.issue-kicker{
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
}
.issue-title{
  font-family: Georgia, "Times New Roman", Times, serif; 
  font-size: clamp(30px, 4vw, 48px);
  margin: 6px 0 8px;
  line-height: 1.15;
}
.issue-meta{
  color: var(--muted);
  margin: 0;
}


.section-title{
  font-size: 18px;
  margin: 0 0 12px;
}

.toc{
  margin: 0;
  padding-left: 18px;
}
.toc li{
  margin: 10px 0;
}
.toc small{
  color: var(--muted);
}

.article{
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.article:first-of-type{
  border-top: 0;
  padding-top: 0;
}
.article-body{
  max-width: 72ch;
}

.badge{
  display:inline-block;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid rgba(31,74,138,.25);
  background: rgba(31,74,138,.06);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.article-title{
  margin: 6px 0 6px;
  font-size: 26px;
}
.article-byline{
  margin: 0 0 14px;
  color: var(--muted);
}

.read-alone{
  margin-top: 16px;
  font-size: 14px;
}

.site-logo img{
  height: 54px;
  width: auto;
  display:block;
}


.featured-grid{
  display: grid;
  grid-template-columns: .55fr 1.45fr;
  gap: 22px;
  align-items: start;
}

.featured-photo img{
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 6px;
}

@media (max-width: 820px){
  .featured-grid{
    grid-template-columns: 1fr;
  }
}

.badge{ display:none; }


.entry-content::after{
  content:"";
  display:block;
  clear:both;
}


.article-author-photo{
  float: left;
  width: 220px;
  max-width: 42%;
  margin: 6px 18px 12px 0;
  border: 1px solid rgba(16,24,40,.12);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.article-author-photo img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

@media (max-width: 820px){

  /* 1) Intro (featured opening card) portrait */
  .featured-photo img{
    max-height: 220px;  
    width: auto;
    display: block;
    margin: 0 auto;
  }

  /* 2) Full-article author portrait  */
  .article-author-photo img{
    max-height: 260px;
    width: auto;
    display: block;
    margin: 0 auto;
  }

  /* 3) Image Callout block image */
  .cpsc-callout img{
    max-height: 240px;  
    width: auto;
    display: block;
    margin: 0 auto;
  }
}


/* Make sure content below doesn't wrap into the next article */
.article .entry-content::after{
  content:"";
  display:block;
  clear:both;
}

@media (max-width: 820px){
  .article-author-photo{
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 14px 0;
  }
}


/* Full article content should use available width */
.article .article-body{
  max-width: none;
}


/* Remove default marker */
.article-expand summary {
  list-style: none;
  cursor: pointer;
}

.article-expand summary::-webkit-details-marker {
  display: none;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  margin-top: 12px;

  font-size: 0.9rem;
  font-weight: 500;

  color: #2b6e73;          /* adjust to your brand */
  text-decoration: none;

  border-bottom: 1px solid rgba(43,110,115,0.35);
  padding-bottom: 2px;

  transition: color 0.2s ease, border-color 0.2s ease;
}

.read-more-btn:hover {
  color: #1f4f53;
  border-color: #1f4f53;
}


/**.read-more-btn::after {
  content: "↓";
  font-size: 0.85em;
  transition: transform 0.2s ease;
}**/

/* When expanded */
.article-expand[open] .read-more-btn::after {
  transform: rotate(180deg);
}


.article-expand[open] .read-more-btn {
  font-style: italic;
}


.hub-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.hub-card {
  display: block;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.hub-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.hub-body {
  padding: 14px;
}

.hub-issue {
  font-size: 0.8rem;
  opacity: 0.75;
  margin-bottom: 6px;
}

.hub-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.hub-byline {
  margin: 0 0 10px;
  font-size: 0.9rem;
  opacity: 0.8;
}

.hub-excerpt p {
  margin: 0;
  opacity: 0.95;
}


/* Single article – classic editorial layout */
.article-single {
  position: relative;
}

/* Floated author image */
.article-float-image {
  float: left;
  margin: 4px 18px 12px 0;
  width: 200px;
}

.article-float-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* Ensure text wraps nicely */
.article-single .article-body p:first-child {
  margin-top: 0;
}

/* Clear float at the end so card contains everything */
.article-single::after {
  content: "";
  display: block;
  clear: both;
}

/* Mobile: stack image above text */
@media (max-width: 700px) {
  .article-float-image {
    float: none;
    margin: 0 0 16px;
    width: 100%;
  }
}

/* Single article: allow full width text */
.article-single .article-body {
  max-width: none;
  width: 100%;
}

@media (max-width: 700px) {
  .article-float-image {
    float: none;
    margin: 0 auto 16px;
    width: 65%;          /* key line – adjust 60–75% to taste */
  }

  .article-float-image img {
    width: 100%;
    height: auto;
    object-fit: contain; /* keep full portrait visible */
  }
}


/* Make each article start below any previous floated image */
.article {
  clear: both;
}

/* Give breathing room between articles */
.article + .article {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(0,0,0,0.08);
}


/* Hide header logo on Issue Hub page (to avoid duplication with masthead) */
.page-template-page-articles-hub .header-wordmark{
  display: none;
}

.issue-logo .custom-logo{
  max-width: 520px;
  width: 100%;
  height: auto;
  display: block;
  margin: 10px 0 6px;
}


.issue-footer{
  margin-top: 40px;
  padding-top: 16px;
  font-size: 0.85rem;
  color: #475569;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.issue-footer a{
  color: inherit;
  text-decoration: none;
}

.article-body table{
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}

.article-body th,
.article-body td{
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  vertical-align: top;
}

.article-body th{
  background: #f8fafc;
  font-weight: 600;
}

.article-body tr:nth-child(even) td{
  background: #fcfcfd;
}

.article-body .wp-block-table{
  overflow-x: auto;
}

.article-body table{
  min-width: 480px;
}


.article-title {
  color: #000080;
}