/*
Theme Name: GEMA Filantropia
Theme URI: https://gema.usp.br
Author: Jakson / Toborino (Layout Jéssica Goulart)
Author URI: https://toborino.com/
Description: Website theme for the GEMA Filantropia, based on Jakson Starter Theme v3
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.4
Version: 3.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gema
Tags: Block Editor Patterns, Site Editor

/*  Smoot Scroll */
html {
  scroll-behavior: smooth;
}

/*  Reduced motion prefs  */
@media screen and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@view-transition {
  navigation: auto;
}

/*  Navigation Block Breakpoint. Credit: https://wpdocs.io/ */
body .wp-block-navigation__responsive-container-open:not(.always-shown) {
  display: block !important;
}

body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
  display: none !important;
}

/* Change the width to the breakpoit of the Nav */
@media (min-width: 799px) {
  body .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none !important;
  }

  body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: block !important;
  }
}

/* end nav break point */

/* Nicley wrapped headlines */
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

/* I've no idea why when you add a backgroud colour to a column, WP by default adds padding to it... so weird - this get's rid of that */
:where(.wp-block-columns.has-background) {
  padding: initial;
}

/* Pull Quote */
.wp-block-pullquote blockquote {
  display: grid;
  gap: 20px;
}

.wp-block-pullquote cite {
  font-size: 80%;
  font-weight: 600;
}

/* Figure height */
.wp-block-image {
  line-height: 1;
}

/* Search Block */
.wp-block-search__input {
  font-size: var(--wp--preset--font-size--default);
}

.wp-block-search__button {
  box-shadow: none;
  border: 0;
  border-radius: 0;
  padding: 0.4rem 1rem 0.5rem 1rem;
  font-weight: 400;
}

/* Comments */
.comment-form-cookies-consent {
  font-size: 14px;
  line-height: 2;
}

/* Keep our titles link the off black color*/
.wp-block-post-title :where(a) {
  color: var(--wp--preset--color--custom-off-black);
}

/* Button hover state  - core button block still does not have this and I can't figure out how to do it in theme.json! */
.wp-block-button__link,
a {
  transition: 0.3s;
}

.wp-block-button.is-style-fill .wp-block-button__link:hover,
#commentform .form-submit.wp-block-button input:hover {
  background: var(--wp--preset--color--custom-white);
  color: var(--wp--preset--color--custom-off-black);
}

.wp-block-button .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-custom-white);
  color: var(--wp--preset--color--off-black);
  border-color: var(--wp--preset--color--custom-off-black);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-off-black);
  color: var(--wp--preset--color--custom-white);
  border-color: var(--wp--preset--color--custom-off-black);
}

a:hover:not(.wp-block-site-title a, .wp-block-button__link.wp-element-button, .wp-block-navigation-item a) {
  text-decoration: none;
}


/* Anchor */

a {
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

a[rel~="noreferrer"]:not(:has(img)),
a[rel~="noopener"]:not(:has(img)),
a[rel~="nofollow"]:not(:has(img)) {
  position: relative;
}

a[rel~="noreferrer"]:not(:has(img))::after,
a[rel~="noopener"]:not(:has(img))::after,
a[rel~="nofollow"]:not(:has(img))::after {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 3px 0 8px;
  mask: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVR42qXKwQkAIAxDUUdxtO6/RBQkQZvSi8I/pL4BoGw/XPkh4XigPmsUgh0626AjRsgxHTkUThsG2T/sIlzdTsp52kSS1wAAAABJRU5ErkJggg==) no-repeat center;
  mask-size: contain;
  background: currentColor;
}

.bloco-links a {
  text-decoration: none;
}

.bloco-links a:hover {
  text-decoration: underline !important;
}

