/*
Theme Name: Hermey the Alpaca
Theme URI: https://hermeythealpaca.com/
Author: Kevin Cordeiro
Description: A cheerful, lightweight block theme for Hermey the Alpaca children's books, articles, printable coloring pages, and PDF activities.
Version: 1.8.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hermey-the-alpaca
Tags: blog, education, entertainment, full-site-editing, block-patterns, custom-colors, custom-logo, featured-images, wide-blocks
*/

:root {
  --hermey-shadow: 0 12px 32px rgba(47, 74, 55, 0.10);
  --hermey-shadow-small: 0 6px 18px rgba(47, 74, 55, 0.08);
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

.wp-site-blocks { min-height: 100vh; }

.hermey-card {
  height: 100%;
  border: 1px solid rgba(47, 74, 55, 0.10);
  box-shadow: var(--hermey-shadow-small);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hermey-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hermey-shadow);
}

.hermey-pill {
  display: inline-block;
  border-radius: 999px;
  padding: .35rem .75rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.hermey-hero-art {
  position: relative;
  overflow: hidden;
}
.hermey-hero-art::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  right: -60px;
  top: -70px;
  pointer-events: none;
}


.hermey-real-photo {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 28px;
  background-image: url('assets/images/hermey-real.jpg');
  background-size: cover;
  background-position: center center;
  box-shadow: var(--hermey-shadow);
  border: 5px solid rgba(255,255,255,.82);
}

.hermey-photo-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--hermey-shadow-small);
}
.hermey-photo-caption h3 { margin: 0; }
.hermey-photo-caption p { color: var(--wp--preset--color--ink); }

.hermey-pdf-box {
  border: 2px dashed var(--wp--preset--color--meadow);
}

.hermey-post-card .wp-block-post-featured-image img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.hermey-post-card .wp-block-post-title a { text-decoration: none; }
.hermey-post-card .wp-block-post-title a:hover { text-decoration: underline; }

.wp-block-button__link {
  transition: transform .15s ease, filter .15s ease;
}
.wp-block-button__link:hover {
  transform: translateY(-1px);
  filter: brightness(.97);
}

.hermey-footer a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.hermey-footer .wp-block-list a {
  color: var(--wp--preset--color--paper) !important;
  font-weight: 600;
}
.hermey-footer .wp-block-list a:hover,
.hermey-footer .wp-block-list a:focus {
  color: var(--wp--preset--color--sunshine) !important;
}

@media (max-width: 781px) {
  .hermey-real-photo { min-height: 360px; background-position: center 38%; }
  .hermey-mobile-center,
  .hermey-mobile-center > * { text-align: center !important; }
  .hermey-mobile-buttons { justify-content: center !important; }
}


/* Free Activities section */
.hermey-free-section {
  position: relative;
  overflow: hidden;
}
.hermey-free-section::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255,255,255,.34);
  left: -70px;
  bottom: -80px;
  pointer-events: none;
}
.hermey-activity-types {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
  margin-bottom: 0;
  padding-bottom: 58px;
}
.hermey-activity-type {
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 16px 14px;
  border: 1px solid rgba(47, 74, 55, 0.10);
  border-radius: 20px;
  background: var(--wp--preset--color--paper);
  color: var(--wp--preset--color--forest);
  box-shadow: var(--hermey-shadow-small);
  text-align: center;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.hermey-activity-type:hover,
.hermey-activity-type:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--hermey-shadow);
  border-color: rgba(47, 74, 55, 0.24);
  background: #fffef9;
  color: var(--wp--preset--color--forest);
  text-decoration: none;
}
.hermey-activity-type:focus-visible {
  outline: 3px solid var(--wp--preset--color--sunshine);
  outline-offset: 3px;
}
.hermey-activity-type__inner {
  display: grid;
  gap: 7px;
  justify-items: center;
}
.hermey-activity-type .hermey-activity-icon {
  display: block;
  line-height: 1;
  font-size: 2rem;
}
.hermey-activity-type .hermey-activity-label {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
  font-weight: 800;
}
/* Always use a year-round Seasonal Fun icon, even if WordPress has cached an older template. */
.hermey-activity-type[href*="seasonal-fun"] .hermey-activity-icon {
  font-size: 0;
}
.hermey-activity-type[href*="seasonal-fun"] .hermey-activity-icon::before {
  content: "🎉";
  font-size: 2rem;
  line-height: 1;
}

/* Prevent the category-card row from visually running into the post grid. */
.wp-block-shortcode:has(.hermey-activity-grid) {
  margin-top: 0 !important;
}

@media (max-width: 1100px) {
  .hermey-activity-types { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hermey-activity-types { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 42px; }
}
@media (max-width: 500px) {
  .hermey-activity-types { grid-template-columns: 1fr; }
}
.hermey-activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 0;
}
.hermey-activity-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--wp--preset--color--paper);
  border: 1px solid rgba(47, 74, 55, 0.10);
  box-shadow: var(--hermey-shadow-small);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hermey-activity-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hermey-shadow);
}
.hermey-activity-card__image,
.hermey-activity-card__placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.hermey-activity-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hermey-activity-card__placeholder {
  display: grid;
  place-items: center;
  font-size: 4rem;
  background: var(--wp--preset--color--sky);
  text-decoration: none;
}
.hermey-activity-card__body {
  padding: 22px;
}
.hermey-activity-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: .28rem .62rem;
  border-radius: 999px;
  background: var(--wp--preset--color--sage);
  color: var(--wp--preset--color--forest);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.hermey-activity-card__title {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.2;
}
.hermey-activity-card__title a {
  color: var(--wp--preset--color--forest);
  text-decoration: none;
}
.hermey-activity-card__title a:hover { text-decoration: underline; }
.hermey-activity-card__excerpt {
  margin: 0 0 16px;
}
.hermey-activity-card__link {
  font-weight: 800;
  text-underline-offset: 3px;
}
.hermey-activities-empty {
  margin-top: 32px;
  padding: 32px;
  border-radius: 22px;
  background: var(--wp--preset--color--paper);
  border: 2px dashed var(--wp--preset--color--meadow);
  text-align: center;
}

