/* Shared components for the warm institution redesign */
.site-header { position: sticky; top: 0; z-index: 500; background: rgba(255,253,248,.94); border-bottom: 1px solid var(--color-line); backdrop-filter: blur(12px); }
.site-header__inner { width: min(var(--container-wide), calc(100% - 40px)); min-height: 74px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--color-primary-dark); font-weight: 800; line-height: 1.25; }
.site-brand img { width: 130px; height: 6rem; object-fit: contain; }
.site-brand span { display: none; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.nav-link { display: inline-flex; align-items: center; min-height: 42px; padding: 0 13px; border-radius: var(--radius-pill); color: var(--color-text-soft); font-size: 15px; font-weight: 700; transition: color 180ms var(--ease), background-color 180ms var(--ease); }
.nav-link[aria-current="page"] { color: var(--color-primary-dark); background: var(--color-primary-light); }
.nav-link:hover { color: var(--color-primary-dark); background: var(--color-orange-light); }
/* Nav link SVG border-draw hover animation */
.nav-border-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.nav-border-rect { color: var(--color-primary); stroke-dashoffset: var(--nav-perimeter, 200); transition: stroke-dashoffset 0.5s cubic-bezier(0.2, 0, 0, 1); }
.nav-link:hover .nav-border-rect,
.nav-link[aria-current="page"] .nav-border-rect { stroke-dashoffset: 0; }
.nav-cta, .button-primary, .button-secondary, .button-text { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: var(--radius-pill); font-weight: 800; transition: transform 180ms var(--ease), background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease); }
.nav-cta, .button-primary { padding: 0 22px; color: var(--color-white); background: var(--color-primary); border: 1px solid var(--color-primary); }
.nav-cta:hover{ transform: translateY(-2px); background: var(--color-primary-dark); border-color: var(--color-primary-dark); }
 .button-primary:hover { transform: translateY(-2px); background: var(--color-primary-darkblue); border-color: var(--color-primary-light); }
.button-secondary { padding: 0 22px; color: var(--color-primary-dark); background: transparent; border: 1px solid var(--color-primary); }
.button-secondary:hover { background: var(--color-primary-light); }
.button-text { min-height: 0; color: var(--color-primary-dark); }
.button-text:hover { color: var(--color-brown); }
.nav-menu-button { display: none; width: 44px; height: 44px; border: 1px solid var(--color-line); border-radius: var(--radius-pill); color: var(--color-primary-dark); background: var(--color-card); padding: 0; flex-shrink: 0; position: relative; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
/* Hamburger icon: three lines */
.hamburger-line { display: block; width: 20px; height: 2.5px; background: var(--color-primary-dark); border-radius: 2px; transform-origin: center; }
/* Hamburger → X animation when menu is open */
.nav-menu-button[aria-expanded="true"] .hamburger-line:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-menu-button[aria-expanded="true"] .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-menu-button[aria-expanded="true"] .hamburger-line:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
/* Mobile menu: smooth expand/collapse animation */
.mobile-menu { display: grid; grid-template-rows: 0fr; border-top: 1px solid var(--color-line); background: var(--color-card); opacity: 0; transform: translateY(-8px); overflow: hidden; }
.mobile-menu.open { grid-template-rows: 1fr; opacity: 1; transform: translateY(0); }
.mobile-menu > .mobile-menu__inner { overflow: hidden; min-height: 0; }
.mobile-menu__inner { width: min(var(--container-wide), calc(100% - 32px)); margin-inline: auto; padding: 0; display: grid; gap: 6px; }
.mobile-menu.open .mobile-menu__inner { padding: 14px 0 22px; }
.site-footer { margin-top: var(--space-section); background: linear-gradient(175deg, #2f4f3a 0%, #1c3322 40%, #162b1d 100%); color: #fff; position: relative; overflow: hidden; padding: 0 0.8rem; }
.site-footer::before { content: ''; position: absolute; top: -80px; right: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(234,241,231,.06) 0%, transparent 70%); pointer-events: none; }
.site-footer::after { content: ''; position: absolute; bottom: -60px; left: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(212,175,55,.04) 0%, transparent 70%); pointer-events: none; }
.site-footer__contact { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px,5vw,70px); align-items: center; padding-block: clamp(0.8rem,7vw,1.1rem); }
.site-footer__image { min-height: 280px; overflow: hidden; border-radius: var(--radius-card); }
.site-footer__image img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; }
.site-footer h2, .site-footer h3, .site-footer p, .site-footer a { color: inherit; }
.site-footer p { color: rgba(255,255,255,.78); }
.site-footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 28px; padding: 44px 0 34px; border-top: 1px solid rgba(255,255,255,.12); position: relative; }
.site-footer__title { margin-bottom: 14px; color: #f4efe6; font-weight: 800; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; position: relative; padding-bottom: 10px; }
.site-footer__title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 28px; height: 2px; background: var(--color-primary); border-radius: 2px; }
.footer-links { display: grid; gap: 10px; }
.footer-link, .footer-contact-line { color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.7; }
.footer-link { display: inline-flex; align-items: center; gap: 6px; }
.footer-link { padding-left: 14px; position: relative; }
.footer-link::before { content: ''; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--color-primary); opacity: .5; transform: translateY(-50%); transition: opacity var(--motion-interaction) var(--ease), transform var(--motion-interaction) var(--ease); }
.footer-link:hover { color: #fff; }
.footer-link:hover::before { opacity: 1; transform: translateY(-50%) scale(1.4); }
.footer-contact-line { position: relative; padding-left: 26px; }
.footer-contact-line::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; background: rgba(255,255,255,.18); border-radius: 3px; }
.footer-contact-line--address::before,
.footer-contact-line--phone::before,
.footer-contact-line--email::before,
.footer-contact-line--taxid::before {
  content: "";
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 1.1em;

  background: rgba(95, 127, 98, .5);

  clip-path: none;
  border-radius: 0;

  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;

  -webkit-mask-position: center;
  mask-position: center;

  -webkit-mask-size: contain;
  mask-size: contain;
}