/* =============================================
   BASE / Acessibilidade
============================================== */
.skip-link.screen-reader-text {
  border: 0;
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
  background-color: #eee;
  clip-path: none;
  color: #444;
  display: block;
  font-size: 1em;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

.sr-only:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Forms */
.newsletter-form .row {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
}

/* Home */
.bloco-iniciativas .grupo {
  padding-right: var(--wp--preset--spacing--large);
  padding-left: var(--wp--preset--spacing--large);
}

/*  Conteúdo */

.noticia-home h2 {
  position: relative;
  padding-top: 12px;
}

.noticia-home h2::before {
  content: "";
  display: block;
  width: 100px;
  height: 12px;
  background: var(--wp--preset--color--custom-ametista);
  margin-bottom: 12px;
}

.taxonomy-category a {
  text-decoration: none;
  font-weight: 600;
}

.separador-posts {
  padding: 6px 0
}

/* 3 posts */
.posts-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.posts-3 article {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* imagem quadrada */
.posts-3 .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.posts-3 .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* barra colorida por categoria */
.categoria-bar {
  height: 12px;
  margin: 0 0 12px 0;
}

.categoria-color-1,
.categoria-bar.eventos {
  background: var(--wp--preset--color--custom-light-ametista);
}

/* Eventos */
.categoria-color-2,
.categoria-bar.biblioteca {
  background: var(--wp--preset--color--custom-mid-ametista);
}

/* Artigos  - ajuste a gosto */
.categoria-color-3,
.categoria-bar.noticias {
  background: var(--wp--preset--color--custom-ametista);
}

/* Notícias - ajuste a gosto */

.posts-3 .content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.posts-3 .meta {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  gap: 0.5rem;
}

.posts-3 .meta-cat {
  font-weight: 700;
  margin-right: 2rem;
}

.posts-3 .entry-title {
  font-size: var(--wp--preset--font-size--medium);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}


.posts-3 .read-more {
  margin-top: auto;
  display: inline-block;
  font-weight: 700;
}

/* posts relacionados */
.related-posts-title {
  font-size: var(--wp--preset--font-size--medium);
  padding: 1.5rem 0 .5rem 0;
}

.posts-relacionados .entry-title {
  font-size: 1.25rem;
}

/* Contact Form 7  */
.wpcf7-form label {
  text-transform: uppercase;
  font-size: .85rem;
  font-weight: 500;
}

.wpcf7-form-control.wpcf7-text,
.wpcf7-form-control.wpcf7-textarea,
.wpcf7-form-control.wpcf7-file,
.wpcf7-form-control.wpcf7-number.wpcf7-validates-as-number,
.wpcf7-form-control.wpcf7-select {
  border: 2px solid var(--wp--preset--color--custom-white);
  padding: 9px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.wpcf7-form-control.wpcf7-submit {
  background-color: var(--wp--preset--color--custom-ametista);
  color: var(--wp--preset--color--custom-white);
  border: 2px solid var(--wp--preset--color--custom-ametista);
  font-size: 1rem;
  text-transform: uppercase;
  padding: .65rem 2rem .5rem;
  cursor: pointer;
}

.wpcf7 form .wpcf7-response-output {
  font-family: inherit;
  padding: 1rem;
  font-weight: 700;
  text-align: center;
  margin: 2rem 0;
}

.wpcf7-form-control.wpcf7-not-valid {
  border-color: #dc3232;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  border-color: #ffb900;
  background: #ffb900;
  color: var(--wp--preset--color--custom-white);
}

.wpcf7 form.sent .wpcf7-response-output {
  border-color: #009900;
  background: #009900;
  color: var(--wp--preset--color--custom-white);
  /* Green */
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
  border-color: #dc3232;
  background: #dc3232;
  color: var(--wp--preset--color--custom-white);
  /* Red */
  /* Red */
}

.wpcf7-spinner {
  display: block;
}

.wpcf7-form p:empty {
  display: none;
}

/* Botoes lateral Pages & Posts */
.submenu-btn ul {
  list-style: none;
}

.submenu-btn li,
.wp-block-tag-cloud a {
  width: 80%;
  height: 60px;
  background-color: var(--wp--preset--color--custom-block-ametista);
  color: var(--wp--preset--color--custom-white);
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  padding: .5rem 1rem;
  font-size: inherit !important;
}

.submenu-btn li a {
  text-decoration: none;
}

.submenu-btn li a:hover,
.submenu-btn li.current a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  color: var(--wp--preset--color--custom-off-black);
}

/* Responsividade */
.mobile {
  display: none !important;
}

.desktop {
  display: block !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 1rem;
}
.wp-swiper .swiper-button-next, .wp-swiper .swiper-button-prev {
    color: var(--wp-swiper-navigation-color, #fff) !important;
}

@media screen and (max-width: 767px) {

  .mobile {
    display: block !important;
  }

  .desktop {
    display: none !important;
  }

  .bloco-iniciativas {
    flex-direction: column;
  }

  .bloco-iniciativas .grupo {
    padding-right: 0;
    padding-left: 0;
  }

  .posts-3,
  .grade-podcast {
    grid-template-columns: 1fr;
  }

  .grade-podcast {
    gap: 0;
  }

}