/* ══════════════════════════════════════════════════════════════════
   Berkeley Professional Education — website pages (home, programs,
   insights, custom solutions, article).
   Ported 1:1 from ui_kits/website: component inline styles live in the
   markup (as in the JSX); this file carries the JS-driven hover states
   (identical values/durations), the marquee keyframes, and the
   responsive rules from the kit's index.html + useIsMobile switches.
   Load AFTER assets/css/tokens.css.
   ══════════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; }
body { margin: 0; background: var(--bpe-white); font-family: var(--font-sans); color: var(--bpe-ink); }
h1, h2, h3, p { text-wrap: pretty; }
img { max-width: 100%; }

/* ═══════ Button (components/core/Button.jsx — hover/press states) ═══════ */
.wk-btn { transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard), background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard); }
.wk-btn:hover { transform: translateY(var(--lift-hover)); box-shadow: var(--shadow-card); }
.wk-btn:active { transform: scale(var(--press-scale)); }
.wk-btn-primary:hover { background: var(--bpe-berkeley-blue) !important; color: var(--bpe-white) !important; border-color: var(--bpe-berkeley-blue) !important; }
.wk-btn-gold:hover { background: var(--bpe-gold-bright) !important; color: var(--bpe-blue-dark) !important; border-color: var(--bpe-gold-bright) !important; }
.wk-btn-outline:hover { background: var(--bpe-blue-dark) !important; color: var(--bpe-white) !important; border-color: var(--bpe-blue-dark) !important; }
.wk-btn-outline-inverse:hover { background: var(--bpe-white) !important; color: var(--bpe-blue-dark) !important; border-color: var(--bpe-white) !important; }

/* ═══════ Pill button with circular arrow badge (Vireo-style, app.jsx) ═══════ */
.wk-pill { transition: background var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard); cursor: pointer; }
.wk-pill .wk-pill-badge { transition: background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard); }
/* hero variant: transparent/white → white fill, badge gold → navy */
.wk-pill-hero:hover { background: #fff !important; border-color: #fff !important; color: var(--bpe-blue-dark) !important; }
.wk-pill-hero:hover .wk-pill-badge { background: var(--bpe-blue-dark) !important; color: #fff !important; }
/* light variant: transparent/border → navy fill, badge navy → gold */
.wk-pill-light:hover { background: var(--bpe-blue-dark) !important; border-color: var(--bpe-blue-dark) !important; color: #fff !important; }
.wk-pill-light:hover .wk-pill-badge { background: var(--bpe-gold) !important; color: var(--bpe-blue-dark) !important; }

/* ═══════ Shared container width ═══════
   One content grid for the whole site: sections span
   var(--max-content) INCLUDING the 50px page gutters, so the content
   edge is identical everywhere (1340px on the 1440px canvas). */
:root { --content-inner: calc(var(--max-content) - 2 * var(--gutter-page)); }

/* ═══════ Header (components/navigation/Header.jsx) ═══════ */
.wk-header { padding: 20px 50px; }
.wk-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; max-width: var(--content-inner); margin: 0 auto; }
.wk-header .wk-logo { height: 36px; display: block; }
.wk-header-inner nav { display: flex; align-items: center; gap: 40px; }
.wk-header nav a.wk-navlink { font-family: var(--font-sans); font-weight: var(--fw-medium); font-size: 18px; text-decoration: none; white-space: nowrap; cursor: pointer; }
.wk-header-dark { background: color-mix(in srgb, var(--bpe-blue-dark) 78%, transparent); backdrop-filter: saturate(1.1) blur(2px); -webkit-backdrop-filter: saturate(1.1) blur(2px); border-bottom: 1px solid rgba(255,255,255,0.12); }
.wk-header-dark nav a.wk-navlink { color: var(--bpe-white); }
.wk-header-light { background: var(--bpe-white); border-bottom: 1px solid var(--bpe-border); }
.wk-header-light nav a.wk-navlink { color: var(--bpe-blue-dark); }

/* Hamburger toggle + mobile menu — hidden on desktop, shown ≤760px.
   The panel drops as an absolute overlay below the header; the burger
   and X swap on the button's aria-expanded state. */
.wk-nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0; padding: 0; background: transparent; border: none; border-radius: var(--radius-sm, 2px); cursor: pointer; }
.wk-header-dark .wk-nav-toggle { color: var(--bpe-white); }
.wk-header-light .wk-nav-toggle { color: var(--bpe-blue-dark); }
.wk-nav-toggle .wk-ic-close { display: none; }
.wk-nav-toggle[aria-expanded="true"] .wk-ic-burger { display: none; }
.wk-nav-toggle[aria-expanded="true"] .wk-ic-close { display: block; }
.wk-mobile-menu { display: none; }
@media (max-width: 760px) {
  /* z-index lifts the header's whole stacking context (created by its
     backdrop-filter) above later hero/page content, so the open menu
     panel is never painted under it. */
  .wk-header { padding: 14px 20px; position: relative; z-index: 80; }
  .wk-header-inner { gap: 16px; }
  .wk-header .wk-logo { height: 30px; }
  .wk-header-inner nav { display: none; }
  .wk-nav-toggle { display: flex; }
  .wk-mobile-menu { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; z-index: 60; padding: 6px 20px 20px; box-sizing: border-box; box-shadow: 0 18px 40px rgba(1,1,51,0.24); }
  .wk-mobile-menu[hidden] { display: none; }
  .wk-header-dark .wk-mobile-menu { background: color-mix(in srgb, var(--bpe-blue-dark) 96%, transparent); -webkit-backdrop-filter: saturate(1.1) blur(6px); backdrop-filter: saturate(1.1) blur(6px); border-bottom: 1px solid rgba(255,255,255,0.16); }
  .wk-header-light .wk-mobile-menu { background: var(--bpe-white); border-bottom: 1px solid var(--bpe-border); }
  .wk-mobile-menu .wk-mmlink { font-family: var(--font-sans); font-weight: var(--fw-medium); font-size: 17px; text-decoration: none; padding: 15px 2px; }
  .wk-header-dark .wk-mobile-menu .wk-mmlink { color: var(--bpe-white); border-bottom: 1px solid rgba(255,255,255,0.16); }
  .wk-header-light .wk-mobile-menu .wk-mmlink { color: var(--bpe-blue-dark); border-bottom: 1px solid var(--bpe-border); }
  .wk-mobile-menu .wk-mm-cta { padding-top: 16px; }
  /* Hero scrim: flat semitransparent navy replaces the diagonal
     gradient so headline, copy, and stats stay readable (app.jsx). */
  .bpe-hero-scrim { background: rgba(1,1,51,0.74) !important; }
}

/* ═══════ Footer (components/navigation/Footer.jsx) ═══════ */
.wk-footer { padding: 50px; background: var(--bpe-black); color: var(--bpe-white); }
.wk-footer-inner { display: flex; justify-content: space-between; gap: 80px; max-width: var(--content-inner); margin: 0 auto; }
.wk-footer .wk-foot-social { display: inline-flex; color: var(--bpe-white); transition: transform var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard); }
.wk-footer .wk-foot-social:hover { transform: translateY(-3px); color: var(--bpe-gold); }
.wk-foot-link { color: inherit; text-decoration: none; }
.wk-foot-link:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--bpe-gold); }
@media (max-width: 760px) {
  .wk-footer { padding: 40px 24px; }
  .wk-footer-inner { flex-direction: column; gap: 36px; }
}

