/*
Theme Name: PAMASKO Christmas
Description: Filipino Christmas gifts, Aguinaldo and holiday traditions.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: pamasko
License: GPL-2.0-or-later
*/

:root {
  --green: #123e32;
  --green-dark: #082a21;
  --green-light: #edf3e9;
  --red: #a82e39;
  --red-dark: #81212b;
  --gold: #dfb66c;
  --cream: #faf6ed;
  --paper: #fffdf8;
  --ink: #263e33;
  --muted: #667064;
  --line: #e5ddce;
  --shadow: 0 12px 36px rgb(18 62 50 / 7%);
  --radius: 22px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.8 system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  overflow-wrap: anywhere;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; height: auto; }
svg { max-width: 100%; }
figure { margin: 24px 0; }

a {
  color: var(--green);
  text-underline-offset: 4px;
}

a:hover { color: var(--red); }

button, input, textarea { font: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.16;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.7rem);
  margin: 0 0 24px;
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.9rem);
  margin: 0 0 20px;
}

h3 {
  font-size: 1.45rem;
  margin: 0 0 14px;
}

p { margin: 0 0 20px; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 5px;
}

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  background: white;
}

.skip-link:focus { top: 12px; }

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.top-strip {
  padding: 9px 16px;
  background: var(--green-dark);
  color: #f6dfb0;
  text-align: center;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .15em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(250 246 237 / 98%);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
  min-height: 94px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 245px;
  text-decoration: none;
}

.brand > a { display: block; }

.brand img,
.brand .custom-logo {
  display: block;
  width: 230px;
  max-width: 100%;
  height: auto;
  max-height: 85px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-text svg {
  width: 42px;
  height: 52px;
  color: var(--red);
}

.brand-name {
  display: block;
  font: 700 1.55rem/1 Georgia, serif;
  letter-spacing: .08em;
}

.brand-small {
  display: block;
  margin-top: 7px;
  font-size: .53rem;
  font-weight: 750;
  letter-spacing: .18em;
}

.site-nav ul {
  display: flex;
  gap: 23px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 14px 0;
  color: var(--green);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 750;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
  color: var(--red);
}

.menu-toggle {
  display: none;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--green);
}

.menu-toggle svg {
  display: block;
  width: 23px;
  height: 23px;
}

.eyebrow {
  display: block;
  margin-bottom: 18px;
  color: var(--red);
  font-size: .71rem;
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero {
  padding: 65px 0 70px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 95% 0, #eeddb8, transparent 55%),
    var(--cream);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 55px;
  align-items: center;
}

.hero-copy h1 em {
  color: var(--red);
  font-weight: inherit;
}

.hero-copy > p {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.06rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--red);
  color: white;
  font-size: .86rem;
  line-height: 1.4;
  font-weight: 750;
  text-decoration: none;
  transition: background .2s, transform .2s;
}

.button:hover {
  background: var(--red-dark);
  color: white;
  transform: translateY(-2px);
}

.button-outline {
  border-color: #b9c8b5;
  background: transparent;
  color: var(--green);
}

.button-outline:hover {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.button-gold {
  background: var(--gold);
  color: var(--green-dark);
}

.button-gold:hover {
  background: #f0ce91;
  color: var(--green-dark);
}

.hero-note {
  margin-top: 24px;
  color: var(--muted);
  font-size: .8rem;
}

.hero-art {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgb(143 111 54 / 25%);
  border-radius: 150px 150px 25px 25px;
  background:
    radial-gradient(circle at 50% 30%, #3b654b, transparent 65%),
    var(--green);
  box-shadow: 0 22px 55px rgb(18 62 50 / 12%);
}

.hero-art > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgb(239 209 150 / 55%);
  border-radius: 138px 138px 16px 16px;
  pointer-events: none;
}

.hero-art .fallback-star {
  position: absolute;
  top: 8%;
  left: 28%;
  width: 44%;
  height: 57%;
  color: var(--gold);
}

.gift-envelope {
  position: absolute;
  left: 28%;
  bottom: 13%;
  width: 44%;
  height: 27%;
  border-radius: 9px;
  background: #f7e5bf;
  transform: rotate(-8deg);
  box-shadow: 0 16px 25px rgb(0 0 0 / 20%);
}

.gift-envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #dbb578;
  clip-path: polygon(0 0, 100% 0, 50% 63%);
}

.gift-envelope::after {
  content: "P";
  position: absolute;
  top: 43%;
  left: 41%;
  display: grid;
  place-items: center;
  width: 18%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--red);
  color: #fff0cb;
  font: 700 22px Georgia, serif;
}

.section { padding: 74px 0; }
.section-white { background: var(--paper); }
.section-soft { background: var(--green-light); }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
  margin-bottom: 34px;
}

.section-heading h2 { margin-bottom: 12px; }
.section-heading p { max-width: 640px; margin: 0; color: var(--muted); }
.text-link { font-size: .88rem; font-weight: 750; }

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

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: #cdb58a;
  box-shadow: 0 22px 46px rgb(18 62 50 / 12%);
}

