/* PutiOrg static theme (base layer).
   NOTE: structure re-implemented for the static site; the Divi child theme rules live in puti.css (mapped from the live main.css).
   Brand colours taken from the live child-theme stylesheet: navy #021089, deep navy #021860, gold #c99c21, pale blue #e7f3fe. */
:root { --navy: #021089; --navy-deep: #021860; --gold: #c99c21; --pale: #e7f3fe; --text: #333; --max: 1200px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.8 Roboto, "Microsoft JhengHei", "微軟正黑體", "PingFang TC", "Noto Sans TC", Arial, sans-serif; color: var(--text); background: #fff; }
img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
a { color: var(--navy); }
a:hover { color: #1938cb; }
.container { width: 90%; max-width: var(--max); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* header */
.site-header { background: #fff; box-shadow: 0 1px 8px rgba(0, 0, 0, .12); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 80px; }
.logo img { display: block; height: 58px; width: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 10px 14px; text-decoration: none; color: var(--navy); font-weight: 500; }
.primary-nav a:hover, .primary-nav a:focus { color: var(--gold); }
.sub-menu { display: none !important; position: absolute; top: 100%; left: 0; min-width: 180px; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); flex-direction: column; align-items: stretch !important; border-top: 3px solid var(--gold); }
.has-children:hover > .sub-menu, .has-children:focus-within > .sub-menu { display: flex !important; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--navy); margin: 5px 0; }
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: 0 6px 10px rgba(0, 0, 0, .15); max-height: 80vh; overflow: auto; }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; }
  .sub-menu { display: block !important; position: static; box-shadow: none; border: 0; padding-left: 16px; }
}