/* 地址 icon：定位圖釘 */
.footer-contact-line--address::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7Zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5Z'/%3E%3C/svg%3E");
}
/* 電話 icon：電話聽筒 */
.footer-contact-line--phone::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.01-.24c1.12.37 2.33.56 3.58.56a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1C10.61 21 3 13.39 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.19 2.46.56 3.58a1 1 0 0 1-.24 1.01l-2.2 2.2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.01-.24c1.12.37 2.33.56 3.58.56a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1C10.61 21 3 13.39 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.19 2.46.56 3.58a1 1 0 0 1-.24 1.01l-2.2 2.2Z'/%3E%3C/svg%3E");
}
/* 信箱 icon：信封 */
.footer-contact-line--email::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm8 9 8-5V6l-8 5-8-5v2l8 5Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm8 9 8-5V6l-8 5-8-5v2l8 5Z'/%3E%3C/svg%3E");
}
/* 統編 icon：文件 */
.footer-contact-line--taxid::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 2h9l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm8 1.5V8h4.5L14 3.5ZM8 11h8v2H8v-2Zm0 4h8v2H8v-2Zm0 4h5v2H8v-2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 2h9l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm8 1.5V8h4.5L14 3.5ZM8 11h8v2H8v-2Zm0 4h8v2H8v-2Zm0 4h5v2H8v-2Z'/%3E%3C/svg%3E");
}
.footer-socials { display: flex; gap: 10px; }
.footer-socials a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; }
.footer-bottom { padding: 18px 0 26px; border-top: 1px solid rgba(255,255,255,.16); color: rgba(255,255,255,.58); font-size: 13px; }
.page-hero { padding: clamp(56px,8vw,3rem) 0 42px; }
.page-hero__label, .section-label { display: inline-flex; margin-bottom: 12px; color: var(--color-primary); font-size: 24px; font-weight: 900; letter-spacing: .12em; text-transform: lowercase; }
.page-hero__lead, .section-lead { max-width: 760px; color: var(--color-text-soft); font-size: clamp(17px,2vw,20px); line-height: 2; }
.section { padding-block: var(--space-section); }
.section-soft { background: color-mix(in srgb, var(--color-card) 50%, transparent); border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); border-left: 0; border-right: 0; border-top: 6px solid;
border-image: repeating-linear-gradient(90deg, var(--color-line) 0 10px, transparent 10px 20px) 1;}
.content-band { padding: clamp(34px,5vw,58px) 0; border-top: 1px solid var(--color-line); }
.soft-panel { background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); }
.thin-card { background: var(--color-card); border: 1px solid var(--color-line); border-radius: var(--radius); }
.meta-pill, .category-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: var(--radius-pill); color: var(--color-primary-dark); background: var(--color-primary-light); font-size: 13px; font-weight: 800; }
.image-frame { overflow: hidden; background: var(--color-bg); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; }
.image-frame img:hover { transform: scale(1.04); }

