/*
Theme Name: Colorful Life
Theme URI: https://example.com/colorful-life
Author: Gary
Description: WordPress classic theme rebuilt from the supplied index.html and blog.html layouts using Tailwind CSS browser v4.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: colorful-life
*/

html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; }
*, *::before, *::after { box-sizing: border-box; }
body {
  background: #fbf7ed;
  color: #173015;
  font-family: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.container-shell {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
}
header.sticky {
  position: sticky;
  top: 0;
  z-index: 50;
}
.mobile-header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(.45rem, 1.8vw, 1rem);
  padding-block: .85rem;
}
.site-logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #214f1d;
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: clamp(1.15rem, 5vw, 1.65rem);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  background: rgba(251,247,237,.92);
  padding: .5rem .65rem;
}
.mobile-search-pill {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  height: 3.25rem;
  overflow: hidden;
  border: 1px solid rgba(23,48,21,.28);
  border-radius: 1rem;
  background: rgba(255,253,247,.94);
  box-shadow: 0 12px 30px rgba(23,48,21,.08);
}
.mobile-search-pill .material-symbols-outlined {
  flex: 0 0 auto;
  margin-left: .75rem;
  color: rgba(23,48,21,.55);
  font-size: 2rem;
}
.mobile-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: .25rem .65rem;
  color: #173015;
  font-size: 1rem;
  font-weight: 700;
  outline: 0;
}
.mobile-weather {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: .25rem;
  color: #f97316;
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.mobile-weather .material-symbols-outlined {
  color: #3478f6;
  font-size: 1.75rem;
}
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}
main > section:first-child.relative.hidden.overflow-hidden { display: none; }
#life-categories {
  background: #fbf7ed;
  padding-block: .75rem 4.75rem;
}
.life-category-row {
  display: flex;
  gap: 1rem;
  margin-inline: -1rem;
  overflow-x: auto;
  padding: .35rem 1rem 1rem;
  scroll-padding-inline: 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.life-category-row::-webkit-scrollbar { display: none; }
.life-card {
  position: relative;
  display: block;
  flex: 0 0 clamp(9.5rem, 43vw, 13.5rem);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.75);
  background: linear-gradient(135deg, rgba(33,79,29,.78), rgba(185,95,22,.62));
  color: #fff;
  isolation: isolate;
  scroll-snap-align: start;
  box-shadow: 0 18px 42px rgba(23,48,21,.12);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.shape-fashion { background: linear-gradient(135deg, #3478f6, #8fbf75); }
.shape-food { background: linear-gradient(135deg, #f97316, #f0b429); }
.shape-home { background: linear-gradient(135deg, #22c55e, #214f1d); }
.shape-travel { background: linear-gradient(135deg, #e24a8d, #3478f6); }
.shape-soul { background: linear-gradient(135deg, #f0b429, #b95f16); }
.life-card:active,
.life-card:focus-visible {
  transform: translateY(-4px) scale(.98);
  box-shadow: 0 26px 64px rgba(23,48,21,.18);
  outline: none;
}
.life-card:hover { box-shadow: 0 32px 80px rgba(23,48,21,.2); }
.life-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
  font-size: 0;
  transition: transform .7s ease, filter .7s ease;
}
.life-card > div:not(:last-child) {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.life-card > div:last-child {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
  color: #fff;
}
.life-card:hover img,
.life-card:focus-visible img {
  transform: scale(1.12);
  filter: saturate(1.12) contrast(1.05);
}
.icon-bubble {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: .75rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
  transition: transform .35s ease, background .35s ease;
}
.life-card:hover .icon-bubble,
.life-card:focus-visible .icon-bubble {
  transform: scale(1.08);
  background: rgba(255,255,255,.32);
}
.life-card h2,
.life-card h3 {
  margin: 0;
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.1;
}
.life-card p { margin: .25rem 0 0; font-weight: 800; }
#stories {
  display: block;
  padding-block: 0 3.5rem;
}
#stories > div:first-child > .mb-8 { display: none; }
#stories .space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: .9rem; }
#stories aside { margin-top: 2rem; }
.article-card {
  display: grid;
  grid-template-columns: 104px minmax(0,1fr);
  gap: .75rem;
  padding: .75rem;
  border: 1px solid rgba(217,208,189,.7);
  border-radius: 1.45rem;
  background: #fffdf7;
  box-shadow: 0 10px 28px rgba(23,48,21,.08);
}
.article-card > a {
  display: block;
  min-height: 116px;
  overflow: hidden;
  border-radius: 1rem;
}
.article-card img {
  width: 100%;
  height: 100%;
  min-height: 116px;
  object-fit: cover;
}
.article-card .eyebrow {
  margin: 0;
  color: #b95f16;
  font-size: .625rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.article-card h2,
.article-card h3 {
  display: -webkit-box;
  margin: .35rem 0 0;
  color: #173015;
  font-family: "Noto Serif TC", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card [class*="leading-7"] {
  display: -webkit-box;
  margin-top: .45rem;
  color: rgba(23,48,21,.65);
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-card [class*="flex-wrap"] { display: none; }
.widget {
  border: 1px solid #d9d0bd;
  border-radius: 2rem;
  background: #fffdf7;
  padding: 1.5rem;
}
@media (max-width: 420px) {
  .container-shell { padding-inline: .95rem; }
  .site-logo-chip { padding-inline: .45rem; }
  .mobile-search-pill { height: 2.95rem; }
  .mobile-search-pill .material-symbols-outlined { margin-left: .7rem; font-size: 1.9rem; }
  .mobile-weather .material-symbols-outlined { font-size: 1.65rem; }
  .mobile-search-input { font-size: .98rem; }
}
@media (min-width: 640px) {
  .container-shell { padding-inline: 2rem; }
  .article-card { grid-template-columns: 150px minmax(0,1fr); gap: 1rem; padding: 1rem; }
  .article-card > a,
  .article-card img { min-height: 150px; }
}
@media (min-width: 768px) {
  .site-logo-chip { background: transparent; padding: 0; font-size: 1.875rem; }
  .mobile-search-pill,
  .mobile-weather { display: none; }
  main > section:first-child.relative.hidden.overflow-hidden { display: block; }
  #life-categories { padding-block: 3.5rem 5rem; }
  .life-category-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    margin-inline: 0;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }
  .life-card { flex-basis: auto; box-shadow: 0 24px 60px rgba(23,48,21,.14); }
  #stories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-block: 3.5rem;
  }
  #stories > div:first-child > .mb-8 { display: flex; }
  .article-card {
    grid-template-columns: 220px 1fr;
    gap: 1.25rem;
    border-radius: 2rem;
  }
  .article-card h2,
  .article-card h3 { font-size: 1.875rem; }
  .article-card [class*="flex-wrap"] { display: flex; }
}
@media (min-width: 1024px) {
  .life-category-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #stories { grid-template-columns: 1fr 360px; }
}