.card:focus-within { border-color: var(--red); }

.card-media {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  height: 205px;
  margin: 11px 11px 0;
  overflow: hidden;
  border-radius: 16px;
  color: #f0cd88;
  background:
    radial-gradient(circle at 50% 30%, #42634a, transparent 65%),
    var(--green);
}

.card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.card:hover .card-media img { transform: scale(1.035); }

.card-media svg { width: 104px; height: 137px; }

.card:nth-child(3n + 2) .card-media {
  background: linear-gradient(145deg, #ad454a, #762530);
}

.card:nth-child(3n) .card-media {
  background: linear-gradient(145deg, #f2dfb7, #d8b46e);
  color: #755027;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px;
}

.card-tag {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 5px 9px;
  border: 1px solid #e8ddc9;
  border-radius: 6px;
  background: #f5efe2;
  color: #7c6239;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.card h2, .card h3 {
  margin: 0 0 14px;
  font-size: 1.5rem;
  line-height: 1.25;
}

.card h2 a, .card h3 a {
  color: var(--green);
  text-decoration: none;
}

.card h2 a:hover, .card h3 a:hover { color: var(--red); }

.card p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: .92rem;
}

.card-read {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 45px;
  margin-top: auto;
  padding: 10px 14px;
  border: 1px solid #dce4d4;
  border-radius: 10px;
  background: #eef3e8;
  color: var(--green);
  font-size: .8rem;
  font-weight: 750;
  text-decoration: none;
}

.card-read:hover {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.feature-panel {
  position: relative;
  padding: 43px;
  overflow: hidden;
  border: 1px solid #3c624c;
  border-radius: 25px;
  background:
    radial-gradient(ellipse at 100% 0, #476246, transparent 70%),
    var(--green);
  color: #e5eadb;
  box-shadow: var(--shadow);
}

.feature-panel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgb(223 182 108 / 28%);
  border-radius: 17px;
  pointer-events: none;
}

.feature-panel h2 { color: #fff0cf; }
.feature-panel .eyebrow { color: var(--gold); }
.feature-panel p { color: #dbe2d3; }
.feature-panel .button { position: relative; z-index: 1; }

.feature-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 23px;
}

.budget-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.budget-card {
  position: relative;
  padding: 31px 27px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 21px;
  background:
    radial-gradient(circle at 100% 0, #f2e5c9, transparent 70%),
    var(--paper);
  box-shadow: var(--shadow);
}

.budget-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 26px;
  right: 26px;
  height: 4px;
  background: var(--green);
}

.budget-card:nth-child(2)::before { background: var(--red); }
.budget-card:nth-child(3)::before { background: var(--gold); }

.budget-card strong {
  display: block;
  margin-bottom: 18px;
  color: var(--red);
  font: 700 2.7rem/1.2 Georgia, serif;
}

.budget-card p { margin: 0; color: var(--muted); font-size: .92rem; }

.page-hero {
  padding: 39px 0 47px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 50% 0, #efdfbd, transparent 70%),
    var(--cream);
}

.page-hero h1 {
  max-width: 900px;
  margin-inline: auto;
  font-size: clamp(2.15rem, 4.5vw, 3.6rem);
}

.page-hero p { max-width: 730px; margin: 0 auto; color: var(--muted); }

.page-mark {
  width: 35px;
  height: 45px;
  margin-bottom: 14px;
  color: var(--red);
}

.breadcrumbs { margin-bottom: 21px; color: var(--muted); font-size: .77rem; }
.breadcrumbs a { color: inherit; }
.breadcrumbs span { margin-inline: 8px; }

.page-cover {
  display: block;
  width: min(1050px, calc(100% - 48px));
  margin: 34px auto 0;
}

.page-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 23px;
  box-shadow: var(--shadow);
}

.reading {
  width: min(800px, calc(100% - 48px));
  margin-inline: auto;
  padding: 43px 0 24px;
}

.reading > :first-child { margin-top: 0; }

.reading h2 {
  margin-top: 42px;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
}

.reading h3 { margin-top: 29px; font-size: 1.3rem; }
.reading li { margin-bottom: 9px; }
.reading ul, .reading ol { padding-left: 24px; }
.reading a { font-weight: 650; }

.content-photo { margin: 28px 0; }

.content-photo img {
  display: block;
  width: 100%;
  border-radius: 18px;
}

.answer-box,
.notice,
.message-card {
  margin: 24px 0;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
}

.answer-box { border-left: 4px solid var(--red); }
.answer-box > strong { display: block; margin-bottom: 10px; color: var(--red); }
.answer-box p:last-child, .notice p:last-child { margin-bottom: 0; }
.notice { background: #f4eddd; }

.message-card {
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow);
}

.message-card blockquote {
  margin: 0 0 20px;
  color: var(--green);
  font: 1.2rem/1.75 Georgia, serif;
}

.copy-button {
  padding: 8px 13px;
  border: 1px solid #d8dfcd;
  border-radius: 8px;
  background: #eef3e8;
  color: var(--green);
  font-size: .8rem;
  font-weight: 650;
}

.copy-button:hover { background: var(--green); color: white; }

details {
  margin-bottom: 13px;
  padding: 19px 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

details[open] { border-color: #b7c8ac; }
summary { color: var(--green); font-weight: 750; cursor: pointer; }
details p { margin: 13px 0 0; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 25px 0; }
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .91rem; }
th, td { padding: 14px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--green); color: #fff0d1; }

.home-return { padding: 22px 20px 60px; text-align: center; }

.footer-banner {
  padding: 39px 0;
  border-top: 1px solid #385744;
  background: var(--green);
  color: #f4dfb7;
}

.banner-row { display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.banner-row h2 { margin: 0 0 8px; color: #fff0d0; font-size: 1.8rem; }
.banner-row p { margin: 0; color: #d8e1d0; }

.site-footer {
  padding: 51px 0 22px;
  background: var(--green-dark);
  color: #d5dfcf;
}

.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 45px; }
.footer-brand { color: #f1ce8b; font: 700 1.8rem Georgia, serif; letter-spacing: .08em; }
.footer-description { max-width: 380px; margin-top: 17px; font-size: .9rem; }
.site-footer h3 { color: #f4deb3; font: 750 .82rem system-ui, sans-serif; margin-bottom: 19px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 9px; }
.site-footer a { color: #d5dfcf; text-decoration: none; font-size: .86rem; }
.site-footer a:hover { color: #ffe1a2; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #31503e;
  font-size: .75rem;
}

.back-top {
  position: fixed;
  right: 19px;
  bottom: 19px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(255 255 255 / 40%);
  border-radius: 12px;
  background: var(--red);
  color: white;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.back-top:hover { background: var(--red-dark); color: white; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 20px; }
.form-field label { display: block; margin-bottom: 7px; font-size: .9rem; font-weight: 750; }

.form-field input,
.form-field textarea,
.search-field {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #becab5;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}

.form-field textarea { min-height: 180px; resize: vertical; }
.checkbox-label { display: flex; align-items: start; gap: 10px; margin-bottom: 23px; font-size: .85rem; }
.checkbox-label input { margin-top: 7px; }
.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  margin-bottom: 24px;
  padding: 18px;
  border-left: 4px solid var(--green);
  background: var(--green-light);
}

.form-error { border-color: var(--red); background: #f9e7e3; }
.search-form { display: flex; gap: 10px; margin: 24px 0; }
.search-form label { flex: 1; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.page-numbers.current { background: var(--green); color: white; }

.post-meta { color: var(--muted); font-size: .8rem; margin-bottom: 24px; }
.post-featured { display: block; width: 100%; border-radius: 18px; margin-bottom: 28px; }
.wp-block-image img { border-radius: 15px; }
.alignwide, .alignfull { max-width: 100%; }

@media (min-width: 783px) {
  body.admin-bar .site-header { top: 32px; }
}

@media (max-width: 1050px) {
  .site-nav ul { gap: 16px; }
  .site-nav a { font-size: .8rem; }
  .hero-grid { gap: 32px; }
  .card-body { padding: 23px; }
}

@media (max-width: 850px) {
  .header-row { min-height: 80px; }
  .menu-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - 130px);
    overflow-y: auto;
    padding: 15px 24px 23px;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
  }

  .site-nav.is-open { display: block; }
  .site-nav ul { display: block; }
  .site-nav a { padding: 13px 7px; font-size: 1rem; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-art { width: min(520px, 100%); margin-inline: auto; }
  .hero-copy > p { max-width: none; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .banner-row { align-items: start; flex-direction: column; }
}

@media (max-width: 540px) {
  .wrap, .reading { width: calc(100% - 32px); }
  .top-strip { font-size: .58rem; letter-spacing: .08em; }
  .brand { max-width: 195px; }
  .brand img, .brand .custom-logo { width: 185px; max-height: 69px; }
  .brand-name { font-size: 1.3rem; }
  .brand-small { font-size: .45rem; }
  .brand-text svg { width: 34px; }
  .hero { padding: 37px 0 45px; }
  .hero-grid { gap: 32px; }
  .hero-art { border-radius: 110px 110px 22px 22px; }
  .hero-art::after { border-radius: 99px 99px 14px 14px; }
  .section { padding: 47px 0; }
  .section-heading { display: block; margin-bottom: 27px; }
  .section-heading > a { display: inline-block; margin-top: 16px; }
  .card-grid, .budget-grid, .form-grid { grid-template-columns: 1fr; }
  .card-grid { gap: 23px; }
  .card-media { height: 195px; }
  .card-body { padding: 24px; }
  .card h2, .card h3 { font-size: 1.55rem; }
  .feature-panel { padding: 31px 27px; }
  .split { gap: 30px; }
  .page-hero { padding: 29px 0 35px; }
  .page-cover { width: calc(100% - 32px); margin-top: 24px; }
  .page-cover img { border-radius: 17px; }
  .reading { padding-top: 33px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .search-form { flex-direction: column; }
  .button { padding-inline: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .card:hover,
  .card:hover .card-media img,
  .button:hover {
    transform: none;
  }
}