/* ============================================================
   CIFACI Platform Experience V5 — 2026-08-21
   Sector hero imagery, readable category universes, title motion,
   opportunity workflow and simplified dashboard.
   ============================================================ */

/* --- Sector-specific hero backgrounds --- */
.page-hero.sector-visual-hero{
  min-height:470px;
  display:flex;
  align-items:center;
  background-size:cover!important;
  background-position:center center!important;
  background-repeat:no-repeat!important;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.page-hero.sector-visual-hero .container{
  max-width:1180px;
}
.page-hero.sector-visual-hero .eyebrow{
  background:rgba(0,45,52,.72);
  border:1px solid rgba(255,209,92,.38);
  padding:8px 12px;
  border-radius:999px;
  backdrop-filter:blur(8px);
}
.page-hero.sector-visual-hero h1{
  max-width:900px;
  color:#fff!important;
  text-shadow:0 5px 26px rgba(0,0,0,.38);
}
.page-hero.sector-visual-hero p{
  max-width:860px;
  color:#f1fbfc!important;
  text-shadow:0 2px 14px rgba(0,0,0,.38);
}

/* --- Large-title motion: visible but professional, never rapid flashing --- */
.page-title-word{
  display:inline-block!important;
  margin-right:.22em!important;
  animation:cifaciTitleWordIn .72s cubic-bezier(.2,.75,.25,1) both;
  animation-delay:calc(var(--word-index,0) * 65ms);
}
.page-title-word:last-child{margin-right:0!important}
.page-hero h1,.hero h1,.section h2,.section-title h2,.dashboard-welcome h2,.dash-top h1{
  animation:cifaciTitleGlow 5.5s ease-in-out infinite;
}
@keyframes cifaciTitleWordIn{
  from{opacity:0;transform:translateY(18px);filter:blur(7px)}
  to{opacity:1;transform:none;filter:blur(0)}
}
@keyframes cifaciTitleGlow{
  0%,72%,100%{text-shadow:0 0 0 rgba(201,150,26,0)}
  80%{text-shadow:0 0 18px rgba(239,196,84,.22)}
  88%{text-shadow:0 0 5px rgba(239,196,84,.08)}
}

/* --- Full category directory: no glued labels --- */
.sector-universe-list{
  display:grid;
  gap:14px;
  margin-top:22px;
}
.sector-universe-item{
  border:1px solid #dce7e9;
  border-radius:20px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,63,73,.05);
}
.sector-universe-item summary{
  display:grid!important;
  grid-template-columns:auto auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px!important;
  padding:17px 20px;
  cursor:pointer;
  list-style:none;
  color:#17343a;
}
.sector-universe-item summary::-webkit-details-marker{display:none}
.sector-universe-item summary::before{
  content:'▸';
  color:#005c67;
  font-weight:900;
  grid-column:1;
}
.sector-universe-item[open] summary::before{content:'▾'}
.sector-universe-code{
  display:inline-grid;
  place-items:center;
  width:42px;
  height:34px;
  border-radius:11px;
  background:#eaf7f8;
  color:#005c67;
  font-weight:900;
  grid-column:2;
  justify-self:start;
}
.sector-universe-item summary strong{
  grid-column:3;
  padding-left:0;
  margin-top:0;
  min-width:0;
  line-height:1.25;
}
.sector-universe-item summary em{
  grid-column:4;
  grid-row:1;
  color:#607079;
  font-size:13px;
  white-space:nowrap;
}
.sector-universe-categories{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px!important;
  padding:8px 20px 20px!important;
}
.sector-universe-categories a{
  display:flex!important;
  align-items:center;
  min-height:48px;
  padding:11px 13px!important;
  border:1px solid #e0e8ea;
  border-radius:13px;
  background:#f8fafb;
  color:#17343a!important;
  font-size:13px;
  line-height:1.35;
  word-break:normal;
  overflow-wrap:anywhere;
  transition:.2s ease;
}
.sector-universe-categories a:hover{
  border-color:#c9961a;
  background:#fff8e6;
  transform:translateY(-1px);
}
.sector-universe-actions{
  display:flex!important;
  gap:10px!important;
  flex-wrap:wrap;
  padding:0 20px 20px!important;
}
.category-search-box{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  background:#fff;
  border:1px solid #dce7e9;
  padding:12px 14px;
  border-radius:18px;
}
.category-search-box input{
  flex:1;
  min-width:0;
  border:0;
  outline:0;
  font-size:15px;
  background:transparent;
  color:#14232b;
}

