/* ==========================================================================
   Retirees in USA — "Modern" look (loads after rti.css when rti_look = modern)
   Same red / blue / navy and logo. Navy headings instead of bright blue,
   cards on plain ground, tinted full-bleed bands, rounder corners, a
   newsletter band and a header Subscribe button. Footer is unchanged.
   ========================================================================== */

body.rti-modern {
  --rti-ink: #13284A;          /* headings */
  --rti-tint: #F2F6FB;         /* bands, sidebar cards */
  --rti-tint-line: #E1E8F2;
  --rti-radius: 14px;
  --color-heading: var(--rti-ink);
  background: #fff;
}

/* Full-bleed band behind a contained block, without breaking the container */
body.rti-modern .latest-posts-section,
body.rti-modern .rti-archive-band {
  background: var(--rti-tint);
  box-shadow: 0 0 0 100vmax var(--rti-tint);
  clip-path: inset(0 -100vmax);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
body.rti-modern .site-header {
  padding: 0.85rem 0 !important;
  border-bottom: 1px solid var(--rti-tint-line);
}

body.rti-modern .site-description {
  display: none;
}

body.rti-modern .main-navigation a {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--rti-ink);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

body.rti-modern .main-navigation a:hover,
body.rti-modern .main-navigation .current-menu-item > a,
body.rti-modern .main-navigation .current-category-ancestor > a {
  color: var(--color-primary-hover);
  border-bottom-color: var(--color-primary);
  text-decoration: none;
}

body.rti-modern .header-actions {
  gap: 0.75rem;
}

.rti-header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
}

.rti-header-cta:hover {
  background: var(--color-primary-hover);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 768px) {
  .rti-header-cta {
    min-height: 36px;
    padding: 0 0.85rem;
    font-size: 0.85rem;
  }
}

/* --------------------------------------------------------------------------
   Shared bits
   -------------------------------------------------------------------------- */
body.rti-modern .hero-category-badge,
body.rti-modern .hero-sidebar-category,
body.rti-modern .latest-post-category {
  color: var(--color-primary-hover);
  font-weight: 700;
}

body.rti-modern .hero-main-title a,
body.rti-modern .hero-sidebar-title a,
body.rti-modern .latest-post-title a,
body.rti-modern .category-block-item-title a,
body.rti-modern .category-block-title a,
body.rti-modern .archive-post-title a,
body.rti-modern .related-post-title a,
body.rti-modern .popular-post-link,
body.rti-modern .top-pick-title a {
  color: var(--rti-ink);
}

body.rti-modern .hero-main-title a:hover,
body.rti-modern .hero-sidebar-title a:hover,
body.rti-modern .latest-post-title a:hover,
body.rti-modern .category-block-item-title a:hover,
body.rti-modern .archive-post-title a:hover,
body.rti-modern .related-post-title a:hover,
body.rti-modern .popular-post-link:hover,
body.rti-modern .top-pick-title a:hover {
  color: var(--color-primary-hover);
}

/* Section heads: big title, pill "View all" */
body.rti-modern .section-header,
body.rti-modern .category-block-header {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 1.1rem;
  align-items: center;
}

body.rti-modern .section-header::after,
body.rti-modern .category-block-header::after {
  display: none;
}

body.rti-modern .section-title,
body.rti-modern .category-block-title {
  font-size: clamp(1.45rem, 1.15rem + 0.9vw, 1.9rem);
  color: var(--rti-ink);
  letter-spacing: -0.015em;
}

body.rti-modern .view-all-link,
body.rti-modern .category-view-all {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.9rem;
  border: 1px solid var(--rti-tint-line);
  border-radius: 999px;
  background: #fff;
  color: var(--rti-ink);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

body.rti-modern .view-all-link:hover,
body.rti-modern .category-view-all:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-hover);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Homepage hero
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
  body.rti-modern .hero-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 2rem;
  }
}

body.rti-modern .hero-main {
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: none;
}

body.rti-modern .hero-main-image {
  border-radius: var(--rti-radius);
  overflow: hidden;
  min-height: 340px;
}

body.rti-modern .hero-main-content {
  padding: 1.1rem 0 0;
}

body.rti-modern .hero-main-title {
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

body.rti-modern .hero-main-excerpt {
  font-size: 1.08rem;
  max-width: 60ch;
}

/* Right column becomes a "Top stories" list on plain ground */
body.rti-modern .hero-sidebar {
  border: 0;
  border-radius: 0;
  padding: 0;
  position: relative;
}

body.rti-modern .hero-sidebar::before {
  content: "Top stories";
  display: block;
  font-family: var(--rti-head);
  font-weight: var(--rti-head-weight);
  font-size: 1.15rem;
  color: var(--rti-ink);
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--rti-ink);
}

body.rti-modern .hero-sidebar-item {
  padding: 0.8rem 0;
  border-bottom-color: var(--rti-tint-line);
}

body.rti-modern .hero-sidebar-image {
  order: 2;
  width: 92px;
  height: 92px;
  border-radius: 10px;
}

body.rti-modern .hero-sidebar-content {
  flex: 1 1 auto;
}

