/*
Theme Name: OPSC Government Jobs
Author: Manava Studio
Author URI: https://manavastudio.com
Description: One-page government vacancies site for the Office of the Public Service Commissioner (Cook Islands). Pulls live job listings from Airtable and renders them in the OPSC brand, with the rest of the navigation linking back to the main psc.gov.ck site. Pairs with free Elementor. Brand teal (#008080), Poppins/Assistant typography.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: opsc-jobs
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --psc-teal: #008080;
  --psc-teal-dark: #006466;
  --psc-teal-darker: #004d4d;
  --psc-teal-soft: rgba(0, 128, 128, 0.95);
  --psc-grey: #f1f1f1;
  --psc-grey-line: #e2e6e6;
  --psc-ink: #2b2f31;
  --psc-ink-soft: #55605f;
  --psc-white: #ffffff;
  --psc-font-head: "Poppins", "Assistant", Arial, Helvetica, sans-serif;
  --psc-font-body: "Assistant", Arial, Helvetica, sans-serif;
  --psc-maxw: 1200px;
  --psc-radius: 10px;
  --psc-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  --psc-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
  --psc-header-h: 64px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--psc-font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--psc-ink);
  background: var(--psc-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--psc-font-head);
  color: var(--psc-ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }

p { margin: 0 0 1.1em; }

a { color: var(--psc-teal); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--psc-teal-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.3em; }

hr { border: 0; border-top: 1px solid var(--psc-grey-line); margin: 2rem 0; }

/* Accessibility: visible focus + skip link */
:focus-visible { outline: 3px solid var(--psc-teal); outline-offset: 2px; }
.psc-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--psc-teal); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.psc-skip-link:focus { left: 0; text-decoration: none; }

/* Layout helpers */
.psc-container { width: 100%; max-width: var(--psc-maxw); margin: 0 auto; padding: 0 20px; }
.psc-section { padding: 56px 0; }