.article-row { display: grid; grid-template-columns: 168px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--color-line); }
.article-row__image { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.article-row h3 { margin-bottom: 6px; font-size: clamp(18px,2vw,24px); }
.article-row__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.date-text { color: var(--color-muted); font-size: 14px; font-weight: 700; }
.resource-layout, .provider-layout, .blog-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(28px,4vw,54px); align-items: start; }
.side-panel { position: sticky; top: 8rem; padding: 22px; background: var(--color-bg); border: 1px solid var(--color-line); border-radius: var(--radius-card); }
.side-panel h2, .side-panel h3 { margin-bottom: 14px; font-size: 20px; }
.field-stack { display: grid; gap: 14px; }
.filter-group { display: grid; gap: 8px; }
.filter-group label { color: var(--color-primary-dark); font-size: 13px; font-weight: 900; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--color-line); border-radius: var(--radius-pill); padding: 7px 12px; color: var(--color-text-soft); background: var(--color-card); font-size: 14px; font-weight: 800; }
.chip.active, .chip[aria-pressed="true"] { color: #fff; background: var(--color-primary); border-color: var(--color-primary); }
.chip:hover { color: var(--color-primary-light); background: var(--color-primary); }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 28px; }
.resource-item { display: grid; gap: 13px; padding-bottom: 22px; border-bottom: 1px solid var(--color-line); }
.resource-item__image { aspect-ratio: 4 / 3; border-radius: 18px; }
.resource-item h3 { margin-bottom: 4px; }
.resource-item p { margin-bottom: 8px; }
.provider-hero { display: grid; grid-template-columns: .86fr 1.14fr; gap: clamp(28px,5vw,64px); align-items: center; padding-bottom: 44px; border-bottom: 1px solid var(--color-line); }
.provider-hero__image { aspect-ratio: 4 / 3; border-radius: var(--radius-card); }
.info-list { display: grid; gap: 12px; }
.info-list div { display: grid; gap: 2px; padding-bottom: 11px; border-bottom: 1px solid var(--color-line); }
.info-list dt, .info-list span { color: var(--color-muted); font-size: 13px; font-weight: 900; }
.info-list dd, .info-list strong { margin: 0; color: var(--color-primary-dark); font-weight: 800; }
.anchor-list { display: grid; gap: 6px; margin-top: 18px; }
.anchor-list a { padding: 8px 0; border-bottom: 1px solid var(--color-line); color: var(--color-text-soft); font-weight: 800; }
.anchor-list a:hover { color: var(--color-primary-dark); }
.three-column-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.plain-list-block { padding: 22px; background: var(--color-card); border-left: 4px solid var(--color-primary); }
.timeline-list { display: grid; gap: 24px; }
.timeline-item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 22px; padding-bottom: 24px; border-bottom: 1px solid var(--color-line); }
.timeline-time { color: var(--color-brown); font-weight: 900; }
.timeline-media-grid, .case-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.timeline-media-grid button, .case-gallery button { border: 0; padding: 0; background: transparent; }
.timeline-media-grid .image-frame, .case-gallery .image-frame { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.lightbox { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(29, 45, 34, 0); opacity: 0; pointer-events: none; backdrop-filter: blur(0px); transition: opacity 300ms var(--ease), background-color 300ms var(--ease), backdrop-filter 300ms var(--ease); }
.lightbox.open { opacity: 1; pointer-events: auto; background: rgba(29, 45, 34, .78); backdrop-filter: blur(6px); }
.lightbox img { max-width: min(96vw, 1200px); max-height: 90vh; border-radius: var(--radius); object-fit: contain; background: #fff; }
.close-btn, .blog-lightbox-close { width: 42px; height: 42px; border: 3px solid var(--color-primary-darkblue); border-radius: 50%; color: var(--color-primary-dark); background: var(--color-card); font-size: 24px; }
.blog-lightbox-modal { position: fixed; inset: 0; z-index: 6000; display: none; padding: 24px; }
.blog-lightbox-modal.open { display: grid; place-items: center; }
.blog-lightbox-backdrop { position: absolute; inset: 0; background: rgba(47,79,58,.68); }
.blog-lightbox-panel { position: relative; width: min(860px, 100%); max-height: 90vh; overflow: auto; padding: clamp(22px,4vw,40px); background: var(--color-card); border-radius: var(--radius-card); }
.blog-lightbox-close { position: sticky; top: 0; margin-left: auto; z-index: 2; }
@media (max-width: 980px) { .site-nav { display: none; } .nav-menu-button { display: flex; } .site-footer__contact, .site-footer__grid, .provider-hero, .resource-layout, .provider-layout, .blog-layout { grid-template-columns: 1fr; } .side-panel { position: static; } .site-footer__contact .section-label { font-size: 16px; } .site-footer__contact h2 { font-size: 18px; } .site-footer__image { display: none; } .site-footer__grid > div:first-child { display: none; } }
@media (max-width: 720px) { .site-header__inner { width: min(100% - 28px, var(--container-wide)); min-height: 66px; } .site-brand img { width: 112px; } .resource-grid, .three-column-list, .timeline-media-grid, .case-gallery { grid-template-columns: 1fr; } .article-row, .timeline-item { grid-template-columns: 1fr; } }

/* Page-specific layout primitives kept in the shared component layer */
.home-hero { min-height: 50vh; display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(28px,5vw,64px); align-items: center; padding-block: clamp(42px,7vw,3rem); position: relative; overflow: hidden; }
.home-hero__waves { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.home-hero__waves svg { width: 100%; height: 100%; }
.hero-wave { stroke: #0b3a1f; fill: none; }
.hero-wave.wave-1 { stroke-width: 2px; opacity: 0.05; animation: waveDrift1 26s ease-in-out infinite alternate; }
.hero-wave.wave-2 { stroke-width: 1.2px; stroke-dasharray: 6, 8; opacity: 0.03; animation: waveDrift2 30s ease-in-out infinite alternate; }
@keyframes waveDrift1 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-20px, 10px) scale(1.02); } }
@keyframes waveDrift2 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(20px, -10px) scale(0.98); } }
.home-hero__copy { max-width: 560px; position: relative; z-index: 2; }
.home-hero__info { display: grid; gap: 8px; margin: 24px 0; padding: 18px 0; border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); color: var(--color-primary-dark); font-weight: 800; }
.home-hero__media-container { position: relative; z-index: 2; }
.home-hero__media { position: relative; min-height: 520px; border-radius: 24px; overflow: hidden; box-shadow: 0 16px 38px rgba(165, 104, 69, 0.308); }
.home-hero__border-overlay { position: absolute; inset: -10px; z-index: 10; pointer-events: none; width: calc(100% + 20px); height: calc(100% + 20px); transform-origin: center center; filter: drop-shadow(0 4px 10px rgba(64, 45, 85, 0.87)); animation: heroFloat 14s ease-in-out infinite alternate; animation-delay: 2s; }
.hero-border-outer, .hero-border-inner { fill: none; stroke: #ffc06e; stroke-linecap: round; }
.hero-border-outer { stroke-width: 2px; opacity: 0.88; stroke-dasharray: 400; stroke-dashoffset: 400; animation: drawStrokeOuter 1.6s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.hero-border-inner { stroke-width: 1px; opacity: 0.55; stroke-dasharray: 380; stroke-dashoffset: 380; animation: drawStrokeInner 1.6s cubic-bezier(0.25, 1, 0.5, 1) forwards; animation-delay: 0.25s; }
@keyframes drawStrokeOuter { to { stroke-dashoffset: 0; } }
@keyframes drawStrokeInner { to { stroke-dashoffset: 0; } }
@keyframes heroFloat { 0% { transform: translate(0, 0) rotate(0deg) scale(1); } 50% { transform: translate(3px, -5px) rotate(0.3deg) scale(1.003); } 100% { transform: translate(-2px, 3px) rotate(-0.3deg) scale(0.997); } }
.home-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 1.5s var(--ease), transform 1.5s var(--ease); }
.home-hero__media img.active { opacity: 1; transform: scale(1); }
.home-hero__dots { position: absolute; left: 22px; bottom: 22px; display: flex; gap: 8px; }
.home-hero__dots button { width: 10px; height: 10px; border: 0; border-radius: 999px; background: rgba(255,255,255,.72); padding: 0; }
.home-hero__dots button.active { width: 28px; background: #fff; }
.service-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--color-line); }
.service-link { display: grid; gap: 10px; padding: 26px 22px; border-bottom: 1px solid var(--color-line); border-right: 1px solid var(--color-line); }
.service-link:nth-child(4n) { border-right: 0; }
.service-link img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.service-link strong { color: var(--color-primary-dark); font-size: 20px; }
.photo-ribbon { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.photo-ribbon .image-frame { aspect-ratio: 3 / 4; border-radius: 18px; }
.about-message { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px,5vw,64px); align-items: center; }
.about-message .image-frame { aspect-ratio: 4 / 3; border-radius: var(--radius-card); }
.model-list { display: grid; gap: 0; border-top: 1px solid var(--color-line); }
.model-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--color-line); }
.model-row__num { color: var(--color-brown); font-family: var(--font-display); font-size: 42px; line-height: 1; }
.team-list { display: grid; gap: 34px; }
.team-row { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 34px; border-bottom: 1px solid var(--color-line); }
.team-row .image-frame { aspect-ratio: 4 / 5; border-radius: 18px; }
.service-detail-list { display: grid; gap: 42px; }
.service-detail { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; align-items: center; padding-bottom: 42px; border-bottom: 1px solid var(--color-line); }
.service-detail:nth-child(even) { grid-template-columns: minmax(0, 1fr) 320px; }
.service-detail:nth-child(even) .image-frame { order: 2; }
.service-detail .image-frame { aspect-ratio: 4 / 3; border-radius: var(--radius-card); }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
.stat-strip div { padding: 24px; border-right: 1px solid var(--color-line); }
.stat-strip div:last-child { border-right: 0; }
@media (max-width: 980px) { .home-hero, .about-message, .service-detail, .service-detail:nth-child(even), .team-row { grid-template-columns: 1fr; } .service-detail:nth-child(even) .image-frame { order: 0; } .service-links { grid-template-columns: repeat(2, 1fr); } .service-link:nth-child(2n) { border-right: 0; } .home-hero__media { min-height: 380px; border-radius: 20px; } .home-hero__waves { display: none; } }
@media (max-width: 640px) { .service-links, .photo-ribbon, .stat-strip { grid-template-columns: 1fr; } .service-link { border-right: 0; } .model-row { grid-template-columns: 1fr; gap: 10px; } }
.lightbox .nav { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; pointer-events: none; padding: 0 18px; }
.lightbox .nav-btn { pointer-events: auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--color-card); color: var(--color-primary-dark); font-size: 30px; }
.lightbox .close-btn { position: absolute; top: 18px; right: 18px; }
.lightbox .thumbs { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; max-width: min(86vw, 760px); overflow-x: auto; padding: 8px; border-radius: var(--radius-pill); background: rgba(255,253,248,.86); }
.lightbox .thumb { width: 54px; height: 40px; object-fit: cover; border-radius: 8px; opacity: .62; border: 2px solid transparent; }
.lightbox .thumb.active { opacity: 1; border-color: var(--color-primary); }
.map-zoom-hint { position: absolute; left: 12px; bottom: 12px; z-index: 500; background: rgba(255,253,248,.92); color: var(--color-primary-dark); border: 1px solid var(--color-line); border-radius: var(--radius-pill); padding: 6px 10px; font-size: 12px; font-weight: 800; pointer-events: none; }