body.rti-modern .hero-sidebar-title {
  font-size: 1.02rem;
}

/* --------------------------------------------------------------------------
   Latest — tinted band, white cards
   -------------------------------------------------------------------------- */
body.rti-modern .latest-posts-section {
  margin-top: 2.5rem;
  padding: 2.25rem 0 2.5rem;
}

body.rti-modern .latest-posts-grid {
  gap: 1.5rem;
}

body.rti-modern .latest-post-card {
  border: 0;
  border-radius: var(--rti-radius);
  background: #fff;
  box-shadow: 0 1px 2px rgba(19, 40, 74, 0.06), 0 8px 24px -12px rgba(19, 40, 74, 0.18);
}

body.rti-modern .latest-post-card:hover {
  box-shadow: 0 1px 2px rgba(19, 40, 74, 0.08), 0 14px 32px -12px rgba(19, 40, 74, 0.28);
}

body.rti-modern .latest-post-content {
  padding: 1rem 1.15rem 1.15rem;
}

body.rti-modern .latest-post-title {
  font-size: 1.16rem;
  line-height: 1.28;
}

/* --------------------------------------------------------------------------
   Newsletter band (front-page.php, modern only)
   -------------------------------------------------------------------------- */
.rti-band {
  margin: 2.5rem 0 0.5rem;
}

.rti-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 1.5rem 2.5rem;
  align-items: center;
  padding: 2rem 2.25rem;
  border-radius: 20px;
  background: var(--color-footer-bg);
  background-image: radial-gradient(circle at 92% 18%, rgba(147, 197, 253, 0.22) 0, rgba(147, 197, 253, 0) 42%);
  color: #DBE7F5;
}

.rti-band-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93C5FD;
}

.rti-band-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.18;
  color: #fff;
}

.rti-band-text {
  margin: 0;
  color: #C3D3E8;
  max-width: 52ch;
}

body .rti-band-form {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.rti-band-form input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-family: inherit;
}

