/*
Theme Name: Jofre Sebastian 2027
Theme URI: https://jofresebastian.cat/
Author: placid.cat
Author URI: https://placid.cat/
Description: Tema independent creat per placid.cat per al web de Jofre Sebastian.
Version: 0.1.3
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: jofre-2027
*/

@font-face {
  font-family: "Open Sans";
  src: url("assets/fonts/open-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 800;
  font-display: fallback;
}

:root {
  --jofre-accent: #987958;
  --jofre-text: #4b4f58;
  --jofre-border: #eaeaea;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 20px; scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--jofre-text); font: 300 1rem/1.65 "Open Sans", sans-serif; }
a { color: var(--jofre-accent); text-decoration: none; }
a:hover, a:focus { color: #6d5034; }
button { font: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 10000; padding: 8px 12px; background: #fff; }
.site-wrap { width: calc(100% - 40px); max-width: 1200px; margin-inline: auto; }
#content { display: flow-root; }

.site-header { margin: 20px 0 50px; }
.header-inner { min-height: 74.44px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.site-title { display: block; font-size: 1.4rem; font-weight: 400; line-height: 1.2; }
.site-title a, .site-title a:visited { color: var(--jofre-accent); }
.primary-nav { margin-left: auto; }
.primary-menu { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.primary-menu > li { margin: 0; padding: 0; }
.primary-menu a { display: block; padding: 0 20px; color: #9b8e83; font-size: 1rem; font-weight: 300; white-space: nowrap; }
.primary-menu > li:last-child a { padding-right: 0; }
.primary-menu .current-menu-item > a, .primary-menu .current-menu-ancestor > a, .primary-menu .current-post-ancestor > a, .primary-menu a[aria-current="page"] { color: var(--jofre-accent); }
.menu-toggle { display: none; }

.site-main { min-height: 1px; }
.single-entry { margin-bottom: 30px; }
.entry-header { margin-bottom: 40px; }
.entry-title { margin: 0; color: var(--jofre-accent); font-size: 1.3rem; font-weight: 400; line-height: 1.2; }
.entry-content { overflow-wrap: break-word; }
.entry-content .wp-block-heading { color: var(--jofre-accent); font-family: "Open Sans", sans-serif; font-weight: 400; }
.entry-content h2.wp-block-heading { font-size: 1.6rem; line-height: 1.3; }
.entry-content h3.wp-block-heading { font-size: 1.3rem; line-height: 1.3; }
.entry-content .wp-block-paragraph { margin: 24px 0 32px; }
.entry-content > .wp-block-paragraph:first-child { margin-top: 0; }
.entry-content .wp-block-columns { gap: 24px; }
.entry-content > p { margin: 0 0 1.6em; }
.entry-content > p:last-child { margin-bottom: 0; }
.entry-content > .wp-block-quote { margin: 33px 22px 33px 66px; padding: 26.4px; border-left: 5px solid #ddd; font-size: 22px; font-style: italic; line-height: 33px; }
.entry-content > .wp-block-quote p { margin-top: 0; }
.entry-content video, .entry-content iframe { max-width: 100%; }
.entry-content .wp-block-video video { height: auto; }
.home .site-main { margin-bottom: 0; }
.home .single-entry { margin-bottom: 0; }

.archive-main { margin-top: 80px; margin-bottom: 80px; }
.archive-heading { padding: 60px; border-bottom: 1px solid var(--jofre-border); margin-bottom: 50px; }
.archive-heading h1 { margin: 0 0 4px; color: var(--jofre-accent); font-size: 2rem; font-weight: 400; line-height: 1.4; }
.archive-grid { display: flex; flex-wrap: wrap; margin-inline: -20px; }
.archive-grid.is-masonry { display: block; position: relative; }
.archive-card { width: 33.333333%; padding-inline: 20px; margin-bottom: 50px; }
.archive-grid.is-masonry .archive-card { position: absolute; }
.archive-card-inner { border-bottom: 1px solid var(--jofre-border); }
.archive-card-image { display: block; margin: 0 0 30px; }
.archive-card-image img { display: block; width: 100%; height: auto; }
.archive-card-excerpt p { margin: 0; }
.archive-card-more { margin: 30px 0 16px; }
.archive-card-more a { color: #9b8e83; }
.archive-card-more a:hover, .archive-card-more a:focus { color: var(--jofre-accent); }
.archive-pagination { margin-top: 40px; }
.archive-pagination .nav-links { display: flex; align-items: center; justify-content: center; gap: 28px; }
.archive-pagination a, .archive-pagination span { color: var(--jofre-accent); }
.archive-pagination .current { color: var(--jofre-text); }
.archive-pagination .next { margin-left: auto; }
.archive-pagination .prev { margin-right: auto; }

.site-footer { min-height: 120px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 30px; }
.footer-social { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: #111; }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }
.footer-credit { margin: 0; color: #888; font-size: .75rem; line-height: 1.6; }
.footer-credit a { color: inherit; }
.back-to-top { position: fixed; right: 30px; bottom: 30px; width: 30px; height: 30px; display: none; align-items: center; justify-content: center; border: 0; background: var(--jofre-accent); color: #fff; cursor: pointer; z-index: 20; font-size: 16px; line-height: 1; }
.back-to-top.is-visible { display: flex; }

@media (max-width: 921px) {
  html { font-size: 18.24px; }
  .site-header { margin-bottom: 50px; }
  .header-inner { min-height: 70px; }
  .menu-toggle { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 12px; border: 0; background: transparent; color: var(--jofre-accent); cursor: pointer; }
  .menu-toggle svg { width: 24px; height: 24px; fill: currentColor; }
  .menu-toggle .icon-close { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-open { display: none; }
  .menu-toggle[aria-expanded="true"] .icon-close { display: block; }
  .primary-nav { display: none; position: absolute; top: 90px; left: 0; width: 100%; background: #f9f9f9; z-index: 50; }
  .primary-nav.is-open { display: block; }
  .primary-menu { display: block; }
  .primary-menu li { border-bottom: 1px solid #e5e5e5; }
  .primary-menu a { padding: 10px 24px; font-size: 1rem; }
  .archive-card { width: 50%; }
}

@media (max-width: 544px) {
  .site-header { margin-bottom: 20px; }
  .primary-nav { top: 90px; }
  .archive-main { margin-top: 27px; margin-bottom: 60px; }
  .archive-heading { padding: 60px 50px; margin-bottom: 45px; }
  .archive-heading h1 { font-size: 30px; }
  .archive-card { width: 100%; margin-bottom: 45px; }
  .footer-inner { padding-top: 30px; }
  .back-to-top { right: 15px; bottom: 15px; }
}