/* --- Public opportunities --- */
.opportunity-public-actions{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin-top:18px;
}
.opportunity-public-actions span{
  color:var(--muted);
  font-size:13px;
}
.opportunity-action-card{scroll-margin-top:120px}
.opportunity-apply{margin-top:18px}
.opportunity-apply summary{list-style:none;width:max-content}
.opportunity-apply summary::-webkit-details-marker{display:none}
.opportunity-apply-form{
  display:grid;
  gap:10px;
  margin-top:16px;
  padding:20px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--bg);
}
.opportunity-apply-form label{font-weight:850;font-size:13px}
.opportunity-apply-form textarea,.opportunity-apply-form input[type=file]{
  width:100%;
  border:1px solid var(--line);
  background:var(--card);
  color:var(--ink);
  border-radius:12px;
  padding:12px;
}
.application-already{
  margin-top:18px;
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  padding:14px 16px;
  border-radius:16px;
  background:#edf8f4;
  border:1px solid #cce9dc;
}
.application-already span{font-size:12px;font-weight:900;text-transform:uppercase;color:#136b4a}

/* --- User opportunity application pages --- */
.application-detail-grid,.admin-interest-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin:20px 0;
}
.application-list{display:grid;gap:13px;margin-top:20px}
.application-list-card{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  padding:18px 20px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 10px 30px rgba(0,63,73,.06);
}
.application-list-card h3{margin:7px 0 4px;color:var(--teal)}
.application-list-card p,.application-list-card small{margin:0;color:var(--muted)}
.application-list-card>div:last-child{text-align:right;display:grid;gap:8px;justify-items:end}
.opportunity-help-card{margin:20px 0}
.direct-contact-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}

/* --- Dashboard: fewer decisions, clearer priorities --- */
.dashboard-primary-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:18px 0 24px;
}
.dashboard-primary-action{
  display:flex;
  align-items:center;
  gap:13px;
  padding:18px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:0 12px 34px rgba(0,63,73,.07);
  transition:.2s ease;
}
.dashboard-primary-action:hover{transform:translateY(-3px);border-color:#c9961a}
.dashboard-primary-action>span{
  flex:0 0 auto;
  width:44px;height:44px;
  display:grid;place-items:center;
  border-radius:14px;
  background:#eaf7f8;
  color:#005c67;
  font-size:21px;
  font-weight:900;
}
.dashboard-primary-action b{display:block;color:var(--teal);line-height:1.25}
.dashboard-primary-action small{display:block;color:var(--muted);margin-top:4px;line-height:1.35}
.ecosystem-dashboard{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.dashboard-shortcuts{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}
.dashboard-shortcuts a{
  padding:10px 13px;
  border-radius:999px;
  border:1px solid var(--line);
  background:var(--bg);
  color:var(--teal);
  font-weight:800;
  font-size:13px;
}
.dashboard-applications-mini{display:grid;gap:10px;margin-top:14px}
.dashboard-applications-mini a{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  background:var(--bg);
  border:1px solid var(--line);
  border-radius:14px;
}
.dashboard-applications-mini b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dashboard-applications-mini small{color:var(--muted)}

@media(max-width:1100px){
  .sector-universe-categories{grid-template-columns:repeat(3,minmax(0,1fr))}
  .dashboard-primary-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:820px){
  .page-hero.sector-visual-hero{min-height:390px}
  .sector-universe-categories{grid-template-columns:repeat(2,minmax(0,1fr))}
  .application-detail-grid,.admin-interest-grid{grid-template-columns:1fr}
  .ecosystem-dashboard{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:620px){
  .sector-universe-item summary{
    grid-template-columns:auto auto 1fr;
  }
  .sector-universe-item summary strong{grid-column:3}
  .sector-universe-item summary em{grid-column:3;grid-row:auto;white-space:normal;padding-left:0}
  .sector-universe-categories{grid-template-columns:1fr}
  .dashboard-primary-actions,.ecosystem-dashboard{grid-template-columns:1fr!important}
  .application-list-card{align-items:flex-start;flex-direction:column}
  .application-list-card>div:last-child{text-align:left;justify-items:start}
  .dashboard-applications-mini a{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
  .page-title-word,.page-hero h1,.hero h1,.section h2,.section-title h2,.dashboard-welcome h2,.dash-top h1{animation:none!important}
}

/* --- Title motion refinement for public and portal large headings --- */
.hero h1 .page-title-word,
.page-hero h1 .page-title-word,
.auth-brand h1 .page-title-word,
.dash-top h1 .page-title-word,
.dashboard-welcome h2 .page-title-word{
  display:inline-block;
  animation:cifaciTitleWordIn .72s cubic-bezier(.2,.75,.25,1) both;
  animation-delay:calc(var(--word-index,0) * 75ms);
}
.hero h1,
.page-hero h1,
.auth-brand h1,
.dash-top h1,
.dashboard-welcome h2{
  will-change:transform,opacity;
}
