/* Shared Single template. Typography, colors and section padding remain Elementor controls. */
/* Keep the previously shipped faces available for explicitly chosen fonts. */
@font-face { font-family:Newsreader; src:url('../fonts/newsreader-variable.ttf') format('truetype'); font-weight:200 800; font-style:normal; font-display:swap; }
@font-face { font-family:'Noto Sans TC'; src:url('../fonts/noto-sans-tc-variable.ttf') format('truetype'); font-weight:100 900; font-style:normal; font-display:swap; }
.ude-case-root {
 --ude-case-paper:#eeebe5;
 --ude-case-font-en:Georgia,'Source Han Sans TW','思源黑體 TW','Source Han Sans TC','思源黑體 TC',SimHei,'黑体',serif;
 --ude-case-font-zh:'Source Han Sans TW','思源黑體 TW','Source Han Sans TC','思源黑體 TC',SimHei,'黑体',sans-serif;
 color:var(--ude-case-paper);
 font-family:var(--ude-case-font-en);
}
/* Defaults have lower specificity than Elementor's saved per-element fonts. */
:where(.ude-case-root) .ude-case-font-en,
:where(.ude-case-root) .ude-case-font-mixed { font-family:var(--ude-case-font-en); }
:where(.ude-case-root) .ude-case-font-zh { font-family:var(--ude-case-font-zh); }
.ude-case-root .ude-case-font-en .elementor-heading-title,
.ude-case-root .ude-case-font-en .elementor-button,
.ude-case-root .ude-case-font-mixed .elementor-heading-title,
.ude-case-root .ude-case-font-mixed .elementor-button,
:where(.ude-case-root) .ude-case-font-en.elementor-widget-text-editor,
:where(.ude-case-root) .ude-case-font-mixed.elementor-widget-text-editor,
:where(.ude-case-root) .ude-case-font-mixed.elementor-widget-theme-post-content { font-family:var(--ude-case-font-en); }
.ude-case-root .ude-case-font-zh .elementor-heading-title,
.ude-case-root .ude-case-font-zh .elementor-button,
:where(.ude-case-root) .ude-case-font-zh.elementor-widget-text-editor { font-family:var(--ude-case-font-zh); }
.ude-case-root .elementor-widget-heading .elementor-heading-title { color:inherit; }
.ude-case-root .elementor-widget-text-editor p:last-child { margin-bottom:0; }
/* Native Elementor controls own hero height and responsive title size. */
.ude-case-root .ude-case-title-block,
.ude-case-root .ude-case-philosophy { min-width:0; }
.ude-case-root .ude-case-title .elementor-heading-title { max-width:100%; overflow-wrap:anywhere; }
.ude-case-root .ude-case-title .elementor-heading-title:has(> .ude-case-title-word) {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.ude-case-root .ude-case-title .ude-case-title-word {
  display: inline-block;
  white-space: nowrap;
}
.ude-case-root .ude-case-title .elementor-heading-title[data-ude-case-title-fitted] {
  font-size: var(--ude-case-fitted-title-size) !important;
}
.ude-case-root .ude-case-hero-motto { position:absolute; top:60px; left:30%; width:40%; z-index:2; }
body:has(.ude-case-root) > footer.site-footer { display:none; }
.ude-case-root .ude-case-philosophy-text { white-space:normal; }
.ude-case-root .ude-case-philosophy-text p { margin:0; }
.ude-case-root .ude-case-meta-label { opacity:.55; }
.ude-case-root .ude-case-plan img { display:block; width:100%; height:auto; }
.ude-case-root .ude-case-return .elementor-button { padding:14px 22px; background:transparent; border:0; }
.ude-case-root .ude-case-return a:focus-visible { outline:1px solid currentColor; outline-offset:4px; }
.ude-case-root .ude-case-return .elementor-button-content-wrapper { flex-direction:column; gap:4px; }
/* JS evaluates current rendered values, including whitespace and lazy sources.
   Only plugin-owned classes change; saved Elementor visibility stays intact. */
.ude-case-root .ude-case-is-empty { display:none !important; }
.ude-case-root .ude-case-plans .ude-case-plan-single.elementor-element { width:100%; flex-basis:100%; }
.ude-case-gallery { --ude-case-gallery-columns:2; display:grid; grid-template-columns:repeat(var(--ude-case-gallery-columns),minmax(0,1fr)); align-items:start; gap:var(--ude-case-row-gap,42px) var(--ude-case-column-gap,32px); width:100%; }
/* Retain a readable fallback for cached markup from the previous column renderer. */
.ude-case-gallery__col { display:flex; flex:1 1 0; min-width:0; flex-direction:column; gap:var(--ude-case-row-gap,42px); }
.ude-case-gallery__photo { margin:0; min-width:0; order:var(--ude-order); }
.ude-case-gallery__photo a { display:block; }
.ude-case-gallery__photo a:focus-visible { outline:2px solid #eeebe5; outline-offset:6px; }
.ude-case-gallery__photo img { display:block; width:100%; height:auto; border-radius:0; }
@media (prefers-reduced-motion: no-preference) {
 .ude-case-gallery__photo > a,
 .ude-case-gallery__photo:not(:has(> a)) { overflow:clip; }
 .ude-case-gallery__photo img { transition:scale 320ms ease; }
 .ude-case-gallery__photo > a:focus-visible img { scale:1.04; }
}
@media (prefers-reduced-motion: no-preference) and (hover:hover) and (pointer:fine) {
 .ude-case-gallery__photo:hover img { scale:1.04; }
}
.ude-case-gallery-empty { padding:32px; border:1px dashed #aaa; color:inherit; }
/* Position only after a successful measurement. Images and the native DOM order
   remain intact; the entrance animation continues to own image transforms. */
@media(max-width:767px) {
 .ude-case-root .ude-case-hero-motto { display:none; }
 .ude-case-gallery { --ude-case-gallery-columns:1; display:flex; flex-direction:column; gap:var(--ude-case-row-gap,24px); }
 .ude-case-gallery[data-responsive-layout="custom"] { display:grid; grid-template-columns:repeat(var(--ude-case-gallery-columns),minmax(0,1fr)); }
 .ude-case-gallery__col { display:contents; }
 .ude-case-gallery__photo { width:100%; }
}
@media(min-width:768px) {
 .ude-case-gallery[data-ude-masonry-ready="true"] { display:block; position:relative; height:var(--ude-gallery-height); }
 .ude-case-gallery[data-ude-masonry-ready="true"]>.ude-case-gallery__photo { position:absolute; left:var(--ude-photo-x); top:var(--ude-photo-y); width:var(--ude-photo-width); }
}
.ude-case-gallery[data-responsive-layout="custom"][data-ude-masonry-ready="true"] { display:block; position:relative; height:var(--ude-gallery-height); }
.ude-case-gallery[data-responsive-layout="custom"][data-ude-masonry-ready="true"]>.ude-case-gallery__photo { position:absolute; left:var(--ude-photo-x); top:var(--ude-photo-y); width:var(--ude-photo-width); }
/* Match the original comparison HTML until native widget controls are configured. */
.ude-case-comparisons { display:block; }
.ude-comparison__images { display:flex; flex-wrap:wrap; gap:20px; }
.ude-comparison__photo { flex:1 1 280px; margin:0; min-width:0; }
.ude-comparison__photo img { width:100%; height:auto; }
.ude-comparison__photo a { display:block; }
.ude-comparison__caption { color:#F2EEE8; margin-top:8px; line-height:1.5; }
.elementor-widget-ude-portfolio-comparison-gallery:has(.ude-comparisons-empty) { display:none; }

/* Optional current-list project navigation; native widget controls own its styling. */
.ude-project-navigation { --ude-project-navigation-arrow-size:24px; display:grid; grid-template-columns:var(--ude-project-navigation-columns,max-content minmax(0,1fr)); gap:var(--ude-project-navigation-row-gap,12px) var(--ude-project-navigation-column-gap,40px); margin-top:var(--ude-project-navigation-top-gap,121px); padding-bottom:var(--ude-project-navigation-bottom-gap,0px); min-width:0; width:100%; color:var(--ude-case-paper,#eeebe5); }
.ude-project-navigation .ude-project-navigation__row { display:grid; grid-column:1 / -1; grid-template-columns:var(--ude-project-navigation-columns,max-content minmax(0,1fr)); align-items:baseline; gap:var(--ude-project-navigation-column-gap,40px); min-width:0; width:100%; color:inherit; text-decoration:none; border:0; box-shadow:none; transition:opacity 250ms ease; }
@supports(grid-template-columns:subgrid) { .ude-project-navigation .ude-project-navigation__row { grid-template-columns:subgrid; } }
.ude-project-navigation__row:is(:hover,:focus-visible) { opacity:.7; }
.ude-project-navigation__row:focus-visible { outline:1px solid currentColor; outline-offset:7px; }
.ude-project-navigation__label {
  position:relative;
  justify-self:stretch;
  min-width:0;
  padding-inline-end:calc(var(--ude-project-navigation-arrow-size) + var(--ude-project-navigation-column-gap,40px));
  font-family:inherit;
  font-size:34px;
  font-weight:400;
  line-height:1.28;
  overflow-wrap:anywhere;
}
.ude-project-navigation__label::after {
  --ude-project-navigation-arrow-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20108%20108%22%3E%3Cg%20transform%3D%22matrix%281%2C0%2C0%2C1%2C-918.009986%2C-684.241405%29%22%3E%3Cg%20transform%3D%22matrix%280.707107%2C-0.707107%2C0.707107%2C0.707107%2C-10.157869%2C645.460831%29%22%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M631.241%2C692.127L631.241%2C834.039L626.543%2C834.039L626.543%2C692.127L612.564%2C706.105L609.543%2C703.084L628.892%2C683.736L648.24%2C703.084L645.219%2C706.105L631.241%2C692.127Z%22%2F%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  content:"";
  position:absolute;
  inset-inline-end:0;
  inset-block-start:50%;
  width:var(--ude-project-navigation-arrow-size);
  height:var(--ude-project-navigation-arrow-size);
  background-color:currentColor;
  -webkit-mask:var(--ude-project-navigation-arrow-mask) center / contain no-repeat;
  mask:var(--ude-project-navigation-arrow-mask) center / contain no-repeat;
  transform:translateY(-50%);
  pointer-events:none;
}
.ude-project-navigation__row[rel="next"] .ude-project-navigation__label::after { transform:translateY(-50%) rotate(180deg); }
.ude-project-navigation__title { display:flex; flex-wrap:wrap; justify-content:flex-start; align-items:baseline; gap:var(--ude-project-navigation-title-gap,8px); min-width:0; color:#b3ada5; text-align:left; font-size:18px; font-weight:400; line-height:1.5; }
.ude-project-navigation__english,.ude-project-navigation__chinese { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.ude-project-navigation__chinese { font-family:var(--ude-case-font-zh,inherit); }
@media(max-width:767px) {
 .ude-project-navigation { --ude-project-navigation-arrow-size:20px; --ude-project-navigation-columns:minmax(0,1fr); --ude-project-navigation-top-gap:64px; --ude-project-navigation-row-gap:16px; --ude-project-navigation-column-gap:12px; }
 .ude-project-navigation__label { font-size:25px; }
 .ude-project-navigation__title { font-size:16px; }
}
