/*
Theme Name: Raglan Chronicle
Description: A responsive newspaper theme for the Raglan Chronicle frontend.
Version: 1.0.1
Text Domain: raglan-chronicle
Requires at least: 6.4
Requires PHP: 7.4
*/

:root {
  --rc-ink: #171717;
  --rc-muted: #686868;
  --rc-rule: #e6e6e6;
  --rc-body: "Quattrocento Sans", Arial, sans-serif;
  --rc-heading: Montserrat, Arial, sans-serif;
  --rc-nav: Lato, Arial, sans-serif;
  --rc-gap: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--rc-ink); background: #fff; font: 400 16px/1.5 var(--rc-body); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .15em; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
img { display: block; height: auto; max-width: 100%; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .65em; font-family: var(--rc-heading); line-height: 1.3; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.screen-reader-text:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.rc-skip-link:focus { position: absolute; z-index: 30; top: 8px; left: 8px; padding: 8px 12px; background: #fff; }
.rc-wrap { width: min(1080px, 97%); margin-inline: auto; }
.rc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--rc-gap); align-items: start; margin-top: 26px; margin-bottom: 60px; }
.rc-main, .rc-sidebar { min-width: 0; }
.rc-no-sidebar { display: block; }

.rc-header { position: relative; background: #fff; z-index: 10; }
.rc-topbar-inner { position: relative; height: 41px; display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--rc-ink); }
.rc-navigation { align-self: flex-start; width: 60%; }
.rc-menu, .rc-menu .sub-menu, .rc-footer-menu { padding: 0; margin: 0; list-style: none; }
.rc-menu { display: flex; align-items: center; flex-wrap: wrap; font: 400 16px/40px var(--rc-nav); }
.rc-menu li { position: relative; }
.rc-menu a { display: block; white-space: nowrap; }
.rc-menu > li > a { padding-inline: 12px; }
.rc-menu .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 0 3px 6px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}
.rc-menu .sub-menu { display: none; position: absolute; z-index: 3; top: 100%; left: -14px; min-width: 155px; background: #fff; border: 1px solid var(--rc-rule); }
.rc-menu .sub-menu a { padding: 0 14px; }
.rc-menu .sub-menu .sub-menu { top: 0; left: 100%; }
.rc-menu li:hover > .sub-menu, .rc-menu li:focus-within > .sub-menu { display: block; }

.rc-masthead { padding: 14px 0; text-align: center; }
.rc-brand {
  display: inline-block;
  font: 700 80px/1.1 var(--rc-heading);
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #151515;
}
.rc-brand:hover { text-decoration: none; }
.rc-masthead .custom-logo { width: auto; max-height: 88px; margin-inline: auto; }
.rc-top-title, .rc-mobile-search { display: none; }
.rc-icon-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; }
.rc-menu-toggle { display: none; }
.rc-search-toggle { margin-right: -12px; }
.rc-search-icon { position: relative; width: 13px; height: 13px; margin: -3px 2px 0 0; border: 1px solid currentColor; border-radius: 50%; }
.rc-search-icon::after { content: ""; position: absolute; width: 6px; height: 1px; top: 10px; left: 10px; background: currentColor; transform: rotate(45deg); transform-origin: left center; }
.rc-menu-icon { width: 20px; height: 2px; background: currentColor; box-shadow: 0 -6px currentColor, 0 6px currentColor; }
.rc-search-panel { position: absolute; z-index: 2; right: 0; top: 100%; width: min(100%, 320px); padding: 16px; background: #fff; border: 1px solid var(--rc-rule); }
.search-form { display: flex; gap: 8px; align-items: stretch; }
.search-form label { min-width: 0; flex: 1; }
.search-field, .search-submit { height: 40px; }
.search-field { width: 100%; padding: 8px 10px; border: 1px solid var(--rc-rule); color: inherit; background: #fff; }
.search-submit, .rc-comment-submit { border: 1px solid var(--rc-ink); padding: 7px 12px; color: #fff; background: var(--rc-ink); cursor: pointer; }

.rc-hero { position: relative; max-width: 660px; margin-top: 10px; }
.rc-hero-slides { aspect-ratio: 5 / 4; background: #454545; }
.rc-hero-story { position: relative; isolation: isolate; display: grid; align-content: end; justify-items: center; height: 100%; color: #fff; overflow: hidden; }
.rc-hero-story::before { position: absolute; z-index: -1; content: ""; inset: 0; background: linear-gradient(180deg, transparent 30%, rgb(0 0 0 / .36)); }
.rc-hero-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.rc-hero-copy { width: calc(100% - 40px); max-width: 620px; text-align: center; margin-bottom: 20px; padding: 15px 36px 18px; background: rgb(23 23 23 / .74); }
.rc-hero-title { font-size: 26px; margin: 0 0 8px; }
.rc-hero-meta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px 12px; font-size: .85em; }
.rc-hero-excerpt { margin: 10px 0 12px; font-size: 15px; line-height: 1.4; }
.rc-hero-more, .rc-card__more { display: inline-block; font: 700 10px/1.2 var(--rc-nav); letter-spacing: 1.4px; text-transform: uppercase; }
.rc-hero-more { min-width: 145px; margin-top: 5px; padding: 5px 13px; border: 2px solid currentColor; font-size: 12px; }
.rc-hero-more:hover { color: var(--rc-ink); background: #fff; text-decoration: none; }
.rc-hero-story:has(.rc-hero-image)::before { background: rgb(0 0 0 / .3); }
.rc-hero-story:has(.rc-hero-image) .rc-hero-copy { background: transparent; }
.rc-hero-control { position: absolute; top: 50%; width: 40px; height: 120px; transform: translateY(-50%); color: #fff; border: 1px solid rgb(255 255 255 / .45); background: transparent; }
.rc-hero-control:hover { background: rgb(0 0 0 / .22); }
.rc-hero-control::before { content: ""; display: inline-block; width: 8px; height: 8px; border: solid currentColor; border-width: 1px 1px 0 0; transform: rotate(45deg); }
.rc-hero-prev { left: 0; }
.rc-hero-prev::before { transform: rotate(-135deg); }
.rc-hero-next { right: 0; }
.rc-home-layout { margin-top: var(--rc-gap); }

.rc-post-list { display: grid; gap: var(--rc-gap); }
.rc-card { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); align-items: start; gap: 24px; min-width: 0; }
.rc-card__media { display: block; aspect-ratio: 5 / 4; overflow: hidden; }
.rc-card__media--empty { background: #e7e7e7; }
.rc-card__image { width: 100%; height: 100%; object-fit: cover; }
.rc-card__copy { min-width: 0; }
.rc-card__title { margin: 0 0 6px; font-size: 1.3em; font-weight: 700; overflow-wrap: anywhere; }
.rc-card__meta, .rc-article-meta { color: var(--rc-muted); font-size: .9em; }
.rc-card__meta, .rc-article-meta, .rc-card__categories { display: flex; gap: 4px 8px; flex-wrap: wrap; align-items: center; }
.rc-card__excerpt { margin: 8px 0 0; }
.rc-card__excerpt p:last-child { margin-bottom: 0; }
.rc-card__more { margin-top: 14px; padding-bottom: 3px; border-bottom: 1px solid currentColor; }
.rc-card__more:hover { text-decoration: none; }
.rc-home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rc-post-list--archive { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rc-post-list--archive > .rc-card:first-child { grid-column: 1 / -1; }
.rc-home-grid .rc-card, .rc-post-list--archive .rc-card { display: block; }
.rc-home-grid .rc-card__media, .rc-post-list--archive .rc-card__media { margin-bottom: 13px; }
.rc-list-heading { margin-bottom: 26px; }
.rc-list-title { margin: 0 0 10px; font-size: 2em; }
.rc-list-description > :last-child { margin-bottom: 0; }

.rc-widget { margin-bottom: 28px; }
.rc-widget:last-child { margin-bottom: 0; }
.rc-widget-title, .rc-widget .wp-block-heading { margin: 0 0 13px; color: #171717; font: 400 12px/1.4 var(--rc-heading); letter-spacing: 2px; text-transform: uppercase; }
.rc-sidebar-links { padding: 0; margin: 0; list-style: none; }
.rc-sidebar-links li { padding: 7px 0; border-bottom: 1px solid var(--rc-rule); }
.rc-sidebar-links li:first-child { padding-top: 0; }
.rc-issue a { display: block; }

.rc-article-image { margin-bottom: 18px; }
.rc-article-image img, img.rc-article-image { width: 100%; height: auto; }
.rc-article-header { margin-bottom: 20px; }
.rc-article-title { margin: 0 0 10px; font-size: 2.15em; overflow-wrap: anywhere; }
.rc-entry-content { font-size: 1.1em; line-height: 1.65; overflow-wrap: anywhere; }
.rc-entry-content a { text-decoration: underline; }
.rc-entry-content figure { max-width: 100%; }
.rc-entry-content iframe { max-width: 100%; }
.rc-entry-content blockquote { margin-inline: 0; padding-left: 1em; border-left: 2px solid var(--rc-rule); }
.rc-entry-content pre { overflow-x: auto; }
.rc-entry-content .alignleft { float: left; margin: 0 1em 1em 0; }
.rc-entry-content .alignright { float: right; margin: 0 0 1em 1em; }
.rc-entry-content .aligncenter { display: block; margin-inline: auto; }
.rc-entry-content::after { display: block; content: ""; clear: both; }
.rc-author, .rc-comments, .rc-story-nav, .rc-related { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--rc-rule); }
.rc-author { display: flex; align-items: center; gap: 12px; }
.rc-author .avatar { border-radius: 50%; }
.rc-author-name, .rc-story-title { font-family: var(--rc-heading); font-weight: 700; }
.rc-comments :is(input:not([type="checkbox"], [type="submit"]), textarea) { display: block; width: 100%; padding: 9px 12px; border: 1px solid var(--rc-rule); background: #fafafa; }
.rc-comments textarea { min-height: 120px; }
.rc-comments .comment-list { padding-left: 0; list-style: none; }
.rc-comments .comment-body { margin-bottom: 18px; }
.rc-comments .comment-author img { display: inline-block; vertical-align: middle; border-radius: 50%; }
.rc-story-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin-bottom: 24px; }
.rc-story-link { display: grid; align-content: start; }
.rc-story-link--next { grid-column: 2; text-align: right; }
.rc-story-label { display: block; color: var(--rc-muted); font: 700 11px/1.4 var(--rc-nav); letter-spacing: 1px; text-transform: uppercase; }
.rc-related { margin-bottom: 60px; }
.rc-related-heading { font-size: 1.25em; }
.rc-related-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.rc-related-image, .rc-related-image img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; margin-bottom: 8px; }
.rc-related-title { margin: 0 0 5px; font-size: 1em; }
.rc-related-excerpt { font-size: .9em; }
.pagination .nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 30px; }
.page-numbers { display: inline-block; padding: 6px 11px; border: 1px solid var(--rc-rule); }
.page-numbers.current { background: var(--rc-ink); border-color: var(--rc-ink); color: #fff; }

.rc-footer { border-top: 1px solid var(--rc-rule); background: #fff; }
.rc-footer-inner { position: relative; padding: 36px 0 30px; }
.rc-footer-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--rc-gap); padding-bottom: 24px; border-bottom: 1px solid var(--rc-rule); }
.rc-footer-columns > * { padding-right: 14px; border-right: 1px solid var(--rc-rule); }
.rc-footer-menu li, .rc-footer-posts li { border-bottom: 1px solid var(--rc-rule); padding: 5px 0; }
.rc-footer-menu li:first-child, .rc-footer-posts li:first-child { padding-top: 0; }
.rc-footer-posts { margin: 0; padding-left: 1.15em; }
.rc-footer-posts li::marker { font: italic 1em Georgia, serif; }
.rc-category-form select { width: 100%; min-height: 36px; padding: 5px 8px; border: 1px solid var(--rc-rule); background: #fff; }
.rc-footer-search { max-width: 240px; margin: 22px auto 0; }
.rc-footer-search .search-field { height: 34px; text-align: center; }
.rc-footer small { display: block; margin-top: 12px; text-align: center; color: var(--rc-muted); }
.rc-back-to-top { position: absolute; bottom: 21px; right: 0; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--rc-rule); border-radius: 50%; }

@media (max-width: 1024px) {
  :root { --rc-gap: 24px; }
  .rc-brand { font-size: 48px; }
  .rc-card__title { font-size: 1.2em; }
}

@media (max-width: 840px) {
  body.admin-bar .rc-header { top: 46px; }
  .rc-header { position: sticky; top: 0; }
  .rc-topbar-inner { height: 54px; border: 0; }
  .rc-top-title { display: grid; align-items: center; position: absolute; inset: 0 50px; text-align: center; pointer-events: none; }
  .rc-top-title :is(.rc-brand, .custom-logo-link) { justify-self: center; pointer-events: auto; }
  .rc-top-title .rc-brand { max-width: 145px; font-size: 16.8px; letter-spacing: 3px; }
  .rc-top-title .custom-logo { width: auto; max-height: 42px; margin-inline: auto; }
  .rc-masthead, .rc-search-toggle { display: none; }
  .rc-menu-toggle { display: grid; }
  .rc-menu-icon { width: 14px; box-shadow: 0 -4px currentColor, 0 4px currentColor; }
  .rc-navigation { display: none; position: absolute; top: 100%; left: 0; width: min(320px, 100%); padding: 18px; background: #fff; border: 1px solid var(--rc-rule); max-height: calc(100dvh - 54px); overflow: auto; }
  .rc-menu-toggle[aria-expanded="true"] ~ .rc-navigation { display: flex; flex-direction: column-reverse; gap: 12px; }
  .rc-menu { display: block; line-height: 36px; }
  .rc-menu > li > a { padding-inline: 0; }
  .rc-menu li + li { border-top: 1px solid var(--rc-rule); }
  .rc-menu .sub-menu { display: block; position: static; border: 0; }
  .rc-mobile-search { display: block; }
  .rc-layout { grid-template-columns: minmax(0, 1fr); }
  .rc-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-hero-title { font-size: 21px; }
  .rc-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rc-footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  :root { --rc-gap: 16px; }
  body { font-size: 14px; }
  body.admin-bar .rc-header { top: 0; }
  .rc-wrap { width: calc(100% - 24px); }
  .rc-layout { margin-top: 18px; }
  .rc-home-layout { margin-top: 16px; }
  .rc-home-grid, .rc-post-list--archive { grid-template-columns: minmax(0, 1fr); }
  .rc-home-grid .rc-card__media, .rc-post-list--archive .rc-card__media { margin-bottom: 10px; }
  .rc-card { gap: 12px; }
  .rc-hero-copy { width: calc(100% - 42px); padding: 7px 12px 11px; margin-bottom: 12px; }
  .rc-hero-title { font-size: 18.2px; margin-bottom: 4px; }
  .rc-hero-excerpt { font-size: 13px; margin: 4px 0 7px; }
  .rc-hero-more { padding: 5px 9px; }
  .rc-article-title { font-size: 1.8em; }
  .rc-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rc-footer-columns { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .rc-footer-columns > * { padding-right: 0; border-right: 0; }
}