/* ═══════ CourseCard overlay (cards/CourseCard.jsx) ═══════ */
.wk-cc { transition: box-shadow var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard); }
.wk-cc:hover { box-shadow: var(--shadow-pop) !important; transform: translateY(var(--lift-hover)); }
.wk-cc .wk-cc-media { transition: transform var(--dur-slow) var(--ease-standard); }
.wk-cc:hover .wk-cc-media { transform: scale(var(--grow-hover)); }

/* ═══════ CourseCard list row ═══════ */
.wk-lr { box-shadow: var(--ring-stroke); background: var(--bpe-white); cursor: pointer; transition: box-shadow var(--dur-base) var(--ease-standard); text-decoration: none; }
.wk-lr:hover { box-shadow: inset 0 0 0 1px var(--bpe-blue-dark); }
.wk-lr .wk-arrow-badge { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-round); color: var(--bpe-blue-dark); box-shadow: inset 0 0 0 1px var(--bpe-border); transition: all var(--dur-base) var(--ease-standard); background: transparent; }
.wk-lr:hover .wk-arrow-badge { background: var(--bpe-blue-dark); color: #fff; box-shadow: none; }

/* ═══════ WebinarCard ═══════ */
.wk-wc { transition: box-shadow var(--dur-base) var(--ease-standard); }
.wk-wc .wk-wc-media { transition: transform var(--dur-slow) var(--ease-standard); }
.wk-wc:hover .wk-wc-media { transform: scale(var(--grow-hover)); }

/* ═══════ ArticleCard ═══════ */
.wk-ac { transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard); }
.wk-ac:hover { transform: translateY(var(--lift-hover)); box-shadow: var(--shadow-pop) !important; }
.wk-ac .wk-ac-media { transition: transform var(--dur-slow) var(--ease-standard); }
.wk-ac:hover .wk-ac-media { transform: scale(var(--grow-hover)); }
.wk-ac .wk-ac-go { transition: gap var(--dur-base) var(--ease-standard); }
.wk-ac:hover .wk-ac-go { gap: 12px !important; }

/* ═══════ Partner strip marquee (app.jsx PartnerStrip) ═══════ */
@keyframes bpe-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.bpe-marquee-track { animation: bpe-marquee 32s linear infinite; }
.bpe-marquee-track:hover { animation-play-state: paused; }

