/* CaDEA - Premium polish: sticky header, dropdown, portraits, refinements */

/* ===== STICKY HEADER ===== */
.cadea-sticky-wrapper{
  position:sticky;top:0;z-index:100;background:#fff;
  transform:translateZ(0);will-change:transform;
  transition:box-shadow .3s ease;
}
.cadea-sticky-wrapper.is-scrolled{box-shadow:0 6px 24px rgba(0,51,102,.12)}
.cadea-sticky-wrapper.is-scrolled .un-topbar{
  max-height:0;overflow:hidden;opacity:0;padding-top:0;padding-bottom:0;
  border:0 !important;
  transition:max-height .3s ease,opacity .2s ease,padding .3s ease;
}
.un-topbar{max-height:60px;opacity:1;transition:max-height .3s ease,opacity .25s ease}
.cadea-sticky-wrapper.is-scrolled .un-header .container{padding-top:10px !important;padding-bottom:10px !important}
.cadea-sticky-wrapper.is-scrolled .un-header .un-brand img{width:48px !important;height:48px !important}
.cadea-sticky-wrapper.is-scrolled .un-header .un-brand .titles .name{font-size:1.25rem !important}
.un-header .un-brand img,.un-header .un-brand .titles .name{transition:all .3s ease}
.cadea-sticky-wrapper.is-scrolled .tagline-strip{max-height:0;overflow:hidden;opacity:0;transition:max-height .3s ease,opacity .2s ease}
.tagline-strip{max-height:54px;opacity:1;transition:max-height .3s ease,opacity .3s ease}

