/*
Theme Name: Smart Homeschooling
Theme URI: https://www.smarthomeschoolingtips.com/
Author: Smart Homeschooling Tips
Description: A fast, Gutenberg-editable block theme for printable learning activities and Lemon Squeezy checkout.
Version: 2.1.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: smart-homeschooling
License: GPL-2.0-or-later
*/

:root {
  --sh-ink: #14213d;
  --sh-blue: #1f63db;
  --sh-blue-hover: #1548a7;
  --sh-yellow: #ffd529;
  --sh-red: #c83a2e;
  --sh-paper: #fffdf7;
  --sh-muted: #536078;
  --sh-soft-blue: #f4f8ff;
  --sh-border: #dbe3ef;
  --sh-radius: 22px;
  --sh-shadow: 0 18px 50px rgba(20, 33, 61, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { color: var(--sh-ink); background: var(--sh-paper); }
a { text-underline-offset: .18em; }
img { height: auto; }

/* Let full-width landing-page sections escape the post-content text column. */
.wp-block-post-content { width: 100%; max-width: none; }
.wp-block-post-content > .alignfull {
  width: 100vw;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}
.wp-block-post-content .alignwide,
.sh-site-header > .wp-block-group,
.sh-site-footer > .wp-block-group {
  width: min(1160px, calc(100% - 48px));
  max-width: 1160px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.sh-site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--sh-border); backdrop-filter: blur(14px); background: rgba(255,253,247,.94); }
.sh-site-header .wp-block-navigation a { font-weight: 700; text-decoration: none; }
.sh-site-header .wp-block-navigation a:hover { color: var(--sh-blue); }
.sh-site-header .wp-block-navigation__responsive-container-open,
.sh-site-header .wp-block-navigation__responsive-container-close {
  align-items: center;
  background: var(--sh-ink);
  border-radius: 12px;
  color: #fff;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 10px;
}
.sh-site-footer { border-top: 1px solid var(--sh-border); }

.sh-hero { overflow: hidden; border-radius: 0 0 40px 40px; background: linear-gradient(125deg, #f4f8ff 0%, #fff7d2 100%); }
.sh-hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); }
.sh-eyebrow { color: var(--sh-blue); font-size: .85rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sh-subtitle { max-width: 680px; color: var(--sh-muted); font-size: 1.15rem; line-height: 1.65; }
.sh-trust-row { color: var(--sh-muted); font-weight: 700; }
.sh-trust-row .wp-block-column { display: flex; align-items: center; justify-content: center; min-height: 48px; }

.sh-section { padding-block: clamp(64px, 8vw, 88px); }
.sh-section--soft { background: var(--sh-soft-blue); }
.sh-section__intro { max-width: 720px; margin-inline: auto; text-align: center; }
.sh-section__intro p { color: var(--sh-muted); }

.sh-card { height: 100%; overflow: hidden; border: 1px solid var(--sh-border); border-radius: var(--sh-radius); background: #fff; box-shadow: 0 10px 28px rgba(20,33,61,.07); transition: transform .2s ease, box-shadow .2s ease; }
.sh-card:hover { transform: translateY(-4px); box-shadow: var(--sh-shadow); }
.sh-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sh-card__body { padding: 24px; }
.sh-card__body h3 { margin-top: 0; }
.sh-card__body p { color: var(--sh-muted); }
.sh-product-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.sh-product-grid > .wp-block-column { min-width: 0; }
.sh-product-grid .sh-card { display: flex; flex-direction: column; align-items: stretch; }
.sh-product-grid .sh-card figure { margin: 0; background: #fff; }
.sh-product-grid .sh-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.sh-product-grid .sh-card__body { display: flex; flex-direction: column; justify-content: center; }
.sh-product-grid .sh-card__body h3 { font-size: clamp(23px, 2.4vw, 30px); overflow-wrap: anywhere; }
.sh-product-grid .sh-card__body .wp-block-buttons { margin-top: auto; }

.sh-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 12px; margin: 18px 0; }
.sh-price__regular { color: var(--sh-muted); font-size: 1rem; text-decoration: line-through; text-decoration-thickness: 2px; }
.sh-price__regular, .sh-price__sale { white-space: nowrap; }
.sh-price__sale { color: var(--sh-red); font-size: 1.65rem; font-weight: 800; }
.sh-price__label { padding: 5px 9px; border-radius: 999px; background: #fff0ed; color: var(--sh-red); font-size: .75rem; font-weight: 800; text-transform: uppercase; }

.sh-feature { padding: 28px; border: 1px solid var(--sh-border); border-radius: var(--sh-radius); background: #fff; }
.sh-feature__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 14px; background: var(--sh-yellow); font-size: 1.35rem; }
.sh-steps { counter-reset: sh-step; }
.sh-step { position: relative; padding: 28px; border-radius: var(--sh-radius); background: #fff; }
.sh-step::before { counter-increment: sh-step; content: counter(sh-step); display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; border-radius: 50%; background: var(--sh-blue); color: white; font-weight: 800; }

.sh-button .wp-block-button__link, .wp-block-button.sh-button .wp-block-button__link { padding: 14px 22px; border-radius: 15px; background: var(--sh-blue); color: #fff; font-weight: 800; box-shadow: 0 8px 20px rgba(31,99,219,.2); }
.sh-button .wp-block-button__link:hover, .wp-block-button.sh-button .wp-block-button__link:hover { background: var(--sh-blue-hover); transform: translateY(-1px); }
.sh-button--yellow .wp-block-button__link { background: var(--sh-yellow) !important; color: var(--sh-ink) !important; box-shadow: none !important; }
.sh-button--ghost .wp-block-button__link { border: 2px solid var(--sh-blue); background: transparent !important; color: var(--sh-blue) !important; box-shadow: none !important; }

.sh-product-hero { padding-block: clamp(48px, 7vw, 84px); background: linear-gradient(135deg, #f4f8ff, #fffdf7); }
.sh-product-hero img { border-radius: var(--sh-radius); box-shadow: var(--sh-shadow); }
.sh-check-list { padding-left: 0; list-style: none; }
.sh-check-list li { position: relative; margin-bottom: 12px; padding-left: 30px; }
.sh-check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--sh-blue); font-weight: 900; }
.sh-notice { padding: 18px 20px; border-left: 5px solid var(--sh-yellow); border-radius: 12px; background: #fff9dc; }
.sh-faq details { margin-bottom: 12px; padding: 18px 20px; border: 1px solid var(--sh-border); border-radius: 14px; background: #fff; }
.sh-faq summary { cursor: pointer; font-weight: 800; }
.sh-cta { padding: clamp(40px, 6vw, 70px); border-radius: 32px; background: var(--sh-ink); color: #fff; }
.sh-cta p { color: #dbe3ef; }

@media (max-width: 781px) {
  .wp-block-post-content .alignwide,
  .sh-site-header > .wp-block-group,
  .sh-site-footer > .wp-block-group { width: min(100% - 32px, 1160px); }
  .sh-site-header { position: static; }
  .sh-site-header > .wp-block-group { flex-wrap: nowrap !important; }
  .sh-site-header .wp-block-site-title { min-width: 0; font-size: clamp(17px, 4.7vw, 22px) !important; }
  .sh-site-header .wp-block-navigation__responsive-container-open { display: flex !important; }
  .sh-site-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
  .sh-site-header .wp-block-navigation__responsive-container.is-menu-open {
    background: var(--sh-paper);
    color: var(--sh-ink);
    display: flex !important;
    height: 100dvh;
    overflow-y: auto;
    padding: 24px;
    position: fixed;
  }
  .sh-site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .sh-site-header .wp-block-navigation__responsive-container.is-menu-open a {
    border-bottom: 1px solid var(--sh-border);
    display: block;
    font-family: "Fredoka", sans-serif;
    font-size: 1.25rem;
    padding: 14px 4px;
    width: 100%;
  }
  .sh-hero { border-radius: 0 0 26px 26px; }
  .sh-hero .wp-block-columns { padding-top: 42px !important; padding-bottom: 42px !important; }
  .sh-hero h1 { font-size: clamp(42px, 13vw, 64px) !important; }
  .sh-section { padding-block: 56px; }
  .sh-product-hero { padding-block: 48px; }
  .sh-card__body { padding: 20px; }
  .sh-product-grid { grid-template-columns: 1fr; }
  .sh-product-grid .sh-card img { aspect-ratio: 4 / 3; object-fit: contain; }
}

@media (min-width: 782px) {
  .sh-site-header .wp-block-navigation__responsive-container-open { display: none !important; }
  .sh-site-header .wp-block-navigation__responsive-container:not(.is-menu-open) { display: block !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Version 2: clean responsive storefront system. */
body { overflow-x: hidden; }
.wp-site-blocks { overflow: clip; }
.wp-block-post-content { margin-top: 0; }
.wp-block-post-content > .alignfull { box-sizing: border-box; }
.wp-block-post-content .alignwide,
.sh-site-header > .wp-block-group,
.sh-site-footer > .wp-block-group { width: min(1160px, calc(100% - 48px)); }

.sh-site-header { position: relative; top: auto; background: #fffdf7; }
.sh-site-header > .wp-block-group { min-height: 76px; padding-block: 14px !important; }
.sh-site-header .wp-block-site-title { white-space: nowrap; }
.sh-site-header .sh-nav-cta a { padding: 11px 18px !important; border-radius: 12px; background: var(--sh-blue); color: #fff !important; }

.sh-home-hero,
.sh-product-hero { padding: clamp(56px, 7vw, 104px) 0; background: var(--sh-paper); border-radius: 0; }
.sh-home-hero .wp-block-columns,
.sh-product-hero .wp-block-columns { gap: clamp(40px, 7vw, 92px); }
.sh-home-hero h1,
.sh-product-hero h1 { max-width: 660px; margin-block: 12px 20px; font-size: clamp(46px, 5.4vw, 76px); }
.sh-product-hero h1 { font-size: clamp(38px, 4.2vw, 58px); }
.sh-home-hero .sh-hero__media { position: relative; }
.sh-home-hero .sh-hero__media::after { content: ""; position: absolute; inset: 10% -5% -7% 8%; z-index: -1; border-radius: 32px; background: var(--sh-yellow); transform: rotate(3deg); }
.sh-home-hero .sh-hero__media img,
.sh-product-hero img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border: 1px solid var(--sh-border); border-radius: 24px; background: #fff; box-shadow: var(--sh-shadow); }
.sh-home-hero .sh-hero__media figure { width: 100%; margin: 0; }
.sh-home-hero .sh-hero__media img { max-height: 560px; padding: 0; object-fit: contain; }
.sh-microcopy { margin-top: 18px; color: var(--sh-muted); font-size: .88rem; }

.sh-trust-band { padding: 18px 0; background: var(--sh-ink); color: #fff; }
.sh-trust-band .wp-block-columns { margin: 0 auto; }
.sh-trust-band p { margin: 0; text-align: center; font-weight: 700; }
.sh-trust-band p::before,
.sh-use-grid h3::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  vertical-align: -6px;
  background: var(--sh-yellow);
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}
.sh-trust-band .wp-block-column:nth-child(1) p::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M12 3v12m0 0 4-4m-4 4-4-4M5 19h14'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M12 3v12m0 0 4-4m-4 4-4-4M5 19h14'/%3E%3C/svg%3E"); }
.sh-trust-band .wp-block-column:nth-child(2) p::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M6 9V3h12v6M6 18H4V9h16v9h-2M7 14h10v7H7z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M6 9V3h12v6M6 18H4V9h16v9h-2M7 14h10v7H7z'/%3E%3C/svg%3E"); }
.sh-trust-band .wp-block-column:nth-child(3) p::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M12 3l7 3v5c0 5-3 8-7 10-4-2-7-5-7-10V6l7-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath d='M12 3l7 3v5c0 5-3 8-7 10-4-2-7-5-7-10V6l7-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
.sh-trust-item { display: flex; align-items: center; justify-content: center; gap: 2px; }

.sh-section { padding-block: clamp(72px, 9vw, 120px); }
.sh-section-heading { margin-bottom: 42px; }
.sh-section-heading h2 { max-width: 620px; margin-bottom: 0; }
.sh-section-heading p { color: var(--sh-muted); }
.sh-section__intro { margin-bottom: 42px; }

.sh-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.sh-product-grid .sh-card { overflow: hidden; border-radius: 18px; box-shadow: 0 12px 30px rgba(20,33,61,.08); }
.sh-product-grid .sh-card figure { overflow: hidden; border-radius: 0; }
.sh-product-grid .sh-card img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }
.sh-product-grid .sh-card__body { min-height: 220px; padding: 24px 26px; }
.sh-product-grid .sh-card__body h3 { margin-bottom: 8px; font-size: clamp(23px, 2vw, 30px); }
.sh-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--sh-border); }
.sh-card__meta .sh-price { margin: 0; }
.sh-card__meta > a { white-space: nowrap; font-weight: 800; text-decoration: none; }

.sh-feature,
.sh-step { height: 100%; border: 0; border-top: 3px solid var(--sh-yellow); border-radius: 0; box-shadow: none; }
.sh-steps { gap: 22px; }
.sh-step::before { width: auto; height: auto; place-items: initial; margin-bottom: 28px; border-radius: 0; background: transparent; color: var(--sh-blue); }
.sh-use-grid .wp-block-column { padding: 28px 12px; border-bottom: 1px solid var(--sh-border); text-align: center; }
.sh-use-grid h3 { font-size: 20px; }
.sh-use-grid h3::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M8 12l2.5 2.5L16 9'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M8 12l2.5 2.5L16 9'/%3E%3C/svg%3E"); color: var(--sh-blue); }
.sh-faq { max-width: 820px !important; }
.sh-faq details { margin: 0; padding: 22px 4px; border: 0; border-bottom: 1px solid var(--sh-border); border-radius: 0; background: transparent; }
.sh-faq summary { display: flex; justify-content: space-between; list-style: none; }
.sh-faq summary::after { content: "+"; color: var(--sh-blue); font-size: 22px; }
.sh-faq details[open] summary::after { content: "−"; }
.sh-cta--inline { padding: clamp(34px, 5vw, 58px); }
.sh-product-cta { padding: clamp(60px, 8vw, 92px) 24px; background: var(--sh-yellow); }
.sh-product-cta > div { max-width: 760px !important; text-align: center; }
.sh-product-cta .sh-button .wp-block-button__link { background: var(--sh-blue); color: #fff; }

.sh-site-footer { border: 0; background: var(--sh-ink) !important; color: #fff; }
.sh-site-footer a { color: #fff; }
.sh-site-footer p { color: #dbe3ef; }
.sh-site-footer ul { padding-left: 18px; }
.sh-site-footer > .wp-block-columns { align-items: flex-start; }
.sh-site-footer .wp-block-site-title { color: #fff; }
.sh-site-footer li { margin-bottom: 9px; }
.sh-site-footer h4 { color: #fff; }
.sh-site-footer a:focus-visible,
.sh-site-header a:focus-visible,
.wp-block-button__link:focus-visible { outline: 3px solid var(--sh-yellow); outline-offset: 3px; }

@media (min-width: 782px) {
  .sh-home-hero { padding-block: 64px; }
  .sh-home-hero .wp-block-columns { align-items: center !important; }
  .sh-trust-band p { font-size: 1.05rem; }
}

@media (max-width: 781px) {
  .wp-block-post-content .alignwide,
  .sh-site-header > .wp-block-group,
  .sh-site-footer > .wp-block-group { width: min(100% - 32px, 1160px); }
  .sh-site-header > .wp-block-group { min-height: 64px; }
  .sh-site-header .wp-block-site-title { white-space: normal; }
  .sh-home-hero { padding-block: 30px 34px; }
  .sh-product-hero { padding-block: 42px; }
  .sh-home-hero .wp-block-columns { gap: 22px; }
  .sh-product-hero .wp-block-columns { gap: 30px; }
  .sh-home-hero h1,
  .sh-product-hero h1 { font-size: clamp(38px, 12vw, 54px) !important; }
  .sh-home-hero .sh-hero__media::after { inset: 7% 0 -4% 5%; }
  .sh-home-hero .sh-hero__media { width: 100%; }
  .sh-home-hero .sh-hero__media img { width: 100%; max-height: none; aspect-ratio: 4 / 3; }
  .sh-section { padding-block: 64px; }
  .sh-trust-band { padding-block: 14px; }
  .sh-trust-band .wp-block-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sh-trust-band p { display: flex; align-items: center; justify-content: center; font-size: .9rem; }
  .sh-product-grid { grid-template-columns: 1fr; gap: 22px; }
  .sh-product-grid .sh-card img { aspect-ratio: 4 / 3; object-fit: contain; }
  .sh-card__meta { align-items: flex-end; }
  .sh-section-heading { gap: 14px; margin-bottom: 30px; }
  .sh-steps { gap: 14px; }
  .sh-cta--inline { padding: 30px 24px; }
  .sh-site-footer > .wp-block-columns { padding-top: 42px !important; padding-bottom: 30px !important; }
  .sh-site-footer .wp-block-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 22px; width: 100%; }
  .sh-site-footer .wp-block-column:first-child { grid-column: 1 / -1; }
  .sh-site-footer .wp-block-column { min-width: 0; }
  .sh-site-footer .wp-block-group.alignwide:last-child { align-items: flex-start; flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .wp-block-post-content .alignwide,
  .sh-site-header > .wp-block-group,
  .sh-site-footer > .wp-block-group { width: min(100% - 24px, 1160px); }
  .sh-site-header .wp-block-site-title { max-width: 210px; font-size: 18px !important; }
  .sh-home-hero h1,
  .sh-product-hero h1 { font-size: clamp(36px, 11vw, 46px) !important; }
  .sh-home-hero h1 { margin-block: 8px 12px; }
  .sh-subtitle { font-size: 1rem; }
  .wp-block-buttons { align-items: stretch; }
  .wp-block-button { width: 100%; }
  .wp-block-button__link { width: 100%; text-align: center; }
  .sh-card__meta { align-items: flex-start; flex-direction: column; }
  .sh-product-grid .sh-card__body { min-height: 0; }
  .sh-home-hero .wp-block-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .sh-home-hero .wp-block-button__link { padding-inline: 10px; font-size: .88rem; }
  .sh-home-hero .sh-microcopy { margin-top: 12px; font-size: .8rem; }
  .sh-home-hero .sh-hero__media img { aspect-ratio: 16 / 10; }
  .sh-trust-band .wp-block-columns { grid-template-columns: 1fr; gap: 10px; }
  .sh-trust-band p { justify-content: flex-start; width: 210px; margin-inline: auto; }
  .sh-site-footer .wp-block-columns { grid-template-columns: 1fr; }
  .sh-site-footer .wp-block-column:first-child { grid-column: auto; }
  .sh-site-footer ul { margin-top: 8px; }
  .sh-site-footer > .wp-block-columns { padding-top: 34px !important; padding-bottom: 24px !important; }
}