/* content */
main { min-height: 50vh; }
.entry-title { color: var(--navy); line-height: 1.4; margin: 1.2em 0 .4em; font-size: 2rem; }
.entry-meta, .card-meta { color: #777; font-size: .9rem; margin: 0 0 1.5em; }
.entry-content { padding-bottom: 2.5rem; }
.post-article .entry-content, .page-article:not(.builder-page) .entry-content { max-width: 860px; }
.entry-content img { height: auto; }
.entry-content figure { margin: 1em 0; }
.entry-content .aligncenter, .entry-content figure.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content .alignright { text-align: right; }
.entry-content .text-right { text-align: right; }
.entry-tags .tag { margin-right: .6em; font-size: .9rem; }
.wp-block-image img, .wp-block-gallery img { max-width: 100%; }
.wp-block-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.wp-block-button__link, .eb-button { display: inline-block; padding: .55em 1.6em; border: 2px solid var(--navy); border-radius: 2rem; color: var(--navy); text-decoration: none; font-weight: 600; }
.wp-block-button__link:hover, .eb-button:hover { background: var(--navy); color: #fff; }

/* Divi-derived layout primitives */
.eb-section { padding: 3rem 0; background-size: cover; background-repeat: no-repeat; }
.eb-section-inner { width: 90%; max-width: var(--max); margin: 0 auto; }
.eb-row { display: flex; flex-wrap: wrap; gap: 0 3%; margin: 0 auto; }
.eb-col { flex: 0 0 100%; max-width: 100%; }
.eb-col-1-2 { flex-basis: 48.5%; max-width: 48.5%; }
.eb-col-1-3 { flex-basis: 31.3%; max-width: 31.3%; }
.eb-col-2-3 { flex-basis: 65.6%; max-width: 65.6%; }
.eb-col-1-4 { flex-basis: 22.75%; max-width: 22.75%; }
.eb-col-3-4 { flex-basis: 74.25%; max-width: 74.25%; }
.eb-col-2-5 { flex-basis: 37.8%; max-width: 37.8%; }
.eb-col-3-5 { flex-basis: 59.2%; max-width: 59.2%; }
.eb-col-1-5 { flex-basis: 17.6%; max-width: 17.6%; }
.eb-col-1-6 { flex-basis: 14%; max-width: 14%; }
.eb-col-5-6 { flex-basis: 83%; max-width: 83%; }
@media (max-width: 980px) { .eb-col[class*="eb-col-"] { flex-basis: 100%; max-width: 100%; } }
@media (max-width: 767px) { .eb-hide-phone { display: none !important; } }
@media (min-width: 981px) { .eb-hide-desktop { display: none !important; } }
.eb-text .section-title, h2.section-title { text-align: center; }
.et_pb_text_align_center { text-align: center; }
.eb-image img { display: block; margin: 0 auto; }
.eb-button-wrap { margin: 1rem 0; }
.eb-divider { border: 0; border-top: 4px solid var(--gold); width: 7em; margin: 1rem auto 2rem; }
.title-banner { background-position: center top; min-height: 400px; display: flex; align-items: center; }
.title-banner .eb-section-inner { width: 100%; }
.banner-title { color: var(--navy); text-align: center; font-size: 2.4rem; }
.eb-toggle { border: 1px solid #ddd; border-radius: 6px; margin: .6rem 0; background: #fff; }
.eb-toggle summary { cursor: pointer; padding: .7rem 1rem; font-weight: 600; color: var(--navy); }
.eb-toggle-body { padding: 0 1rem 1rem; }
.eb-embed { position: relative; padding-bottom: 56.25%; height: 0; margin: 1rem 0; background: #000; }
.eb-embed iframe, .eb-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.eb-map { padding-bottom: 50%; }
.eb-code iframe { max-width: 100%; border: 0; }
.eb-blurb img { max-width: 100%; }
.eb-counter-number { font-size: 2rem; font-weight: 700; color: var(--navy); }

/* cards, archives, slider */
.card-grid, .card-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; margin: 1.5rem 0; }
.card { background: #fff; border: 1px solid #e6e6e6; border-radius: 8px; overflow: hidden; }
.card-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.card h3 { font-size: 1.05rem; line-height: 1.5; margin: .8rem 1rem .3rem; }
.card h3 a { text-decoration: none; }
.card .card-meta { margin: 0 1rem 1rem; }
.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 2rem 0 3rem; }
.pagination a, .pagination span { min-width: 38px; text-align: center; padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; text-decoration: none; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination .dots { border: 0; }
.eb-slider-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.eb-slider-track > * { flex: 0 0 calc((100% - 32px) / var(--items, 1)); scroll-snap-align: start; margin: 0; }
.eb-slider-track img { width: 100%; display: block; }

/* footer */
.site-footer { background: var(--navy-deep); color: #fff; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

.cookie-notice { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 2px solid var(--navy); padding: 10px 5%; display: flex; gap: 16px; align-items: center; justify-content: center; z-index: 200; font-size: .9rem; }
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; line-height: 1.5; }
.cookie-notice button { background: var(--navy); color: #fff; border: 0; padding: 6px 18px; border-radius: 4px; cursor: pointer; }
.not-found { text-align: center; padding: 5rem 0; }

/* footer extras */
.site-footer .eb-section-inner { padding-bottom: 1rem; }
.entry-content .eb-image img[src*="circle"], .eb-text img.aligncenter { max-width: 100%; }

/* Video slider (Divi video slider): active player plus a thumbnail per video */
.eb-video-slider { margin: 1rem 0; }
.eb-video-slide[hidden] { display: none; }
.eb-video-slider-strip { position: relative; margin-top: 16px; }
.eb-video-slider-thumbs { display: flex; flex-wrap: nowrap; gap: 2%; overflow: hidden; margin: 0; --eb-thumbs: 4; }
.eb-video-slider-thumbs button { flex: 0 0 calc((100% - 2% * (var(--eb-thumbs) - 1)) / var(--eb-thumbs)); aspect-ratio: 190 / 142; padding: 0; border: 0; background: rgba(0, 0, 0, .25); cursor: pointer; overflow: hidden; opacity: .6; transition: opacity .2s; }
.eb-video-slider-thumbs button[aria-selected="true"], .eb-video-slider-thumbs button:hover { opacity: 1; }
.eb-video-slider-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.eb-video-slider-arrow { position: absolute; top: 50%; width: 48px; height: 48px; margin-top: -24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; font: 700 24px/48px Arial, sans-serif; text-align: center; cursor: pointer; opacity: 0; transition: opacity .2s; padding: 0; }
.eb-video-slider-prev { left: -24px; }
.eb-video-slider-next { right: -24px; }
.eb-video-slider-strip:hover .eb-video-slider-arrow, .eb-video-slider-arrow:focus-visible { opacity: 1; }
@media (max-width: 980px) { .eb-video-slider-arrow { opacity: .9; width: 36px; height: 36px; margin-top: -18px; font-size: 20px; line-height: 36px; } .eb-video-slider-prev { left: 0; } .eb-video-slider-next { right: 0; } }
@media (max-width: 767px) { .eb-video-slider-thumbs { --eb-thumbs: 3; } }

/* Section/row background video (mp4), muted and looping behind the content */
.eb-has-bg-video { position: relative; overflow: hidden; }
.eb-bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; pointer-events: none; }
.eb-has-bg-video > *:not(.eb-bg-video) { position: relative; z-index: 1; }