@media (max-width: 900px) {
  .hermey-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hermey-activity-grid { grid-template-columns: 1fr; }
}


/* About Author page */
.hermey-about-hero {
  position: relative;
  overflow: hidden;
}
.hermey-about-hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  right: -75px;
  top: -80px;
  background: rgba(255,255,255,.26);
  pointer-events: none;
}
.hermey-about-photo,
.hermey-about-story-photo {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--hermey-shadow);
  border: 5px solid rgba(255,255,255,.86);
  background: var(--wp--preset--color--paper);
}
.hermey-about-photo img,
.hermey-about-story-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hermey-about-photo img { aspect-ratio: 5 / 4; }
.hermey-about-story-photo img { aspect-ratio: 4 / 3; }
.hermey-about-photo--portrait img { aspect-ratio: 4 / 5; }
.hermey-about-kicker {
  display: inline-block;
  border-radius: 999px;
  padding: .38rem .8rem;
  background: rgba(255,255,255,.82);
  color: var(--wp--preset--color--forest);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.hermey-about-fact {
  height: 100%;
  padding: 22px;
  border-radius: 20px;
  background: var(--wp--preset--color--paper);
  border: 1px solid rgba(47,74,55,.10);
  box-shadow: var(--hermey-shadow-small);
}
.hermey-about-fact strong {
  display: block;
  margin-bottom: 6px;
  color: var(--wp--preset--color--forest);
  font-size: 1.05rem;
}
.hermey-about-gallery {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 22px;
}
.hermey-about-gallery figure { margin: 0; }
.hermey-about-gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: var(--hermey-shadow-small);
}
@media (max-width: 781px) {
  .hermey-about-gallery { grid-template-columns: 1fr; }
  .hermey-about-photo img,
  .hermey-about-story-photo img,
  .hermey-about-photo--portrait img { aspect-ratio: auto; max-height: 620px; }
}


/* Books page + Hermey Gives Back */
.hermey-books-hero {
  position: relative;
  overflow: hidden;
}
.hermey-books-hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.24);
  right: -70px;
  top: -90px;
  pointer-events: none;
}
.hermey-books-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
  margin-top: 38px;
  align-items: stretch;
}
.hermey-book-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(47, 74, 55, 0.10);
  border-radius: 22px;
  background: var(--wp--preset--color--paper);
  box-shadow: var(--hermey-shadow-small);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hermey-book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hermey-shadow);
}
.hermey-book-card__cover {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #fff;
}
.hermey-book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 10px;
  box-sizing: border-box;
}
.hermey-book-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}
.hermey-book-card__body h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  line-height: 1.25;
}
.hermey-book-card__body p {
  margin: 0 0 18px;
  font-size: .96rem;
  line-height: 1.55;
}
.hermey-book-card__body .wp-block-button,
.hermey-book-card__body .hermey-book-card__button {
  margin-top: auto;
}
.hermey-book-card__button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: .78rem 1rem;
  border-radius: 999px;
  background: var(--wp--preset--color--forest);
  color: #fff !important;
  font-weight: 800;
  text-decoration: none;
}
.hermey-book-card__button:hover,
.hermey-book-card__button:focus-visible {
  filter: brightness(.94);
  text-decoration: none;
}
.hermey-gives-back {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: var(--hermey-shadow-small);
}
.hermey-gives-back__inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(26px,5vw,64px);
  align-items: center;
}
.hermey-gives-back__badge {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-inline: auto;
  background: var(--wp--preset--color--sunshine);
  color: var(--wp--preset--color--forest);
  border: 8px solid rgba(255,255,255,.7);
  box-shadow: var(--hermey-shadow-small);
  text-align: center;
  line-height: 1;
}
.hermey-gives-back__badge strong {
  display: block;
  font-size: 3.4rem;
  line-height: .9;
}
.hermey-gives-back__badge span {
  display: block;
  margin-top: 8px;
  font-size: .95rem;
  font-weight: 800;
  line-height: 1.15;
}
.hermey-gives-back__fineprint {
  font-size: .82rem;
  opacity: .82;
  line-height: 1.5;
}
.hermey-home-giving-strip {
  border: 1px solid rgba(47, 74, 55, 0.10);
  box-shadow: var(--hermey-shadow-small);
}
.hermey-home-giving-strip .hermey-home-giving-number {
  font-size: clamp(2.5rem,6vw,4.6rem);
  line-height: .9;
  font-weight: 900;
  color: var(--wp--preset--color--forest);
}
@media (max-width: 1200px) {
  .hermey-books-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .hermey-books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hermey-gives-back__inner { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 520px) {
  .hermey-books-grid { grid-template-columns: 1fr; }
  .hermey-book-card__cover { aspect-ratio: 5 / 6; }
}