/* ===== ENHANCED MEGA DROPDOWN (lisible) ===== */
.un-nav .menu .has-sub .submenu{
  position:absolute !important;top:100% !important;left:50% !important;
  transform:translateX(-50%) translateY(-6px) !important;
  width:auto !important;max-width:min(1080px,95vw) !important;min-width:860px !important;
  display:grid !important;grid-template-columns:repeat(4,1fr) !important;gap:6px !important;
  padding:18px !important;background:#fff !important;
  border:1px solid #d0d5dd !important;border-top:3px solid #009edb !important;
  border-radius:0 0 10px 10px !important;
  box-shadow:0 20px 50px rgba(0,51,102,.2) !important;
  opacity:0;visibility:hidden;
  transition:opacity .25s ease,transform .25s ease,visibility 0s linear .25s !important;
}
.un-nav .menu .has-sub:hover .submenu,
.un-nav .menu .has-sub.open .submenu{
  opacity:1 !important;visibility:visible !important;
  transform:translateX(-50%) translateY(0) !important;
  transition:opacity .25s ease,transform .25s ease,visibility 0s !important;
}
.un-nav .menu .has-sub .submenu a{
  display:flex !important;flex-direction:column !important;align-items:flex-start !important;gap:5px !important;
  padding:14px 16px !important;border:1px solid transparent !important;border-radius:8px !important;
  background:#f8fafc !important;font-weight:700 !important;font-size:.84rem !important;
  color:#003366 !important;text-transform:none !important;letter-spacing:0 !important;
  white-space:normal !important;line-height:1.3 !important;min-height:74px !important;
  transition:background .2s,border-color .2s,transform .15s !important;
}
.un-nav .menu .has-sub .submenu a:hover{background:#e8f4fb !important;border-color:#009edb !important;transform:translateY(-1px)}
.un-nav .menu .has-sub .submenu a small{
  display:block !important;margin-top:0 !important;font-size:.74rem !important;
  color:#5b6577 !important;font-weight:400 !important;white-space:normal !important;line-height:1.4 !important;
}
@media (max-width:1024px){
  .un-nav .menu .has-sub .submenu{
    position:static !important;transform:none !important;grid-template-columns:1fr !important;
    min-width:0 !important;max-width:none !important;background:#0d0d0d !important;border:0 !important;
    border-left:3px solid #009edb !important;box-shadow:none !important;padding:8px !important;margin:0 16px !important;
  }
  .un-nav .menu .has-sub .submenu a{
    background:transparent !important;color:#e8f4fb !important;
    border-bottom:1px solid #2a2a2a !important;border-radius:0 !important;min-height:auto !important;
  }
  .un-nav .menu .has-sub .submenu a small{color:#b8c5dc !important}
  .un-nav .menu .has-sub .submenu a:hover{background:#1a2a3a !important;color:#1cabe2 !important;border-color:#2a2a2a !important}
}

/* ===== PORTRAITS ===== */
.portrait-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:26px}
.portrait{
  background:#fff;border:1px solid #e5e9f0;border-radius:16px;padding:28px;
  transition:transform .4s cubic-bezier(.2,.8,.2,1),box-shadow .4s,border-color .3s;
  position:relative;overflow:hidden;
}
.portrait::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(to bottom,#009edb,#1cabe2);transform:scaleY(0);transform-origin:top;transition:transform .4s ease}
.portrait:hover{transform:translateY(-4px);box-shadow:0 18px 44px rgba(0,51,102,.12);border-color:#d0eaf8}
.portrait:hover::before{transform:scaleY(1)}
.portrait-head{display:flex;align-items:center;gap:16px;margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid #eef1f6}
.portrait-avatar{
  width:64px;height:64px;border-radius:50%;flex-shrink:0;
  background:linear-gradient(135deg,#003366,#0077a8);color:#fff;
  display:grid;place-items:center;font-weight:800;font-size:1.1rem;letter-spacing:.5px;
  border:3px solid #fff;box-shadow:0 6px 18px rgba(0,51,102,.2);
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;
}
.portrait-head h3{margin:0 0 5px;font-size:1.12rem;color:#003366 !important;font-weight:700;line-height:1.25}
.portrait-role{font-size:.78rem;color:#0077a8;font-weight:700;text-transform:uppercase;letter-spacing:.06em}
.portrait-body p{color:#2a3648;font-size:.92rem;line-height:1.7;margin:0 0 12px}
.portrait-body p:last-child{margin-bottom:0}
@media (max-width:880px){.portrait-grid{grid-template-columns:1fr}}

/* ===== PREMIUM REFINEMENTS ===== */
html{scroll-behavior:smooth}
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-track{background:#f0f1f4}
*::-webkit-scrollbar-thumb{background:#b8c5dc;border-radius:10px;border:2px solid #f0f1f4}
*::-webkit-scrollbar-thumb:hover{background:#003366}

a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:3px solid #009edb;outline-offset:2px;border-radius:4px;
}

.card,.person,.prog,.dash-card,.news-card,.event-card,.info-block,.job-card,.side-card{
  transition:transform .4s cubic-bezier(.2,.8,.2,1),box-shadow .4s cubic-bezier(.2,.8,.2,1),border-color .3s ease !important;
}

.btn{position:relative;overflow:hidden}
.btn::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at center,rgba(255,255,255,.3),transparent 60%);opacity:0;transition:opacity .3s;pointer-events:none}
.btn:hover::after{opacity:1}

p{hyphens:auto;-webkit-hyphens:auto}

@media (min-width:1400px){
  .container{max-width:1280px !important}
  body{font-size:17px}
}

.partner{filter:grayscale(12%);transition:filter .3s ease,transform .3s ease,border-color .3s ease,box-shadow .3s ease !important}
.partner:hover{filter:grayscale(0);transform:translateY(-3px) !important;box-shadow:0 8px 20px rgba(0,51,102,.12) !important}

.un-footer .social-row a{transition:background .25s,border-color .25s,color .25s,transform .25s !important}
.un-footer .social-row a:hover{transform:translateY(-3px) scale(1.05)}

.section-head h2{position:relative;padding-bottom:18px}
.section-head h2::after{content:"";position:absolute;left:50%;bottom:0;transform:translateX(-50%);width:60px;height:3px;background:linear-gradient(to right,#009edb,#1cabe2);border-radius:2px}

.spinner{display:inline-block;width:18px;height:18px;border:2.5px solid rgba(0,51,102,.15);border-top-color:#009edb;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== CHATBOT REFINEMENTS ===== */
.chatbot-launcher{box-shadow:0 10px 28px rgba(0,51,102,.3),0 0 0 6px rgba(28,171,226,.15) !important}
.chatbot-launcher:hover{box-shadow:0 16px 36px rgba(0,51,102,.4),0 0 0 8px rgba(28,171,226,.25) !important}
.chat-typing{display:inline-flex;align-items:center;gap:4px;padding:12px 16px;background:#fff;border:1px solid #e5e9f0;border-radius:14px;border-bottom-left-radius:4px}
.chat-typing span{width:7px;height:7px;background:#009edb;border-radius:50%;animation:typingDot 1.4s ease-in-out infinite}
.chat-typing span:nth-child(2){animation-delay:.15s}
.chat-typing span:nth-child(3){animation-delay:.3s}
@keyframes typingDot{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.chat-sources{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;padding-top:10px;border-top:1px dashed #e5e9f0}
.chat-sources a{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;background:#f0f8fc;border:1px solid #bfe1f1;border-radius:999px;font-size:.7rem;color:#0077a8 !important;text-decoration:none;font-weight:600}
.chat-sources a:hover{background:#009edb;color:#fff !important;border-color:#009edb}
.chat-web-badge{display:inline-flex;align-items:center;gap:5px;font-size:.7rem;color:#0077a8;font-weight:600;margin-bottom:6px;padding:3px 9px;background:rgba(0,158,219,.1);border-radius:999px;width:fit-content}
.chat-web-badge svg{width:11px;height:11px}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}
}

/* ===== PHOTO AVATARS (direction) ===== */
.avatar.has-photo,.portrait-avatar.has-photo{padding:0;overflow:hidden;background:#e8f4fb}
.avatar.has-photo img,.portrait-avatar.has-photo img{width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit}
.avatar{overflow:hidden}

/* ===== DASHBOARD honest states ===== */
.toppages li.empty{color:#5b6577;font-size:.86rem;font-style:normal;padding:8px 0;border:0}
.dash-card .hint{color:#5b6577;font-size:.8rem;margin-top:6px;display:block}
.dash-card .big{color:#003366}