/* Resource filter toggle & expand/collapse animation */
.filter-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  border: 0;
  background: transparent;
  color: var(--color-primary-dark);
  font-size: 18px;
  font-weight: 900;
  text-align: left;
}
.filter-toggle [aria-hidden] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 16px;
  font-weight: 900;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s var(--ease);
}
/* Filter body: smooth expand/collapse using grid-template-rows */
#resource-filter-body {
  display: grid;
  grid-template-rows: 1fr;
  overflow: hidden;
  transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s var(--ease);
  opacity: 1;
}
#resource-filter-body > .field-stack {
  overflow: hidden;
  min-height: 0;
}
.resource-filters.collapsed #resource-filter-body {
  grid-template-rows: 0fr;
  opacity: 0;
}
/* Rotate the toggle icon when collapsed */
.resource-filters.collapsed .filter-toggle [aria-hidden] {
  transform: rotate(0deg);
}
.resource-filters:not(.collapsed) .filter-toggle [aria-hidden] {
  transform: rotate(45deg);
}
@media (max-width: 980px) {
  .resource-filters #resource-filter-body h2 { display: none; }
}

/* Interaction refresh */
html { scroll-padding-top: 96px; }
.action-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav-link { position: relative; overflow: visible; background: transparent; }

.nav-cta, .button-primary, .button-secondary, .button-text, .chip, .service-link, .resource-item, .article-row, .plain-list-block, .model-row, .achievement-item, .sdg-item, .footer-link, .footer-contact-line { transition: color 1.2s var(--ease), background-color 1.2s var(--ease), border-color 1.2s var(--ease), transform 1.2s var(--ease), box-shadow 1.2s var(--ease), opacity 1.2s var(--ease); }
.interactive-lift:hover { transform: translateY(-4px); }
.interactive-row:hover { transform: translateX(4px); }
.interactive-line:hover { border-color: rgba(95,127,98,.48); }
.interactive-image { border: 0; padding: 0; background: transparent; overflow: hidden; }
.interactive-image img { transition: transform 1.6s var(--ease), filter 1.2s var(--ease); }
.interactive-image:hover img { transform: scale(1.045); filter: saturate(1.05); }
.button-secondary:hover { transform: translateY(-1px); color: var(--color-primary-dark) !important; }
.button-text::after { content: ''; width: 0; height: 1px; background: currentColor; transition: width 1.2s var(--ease); }
.button-text:hover::after { width: 18px; }
.plain-button-title { border: 0; padding: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
.footer-copy { padding: 0; padding-left: 26px; border: 0; background: transparent; text-align: left; cursor: pointer; justify-content: flex-start; }

/* Footer social SVGs restored with hover identity colors */
.footer-socials { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.footer-socials a.footer-social { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: rgba(255,255,255,.68); background: rgba(255,255,255,.05); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.footer-social svg { width: 22px; height: 22px; }
.footer-social:hover { transform: translateY(-3px) rotate(-4deg) scale(1.08); background: #fff; border-color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.footer-social--facebook:hover { color: #1877f2; }
.footer-social--instagram:hover { color: #e4405f; }
.footer-social--line:hover { color: #00c300; }
.footer-social--threads:hover { color: #111; }
.footer-contact-line:hover, .footer-link:hover { color: #fff; transform: translateX(4px); }

/* Footer first column:工作室名稱與 tagline 的裝飾強化 */
.site-footer__grid > div:first-child .site-footer__title { font-size: 20px; letter-spacing: .02em; text-transform: none; font-family: var(--font-display); }
.site-footer__grid > div:first-child p { color: rgba(255,255,255,.65); font-size: 14px; line-height: 1.85; max-width: 320px; }
.site-footer__grid > div:first-child::after { content: ''; display: block; width: 40px; height: 3px; margin-top: 18px; background: linear-gradient(90deg, var(--color-primary), #d4af37); border-radius: 3px; }

/* Footer bottom 裝飾增強 */
.footer-bottom { padding: 20px 0 30px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.5); font-size: 13px; letter-spacing: .02em; position: relative; }
.footer-bottom::before { content: ''; position: absolute; top: -1px; left: 0; width: 60px; height: 2px; background: var(--color-primary); border-radius: 2px; }

/* Homepage restored impact sections */
.section-heading-with-art { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: end; }
.draw-svg { width: min(260px, 100%); color: var(--color-primary); overflow: visible; }
.draw-svg path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 420; opacity: .75; }
.draw-svg text { fill: var(--color-brown); font: 800 17px var(--font-body); letter-spacing: .08em; text-transform: uppercase; opacity: 0; transform: translateY(8px); transition: opacity 420ms var(--ease) 420ms, transform 420ms var(--ease) 420ms; }
.draw-svg.is-visible path { animation: drawLine 1600ms var(--ease) forwards; }
.draw-svg.is-visible text { opacity: 1; transform: translateY(0); }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.home-subsection { margin-top: clamp(42px, 6vw, 72px); padding-top: 34px; border-top: 1px solid var(--color-line); }
.home-subsection__intro { display: flex; justify-content: space-between; gap: 20px; align-items: end; flex-wrap: wrap; margin-bottom: 22px; }
.sdg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.sdg-card {
  background: var(--color-bg-softd);
  border-radius: 16px;
  padding: 40px 24px;
  border: 1px solid #eaeaea;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
}

.sdg-card:nth-child(1) { --sdg-color: #C5192D; }
.sdg-card:nth-child(2) { --sdg-color: #E11484; }
.sdg-card:nth-child(3) { --sdg-color: #F99D1C; }
.sdg-card:nth-child(4) { --sdg-color: #14496B; }

.sdg-svg-wrapper {
  width: 110px;
  height: 110px;
  background: #f8f9fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
  transform-origin: center center;
  transition:
    transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.5s ease;
}

.sdg-card:hover .sdg-svg-wrapper {
  transform: translateY(-10px) rotate(10deg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.sdg-icon {
  width: max-content;
  color: var(--sdg-color);
}

.sdg-icon path {
  fill: currentColor;
  stroke: transparent;
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sdg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 10px;
  margin-bottom: 12px;
  border-radius: 12px;
  color: #fff;
  background: var(--sdg-color);
  font-size: 12px;
  font-weight: 700;
}

.sdg-name {
  display: block;
  margin-bottom: 8px;
  color: var(--color-primary-dark, #1c3322);
  font-size: 18px;
  font-weight: 700;
}

.sdg-desc {
  display: block;
  color: var(--color-text-soft, #555);
  line-height: 1.6;
  font-size: 13.5px;
  margin: 0;
}

@keyframes fast-draw-slow-end-fill {
  0% {
    fill: transparent;
    stroke: currentColor;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation-timing-function: linear; /* 前 4 秒嚴格執行勻速慢畫 */
  }
  45% { 
    fill: transparent;
    stroke: currentColor;
    stroke-dashoffset: 0.85; /* 精確剩下 55% 長度，即 4 秒完成了 45% */
    animation-timing-function: linear; /* 後半段切換為快速衝刺收筆 */
  }
  100% { 
    fill: currentColor; /* 0.2秒內急速完成填色 */
    stroke: transparent;
    stroke-dashoffset: 0;
    stroke-dashoffset: 0;
  }
}

/* Test tokens: .sdg-border-svg navRingDraw sdgLineRedraw sdgFillIn */
.compact-model-list .model-row { opacity: 0; transform: translateX(-12px); }
.compact-model-list .model-row.is-visible { opacity: 1; transform: translateX(0); }
.achievement-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
.achievement-item { padding: 26px 24px; border-right: 1px solid var(--color-line); background: rgba(255,253,248,.42); opacity: 0; transform: translateY(14px); }
.achievement-item:last-child { border-right: 0; }
.achievement-item.is-visible { opacity: 1; transform: translateY(0); }
.achievement-number { display: block; color: var(--color-brown); font-family: var(--font-display); font-size: clamp(36px,4vw,56px); line-height: 1; font-weight: 800; }
.achievement-item p { margin: 8px 0 0; color: var(--color-primary-dark); font-weight: 800; }
.achievement-item strong { color: var(--color-brown); }
.achievement-item:hover { background: var(--color-card); box-shadow: var(--shadow-soft); }

/* Provider flow display */
.flow-list { display: grid; gap: 24px; counter-reset: flow; }
.flow-item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 22px; padding-bottom: 24px; border-bottom: 1px solid var(--color-line); }
.flow-step { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; align-content: center; color: var(--color-primary-dark); background: var(--color-primary-light); border: 1px solid rgba(95,127,98,.28); }
.flow-step span { color: var(--color-muted); font-size: 12px; font-weight: 900; line-height: 1; }
.flow-step strong { font-family: var(--font-display); font-size: 26px; line-height: 1; }
.provider-interview-link { margin: 6px 0 4px; }
.provider-interview-card { margin-top: 22px; }
.provider-hero__image { cursor: zoom-in; }

/* Blog behavior helpers */
.blog-list-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; scroll-margin-top: 96px; }
.blog-glory-timeline .timeline-item:first-child .timeline-time { color: var(--color-primary-dark); }

/* ===== Q&A Interview Section ===== */
.qa-section { display: grid; gap: 0; margin-top: 8px; }
.qa-section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--color-primary-dark);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.qa-section-label::before {
  content: '';
  display: inline-block;
  width: 36px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  vertical-align: middle;
}
.qa-item {
  position: relative;
  padding: 22px 24px;
  margin-bottom: 14px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}
.qa-item:hover {
  border-color: rgba(95, 127, 98, .4);
  box-shadow: 0 8px 28px rgba(47, 79, 58, .06);
}
.qa-question,
.qa-answer {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  line-height: 1.9;
}
.qa-question { margin-bottom: 14px; }
.qa-answer { padding-top: 14px; border-top: 1px dashed var(--color-line); }
.qa-badge {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
}
.qa-badge--q {
  color: #fff;
  background: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.qa-badge--a {
  color: var(--color-brown);
  background: var(--color-primary-light);
  border: 2px solid rgba(122, 90, 58, .18);
}
.qa-question-text {
  flex: 1;
  color: var(--color-primary-dark);
  font-weight: 800;
  font-size: 16.5px;
  line-height: 1.9;
}
.qa-answer-text {
  flex: 1;
  color: var(--color-text-soft);
  font-size: 15.5px;
  line-height: 2;
  white-space: pre-line;
}
/* Alternating subtle accent on left border */
.qa-item:nth-child(even) { border-left: 3px solid var(--color-primary); }
.qa-item:nth-child(odd)  { border-left: 3px solid var(--color-brown); }

/* Animated entrance for each Q&A item */
.qa-item {
  opacity: 0;
  transform: translateY(12px);
  animation: qaFadeIn 0.5s var(--ease) forwards;
  animation-delay: calc(var(--qa-index, 0) * 0.12s);
}
@keyframes qaFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .qa-item { padding: 16px 14px; }
  .qa-badge { width: 30px; height: 30px; font-size: 13px; }
  .qa-question-text { font-size: 15px; }
  .qa-answer-text { font-size: 14px; }
  .qa-question, .qa-answer { gap: 10px; }
}

/* Lightbox fixes: above QA/blog modal, centered controls */
.lightbox { z-index: 6500; padding: clamp(54px, 7vw, 84px) clamp(18px, 7vw, 92px); background: rgba(29, 45, 34, 0); backdrop-filter: blur(0px); opacity: 0; pointer-events: none; transition: opacity 300ms var(--ease), background-color 300ms var(--ease), backdrop-filter 300ms var(--ease); }
.lightbox.open { opacity: 1; pointer-events: auto; background: rgba(29, 45, 34, .78); backdrop-filter: blur(6px); }
.lightbox > img { position: relative; z-index: 1; max-width: min(100%, 1180px); max-height: calc(100vh - 170px); border-radius: var(--radius); object-fit: contain; background: #fff; box-shadow: 0 22px 80px rgba(0,0,0,.28); transform: scale(0.95); transition: transform 300ms var(--ease); }
.lightbox.open > img { transform: scale(1); }
.lightbox .nav { position: absolute; top: 50%; left: clamp(14px, 3vw, 42px); right: clamp(14px, 3vw, 42px); z-index: 2; display: flex; align-items: center; justify-content: space-between; pointer-events: none; padding: 0; transform: translateY(-50%); }
.lightbox .nav-btn { pointer-events: auto; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; background: rgba(255,253,248,.94); color: var(--color-primary-dark); font-size: 34px; line-height: 1; box-shadow: var(--shadow-soft); transition: transform 180ms var(--ease), background-color 180ms var(--ease); }
.lightbox .nav-btn:hover { transform: scale(1.08); background: #fff; }
.lightbox .close-btn { position: absolute; top: 18px; right: 18px; z-index: 3; display: grid; place-items: center; }
.lightbox .thumbs { z-index: 2; bottom: 18px; }
.blog-lightbox-modal { z-index: 6000; }
.blog-lightbox-panel { box-shadow: 0 24px 90px rgba(29,45,34,.24); }

@media (max-width: 980px) {
  .section-heading-with-art { grid-template-columns: 1fr; }
  .draw-svg { max-width: 220px; }
  .sdg-lineup, .achievement-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sdg-item:nth-child(2n), .achievement-item:nth-child(2n) { border-right: 0; }
  .sdg-item { border-bottom: 1px solid var(--color-line); padding: 28px 20px; }
  .sdg-item:nth-child(3), .sdg-item:nth-child(4) { border-bottom: 0; }
  .sdgs-path-svg { display: none; }
}
@media (max-width: 720px) {
  .sdg-lineup, .achievement-strip, .flow-item { grid-template-columns: 1fr; }
  .sdg-item, .achievement-item { border-right: 0; }
  .sdg-item { border-bottom: 1px solid var(--color-line); }
  .sdg-item:last-child { border-bottom: 0; }
  .flow-step { width: auto; height: auto; border-radius: var(--radius-pill); display: inline-flex; gap: 8px; padding: 10px 14px; justify-self: start; }
  .lightbox { padding: 58px 12px 86px; }
  .lightbox > img { max-height: calc(100vh - 160px); }
  .lightbox .nav { left: 10px; right: 10px; }
  .lightbox .nav-btn { width: 42px; height: 42px; font-size: 30px; }
}


/* Final interaction timing pass: every user-facing operation uses a visible 0.5s transition. */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: auto auto 6vh -70px;
  width: 250px;
  height: 250px;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg width='250' height='250' viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%235f7f62' stroke-width='2' stroke-linecap='round' opacity='.55'%3E%3Cpath d='M36 158c42-62 94-86 157-70'/%3E%3Cpath d='M52 184c34-32 69-43 105-34'/%3E%3Cpath d='M58 118c22-20 45-27 70-21'/%3E%3Ccircle cx='181' cy='84' r='18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
body::after {
  inset: 18vh -90px auto auto;
  transform: rotate(18deg);
  opacity: .16;
}
.section { padding-block: calc(var(--space-section) - 5px); }
.content-band { padding: calc(clamp(34px,5vw,58px) - 5px) 0; }
.resource-layout, .provider-layout, .blog-layout { gap: calc(clamp(28px,4vw,54px) - 5px); }
.service-links, .resource-grid, .three-column-list, .timeline-media-grid, .case-gallery, .sdg-lineup, .achievement-strip { gap: max(0px, calc(26px - 5px)); }
.nav-link,
.nav-link::before,
.nav-link::after,
.nav-cta,
.button-primary,
.button-secondary,
.button-text,
.button-text::after,
.chip,
.service-link,
.resource-item,
.article-row,
.plain-list-block,
.model-row,
.achievement-item,
.sdg-item,
.footer-link,
.footer-contact-line,
.footer-social,
.footer-social svg,
.image-frame img,
.interactive-image img,
.home-hero__dots button,
.home-hero__media img,
.lightbox .nav-btn,
.lightbox .close-btn,
.filter-toggle,
input,
select,
textarea,
button,
a {
  transition-duration: var(--motion-interaction) !important;
  transition-timing-function: var(--ease) !important;
}
.nav-link::before,
.nav-link::after {
  transition-property: width, height, opacity, border-color, transform !important;
}
.nav-link::before,
.nav-link::after {
  width: 0;
  height: 0;
  transform: none;
}

/* Hamburger & mobile menu transitions: override global slow timing for snappy interaction */
.hamburger-line,
.mobile-menu,
.mobile-menu__inner,
.nav-menu-button,
#resource-filter-body,
.filter-toggle [aria-hidden] {
  transition-duration: 0.4s !important;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.hamburger-line { transition-property: transform, opacity, background !important; }
.mobile-menu { transition-property: grid-template-rows, opacity, transform !important; }
.mobile-menu__inner { transition-property: padding !important; }
#resource-filter-body { transition-property: grid-template-rows, opacity !important; }
.filter-toggle [aria-hidden] { transition-property: transform, background-color !important; }

.draw-svg path { animation-duration: 1.5s; }

/* Scroll animation for service items */
.service-detail--scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.service-detail--scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Background art visibility and SDG icon polish */
body { position: relative; overflow-x: hidden; }
body::before, body::after { z-index: 0; }
body > * { position: relative; z-index: 1; }

/* Service detail image frames as circles */
.service-detail .image-frame {
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  border: 6px solid #b3c5a6 !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12) !important;
  width: 100% !important;
  max-width: 320px !important;
  margin: 0 auto !important;
  display: block !important;
}

/* Gallery Carousel / Autoplay Marquee ticker styling */
.gallery-carousel-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 24px 0;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.gallery-carousel-track {
  display: flex;
  gap: 24px;
  width: max-content;
  will-change: transform;
  animation: gallery-marquee 25s linear infinite !important;
}

.gallery-carousel-wrapper:hover .gallery-carousel-track {
  animation-play-state: paused !important;
}

.gallery-carousel-item {
  width: 340px;
  height: 255px;
  flex-shrink: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: none !important;
  box-shadow: none !important;
  transition: transform 300ms var(--ease);
  /* Extremely soft rectangular feathered edges fading to transparent */
  mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%),
              linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%) !important;
  mask-composite: intersect !important;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 80%, transparent 100%),
                      linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%) !important;
  -webkit-webkit-mask-composite: source-in !important;
  -webkit-mask-composite: source-in !important;
}

.gallery-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.gallery-carousel-item:hover img {
  transform: scale(1.06);
}

@keyframes gallery-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Vertical timeline for Glory Moments */
.glory-vertical-timeline {
  position: relative;
  padding-left: 40px;
  margin-top: 24px;
}

.glory-vertical-timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: linear-gradient(180deg, #d4af37, #f3e5ab, #aa7c11);
  border-radius: var(--radius-pill);
}

.glory-timeline-item {
  position: relative;
  margin-bottom: 28px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.glory-timeline-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

.glory-timeline-badge-wrapper {
  position: absolute;
  left: -40px;
  top: 4px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.glory-timeline-badge {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #aa7c11, #d4af37, #f3e5ab);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
  border: 2px solid var(--color-card);
  transition: all 0.3s var(--ease);
}

.glory-timeline-content {
  position: relative;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s var(--ease);
  overflow: hidden;
}

.glory-timeline-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #d4af37, #aa7c11);
}

.glory-timeline-time {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #aa7c11;
  background: linear-gradient(135deg, #aa7c11, #d4af37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.glory-timeline-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}

.glory-timeline-detail {
  color: var(--color-text-soft);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* Hover effects */
.glory-timeline-item:hover .glory-timeline-content {
  transform: translateY(-3px);
  border-color: #d4af37;
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.15), var(--shadow-hover);
}

.glory-timeline-item:hover .glory-timeline-badge {
  transform: scale(1.3);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.9);
}

@media (max-width: 720px) {
  .glory-vertical-timeline {
    padding-left: 28px;
  }
  .glory-vertical-timeline::before {
    left: 10px;
  }
  .glory-timeline-badge-wrapper {
    left: -28px;
    width: 24px;
    height: 24px;
  }
  .glory-timeline-badge {
    width: 12px;
    height: 12px;
  }
}

/* Custom Dropdown/Select Styling with elegant scaleY extension animation */
.custom-select {
  position: relative;
  width: 100%;
}
.custom-select-trigger {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: 13px 15px;
  color: var(--color-text);
  background: var(--color-card);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: border-color var(--motion-interaction) var(--ease), box-shadow var(--motion-interaction) var(--ease);
}
.custom-select-trigger:hover {
  border-color: rgba(95,127,98,.48);
}
.custom-select.active .custom-select-trigger {
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
}
.custom-select-trigger .arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 10px;
  opacity: 0.7;
}
.custom-select.active .custom-select-trigger .arrow {
  transform: translateY(2px) rotate(-135deg);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: 14px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scaleY(0.9);
  transform-origin: top center;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 250px;
  overflow-y: auto;
  padding: 6px;
}
.custom-select.active .custom-select-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scaleY(1);
}
.custom-select-option {
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
  color: var(--color-text);
  font-size: 14px;
}
.custom-select-option:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary-dark);
}
.custom-select-option.selected {
  background-color: var(--color-primary);
  color: #fff;
}
.custom-select-option.selected:hover {
  background-color: var(--color-primary-dark);
  color: #fff;
}

/* Stacking contexts layers to fix sticky behavior and z-index overlap issues */
#nav-placeholder {
  position: sticky !important;
  top: 0 !important;
  z-index: 500 !important;
}
.site-header {
  position: relative !important;
  top: auto !important;
  z-index: 500 !important;
}
main, #blog-root {
  position: relative !important;
}
#footer-placeholder {
  position: relative !important;
  z-index: 100 !important; /* Below main dropdown content */
}

@media (max-width: 980px) {
  /* Blog layout mobile adaptations */
  .blog-layout {
    display: flex;
    flex-direction: column;
  }
  .blog-layout .side-panel {
    position: sticky !important;
    top: 6rem !important; /* sticky header height */
    z-index: 490 !important;
    background: rgba(255, 253, 248, 0.98) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-line);
    border-left: none;
    border-right: none;
    border-top: none;
    border-radius: 0;
    padding: 12px 24px;
    margin: 0 -24px 20px -24px;
    width: calc(100% + 48px);
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }
  .blog-layout .side-panel h2 {
    display: none;
  }
  .blog-layout .side-panel .chip-list {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
  }
  .blog-layout .side-panel .chip-list::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
  }
  .blog-latest-posts {
    display: none !important;
  }

  /* Explore layout mobile adaptations */
  .resource-layout {
    display: flex;
    flex-direction: column;
  }
  .resource-layout .side-panel.resource-filters {
    position: sticky !important;
    top: 6rem !important; /* sticky header height */
    z-index: 490 !important;
    background: rgba(255, 253, 248, 0.98) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-line);
    border-left: none;
    border-right: none;
    border-top: none;
    border-radius: 0;
    padding: 12px 24px;
    margin: 0 -24px 20px -24px;
    width: calc(100% + 48px);
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }
  .resource-filters .filter-toggle {
    margin-bottom: 0;
    width: 100%;
  }
  .resource-filters #resource-filter-body {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 253, 248, 0.98) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-line);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 0 24px;
    max-height: 0;
    overflow-y: auto;
    z-index: 490 !important;
    display: block !important;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s var(--ease), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .resource-filters #resource-filter-body > .field-stack {
    overflow: hidden;
    min-height: 0;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .resource-filters:not(.collapsed) #resource-filter-body {
    max-height: 50vh;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  .resource-filters:not(.collapsed) #resource-filter-body > .field-stack {
    overflow: visible !important;
  }
}

/* Adjust margins on extra small screens */
@media (max-width: 760px) {
  .blog-layout .side-panel,
  .resource-layout .side-panel.resource-filters {
    margin-left: -16px;
    margin-right: -16px;
    width: calc(100% + 32px);
    padding: 12px 16px;
  }
  .resource-filters #resource-filter-body {
    padding: 0 16px;
  }
  .resource-filters #resource-filter-body > .field-stack {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

/* Adjust header top position at header break-point */
@media (max-width: 720px) {
  .blog-layout .side-panel,
  .resource-layout .side-panel.resource-filters {
    top: 6rem !important;
  }
}

/* Desktop overflow corrections for custom selects */
@media (min-width: 981px) {
  #resource-filter-body,
  #resource-filter-body > .field-stack {
    overflow: visible !important;
  }
}

/* Explore Map Responsiveness */
@media (max-width: 980px) {
  .explore-map-container {
    display: none !important;
  }
}