.rti-band-form button {
  min-height: 48px;
  padding: 0 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

.rti-band-form button:hover {
  background: var(--color-primary-hover);
}

.rti-band .newsletter-message {
  margin-top: 0.6rem;
  color: #fff;
}

@media (max-width: 860px) {
  .rti-band-inner {
    grid-template-columns: 1fr;
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 420px) {
  body .rti-band-form {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   Category blocks + sidebar
   -------------------------------------------------------------------------- */
body.rti-modern .categories-with-sidebar {
  padding-top: 2.5rem;
}

body.rti-modern .category-block {
  margin-bottom: 2.5rem;
}

body.rti-modern .category-block-posts {
  gap: 1.1rem 1.5rem;
}

body.rti-modern .category-block-image {
  width: 120px;
  height: 90px;
  border-radius: 10px;
}

body.rti-modern .category-block-item-title {
  font-size: 1.04rem;
}

body.rti-modern .sidebar-widget {
  background: var(--rti-tint);
  border: 0;
  border-radius: var(--rti-radius);
  padding: 1.25rem 1.35rem;
}

body.rti-modern .sidebar-widget-title {
  font-family: var(--rti-head);
  font-size: 1.1rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--rti-ink);
  border-bottom: 2px solid var(--rti-ink);
}

/* Ranks as large red numerals instead of filled circles */
body.rti-modern .popular-rank {
  width: auto;
  min-width: 1.6rem;
  height: auto;
  background: none;
  border-radius: 0;
  color: var(--color-primary);
  font-family: var(--rti-head);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  justify-content: flex-start;
}

body.rti-modern .popular-post-item,
body.rti-modern .top-pick-item,
body.rti-modern .sidebar-categories li {
  border-color: var(--rti-tint-line);
}

body.rti-modern .top-pick-image img {
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Single post
   -------------------------------------------------------------------------- */
body.rti-modern .article-header {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 1.5rem;
}

body.rti-modern .entry-title {
  color: var(--rti-ink);
  font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

body.rti-modern .entry-meta {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0;
}

body.rti-modern .entry-meta .categories a {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: #FDECEC;
  color: var(--color-primary-hover);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

body.rti-modern .entry-content {
  font-size: 1.15rem;
}

body.rti-modern .entry-content h2 {
  color: var(--rti-ink);
  border-bottom: 0;
  padding-bottom: 0;
  letter-spacing: -0.015em;
}

body.rti-modern .entry-content h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 0.7rem;
  border-radius: 2px;
  background: var(--color-primary);
}

body.rti-modern .entry-content h3 {
  color: var(--rti-ink);
}

body.rti-modern .entry-content figure img {
  border-radius: var(--rti-radius);
}

body.rti-modern .entry-content table {
  border-radius: 12px;
  overflow: hidden;
}

body.rti-modern .entry-content th {
  background: var(--rti-tint);
  color: var(--rti-ink);
}

/* Post sidebar: tinted cards, no red rails */
body.rti-modern .widget {
  border-left: 0;
  padding: 1.15rem 1.25rem;
  background: var(--rti-tint);
  border-radius: var(--rti-radius);
}

body.rti-modern .widget-area > section > p:first-child,
body.rti-modern p.widget-styled-title,
body.rti-modern .widget-styled-title {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--rti-head);
  font-size: 1.1rem !important;
  color: var(--rti-ink);
}

body.rti-modern .widget-newsletter {
  background: var(--color-footer-bg);
  border: 0;
  color: #DBE7F5;
}

body.rti-modern .widget-newsletter .widget-styled-title {
  color: #fff;
}

body.rti-modern .widget-newsletter .newsletter-description {
  color: #C3D3E8;
}

body.rti-modern .widget-newsletter input[type="email"],
body.rti-modern .widget-newsletter button[type="submit"] {
  border-radius: 999px;
  min-height: 44px;
}

body.rti-modern .widget_recent_entries a {
  color: var(--rti-ink);
}

body.rti-modern .related-posts {
  background: var(--rti-tint);
  box-shadow: 0 0 0 100vmax var(--rti-tint);
  clip-path: inset(0 -100vmax);
}

/* --------------------------------------------------------------------------
   Archive
   -------------------------------------------------------------------------- */
body.rti-modern .archive-title {
  color: var(--rti-ink);
  font-size: clamp(2rem, 1.4rem + 2vw, 2.8rem);
  letter-spacing: -0.02em;
}

body.rti-modern .archive-header {
  border-bottom: 0;
}

body.rti-modern .archive-post-item {
  border: 0;
  border-radius: var(--rti-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(19, 40, 74, 0.06), 0 8px 24px -12px rgba(19, 40, 74, 0.18);
}

body.rti-modern .archive-post-link {
  color: var(--color-primary-hover);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Phones
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  body.rti-modern .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  body.rti-modern .hero-main-image {
    min-height: 0;
  }

  body.rti-modern .latest-posts-section {
    margin-top: 1.75rem;
    padding: 1.75rem 0 2rem;
  }

  body.rti-modern .category-block-image {
    width: 100px;
    height: 76px;
  }
}

/* Late fixes */
.rti-header-cta {
  line-height: 1;
}

body.rti-modern .entry-meta .meta-sep {
  margin: 0 0.45rem;
  color: #94A3B8;
}

/* Archive: header on white, posts on a full-bleed tint band */
body.rti-modern .archive-header {
  padding: 0.5rem 0 1.5rem;
  margin-bottom: 0;
}

body.rti-modern .archive-posts {
  padding: 2rem 0 2.5rem;
  background: var(--rti-tint);
  box-shadow: 0 0 0 100vmax var(--rti-tint);
  clip-path: inset(0 -100vmax);
}

body.rti-modern .archive-posts > .site-container {
  padding-left: 0;
  padding-right: 0;
}

body.rti-modern .archive-grid {
  gap: 1.5rem;
}

/* Sidebar newsletter on navy: white title, no red rail (main.css pins the
   rail with !important), form fields in the site font. */
body.rti-modern .widget-area .widget-newsletter {
  border-left: 0 !important;
}

body.rti-modern .widget-area > section.widget-newsletter > p.widget-styled-title {
  color: #fff;
}

body.rti-modern .widget-newsletter input[type="email"],
body.rti-modern .widget-newsletter button[type="submit"] {
  font-family: inherit;
}

body.rti-modern .rti-related-lead-image,
body.rti-modern .rti-related-thumb {
  background: var(--rti-tint-line);
}

body.rti-modern .rti-related-item {
  border-bottom-color: var(--rti-tint-line);
}

body.rti-modern .rti-archive .rti-archive-top,
body.rti-modern .rti-archive-row {
  border-bottom-color: var(--rti-tint-line);
}

body.rti-modern .rti-archive-row-thumb {
  background: var(--rti-tint-line);
}

body.rti-modern .rti-archive .page-numbers {
  border-color: var(--rti-tint-line);
  color: var(--rti-ink);
}

body.rti-modern .rti-archive .page-numbers.current,
body.rti-modern .rti-archive .page-numbers:hover {
  background: var(--rti-ink);
  border-color: var(--rti-ink);
  color: #fff;
}


/* Tablet (2.0.6): hero stacks (base rule at <=1024px), Top stories becomes a
   two-up list under the lead; the "Top stories" label spans the row. */
@media (min-width: 769px) and (max-width: 1024px) {
  body.rti-modern .hero-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 2rem;
  }

  body.rti-modern .hero-sidebar::before {
    flex: 0 0 100%;
  }

  body.rti-modern .hero-sidebar-item {
    flex: 1 1 calc(50% - 1rem);
    min-width: 0;
  }

  body.rti-modern .hero-sidebar-item:nth-last-child(2) {
    border-bottom: 0;
  }
}

/* Tablet header: keep the menu on one row beside the logo. Subscribe stays
   reachable from the footer form and the homepage band. */
@media (min-width: 769px) and (max-width: 1100px) {
  body.rti-modern .site-title svg {
    width: 140px;
    height: 35px;
  }

  body.rti-modern .header-main {
    gap: 1rem;
  }

  body.rti-modern .main-navigation ul {
    gap: 0.9rem;
  }

  body.rti-modern .main-navigation a {
    font-size: 0.88rem;
  }

  body.rti-modern .rti-header-cta {
    display: none;
  }
}