/* Buttons */
.psc-btn,
.entry-content .wp-block-button__link {
  display: inline-block;
  background: var(--psc-teal);
  color: #fff;
  font-family: var(--psc-font-head);
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 40px;
  border: 2px solid var(--psc-teal);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.psc-btn:hover { background: var(--psc-teal-dark); border-color: var(--psc-teal-dark); color: #fff; text-decoration: none; }
.psc-btn--ghost { background: transparent; color: var(--psc-teal); }
.psc-btn--ghost:hover { background: var(--psc-teal); color: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */
/* Logo overlaid on the page banner (top-left), matching the live site. The
   header sits above the first banner; JS drops the nav in just below it. */
.psc-header { position: relative; z-index: 400; }
.psc-brandmark {
  position: absolute; top: 16px; left: 26px; z-index: 30;
  display: inline-block; line-height: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}
.psc-brandmark img { height: 88px; width: auto; }

/* Hide the nav until JS has placed it, so it never flashes at the top first. */
html.psc-js .psc-nav { display: none; }
html.psc-js.psc-nav-ready .psc-nav { display: block; }

/* Fallback for pages with no banner (search, 404): teal bar, logo inline. */
body.psc-no-banner .psc-header { background: var(--psc-teal); }
body.psc-no-banner .psc-brandmark { position: static; padding: 16px 26px; filter: none; }

/* Primary nav bar (white) — dropped in below the banner by JS. */
.psc-nav {
  background: #fff;
  border-bottom: 1px solid var(--psc-grey-line);
  box-shadow: var(--psc-shadow-sm);
  position: sticky; top: 0; z-index: 500;
}
.psc-nav__inner {
  display: flex; align-items: center; justify-content: center;
  max-width: var(--psc-maxw); margin: 0 auto; padding: 0 20px;
}
.psc-menu { justify-content: center; }
.psc-menu {
  display: flex; flex-wrap: wrap; gap: 2px;
  list-style: none; margin: 0; padding: 0;
}
.psc-menu li { position: relative; }
.psc-menu a {
  display: block;
  font-family: var(--psc-font-head);
  font-weight: 500;
  color: var(--psc-ink);
  padding: 18px 18px;
  border-bottom: 3px solid transparent;
}
.psc-menu a:hover { color: var(--psc-teal); text-decoration: none; background: var(--psc-grey); }
.psc-menu .current-menu-item > a,
.psc-menu .current_page_item > a,
.psc-menu .current-menu-parent > a {
  color: var(--psc-teal);
  border-bottom-color: var(--psc-teal);
}
/* Dropdowns */
.psc-menu ul.sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--psc-grey-line);
  box-shadow: var(--psc-shadow); list-style: none; margin: 0; padding: 6px 0;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 600;
}
.psc-menu li:hover > ul.sub-menu,
.psc-menu li:focus-within > ul.sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.psc-menu ul.sub-menu a { padding: 10px 18px; border-bottom: 0; font-weight: 400; }

/* Mobile toggle */
.psc-nav__toggle {
  display: none; background: transparent; border: 0; cursor: pointer;
  padding: 16px 8px; color: var(--psc-ink);
}
.psc-nav__toggle svg { width: 26px; height: 26px; }

/* ==========================================================================
   Page title band + content
   ========================================================================== */
.psc-pagehead {
  background: var(--psc-teal);
  color: #fff;
  padding: 44px 0;
}
.psc-pagehead h1 { color: #fff; margin: 0; }
.psc-pagehead .psc-breadcrumb { color: rgba(255,255,255,0.85); font-size: 0.9rem; margin-top: 6px; }
.psc-pagehead .psc-breadcrumb a { color: #fff; }

.psc-content { padding: 48px 0 64px; }
.entry-content { max-width: 820px; margin-left: auto; margin-right: auto; }
/* Document-library pages use the wider container */
.entry-content:has(.psc-doclist) { max-width: 1040px; }
.entry-content img { border-radius: var(--psc-radius); margin: 1.4em 0; }
.entry-content h2, .entry-content h3 { margin-top: 1.6em; }

/* Full-width for Elementor-built pages: let Elementor manage its own width */
.psc-content--elementor { padding: 0; }
.psc-content--elementor .entry-content { max-width: none; }

/* ==========================================================================
   Blog / News
   ========================================================================== */
.psc-postgrid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.psc-card {
  background: #fff; border: 1px solid var(--psc-grey-line);
  border-radius: var(--psc-radius); overflow: hidden;
  box-shadow: var(--psc-shadow-sm); display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.psc-card:hover { transform: translateY(-4px); box-shadow: var(--psc-shadow); }
.psc-card__thumb { aspect-ratio: 16 / 10; background: var(--psc-grey); overflow: hidden; }
.psc-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.psc-card__body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.psc-card__date { font-size: 0.82rem; color: var(--psc-ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.psc-card__title { font-family: var(--psc-font-head); font-size: 1.15rem; margin: 0; }
.psc-card__title a { color: var(--psc-ink); }
.psc-card__title a:hover { color: var(--psc-teal); text-decoration: none; }
.psc-card__more { margin-top: auto; font-family: var(--psc-font-head); font-weight: 600; color: var(--psc-teal); }

/* Single News article — readable centered column */
.psc-single { max-width: 820px; margin: 0 auto; }
.psc-single__meta {
  color: var(--psc-ink-soft); font-size: 0.85rem; margin-bottom: 1.4rem;
  text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--psc-font-head);
}
.psc-single__meta a { color: var(--psc-teal); }
/* Featured image kept modest (width-capped, never cropped) so lower-res
   sources stay crisp and tall posters show in full. */
.psc-single__thumb { margin: 0 auto 2rem; border-radius: 14px; overflow: hidden; max-width: 460px; box-shadow: var(--psc-shadow-sm); }
.psc-single__thumb img { width: 100%; height: auto; display: block; }
.psc-single .entry-content { max-width: none; font-size: 1.06rem; line-height: 1.78; }
.psc-single .entry-content p { margin: 0 0 1.2em; }
.psc-single .entry-content strong { color: var(--psc-ink); }
.psc-single .entry-content a { color: var(--psc-teal); text-decoration: underline; }
.psc-single .entry-content h2, .psc-single .entry-content h3 { margin-top: 1.6em; color: var(--psc-teal-darker); }
.psc-single .entry-content figure { margin: 1.8em auto; text-align: center; }
/* All article images render full column width */
.psc-single .entry-content figure,
.psc-single .entry-content figure img,
.psc-single .entry-content img { width: 100%; max-width: 100%; height: auto; margin: 0 auto; display: block; border-radius: 12px; }
.psc-single .entry-content ul { margin: 0 0 1.2em; padding-left: 1.3em; }
.psc-single__tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.psc-single__tags a {
  display: inline-block; padding: 5px 14px; border-radius: 30px;
  background: var(--psc-grey); color: var(--psc-ink); font-size: 0.85rem; text-decoration: none;
}
.psc-single__tags a:hover { background: var(--psc-teal); color: #fff; }
.post-navigation { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--psc-grey-line); display: flex; justify-content: space-between; gap: 16px; }
.post-navigation a { color: var(--psc-teal); font-family: var(--psc-font-head); font-weight: 500; }

/* News banner (listing + single) + News hero title band */
.psc-newsbanner { line-height: 0; }
.psc-newsbanner img { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); height: 380px; object-fit: cover; display: block; }
.psc-newshero { background: var(--psc-teal); position: relative; overflow: hidden; padding: 44px 0; }
.psc-newshero::before {
  content: ""; position: absolute; top: 8px; left: -30px; width: 560px; height: 170px;
  background: url("assets/img/watermark.png") no-repeat left top / contain; opacity: 0.12;
}
.psc-newshero .psc-container { position: relative; z-index: 1; text-align: center; }
.psc-newshero__title { margin: 0; }
.psc-newshero__title .psc-mi { color: #FF8052; }
.psc-newshero__title .psc-en { color: #fff; }
.psc-newshero__intro { color: #eef6f5; max-width: 820px; margin: 12px auto 0; }
.psc-single__title { margin: 6px 0 1.2rem; color: var(--psc-ink); }
.psc-pdf-note { background: var(--psc-grey); border-left: 4px solid var(--psc-teal); border-radius: 8px; padding: 20px 24px; margin: 1.6em 0; }
.psc-pdf-note p { margin: 0 0 0.4em; }
.psc-pdf-note__file { font-family: var(--psc-font-head); font-weight: 600; color: var(--psc-teal-darker); margin: 0; }

/* Document library (Publications / Guidance category pages) */
.psc-doclead { color: var(--psc-ink-soft); margin: 0 0 1.8rem; }
.psc-doclist { display: flex; flex-direction: column; gap: 12px; }
.psc-doc {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid var(--psc-grey-line); border-radius: 10px;
  padding: 16px 20px; box-shadow: var(--psc-shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.psc-doc:hover { border-color: #5f8f8a; box-shadow: var(--psc-shadow); transform: translateY(-1px); }
.psc-doc__icon { flex: 0 0 auto; width: 26px; height: 26px; color: #5f8f8a; }
.psc-doc__icon svg { width: 100%; height: 100%; display: block; }
.psc-doc__name { font-family: var(--psc-font-head); font-weight: 500; color: var(--psc-ink); flex: 1 1 auto; line-height: 1.35; word-break: break-word; }
.psc-doc__btn {
  flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  background: #5f8f8a; color: #fff; padding: 9px 22px; border-radius: 6px;
  font-family: var(--psc-font-head); white-space: nowrap;
}
.psc-doc__btn:hover { background: #517d78; color: #fff; text-decoration: none; }
.psc-doc__btntxt { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.psc-doc__size { font-size: 0.7rem; opacity: 0.85; }
@media (max-width: 560px) {
  .psc-doc { flex-wrap: wrap; }
  .psc-doc__name { flex: 1 1 calc(100% - 42px); }
  .psc-doc__btn { margin-left: 42px; }
}

/* Complaint & feedback form */
.psc-form { max-width: 720px; margin: 0 auto; }
.psc-form__row { display: flex; gap: 18px; flex-wrap: wrap; }
.psc-form__field { display: block; flex: 1 1 240px; margin-bottom: 18px; font-family: var(--psc-font-head); font-weight: 500; color: var(--psc-ink); }
.psc-form__field span { color: #d9534f; }
.psc-form__field input,
.psc-form__field textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 16px; border: 1px solid var(--psc-grey-line); border-radius: 8px; font-family: var(--psc-font-body); font-size: 1rem; box-sizing: border-box; }
.psc-form__field input:focus,
.psc-form__field textarea:focus { outline: 2px solid var(--psc-teal); border-color: var(--psc-teal); }
.psc-form__hp { position: absolute !important; left: -9999px !important; }
.psc-form button { margin-top: 6px; cursor: pointer; }
.psc-form__success { max-width: 720px; margin: 0 auto; background: #e6f4ea; border-left: 4px solid #2e8b57; padding: 18px 22px; border-radius: 8px; color: #205e39; }
.psc-form__error { max-width: 720px; margin: 0 auto 18px; background: #fdecea; border-left: 4px solid #d9534f; padding: 14px 20px; border-radius: 8px; color: #a12b23; }
.psc-form__error ul { margin: 0; padding-left: 1.2em; }
@media (max-width: 767px) { .psc-newsbanner img { height: 220px; } }

/* Pagination */
.psc-pagination { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 44px; }
.psc-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 12px;
  border: 1px solid var(--psc-grey-line); border-radius: 8px;
  color: var(--psc-ink); font-family: var(--psc-font-head);
}
.psc-pagination .page-numbers.current { background: var(--psc-teal); color: #fff; border-color: var(--psc-teal); }
.psc-pagination a.page-numbers:hover { border-color: var(--psc-teal); color: var(--psc-teal); text-decoration: none; }

/* ==========================================================================
   Footer
   ========================================================================== */
.psc-footer { background: var(--psc-teal-darker); color: #dff0ef; margin-top: 0; }
.psc-footer__inner { max-width: var(--psc-maxw); margin: 0 auto; padding: 44px 20px 24px; }
.psc-footer__top { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.psc-footer__brand img { height: 92px; width: auto; }
.psc-footer__social { display: flex; gap: 12px; }
.psc-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff;
}
.psc-footer__social a:hover { background: #fff; color: var(--psc-teal-darker); }
.psc-footer__social svg { width: 19px; height: 19px; fill: currentColor; }
.psc-footer__bar {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin-top: 28px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  font-size: 0.9rem;
}
.psc-footer__legal { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; }
.psc-footer__legal a { color: #dff0ef; }
.psc-footer__legal a:hover { color: #fff; }
.psc-footer__copy { color: #bcdedc; margin: 0; }
.psc-footer__credit { opacity: 0.75; }
.psc-footer__credit a { color: inherit; }

/* ==========================================================================
   Elementor page helpers — theme-guaranteed styling for built pages
   ========================================================================== */
.psc-el-hero { background: var(--psc-teal); }
.psc-el-hero .elementor-heading-title,
.psc-el-hero .elementor-widget-text-editor,
.psc-el-hero .elementor-widget-text-editor p { color: #fff !important; }

.psc-el-hero--home { position: relative; min-height: 460px; display: flex; align-items: center; overflow: hidden; }
.psc-el-hero--home::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(0, 77, 77, 0.06);
}
.psc-el-hero--home > .elementor-container { position: relative; z-index: 2; }
.psc-el-hero--home .elementor-background-video-container { z-index: 0; }

.psc-el-cards .elementor-widget-icon-box {
  background: #fff; border: 1px solid var(--psc-grey-line);
  border-radius: var(--psc-radius); box-shadow: var(--psc-shadow-sm);
  padding: 28px 24px; height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.psc-el-cards .elementor-widget-icon-box:hover { transform: translateY(-4px); box-shadow: var(--psc-shadow); }
.psc-el-cards .elementor-icon-box-title,
.psc-el-cards .elementor-icon-box-title a { color: var(--psc-teal); }
.psc-el-cards .elementor-icon-box-description { color: var(--psc-ink-soft); }
/* Clickable cue */
.psc-el-cards .elementor-widget-icon-box,
.psc-el-cards .elementor-widget-icon-box a { cursor: pointer; }
.psc-el-cards .elementor-icon-box-content::after {
  content: "Learn more \2192"; display: inline-block; margin-top: 16px;
  color: var(--psc-teal); font-family: var(--psc-font-head); font-weight: 600;
  font-size: 0.9rem; transition: transform 0.2s ease;
}
.psc-el-cards .elementor-widget-icon-box:hover .elementor-icon-box-content::after { transform: translateX(6px); }
.psc-el-cards .elementor-widget-icon-box:hover .elementor-icon-box-title { text-decoration: underline; }

/* Full-bleed edge-to-edge banner image */
.psc-el-banner,
.psc-el-banner > .elementor-container { max-width: 100% !important; width: 100%; padding: 0 !important; }
.psc-el-banner .elementor-column,
.psc-el-banner .elementor-widget-wrap,
.psc-el-banner .elementor-widget-image,
.psc-el-banner .elementor-widget-image .elementor-widget-container { padding: 0 !important; margin: 0 !important; line-height: 0; }
.psc-el-banner .elementor-widget-image img {
  width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw);
  height: 440px; object-fit: cover; display: block;
}
body { overflow-x: hidden; }

/* Teal content sections + a single faint emblem watermark at the top-left. */
.psc-el-teal { background: var(--psc-teal); position: relative; }
.psc-el-hero:not(.psc-el-hero--home) { position: relative; overflow: hidden; }
.psc-el-hero:not(.psc-el-hero--home)::before {
  content: ""; position: absolute; top: 8px; left: -30px; width: 560px; height: 170px;
  background: url("assets/img/watermark.png") no-repeat left top / contain;
  opacity: 0.12; pointer-events: none; z-index: 0;
}
.psc-el-teal > .elementor-container,
.psc-el-hero > .elementor-container { position: relative; z-index: 1; }

/* Keep section backgrounds full-width but constrain content to a centered
   container (banner stays full-bleed). Fixes cards touching the viewport edge. */
.psc-main .elementor-section:not(.psc-el-banner) > .elementor-container {
  max-width: 1200px; width: 100%; margin-left: auto; margin-right: auto;
  padding-left: 24px; padding-right: 24px; box-sizing: border-box;
}
.psc-el-teal .elementor-heading-title,
.psc-el-teal .elementor-widget-text-editor,
.psc-el-teal .elementor-widget-text-editor p { color: #fff; }

/* Contact-us info: single stacked column, white text on teal (matches live). */
.psc-contact-info > .elementor-container { max-width: 900px !important; }
.psc-contact-info .elementor-widget-heading .elementor-heading-title {
  font-family: var(--psc-font-head); font-weight: 600; font-size: 1.85rem;
  margin: 26px 0 6px;
}
.psc-contact-info .elementor-widget-heading:first-child .elementor-heading-title,
.psc-contact-info .elementor-column > .elementor-widget-wrap > .elementor-element:first-child .elementor-heading-title { margin-top: 4px; }
.psc-contact-info .elementor-widget-text-editor p { line-height: 1.7; margin: 0 0 4px; }
.psc-contact-info .elementor-widget-text-editor a { color: #fff; text-decoration: underline; }

/* Homepage intro: title + tagline beside the team photo, with the watermark */
.psc-el-intro { position: relative; overflow: hidden; }
.psc-el-intro::before {
  content: ""; position: absolute; top: 6px; left: -30px; width: 560px; height: 170px;
  background: url("assets/img/watermark.png") no-repeat left top / contain; opacity: 0.12; z-index: 0;
}
.psc-el-intro > .elementor-container { position: relative; z-index: 1; align-items: center; }
.psc-el-intro .elementor-column { display: flex; flex-direction: column; justify-content: center; }
.psc-el-intro .elementor-widget-image img { border-radius: 12px; box-shadow: var(--psc-shadow); }
.psc-el-intro .elementor-heading-title { color: #fff; }

/* Inner-page white cards on teal — equal height, arrow sits after the text */
.psc-el-cardgrid .elementor-column { display: flex; }
.psc-el-cardgrid .elementor-widget-wrap,
.psc-el-cardgrid .elementor-column .elementor-widget-wrap.elementor-element-populated {
  background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
  padding: 30px 30px !important; width: 100%; box-sizing: border-box; min-height: 210px;
  display: flex; flex-direction: column; align-items: flex-start;
}
.psc-el-cardgrid .elementor-widget { width: 100%; flex-grow: 0; }
.psc-el-cardgrid .elementor-heading-title { color: #182153 !important; font-weight: 600; }
.psc-el-cardgrid .elementor-widget-text-editor,
.psc-el-cardgrid .elementor-widget-text-editor p { color: var(--psc-ink-soft) !important; }
/* CTA (arrow or button) sits at the bottom-left of the card */
.psc-el-cardgrid .elementor-widget-icon,
.psc-el-cardgrid--btn .elementor-widget-button { margin-top: auto; padding-top: 20px; }
.psc-el-cardgrid .elementor-icon-wrapper { text-align: left; }
.psc-el-cardgrid .elementor-widget-icon .elementor-icon { color: var(--psc-ink); transition: transform 0.22s ease; }
.psc-el-cardgrid .elementor-column:hover .elementor-widget-icon .elementor-icon,
.psc-el-cardgrid .elementor-widget-wrap:hover .elementor-widget-icon .elementor-icon { transform: translateX(10px); }

/* Gap between cards (outer cards stay aligned with the container edge) */
.psc-el-cardgrid > .elementor-container { padding-left: 12px !important; padding-right: 12px !important; }
.psc-el-cardgrid .elementor-column { padding: 0 12px 24px; }

/* Centre a lone card (single filtered result) */
.psc-el-cardgrid.psc-one > .elementor-container { justify-content: center; }
.psc-el-cardgrid.psc-one .elementor-column { flex: 0 0 33%; max-width: 380px; }

/* "VIEW ONLINE" button cards (Guidance / Publications) */
.psc-el-cardgrid--btn .elementor-widget-button { margin-top: 14px; }
.psc-el-cardgrid--btn .elementor-button {
  background-color: #5f8f8a !important; color: #fff !important; border-radius: 4px;
  padding: 15px 30px !important; font-family: var(--psc-font-head); font-weight: 600;
  font-size: 0.92rem; letter-spacing: 0.04em; text-transform: uppercase;
  transition: background-color 0.18s ease;
}
.psc-el-cardgrid--btn .elementor-button:hover { background-color: #517d78 !important; }

/* Document category filter (Guidance / Publications) — grey panel on teal */
.psc-docfilter { background: var(--psc-teal); }
.psc-docfilter__inner { max-width: 1200px; margin: 0 auto; padding: 8px 24px 22px; }
.psc-docfilter__box {
  background: #f1f1f1; border-radius: 10px; padding: 22px 26px;
  display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap;
}
.psc-docfilter__field { flex: 1 1 260px; }
.psc-docfilter__label {
  display: block; color: var(--psc-teal); font-family: var(--psc-font-head);
  font-weight: 600; font-size: 1.05rem; margin-bottom: 8px;
}
.psc-docfilter__control { position: relative; }
.psc-docfilter__cat {
  width: 100%; padding: 14px 46px 14px 20px; border: 1px solid var(--psc-grey-line);
  border-radius: 30px; background: #fff; font-family: var(--psc-font-body);
  font-size: 1rem; color: var(--psc-teal); cursor: pointer;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
.psc-docfilter__control::after {
  content: ""; position: absolute; right: 20px; top: 46%; width: 9px; height: 9px;
  border-right: 2px solid var(--psc-ink-soft); border-bottom: 2px solid var(--psc-ink-soft);
  transform: translateY(-50%) rotate(45deg); pointer-events: none;
}
.psc-docfilter__btn {
  background: #FF8052; color: #fff; border: 0; border-radius: 30px;
  padding: 14px 40px; font-family: var(--psc-font-head); font-weight: 600;
  font-size: 1rem; cursor: pointer; transition: background 0.18s ease;
}
.psc-docfilter__btn:hover { background: #f4703e; }
.psc-docfilter :focus-visible { outline: 3px solid var(--psc-teal); outline-offset: 2px; }
@media (max-width: 560px) {
  .psc-docfilter__box { flex-direction: column; align-items: stretch; }
  .psc-docfilter__btn { width: 100%; }
}

/* Elementor page responsive */
@media (max-width: 767px) {
  .psc-el-banner .elementor-widget-image img { height: 220px; }
  .psc-el-hero--home { min-height: 360px; }
  .psc-el-cardgrid .elementor-widget-wrap { padding: 22px 20px; }
  .psc-el-teal::before,
  .psc-el-hero:not(.psc-el-hero--home)::before { width: 300px; height: 300px; top: -40px; left: -50px; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .psc-postgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 782px) {
  .psc-nav__toggle { display: inline-flex; }
  .psc-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; background: #fff; border-top: 1px solid var(--psc-grey-line);
    box-shadow: var(--psc-shadow); padding: 6px 0;
  }
  .psc-nav__inner { position: relative; }
  .psc-nav__inner { justify-content: space-between; }
  .psc-nav.is-open .psc-menu { display: flex; }
  .psc-menu a { padding: 14px 20px; border-bottom: 1px solid var(--psc-grey-line); }
  .psc-menu .current-menu-item > a { border-bottom-color: var(--psc-grey-line); }
  .psc-menu ul.sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding-left: 14px;
  }
  .psc-brandmark img { height: 62px; }
  .psc-brandmark { top: 12px; left: 16px; }
}
@media (max-width: 560px) {
  .psc-postgrid { grid-template-columns: 1fr; }
  .psc-brandmark img { height: 52px; }
  .psc-footer__top { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   OPSC Government Jobs — one-page site
   ========================================================================== */
:root { --opsc-orange: #e06d33; --opsc-navy: #182153; }
.opsc-main { min-height: 40vh; }
.opsc-container { max-width: var(--psc-maxw); margin: 0 auto; padding: 0 24px; }
.opsc-skip { position: absolute; left: -9999px; }
.opsc-skip:focus { left: 12px; top: 12px; background: #fff; padding: 10px 14px; z-index: 999; }

/* Header */
.opsc-header { background: #fff; border-bottom: 1px solid var(--psc-grey-line); position: sticky; top: 0; z-index: 500; }
.opsc-header__inner { max-width: var(--psc-maxw); margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.opsc-brand { line-height: 0; }
.opsc-brand img { height: 52px; width: auto; }
.opsc-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.opsc-menu a { display: block; font-family: var(--psc-font-head); font-weight: 500; color: var(--psc-ink); padding: 14px 16px; border-bottom: 3px solid transparent; text-transform: uppercase; letter-spacing: .02em; font-size: .95rem; }
.opsc-menu a:hover { color: var(--psc-teal); background: var(--psc-grey); text-decoration: none; }
.opsc-menu a[aria-current="page"] { color: var(--psc-teal); border-bottom-color: var(--psc-teal); }
.opsc-nav__toggle { display: none; background: transparent; border: 0; cursor: pointer; color: var(--psc-ink); padding: 8px; }

/* Elementor hero — teal with the Cook Islands motif top-right (matches live) */
.opsc-el-hero { background: #008080 url("assets/img/hero-bg.png") no-repeat right top / cover; position: relative; overflow: hidden; }
.opsc-el-hero .elementor-heading-title,
.opsc-el-hero .elementor-widget-text-editor,
.opsc-el-hero .elementor-widget-text-editor p { color: #fff !important; }
.opsc-el-hero > .elementor-container { position: relative; z-index: 1; }

/* Jobs section */
.opsc-jobs { max-width: 980px; margin: 0 auto; padding: 40px 24px 64px; }
.opsc-jobs__notice { background: #fff6ef; border: 1px solid #f3d6bf; color: #8a4b23; padding: 10px 14px; border-radius: 8px; font-size: .9rem; margin: 0 0 18px; }
/* Filter bar: all controls on one clean line, sharing the width evenly. */
.opsc-jobs__filters { display: flex; flex-wrap: nowrap; gap: 10px; align-items: center; margin-bottom: 26px; }
.opsc-jobs__filter { flex: 1 1 0; min-width: 0; }
.opsc-jobs__filter select,
.opsc-jobs__search { border: 1px solid var(--psc-grey-line); border-radius: 999px; background: #fff; font: inherit; color: var(--psc-ink); height: 46px; box-sizing: border-box; }
.opsc-jobs__filter select { width: 100%; padding: 0 34px 0 16px; appearance: none; -webkit-appearance: none; cursor: pointer; text-overflow: ellipsis; white-space: nowrap;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232b2f31' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.opsc-jobs__filter select:focus,
.opsc-jobs__search:focus-within { outline: 2px solid var(--psc-teal); outline-offset: 1px; }
.opsc-jobs__search { flex: 1.4 1 0; min-width: 0; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; color: #7b8794; }
.opsc-jobs__search input { border: 0; background: transparent; padding: 0 4px; font: inherit; color: var(--psc-ink); min-width: 0; width: 100%; }
.opsc-jobs__search input:focus { outline: none; }

/* Section heading on white (Find a Job / Internships) */
.opsc-el-find .elementor-heading-title { color: var(--opsc-navy) !important; }
.opsc-el-find .elementor-widget-text-editor { color: var(--psc-ink-soft, #566); }

.opsc-jobs__list { display: flex; flex-direction: column; gap: 18px; }
.opsc-job { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
	border: 1px solid var(--psc-grey-line); border-radius: 14px; padding: 26px 28px; background: #fff; transition: box-shadow .18s ease, border-color .18s ease; }
.opsc-job:hover { box-shadow: 0 8px 24px rgba(0,0,0,.07); border-color: #d7dee0; }
.opsc-job__title { font-family: var(--psc-font-head); font-size: 1.4rem; color: var(--opsc-navy); margin: 0 0 10px; }
.opsc-job__meta { margin: 2px 0; color: var(--psc-ink); }
.opsc-job__excerpt { margin: 12px 0 0; color: var(--psc-ink-soft, #566); line-height: 1.6; }
.opsc-job__cta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
	background: var(--opsc-orange); color: #fff; font-family: var(--psc-font-head); font-weight: 600; font-size: .95rem;
	padding: 12px 20px; border-radius: 999px; }
.opsc-job__cta:hover { background: #c85b26; color: #fff; text-decoration: none; }
.opsc-jobs__empty { text-align: center; color: #7b8794; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 620px; margin: 0 auto; line-height: 1.6; }
.opsc-jobs__empty[hidden] { display: none; }
.opsc-jobs__empty-icon { color: #b7c0c6; }
.opsc-jobs--internships { border-top: 1px solid var(--psc-grey-line); margin-top: 8px; }

/* Detail */
.opsc-jobs--detail { max-width: 820px; }
.opsc-job__back { display: inline-flex; align-items: center; gap: 6px; color: var(--psc-teal); font-weight: 600; margin-bottom: 20px; }
.opsc-job-detail h2 { font-family: var(--psc-font-head); color: var(--opsc-navy); font-size: 2rem; margin: 0 0 20px; }
.opsc-job-detail__facts { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.opsc-job-detail__facts li { background: var(--psc-grey); border-radius: 10px; padding: 12px 16px; }
.opsc-job-detail__facts strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #7b8794; margin-bottom: 2px; }
.opsc-job-detail__desc { line-height: 1.7; color: var(--psc-ink); }
.opsc-job-detail__apply { display: inline-block; margin-top: 18px; background: var(--psc-teal); color: #fff; padding: 12px 26px; border-radius: 999px; font-family: var(--psc-font-head); font-weight: 600; }
.opsc-job-detail__apply:hover { background: #006a6a; color: #fff; text-decoration: none; }

/* Footer */
.opsc-footer { background: var(--psc-teal); color: #fff; margin-top: 0; }
.opsc-footer__inner { max-width: var(--psc-maxw); margin: 0 auto; padding: 34px 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.opsc-footer__brand img { height: 70px; width: auto; }
.opsc-footer__nav { display: flex; flex-wrap: wrap; gap: 20px; }
.opsc-footer__nav a { color: #fff; opacity: .92; }
.opsc-footer__nav a:hover { opacity: 1; text-decoration: underline; }
.opsc-footer__bar { border-top: 1px solid rgba(255,255,255,.18); }
.opsc-footer__bar { max-width: var(--psc-maxw); margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: rgba(255,255,255,.85); }

/* Responsive */
@media (max-width: 860px) {
	.opsc-nav__toggle { display: inline-flex; }
	.opsc-nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--psc-grey-line); box-shadow: var(--psc-shadow); display: none; }
	.opsc-header.is-open .opsc-nav { display: block; }
	.opsc-menu { flex-direction: column; padding: 6px 0; }
	.opsc-menu a { padding: 14px 24px; border-bottom: 1px solid var(--psc-grey-line); }
	.opsc-job { flex-direction: column; }
	.opsc-job__cta { align-self: flex-start; }
	.opsc-jobs__filters { flex-wrap: wrap; }
	.opsc-jobs__filter { flex: 1 1 45%; }
	.opsc-jobs__search { flex: 1 1 100%; }
}

/* Detail actions */
.opsc-job-detail__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.opsc-job-detail__contact { margin-top: 18px; color: var(--psc-ink); }
.opsc-job-detail__email { display: inline-block; background: #fff; border: 1px solid var(--psc-teal); color: var(--psc-teal); padding: 11px 24px; border-radius: 999px; font-family: var(--psc-font-head); font-weight: 600; }
.opsc-job-detail__email:hover { background: var(--psc-teal); color: #fff; text-decoration: none; }

/* --- Stay Updated (newsletter) --- */
.opsc-subscribe {
	background-color: #f2f1ef;
	background-image: url("assets/img/stay-updated-bg.svg");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	padding: 72px 24px 88px;
	text-align: center;
}
.opsc-subscribe__inner { max-width: 620px; margin: 0 auto; }
.opsc-subscribe__title {
	color: var(--psc-teal);
	font-size: clamp( 2rem, 4.5vw, 3rem );
	font-weight: 800;
	margin: 0 0 12px;
	letter-spacing: -.01em;
}
.opsc-subscribe__lead { color: #333; font-size: 1.05rem; margin: 0 0 26px; }
.opsc-subscribe__form {
	display: flex;
	max-width: 500px;
	margin: 0 auto;
	gap: 14px;
}
.opsc-subscribe__input {
	flex: 1;
	padding: 15px 18px;
	border: 1px solid #e2e0dc;
	border-radius: 6px;
	background: #fff;
	font-size: 1rem;
}
.opsc-subscribe__input:focus { outline: 2px solid var(--psc-teal); outline-offset: 1px; }
.opsc-subscribe__btn {
	padding: 15px 30px;
	border: 0;
	border-radius: 6px;
	background: #ef7f57;
	color: #fff;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	font-size: .85rem;
	cursor: pointer;
	transition: background .15s ease;
}
.opsc-subscribe__btn:hover { background: #e26c42; }
.opsc-subscribe__msg { font-weight: 600; margin: 0 0 18px; }
.opsc-subscribe__msg--ok { color: #1a7f4b; }
.opsc-subscribe__msg--err { color: #c0392b; }

/* footer social icons */
.opsc-footer__social { display: flex; align-items: center; gap: 16px; }
.opsc-footer__social a { color: rgba(255,255,255,.85); display: inline-flex; transition: color .15s ease; }
.opsc-footer__social a:hover { color: #fff; }

@media (max-width: 600px) {
	.opsc-subscribe__form { flex-direction: column; }
	.opsc-subscribe__btn { width: 100%; }
}
