/*
Theme Name: ReNew Blog
Description: Blog for renewdentalcare.com. The header, menu, footer, popup and site styles come from the main site's includes/partials, so changes there show here too.
Version: 1.2.2
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: renew-blog
*/

/* Banner */
.rnb-hero { background: #634256; color: #fff; padding: 210px 6% 70px; }
.rnb-hero__inner { max-width: 1200px; margin: 0 auto; }
.rnb-hero h1 { font-family: "Work Sans", sans-serif; font-weight: 300; font-size: 50px; line-height: 1.1; color: #fff; margin: 0; text-transform: none; letter-spacing: normal; max-width: 900px; }
.rnb-meta { margin: 0 0 14px; font-size: 15px; }
.rnb-meta a { color: #fff; font-weight: 700; }
.rnb-hero .rnb-back { color: #fff; font-weight: 700; }

/* Listing */
.rnb-list { padding: 80px 6%; background: #fff; }
.rnb-list__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.rnb-list__inner--solo { grid-template-columns: minmax(0, 1fr); }

/* Category box (blog page and category pages) */
.rnb-cats { padding: 22px 20px 24px; border-radius: 16px; background: #f2f2f2; }
.rnb-cats h2 { margin: 0 0 14px; color: #5f6063; font-family: "Open Sans", sans-serif; font-weight: 400; font-size: 13px; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; }
.rnb-cats ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.rnb-cats li { margin: 0; }
.rnb-cats a { display: inline-block; padding: 9px 15px; border: 1px solid #d4d4d4; border-radius: 32px; background: #fff; color: #323232; font-weight: 400; font-size: 15px; line-height: 1.2; transition: background .15s, color .15s, border-color .15s; }
.rnb-cats a span { color: #5f6063; }
.rnb-cats a:hover { border-color: #396768; background: #eef5f4; color: #2c5152; }
.rnb-cats a[aria-current] { border-color: #396768; background: #396768; color: #fff; font-weight: 600; }
.rnb-cats a[aria-current] span { color: #fff; }
.rnb-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 30px; }
.rnb-card { display: flex; flex-direction: column; background: #fff; border-top: 3px solid #80b8b2; box-shadow: 0 4px 18px rgba(41, 23, 33, .08); }
.rnb-card__img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
/* Tablet and up: photo on the left, text on the right (posts without a photo use the full width) */
@media (min-width: 768px) {
  .rnb-card { flex-direction: row; align-items: center; }
  .rnb-card__img { flex: 0 0 42%; margin-left: 26px; } /* keeps its 16:9 shape so nothing important is cropped */
}
.rnb-card__body { min-width: 0; display: flex; flex-direction: column; flex: 1; padding: 28px 26px 30px; }
.rnb-card h2 { font-family: "Work Sans", sans-serif; font-weight: 300; font-size: 25px; line-height: 1.2; margin: 0 0 14px; text-transform: none; }
.rnb-card h2 a { color: #396768; font-weight: 300; }
.rnb-card .rnb-meta { color: #5f6063; }
.rnb-card .rnb-meta a { color: #396768; }
.rnb-card p { margin: 0 0 18px; }
.rnb-more { margin-top: auto; font-weight: 700; color: #396768; }
.rnb-empty { max-width: 1200px; margin: 0 auto; }
.rnb-list .pagination { max-width: 1200px; margin: 45px auto 0; text-align: center; }
.rnb-list .page-numbers { display: inline-block; padding: 8px 15px; margin: 2px; background: #fff; color: #396768; font-weight: 700; }
.rnb-list .page-numbers.current { background: #634256; color: #fff; }

/* Post */
.rnb-post { padding: 80px 6%; background: #fff; }
.rnb-post__inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.rnb-post__inner--solo { grid-template-columns: minmax(0, 860px); justify-content: center; }
.rnb-featured { margin: 0 0 40px; }
.rnb-featured img { display: block; width: 100%; height: auto; }
/* The site's CSS makes body its own scroll area, which stops position: sticky from working. */
body.single-post:not(.nav-open), body.blog:not(.nav-open), body.archive:not(.nav-open) { overflow: visible !important; }

.rnb-side { position: sticky; top: 94px; max-height: calc(100vh - 118px); overflow-y: auto; border-radius: 16px; scrollbar-width: thin; }
.rnb-tabs { overflow: hidden; overflow: clip; border-radius: 16px; background: #f2f2f2; font-size: 15px; line-height: 1.35; }
.rnb-tabs__strip { position: sticky; top: 0; z-index: 1; display: flex; background: #634256; }
.rnb-tabs .rnb-tabs__tab { flex: 1; margin: 0; padding: 14px 12px; border: 0; border-radius: 0; background: transparent; color: rgba(255, 255, 255, .85); font-family: "Open Sans", sans-serif; font-weight: 600; font-size: 15px; line-height: 1.35; letter-spacing: normal; text-transform: none; cursor: pointer; transition: background .2s, color .2s; }
.rnb-tabs .rnb-tabs__tab:hover { color: #fff; }
.rnb-tabs .rnb-tabs__tab[aria-selected="true"] { background: #396768; color: #fff; }
.rnb-tabs .rnb-tabs__tab:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.rnb-tabs__title { margin: 0; padding: 14px 20px; color: #fff; font-family: "Open Sans", sans-serif; font-weight: 600; font-size: 15px; line-height: 1.35; text-transform: none; }
.rnb-tabs__panel { padding: 16px; }
.rnb-tabs__panel[hidden] { display: none; }

.rnb-toc, .rnb-related { list-style: none; margin: 0; padding: 0; }
.rnb-toc li + li { margin-top: 4px; }
.rnb-toc a { display: block; padding: 8px 12px; border-left: 3px solid transparent; border-radius: 0 4px 4px 0; color: #323232; font-weight: 400; transition: background .15s, color .15s, border-color .15s; }
.rnb-toc a:hover { background: rgba(128, 184, 178, .18); color: #2c5152; }
.rnb-toc a.is-current { border-left-color: #396768; background: rgba(128, 184, 178, .28); color: #2c5152; font-weight: 600; }
.rnb-related li + li { border-top: 1px solid rgba(0, 0, 0, .1); }
.rnb-related a { display: block; padding: 10px 4px; color: #323232; font-weight: 400; transition: color .15s; }
.rnb-related a:hover { color: #396768; }

/* Phones and tablets only */
.rnb-toc-menu, .rnb-related-end { display: none; }
.rnb-toc-menu { margin: 0 0 30px; overflow: hidden; border-radius: 16px; background: #f2f2f2; font-size: 16px; line-height: 1.4; }
.rnb-toc-menu summary { position: relative; padding: 16px 50px 16px 22px; color: #634256; font-weight: 600; cursor: pointer; list-style: none; }
.rnb-toc-menu summary::-webkit-details-marker { display: none; }
.rnb-toc-menu summary::after { content: ""; position: absolute; right: 24px; top: 50%; width: 9px; height: 9px; margin-top: -8px; border: solid #396768; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.rnb-toc-menu[open] summary::after { margin-top: -3px; transform: rotate(-135deg); }
.rnb-toc-menu summary:focus-visible { outline: 2px solid #299dc9; outline-offset: -3px; border-radius: 16px; }
.rnb-toc-menu nav { padding: 0 12px 16px; }
.rnb-related-end { margin-top: 44px; padding: 24px 24px 14px; border-radius: 16px; background: #f2f2f2; }
.rnb-related-end h2 { margin: 0 0 8px; color: #396768; font-family: "Work Sans", sans-serif; font-weight: 300; font-size: 24px; line-height: 1.2; text-transform: none; }

.rnb-content > :first-child { margin-top: 0; }
.rnb-content h2, .rnb-content h3, .rnb-content h4 { font-family: "Work Sans", sans-serif; font-weight: 300; line-height: 1.2; text-transform: none; scroll-margin-top: 100px; }
.rnb-content h2 { font-size: 34px; color: #299dc9; margin: 48px 0 18px; }
.rnb-content h3 { font-size: 25px; color: #396768; margin: 34px 0 14px; }
.rnb-content h4 { font-size: 21px; color: #396768; margin: 28px 0 12px; }
.rnb-content p { margin: 0 0 18px; }
.rnb-content strong { font-weight: 600; }
.rnb-content a { font-weight: 700; }
.rnb-content ul, .rnb-content ol { margin: 0 0 22px; padding-left: 26px; }
.rnb-content ul { list-style: disc; }
.rnb-content ol { list-style: decimal; }
.rnb-content li { margin-bottom: 9px; }
.rnb-content li::marker { color: #634256; font-weight: 700; }
.rnb-content img { max-width: 100%; height: auto; }

/* Tables: rows become stacked blocks on phones */
.rnb-content .wp-block-table { margin: 0 0 28px; overflow-x: auto; }
.rnb-content table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.55; }
.rnb-content .wp-block-table thead { border-bottom: 0; }
.rnb-content th, .rnb-content td { padding: 16px 18px; border: 1px solid #d9e6e4; text-align: left; vertical-align: top; }
.rnb-content thead th { background: #634256; border-color: #634256; color: #fff; font-weight: 600; }
.rnb-content tbody tr:nth-child(even) { background: #f9f9f9; }

.rnb-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; padding-top: 34px; border-top: 1px solid #d4d4d4; }
.rnb-btn { display: inline-block; padding: 16px 28px; background: #634256; border: 1px solid #634256; color: #fff !important; font-family: Roboto, sans-serif; font-weight: 900; font-size: 15px; line-height: 1.1; text-transform: uppercase; }
.rnb-btn--line { background: #fff; color: #634256 !important; }
.rnb-btn:hover { background: #291721; border-color: #291721; color: #fff !important; }
.rnb-hero a:focus-visible, .rnb-post a:focus-visible, .rnb-list a:focus-visible { outline: 2px solid #299dc9; outline-offset: 3px; }

@media (max-width: 1024px) {
  .rnb-hero { padding: 170px 45px 55px; }
  .rnb-hero h1 { font-size: 40px; }
  .rnb-list, .rnb-post { padding: 60px 45px; }
  .rnb-post__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .rnb-side { display: none; }
  .rnb-side--cats { display: block; position: static; max-height: none; }
  .rnb-list__inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .rnb-toc-menu, .rnb-related-end { display: block; }
  .rnb-content h2, .rnb-content h3, .rnb-content h4 { scroll-margin-top: 188px; } /* clears the fixed header */
  .rnb-content h2 { font-size: 28px; }
  .rnb-content h3 { font-size: 23px; }
}

@media (max-width: 767px) {
  .rnb-hero { padding: 165px 20px 45px; } /* clears the fixed header */
  .rnb-hero h1 { font-size: 32px; }
  .rnb-list, .rnb-post { padding: 45px 20px; }
  .rnb-content h2, .rnb-content h3, .rnb-content h4 { scroll-margin-top: 152px; }
  .rnb-btn { width: 100%; box-sizing: border-box; text-align: center; }
  .rnb-content .wp-block-table { overflow: visible; }
  .rnb-content table.rnb-stack, .rnb-content .rnb-stack tbody, .rnb-content .rnb-stack tr, .rnb-content .rnb-stack td { display: block; width: auto; }
  .rnb-content .rnb-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .rnb-content .rnb-stack tr { margin-bottom: 16px; border: 1px solid #d9e6e4; border-top: 3px solid #634256; }
  .rnb-content .rnb-stack td { border: 0; padding: 12px 16px; }
  .rnb-content .rnb-stack td::before { content: attr(data-label); display: block; font-weight: 700; color: #634256; }
}