/* ═══════ Testimonial marquee (app.jsx TestimonialMarquee) ═══════ */
@keyframes bpe-tm-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes bpe-tm-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.bpe-tm-track { display: flex; gap: 24px; width: max-content; will-change: transform; }
.bpe-tm-track.left { animation: bpe-tm-left 46s linear infinite; }
.bpe-tm-track.right { animation: bpe-tm-right 52s linear infinite; }
.bpe-tm-row:hover .bpe-tm-track { animation-play-state: paused; }
.bpe-tm-cell { width: 440px; flex-shrink: 0; }
@media (max-width: 640px) { .bpe-tm-cell { width: 300px; } }

/* ═══════ Filter chips (Programs / Insights screens) ═══════ */
.wk-chip { cursor: pointer; padding: 9px 22px; border-radius: var(--radius-pill); font-family: var(--font-sans); font-size: 14px; font-weight: 500; border: 1px solid var(--bpe-border); background: transparent; color: var(--bpe-blue-dark); }
.wk-chip.is-active { border-color: var(--bpe-blue-dark); background: var(--bpe-blue-dark); color: #fff; }

/* ═══════ Custom Solutions template-local styles ═══════ */
.csfeat { transition: transform .3s ease, border-color .3s ease; }
.csfeat .csfeatimg { transition: transform 1.1s ease; }
.csfeat:hover .csfeatimg { transform: scale(1.05); }
.cscard { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.cscard:hover { transform: translateY(-5px); box-shadow: 0 22px 48px rgba(1,1,51,0.12); border-color: rgba(253,181,21,0.7); }

/* ═══════ Article template-local styles ═══════ */
.bpe-underline-link { position: relative; text-decoration: none; }
.bpe-underline-link::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px; background: currentColor; transition: right .3s ease; }
.bpe-underline-link:hover::after { right: 0; }

/* ═══════ Responsive (ui_kits/website/index.html + app.jsx section rules) ═══════ */
html { scroll-behavior: smooth; }
@media (max-width: 1100px) { .bpe-faculty-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 960px) {
  .bpe-grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .bpe-statement-h2 { font-size: 44px !important; }
}
@media (max-width: 900px) { .bpe-webinar-grid, .bpe-insights-grid { grid-template-columns: 1fr !important; } .bpe-feature-article { grid-template-columns: 1fr !important; } }

/* ── Insights loading placeholders ──
   The Insights list is fetched from /api/posts, so the article area
   holds these neutral blocks until the real posts arrive. They occupy
   the same footprint as the feature article and cards, so nothing
   shifts when the content lands. */
.bpe-skel {
  background: var(--bpe-gray-light);
  border: 1px solid var(--bpe-border);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.bpe-skel::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: bpe-skel-sweep 1.4s ease-in-out infinite;
}
.bpe-skel-feature { min-height: 320px; margin-bottom: 48px; }
.bpe-skel-card { min-height: 360px; }
@keyframes bpe-skel-sweep { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .bpe-skel::after { animation: none; } }
@media (max-width: 860px) {
  .cs-grid { grid-template-columns: 1fr !important; }
  .cs-herophoto { min-height: 320px !important; }
  .cs-hero-left { padding: 44px 22px 52px !important; }
  .cs-section { padding: 60px 22px !important; }
  .art-hero-img { height: 260px !important; }
  .art-h1 { font-size: 34px !important; }
  .cs-h1 { font-size: 40px !important; }
  .cs-h2 { font-size: 32px !important; }
}
@media (max-width: 680px) {
  .bpe-faculty-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  /* Single column: every instructor gets its own divider, so the
     desktop every-4th-row divider is redundant. Cards span the full
     column so the lines run edge to edge like the section itself. */
  .bpe-faculty-divider { display: none !important; }
  .bpe-faculty-grid > div:not(.bpe-faculty-divider) { max-width: none !important; }
  .bpe-faculty-grid > div:not(.bpe-faculty-divider):not(:first-child) { border-top: 1px solid var(--bpe-border); padding-top: 24px; }
}
@media (max-width: 640px) {
  .bpe-grid-3 { grid-template-columns: 1fr !important; }
  .bpe-hero-stats { grid-template-columns: 1fr 1fr !important; gap: 22px 24px !important; }
  .bpe-hero-body { padding: 96px 22px 36px !important; }
  .bpe-px { padding-left: 22px !important; padding-right: 22px !important; }
  .bpe-statement-h2 { font-size: 30px !important; line-height: 1.16 !important; }
  .bpe-section-h2 { font-size: 28px !important; }
}
@media (max-width: 460px) { .cs-h1 { font-size: 33px !important; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bpe-marquee-track, .bpe-tm-track { animation: none !important; }
  .wk-btn:hover, .wk-btn:active, .wk-cc:hover, .wk-ac:hover,
  .wk-cc:hover .wk-cc-media, .wk-wc:hover .wk-wc-media, .wk-ac:hover .wk-ac-media { transform: none !important; }
}
