/* =====================================================
   GLOBAL
===================================================== */

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #111;
  color: #fff;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none !important;
  color: #333;
  transition: color 0.2s ease;
}

a:hover {
  color: #000;
}

a,
a:hover,
.wp-block-post a,
.wp-block-navigation a,
.wp-block-post-title a {
  cursor: pointer !important;
}

a:focus-visible {
  outline: 2px solid #999;
  outline-offset: 2px;
}

a,
button {
  transition:
    color 0.2s ease,
    transform 0.2s ease,
    background-size 0.25s ease;
}

/* =====================================================
   NAVIGATION
===================================================== */

.wp-block-navigation a {
  position: relative;
  text-decoration: none !important;
  display: inline-block;
  transition: transform 0.2s ease;
}

.wp-block-navigation a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.wp-block-navigation a:hover::after {
  transform: scaleX(1);
}

.wp-block-navigation a:hover {
  transform: scale(1.08);
}

.wp-block-navigation a:focus,
.wp-block-navigation a:active,
.wp-block-navigation a:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* =====================================================
   LAYOUT
===================================================== */

.wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

@media (max-width: 768px) {
  .wp-block-post-template {
    grid-template-columns: 1fr;
  }
}

body.blog .wp-block-query .wp-block-post-template,
body.archive .wp-block-query .wp-block-post-template,
body.search .wp-block-query .wp-block-post-template {
  display: flex !important;
  flex-direction: column !important;
}

/* =====================================================
   POST CARD
===================================================== */

.wp-block-post {
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
}

.wp-block-post:hover {
  transform: translateY(-6px);
}

.wp-block-post > * {
  margin-bottom: 12px;
}

.wp-block-post > *:last-child {
  margin-bottom: 0;
}

.wp-block-post-featured-image {
  margin-bottom: 14px;
  overflow: hidden;
}

.wp-block-post-featured-image img {
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.wp-block-post:hover .wp-block-post-featured-image img {
  transform: scale(1.06);
}

.wp-block-post-title a {
  text-decoration: none;
  color: #111;
  transition: color 0.2s ease;
}

.wp-block-post-title a:hover {
  color: #555;
}

.wp-block-post-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wp-block-post-date {
  font-size: 12px;
  color: #999;
}

.wp-block-post-terms a {
  text-decoration: none !important;
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-size: 12px;
  color: #444;
  font-weight: 400;
  margin-right: 12px;
  transition: color 0.2s ease;
}

.wp-block-post-terms a:hover {
  color: #000;
}

/* =====================================================
   PAGINATION
===================================================== */

.wp-block-query-pagination a {
  text-decoration: none !important;
  font-size: 22px;
  letter-spacing: 0.7px;
  color: #444;
  transition: color 0.2s ease;
}

.wp-block-query-pagination a:hover {
  color: #000;
}

.wp-block-query-pagination-previous,
.wp-block-query-pagination-next {
  letter-spacing: 1px;
}

/* =====================================================
   SEARCH
===================================================== */

.wp-block-search {
  width: 100%;
  max-width: 100%;
}

.wp-block-search__inside-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.wp-block-search__input {
  flex: 1;
  height: 40px;
  padding: 0;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  color: #111;
}

.wp-block-search__input:focus {
  outline: none;
  border-color: #999;
}

/* =====================================================
   CONTENT
===================================================== */

.wp-block-post-content {
  color: #222;
}

.wp-block-post-content p {
  line-height: 1.5;
  letter-spacing: 0.3px;
  margin-bottom: 0.9em;
}

.wp-block-post-content h2 {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.3;
	font-size: 1.7rem;
}

.wp-block-post-content h3 {
  margin-top: 1em;
  margin-bottom: 0.35em;
  line-height: 1.3;
}

.wp-block-post-content ul li {
  margin-bottom: 0.6em;
}

.wp-block-post-content blockquote {
  border-left: 3px solid #ddd;
  padding-left: 20px;
  color: #666;
}

.wp-block-post-content img {
  border-radius: 4px;
}

.wp-block-post-content a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition:
    background-size 0.25s ease,
    color 0.2s ease;
}

.wp-block-post-content a:hover {
  background-size: 100% 1px;
}

/* =====================================================
   FOOTER
===================================================== */

footer {
  border-top: 1px solid #eee;
}

footer hr {
  width: 100%;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  border: none;
  border-top: 1px solid #eee;
  margin: 40px 0 20px;
}

footer a:not(.custom-logo-link) {
  text-decoration: none;
  color: #444;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.25s ease, color 0.2s ease;
}

footer a:not(.custom-logo-link):hover {
  color: #000;
  background-size: 100% 1px;
}

/* =====================================================
   YOUTUBE
===================================================== */

.wp-block-embed.is-type-video .wp-block-embed__wrapper {
  aspect-ratio: 9 / 16;
  max-width: 400px;
  max-height: 700px;
  margin: 24px auto;
  position: relative;
}

.wp-block-embed.is-type-video .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}