:root{
  --mec-wave-svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath d='M0,40 C120,90 240,10 360,50 C480,90 600,10 720,50 C840,90 960,10 1080,50 C1200,90 1320,10 1440,50 L1440 120 L0 120 Z' fill='%23ffffff' opacity='0.18'/%3E%3C/svg%3E");
  --mec-wave-svg-2:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120'%3E%3Cpath d='M0,50 C120,100 240,20 360,60 C480,100 600,20 720,60 C840,100 960,20 1080,60 C1200,100 1320,20 1440,60 L1440 120 L0 120 Z' fill='%23ffffff' opacity='0.14'/%3E%3C/svg%3E");

  /* Paleta base (azuis do mar) */
  --mec-navy:#145785;     /* base (onda 1) */
  --mec-navy-2:#1e6fa8;   /* médio */
  --mec-teal:#3c93d6;     /* claro */
  --mec-teal-2:#bfe7ff;   /* muito claro */

  --mec-accent-rgb:30,111,168;
  --mec-sand:#f3efe8;
  --mec-ink:#0f172a;
}


html, body { height: 100%; }

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--mec-ink);
  background: linear-gradient(180deg, rgba(var(--mec-accent-rgb),0.05), rgba(255,255,255,1) 30%);
}

/* Links */
a { color: var(--mec-navy-2); }
a:hover { color: var(--mec-teal); }

/* Navbar */
.mec-nav{
  background: linear-gradient(90deg, rgba(20,87,133,0.95) 0%, rgba(30,111,168,0.92) 55%, rgba(191,231,255,0.90) 100%);
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.16);
}
.mec-nav .navbar-brand{
  font-weight: 800;
  letter-spacing: 0.2px;
}

.mec-nav .brand-wrap{
  display:flex;
  align-items:center;
  gap: .55rem;
}
.mec-nav .brand-logo{
  height: 78px;
  width: auto;
  border-radius: .5rem;
  background: rgba(255,255,255,0.12);
  padding: .2rem .35rem;
}
.mec-nav .navbar-brand span{
  font-weight: 900;
  letter-spacing: 0.2px;
}
.mec-nav{
  position: relative;
  overflow: hidden;
}
.mec-nav::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:-1px;
  height: 54px;
  background-image: var(--mec-wave-svg);
  background-size: 1200px 60px;
  background-repeat: repeat-x;
  opacity: .55;
  pointer-events:none;
}
.mec-nav .nav-link{
  color: rgba(255,255,255,0.92);
  padding: .35rem .7rem;
  margin: .12rem .08rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
}
.mec-nav .nav-link:hover,
.mec-nav .nav-link:focus{
  color:#ffffff;
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
}
.mec-nav .nav-link.active{
  color:#ffffff;
  text-decoration: none;
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.28);
}
.mec-nav .nav-link{
  color: rgba(255,255,255,0.88);
}
.mec-nav .nav-link:hover,
.mec-nav .nav-link:focus{
  color: #ffffff;
}
.mec-nav .nav-link.active{
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Navbar: muitos itens (evitar corte em ecrãs médios) */
.mec-nav .navbar-collapse{
  flex-wrap: wrap;
  row-gap: 0.35rem;
}
.mec-nav .navbar-nav{
  flex-wrap: wrap;
}
.mec-nav .nav-link{
  white-space: nowrap;
}
#navSearchForm{
  min-width: 240px;
}

/* Hero */
.hero{
  position: relative;
  min-height: 44vh;
  display: flex;
  align-items: center;
  color: #ffffff;
  background-image: url('../img/banner_mec2026.jpg');
  background-size: cover;
  background-position: center;
}
.hero::before{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,48,74,0.92), rgba(16,77,118,0.64) 55%, rgba(var(--mec-accent-rgb),0.36));
}

/* Hero compact typography */
.hero .display-5{
  font-size: clamp(1.65rem, 2.1vw + 1rem, 2.55rem);
  line-height: 1.12;
}
.hero .lead{
  font-size: 1.04rem;
  line-height: 1.45;
}
.hero .btn{
  --bs-btn-padding-y: .62rem;
  --bs-btn-padding-x: 1.05rem;
  --bs-btn-font-size: 1rem;
}
@media (max-width: 575.98px){
  .hero{ min-height: 52vh; }
  .hero .btn{ width: 100%; }
}

.hero .container{
  position: relative;
  z-index: 1;
}
.badge-soft{
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.25);
  color: #ffffff;
}

/* Cards / Sections */
.card-soft{
  border: 1px solid rgba(15,23,42,0.08);
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.08);
  border-radius: 1.05rem;
  background: linear-gradient(180deg, rgba(var(--mec-accent-rgb),0.10), rgba(255,255,255,1) 38%);
}
.section-title{
  font-weight: 500;
  letter-spacing: -0.001em;
}

.page-header{
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, rgba(191,231,255,0.55) 0%, rgba(var(--mec-accent-rgb),0.06) 52%, #ffffff 100%);
}
.page-header::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:-1px;
  height: 65px;
  background-image: var(--mec-wave-svg-2);
  background-size: 1200px 60px;
  background-repeat: repeat-x;
  opacity: .50;
  pointer-events:none;
}
.title-card{
  position: relative;
  padding: 1.05rem 1.15rem;
  border-radius: 1.25rem;
  color: #ffffff;
  background: linear-gradient(70deg, rgba(20,87,133,0.95) 0%, rgba(30,111,168,0.92) 55%, rgba(60,147,214,0.90) 100%);
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.14);
  border: 1px solid rgba(255,255,255,0.22);
}
.title-card::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:-1px;
  height: 46px;
  border-bottom-left-radius: 1.25rem;
  border-bottom-right-radius: 1.25rem;
  background-image: var(--mec-wave-svg-2);
  background-size: 1200px 60px;
  background-repeat: repeat-x;
  opacity: .55;
  pointer-events:none;
}
.title-card .section-title{
  color:#ffffff;
}
.title-card .title-card-kicker{
  color: rgba(255,255,255,0.88);
}

/* Footer */
.site-footer{
  background: linear-gradient(90deg,
    rgba(20,87,133,0.96) 0%,
    rgba(30,111,168,0.92) 55%,
    rgba(191,231,255,0.90) 100%);
  color: rgba(255,255,255,0.90);
}
.site-footer a{ color: rgba(255,255,255,0.9); }
.site-footer a:hover{ color: #ffffff; }

/* Search */
.search-result{
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 0.9rem;
  padding: 1rem;
}
.search-result-link{
  display:block;
  text-decoration:none;
  color: inherit;
}
.search-result-link:hover,
.search-result-link:focus{
  background: rgba(var(--mec-accent-rgb),0.08);
  border-color: rgba(var(--mec-accent-rgb),0.25);
}
.search-muted{
  color: rgba(15,23,42,0.65);
}

/* Small tweaks */
.lead-tight{ line-height: 1.35; }

/* Buttons */
.btn-primary{
  background-color: var(--mec-teal);
  border-color: var(--mec-teal);
}
.btn-primary:hover, .btn-primary:focus{
  background-color: #2e82c0;
  border-color: #2e82c0;
}
.btn-outline-primary{
  color: var(--mec-navy-2);
  border-color: rgba(11,61,79,0.45);
}
.btn-outline-primary:hover, .btn-outline-primary:focus{
  background-color: rgba(var(--mec-accent-rgb),0.14);
  border-color: rgba(var(--mec-accent-rgb),0.55);
  color: var(--mec-navy);
}

/* Offcanvas nav */
.offcanvas{
  border-left: 1px solid rgba(15,23,42,0.10);
}
.offcanvas .offcanvas-header{
  background: linear-gradient(90deg, var(--mec-navy), var(--mec-navy-2) 60%, var(--mec-teal-2));
  color:#ffffff;
}
.offcanvas .offcanvas-title{
  font-weight: 900;
}
.offcanvas .btn-close{
  filter: invert(1) grayscale(1);
  opacity: .85;
}
.offcanvas:not(.mec-sidebar) .nav-link{
  color: var(--mec-navy-2);
  padding: .45rem .8rem;
  border-radius: 999px;
  margin: .12rem 0;
  background: rgba(var(--mec-accent-rgb),0.08);
  border: 1px solid rgba(11,61,79,0.10);
}
.offcanvas:not(.mec-sidebar) .nav-link:hover,
.offcanvas:not(.mec-sidebar) .nav-link:focus{
  background: rgba(var(--mec-accent-rgb),0.14);
  border-color: rgba(var(--mec-accent-rgb),0.35);
  color: var(--mec-navy);
}
.offcanvas:not(.mec-sidebar) .nav-link.active{
  background: rgba(11,61,79,0.14);
  border-color: rgba(11,61,79,0.22);
  color: var(--mec-navy);
}


/* =========================
   Left sidebar layout (desktop) + offcanvas (mobile)
   ========================= */
.mec-topbar{
  background: linear-gradient(90deg, var(--mec-navy), var(--mec-navy-2) 40%, var(--mec-teal) 75%, var(--mec-teal-2));
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.16);
  position: relative;
  overflow: hidden;
}
.mec-topbar::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:-1px;
  height: 46px;
  background-image: var(--mec-wave-svg);
  background-size: 1200px 60px;
  background-repeat: repeat-x;
  opacity: .55;
  pointer-events:none;
}
.topbar-brand{
  display:flex;
  align-items:center;
  gap:.55rem;
  text-decoration:none;
  color:#ffffff;
  font-weight: 900;
  letter-spacing: .2px;
}
.topbar-brand:hover{ color:#ffffff; opacity:.95; }
.topbar-logo{
  height: 78px;
  width: auto;
  border-radius: .65rem;
  background: rgba(255,255,255,0.12);
  padding: .2rem .3rem;
}

.mec-layout{
  display:flex;
  min-height: 100vh;
}
.mec-sidebar{
  background: linear-gradient(180deg,
    rgba(20,87,133,0.98) 0%,
    rgba(16,77,118,0.98) 45%,
    rgba(10,56,86,0.98) 100%);
  color: rgba(255,255,255,0.92);
}
.sidebar-inner{
  height: 100%;
  min-height: 100%;
  padding: 1rem 1rem 1.1rem 1rem;
  position: relative;
  overflow: hidden;
  display:flex;
  flex-direction: column;
}
.sidebar-inner::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:-1px;
  height: 62px;
  background-image: var(--mec-wave-svg);
  background-size: 1200px 60px;
  background-repeat: repeat-x;
  opacity: .55;
  pointer-events:none;
}
.sidebar-brand{
  display:flex;
  align-items:center;
  gap:.6rem;
  text-decoration:none;
  color:#ffffff;
  font-weight: 900;
  letter-spacing: .2px;
  margin-bottom: .85rem;
}
.sidebar-brand:hover{ color:#ffffff; opacity:.95; }
.sidebar-logo{
  height: 78px;
  width: auto;
  border-radius: .85rem;
  background: rgba(255,255,255,0.12);
  padding: .28rem .38rem;
}
.sidebar-search{
  margin-bottom: .9rem;
}
.sidebar-search .input-group-text,
.sidebar-search .form-control{
  border: 1px solid rgba(255,255,255,0.20) !important;
}
.sidebar-search .input-group-text{
  background: rgba(255,255,255,0.92) !important;
}
.sidebar-search .form-control{
  background: rgba(255,255,255,0.98);
}

.mec-sidenav{
  gap: .28rem;
  padding-right: .15rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.35) rgba(255,255,255,0.08);
  margin-bottom: .9rem;
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 4.25rem;
}
.mec-sidenav .nav-link{
  display: block;
  width: 100%;
  color: rgba(255,255,255,0.92);
  padding: .44rem .55rem;
  border-radius: .85rem;
  background: transparent;
  border: 1px solid transparent;
  transition: background-color .12s ease, border-color .12s ease;
  white-space: normal;
  line-height: 1.25;
  font-size: .96rem;
}
.mec-sidenav .nav-link:hover,
.mec-sidenav .nav-link:focus{
  color:#ffffff;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.16);
}
.mec-sidenav .nav-link.active{
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.22);
}

.mec-sidenav .nav-link.active{
  color:#ffffff;
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.28);
  text-decoration: none;
}
.sidebar-ctas{
  margin-top: auto;
}
.sidebar-meta{
  margin-top: .9rem;
  color: rgba(255,255,255,0.86);
}

.mec-content{
  flex: 1;
  min-width: 0;
}

/* Sidebar width and sticky behavior on desktop */
@media (min-width: 992px){
  .mec-sidebar{
    width: 330px;
    position: sticky;
    top: 0;
    height: 100vh;
  }
  .mec-sidebar .offcanvas-body{
    height: 100%;
  }
  .mec-content{
    width: calc(100% - 330px);
  }
}

/* Remove extra top padding when mobile topbar is visible */
@media (max-width: 991.98px){
  .mec-content{
    width: 100%;
  }
}


/* =========================================================
   MEC2026 — layout refinements (header + sidebar + spacing)
   ========================================================= */
html, body { overflow-x: hidden; }

/* App-shell: header + sidebar fixos; só o conteúdo (direita) faz scroll */
html, body { overflow: hidden; }

/* Evitar qualquer scroll horizontal */
.mec-layout,
.mec-sidebar,
.mec-sidebar .offcanvas-body,
.sidebar-inner,
.mec-content{ overflow-x: hidden; }

:root{
  /* valores por defeito; são recalculados em JS consoante a altura real do header */
  /* Nota: manter um valor por defeito próximo do real evita “faixa” branca antes do JS recalcular */
  --mec-header-h: 86px;
  --mec-sidebar-w: 240px;
}

.mec-header{
  background: linear-gradient(90deg,
    rgba(27,127,168,0.98) 0%,
    rgba(47,166,212,0.98) 45%,
    rgba(88,190,230,0.96) 78%,
    rgba(169,231,255,0.94) 100%);
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.10);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  z-index: 1050; /* acima de sidebar/conteúdo */
}
.mec-header::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:-1px;
  height: 62px;
  background-image: var(--mec-wave-svg);
  background-size: 1200px 60px;
  background-repeat: repeat-x;
  opacity: .55;
  pointer-events:none;
}

.mec-brand{
  display:flex;
  align-items:center;
  gap: 1.10rem;
  color:#ffffff;
  font-weight: 900;
  letter-spacing: .2px;
  min-width: 220px;
}
.mec-brand:hover{ color:#ffffff; opacity:.95; }
.mec-brand-logo{
  height: 78px;
  width: auto;
  border-radius: .85rem;
  background: rgba(255,255,255,0.12);
  padding: .16rem .22rem;
  transform: translateY(4px);
  margin-top: 6px !important; /* baixa o logo */
}


@media (min-width:992px){
  .mec-brand-logo{ margin-top: 8px !important; } /* desktop: baixa ligeiramente mais */
}

.mec-brand-title{
  font-size: 1.22rem;
  line-height: 1.05;
}
.mec-brand-subtitle{
  font-size: 1.1rem;
  font-weight: 700;
  opacity: .92;
  line-height: 1.1;
  white-space: nowrap;
}

.mec-brand-meta{
  font-size: .92rem;
  font-weight: 500;
  opacity: .88;
  line-height: 1.1;
  white-space: nowrap;
}

.mec-header-search{
  flex: 1 1 420px;
  min-width: 240px;
  max-width: 520px;
}
.mec-header-search .input-group-text,
.mec-header-search .form-control{
  border: 0;
}
.mec-header-search .input-group{
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.12);
}

.mec-layout{
  display: flex;
  height: 100vh;
  padding-top: var(--mec-header-h);
}

.mec-content{
  flex: 1 1 auto;
  min-width: 0;
  height: calc(100vh - var(--mec-header-h));
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-inner{
  padding: .25rem .55rem;
  padding-bottom: 1.0rem;
}
.sidebar-mobile-top{
  display: flex;
  justify-content: flex-end;
  padding: .1rem 0 .15rem;
}

.mec-sidenav{ margin-bottom: .55rem; gap: 0; }
.mec-sidenav .nav-link{
  padding: .10rem .05rem;
  border-radius: .6rem;
  border: 0;
  background: transparent;
  font-size: .90rem;
  line-height: 1.12;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.mec-sidenav .nav-ico{
  opacity: .75;
  font-size: .95em;
}
.mec-sidenav .nav-link:hover{
  background: rgba(255,255,255,0.10);
}
.mec-sidenav .nav-link.active{
  background: rgba(255,255,255,0.14);
}
.sidebar-ctas{ margin-top: .35rem; }

.sidebar-cta-btn{
  display: block;
  width: 92%;
  margin-left: auto;
  margin-right: auto;
  padding: .58rem .85rem;
  border-radius: .85rem;
}

@media (min-width: 992px){
  .offcanvas-lg.mec-sidebar{
    width: var(--mec-sidebar-w);
    position: fixed;
    top: var(--mec-header-h);
    left: 0;
    height: calc(100vh - var(--mec-header-h));
  }
  .mec-content{ margin-left: var(--mec-sidebar-w); }

  /* Em desktop, o menu não deve ter scroll próprio */
  .mec-sidenav{ overflow: hidden; }
}

@media (max-width: 991.98px){
  /* Mobile: conteúdo ocupa a largura toda; o menu abre em offcanvas */
  .mec-content{ margin-left: 0; }
  .mec-sidebar.offcanvas{
    top: var(--mec-header-h);
    height: calc(100vh - var(--mec-header-h));
  }
  .mec-sidebar.offcanvas .offcanvas-body{ height: 100%; }
  /* Em mobile, permitimos scroll vertical no menu para garantir acesso aos botões */
  .mec-sidebar.offcanvas .mec-sidenav{
    overflow-y: auto;
    max-height: calc(100vh - var(--mec-header-h) - 170px);
  }
}

/* Reduce vertical whitespace on internal pages */
.page-header{ padding-top: .45rem !important; padding-bottom: .45rem !important; }
.title-card{ padding: .75rem .95rem; }
.card-soft .card-body{ padding: 1.35rem !important; }
@media (min-width: 768px){
  .card-soft .card-body{ padding: 1.6rem !important; }
}


/* ===== MEC2026 v8 tweaks ===== */
:root{
  --mec-header-h: 86px;
}

/* Fixed header and fixed sidebar; only content scrolls */
.mec-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
}

.mec-layout{
  padding-top: var(--mec-header-h);
}

@media (min-width: 992px){
  body{ overflow: hidden; }
  .mec-sidebar{
    width: 280px !important;
    position: fixed !important;
    top: var(--mec-header-h) !important;
    left: 0;
    height: calc(100vh - var(--mec-header-h)) !important;
  }
  .mec-content{
    margin-left: 280px;
    height: calc(100vh - var(--mec-header-h));
    overflow-y: auto;
  }
}

@media (max-width: 991.98px){
  .mec-sidebar.offcanvas{
    top: var(--mec-header-h);
    height: calc(100vh - var(--mec-header-h));
  }
  .offcanvas-backdrop.show{
    top: var(--mec-header-h);
    height: calc(100vh - var(--mec-header-h));
  }
}

/* Sidebar spacing */
.sidebar-inner{
  padding: .75rem .75rem .9rem .75rem;
  overflow: hidden;
}
.mec-sidenav{
  gap: .36rem;
  margin-top: .2rem;
  padding-bottom: 1.2rem;
}
.mec-sidenav .nav-link{
  padding: .48rem .55rem;
  border-radius: .75rem;
}

/* Active indicator: left accent bar (no chevron) */
.mec-sidenav .nav-link{
  position: relative;
  padding-left: .85rem;
}
.mec-sidenav .nav-link::before{
  content:'';
  position:absolute;
  left:.35rem;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}
.mec-sidenav .nav-link.active::before{
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.35));
}

/* CTA buttons: slightly narrower and higher */
.sidebar-ctas{
  margin-top: .6rem;
}
.sidebar-cta-btn{
  width: 100%;
  padding: .6rem .65rem;
  font-size: .95rem;
}

/* Home hero with image */
.hero.hero-image{
  position: relative;
  color: #ffffff;
  overflow: hidden;
}
.hero.hero-image .hero-bg{
  position:absolute; inset:0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.02);
}
.hero.hero-image .hero-overlay{
  position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(14,79,99,0.35), rgba(19,120,139,0.22) 45%, rgba(24,183,179,0.18));
  }
.hero.hero-image > .container{ position: relative; z-index: 1; }

/* Footer with partner logos */
.site-footer{
  background: linear-gradient(90deg,
    rgba(20,87,133,0.96) 0%,
    rgba(30,111,168,0.92) 55%,
    rgba(191,231,255,0.90) 100%);
  border-top: 1px solid rgba(11,61,79,0.10);
}
.footer-logos{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: .35rem 0 .15rem 0;
}
.footer-logos img{
  max-width: 980px;
  width: 100%;
  height: auto;
  border-radius: .75rem;
}
.footer-copy{
  color: rgba(255,255,255,0.75);
  padding-top: .45rem;
}

/* Page wrapper to keep footer at bottom on short pages */
.mec-content{ display:flex; flex-direction:column; }
.mec-page{ min-height: 100%; display:flex; flex-direction:column; }

/* Make title cards slightly more compact */
.title-card{
  margin-top: .75rem !important;
}
.title-card .card-body{
  padding-top: .9rem !important;
  padding-bottom: .9rem !important;
}

.mec-header{background: linear-gradient(90deg, rgba(11,61,79,0.98), rgba(8,87,100,0.96) 40%, rgba(var(--mec-accent-rgb),0.92));}


/* =========================================================
   MEC2026 – FINAL OVERRIDES (v10)
   Objetivo: evitar cortes no hero, cores mais claras,
   header + sidebar fixos, e apenas conteúdo com scroll.
   ========================================================= */

html, body { height: 100%; }

body{
  overflow: hidden; /* evita scroll duplo; só .mec-content faz scroll */
}

/* Header ligeiramente mais alto e logo maior */
.mec-header .container-fluid{
  padding-top: .55rem !important;
  padding-bottom: .55rem !important;
}

/* Sidebar mais clara e ligeiramente mais estreita */
.mec-sidebar{
  background: linear-gradient(180deg,
    rgba(20,87,133,0.98) 0%,
    rgba(16,77,118,0.98) 45%,
    rgba(10,56,86,0.98) 100%);
  box-shadow: 10px 0 22px rgba(2, 6, 23, 0.10);
}

/* Menu: mais legível e com espaçamento moderado */
.mec-sidenav{
  gap: .42rem !important;
  padding-bottom: 0 !important;
  overflow-y: auto !important;
}
.mec-sidenav .nav-link{
  padding: .52rem .70rem !important;
  border-radius: 1rem !important;
}

/* Colocar CTAs mais acima e garantir que aparecem */
.sidebar-ctas{
  margin-top: .9rem !important;
}
.sidebar-cta-btn{
  width: 100% !important;
}

/* Layout “app shell”: header+sidebar fixos; só conteúdo scroll */
.mec-layout{
  height: 100vh;
  padding-top: var(--mec-header-h);
}

@media (min-width: 992px){
  .mec-sidebar.offcanvas-lg{
    position: fixed !important;
    left: 0;
    top: var(--mec-header-h);
    width: var(--mec-sidebar-w) !important;
    height: calc(100vh - var(--mec-header-h));
    transform: none !important;
    visibility: visible !important;
    display: block !important;
  }
  .mec-sidebar .offcanvas-body{
    height: 100%;
  }
  .sidebar-inner{
    padding: .85rem .75rem 1.0rem .75rem !important;
    height: 100%;
    overflow: hidden;
  }
  .mec-content{
    margin-left: var(--mec-sidebar-w) !important;
    height: calc(100vh - var(--mec-header-h)) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

/* Mobile: sidebar (offcanvas) sob o header fixo */
@media (max-width: 991.98px){
  .mec-sidebar.offcanvas{
    top: var(--mec-header-h) !important;
    height: calc(100vh - var(--mec-header-h)) !important;
  }
}

/* HERO: evitar cortes do texto (não usar flex centering) */
.hero.hero-image{
  display: block !important;
  min-height: clamp(320px, 46vh, 520px);
  overflow: hidden;
}
.hero.hero-image .container{
  position: relative;
  z-index: 2;
  padding-top: 1.1rem;
  padding-bottom: 1.4rem;
}
.hero.hero-image .hero-bg{
  filter: saturate(1.08) contrast(1.03) brightness(1.03);
}

/* Title cards mais claros do que menu/header */
.title-card{
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.12);
  border: 1px solid rgba(255,255,255,0.22);
}

/* Page header: garantir que não fica escondido */
.page-header{
  margin-top: 0 !important;
}


/* Footer partner logos (individual) */
.footer-logos-grid{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .85rem 1.15rem;
  padding: .25rem 0 .15rem 0;
}
.footer-logos-grid .partner-logo{
  height: 34px;
  width: auto;
  max-width: 160px;
  background: rgba(255,255,255,0.92);
  border-radius: .55rem;
  padding: .25rem .45rem;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.12);
}
@media (max-width: 480px){
  .footer-logos-grid .partner-logo{ height: 30px; }
}


/* Mobile fallback title inside first content card (Objetivos) */
.content-card-title{ display:none; }
@media (max-width: 991.98px){
  .content-card-title{ display:block; }
}


/* ===== MEC2026 v15 palette override (hero-ocean blue) ===== */
:root{
  --mec-ocean-dark: #37577a;
  --mec-ocean-mid:  #537ead;
  --mec-ocean-light:#7da5d1;
  --mec-ocean-title:#9cbfe6;
}

/* Header + sidebar with consistent ocean-blue gradient */
.mec-header{
  background: linear-gradient(90deg,
    rgba(55,87,122,0.98) 0%,
    rgba(83,126,173,0.98) 48%,
    rgba(125,165,209,0.96) 80%,
    rgba(230,245,255,0.92) 100%) !important;
}
.mec-sidebar{
  background: linear-gradient(180deg,
    rgba(20,87,133,0.98) 0%,
    rgba(16,77,118,0.98) 45%,
    rgba(10,56,86,0.98) 100%);
}

/* Title cards: azul um pouco mais escuro para dar contraste (sobretudo no Firefox) */
.title-card{
  position: relative;
  padding: 1.05rem 1.15rem;
  border-radius: 1.25rem;
  color: #ffffff;
  background: linear-gradient(70deg, rgba(20,87,133,0.95) 0%, rgba(30,111,168,0.92) 55%, rgba(60,147,214,0.90) 100%);0%,
    rgba(125,165,209,0.96) 55%,
    rgba(156,191,230,0.92) 100%) !important;
}

/* Afinar espaçamentos globais (ganhar espaço útil no topo) */
.sidebar-inner{ padding-top: .55rem !important; }
.hero.hero-image .container{ padding-top: 1.0rem !important; padding-bottom: 1.0rem !important; }

/* Ensure the app-shell layout is stable and titles never hide behind fixed header */
.mec-layout{ height: 100vh !important; padding-top: var(--mec-header-h) !important; overflow: hidden !important; }
.mec-content{ height: calc(100vh - var(--mec-header-h)) !important; overflow-y: auto !important; overflow-x: hidden !important; }
.page-header{ margin-top: 0 !important; }

/* Footer partner logos */
.site-footer{
  background: linear-gradient(90deg,
    rgba(20,87,133,0.96) 0%,
    rgba(30,111,168,0.92) 55%,
    rgba(191,231,255,0.90) 100%); }
.footer-logos{
  display:flex;
  flex-wrap:wrap;
  gap: 14px 22px;
  align-items:center;
  justify-content:center;
}
.footer-logos img{
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  filter: none;
}
@media (max-width: 575.98px){
  .footer-logos img{ height: 34px; max-width: 180px; }
}

/* === v19 Layout & UX tweaks (sidebar, hero, title-cards, offcanvas close) === */
:root{
  /* Slightly narrower sidebar so all items fit more often */
  --mec-sidebar-w: 228px;
}

/* Make sure only the right content pane scrolls */
html, body{ height: 100%; }
body{ overflow: hidden; }

/* Fixed sidebar in desktop, with internal vertical scroll (never horizontal) */
@media (min-width: 992px){
  .mec-sidebar{
    position: fixed !important;
    top: var(--mec-header-h);
    left: 0;
    bottom: 0;
    width: var(--mec-sidebar-w);
    transform: none !important;
    visibility: visible !important;
  }
  .mec-sidebar .offcanvas-body{
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .sidebar-inner{
    height: 100%;
    overflow: hidden;
  }
  .mec-sidenav{
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: .15rem; /* keep scrollbar from overlaying text */
  }
}

/* Compact the menu so the last item (Contactos) is visible more often */
.mec-sidenav{
  margin-top: .15rem;
  padding-bottom: 2.75rem;
}
.mec-sidenav .nav-link{
  padding: .18rem .40rem !important;
  line-height: 1.12;
  font-size: .98rem;
}
.mec-sidenav .nav-link + .nav-link{ margin-top: .10rem; }

/* CTA buttons a bit slimmer */
.sidebar-ctas{
  padding: .55rem .55rem .65rem;
}
.sidebar-ctas .btn{
  width: 100%;
  padding: .52rem .75rem;
}

/* Reduce hero height slightly */
.hero{ min-height: 36vh; }
@media (max-width: 575.98px){
  .hero{ min-height: 30vh; }
}

/* Give page headers a reliable top offset (helps Firefox/mobile) */
.mec-page{ padding-top: 14px; }
.page-header{ padding-top: .35rem; }

/* Title-card: slightly darker fill for better legibility */
.title-card{
  position: relative;
  padding: 1.05rem 1.15rem;
  border-radius: 1.25rem;
  color: #ffffff;
  background: linear-gradient(70deg, rgba(20,87,133,0.95) 0%, rgba(30,111,168,0.92) 55%, rgba(60,147,214,0.90) 100%);, rgba(166,228,255,.88)) !important;
}



/* =========================
   v21 Ajustes (Home/Menu/Firefox)
   ========================= */

/* Home: 1º card (introdução) um pouco mais compacto */
.home-intro-card .card-body{
  font-size: 1.0rem;
  line-height: 1.55;
}

/* Home: cards Local/Datas/Programa */
.home-quick .card-body{
  padding-top: 0.95rem !important;
  padding-bottom: 1.05rem !important;
}
.home-quick .section-title{
  margin-top: 0 !important;
  margin-bottom: 0.55rem !important;
}
.home-quick .section-title i{
  font-size: 1.05rem;
}
.home-quick .h5{
  font-size: 1.12rem;
}

/* Home: cards Participação/Pesquisa */
.home-actions h2.h4{
  margin-bottom: 0.65rem !important;
}
.home-actions .card-body{
  padding-top: 1.05rem !important;
  padding-bottom: 1.05rem !important;
}

/* Sidebar: permitir scroll vertical sempre que necessário e manter CTA no fundo */
.sidebar-inner{
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.mec-sidenav{
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: .25rem; /* evita cortar scrollbar */
}
.mec-sidenav .nav-link{
  margin: 0.08rem 0;
  padding: .50rem .65rem;
  white-space: normal;
}
.sidebar-ctas{
  margin-top: .75rem;
}

/* Evitar qualquer scroll horizontal */
.mec-sidenav, .mec-sidebar, body{
  overflow-x: hidden;
}

/* Page header: garantir que o título fica acima do efeito “ondas” (Firefox) */
.page-header{
  position: relative;
}
.page-header::after{
  z-index: 0;
}
.page-header .container{
  position: relative;
  z-index: 1;
}

/* Hero: ligeiramente menos alto */
.hero{
  min-height: 50vh;
}
@media (max-width: 576px){
  .hero{ min-height: 46vh; }
}

/* =========================
   FINAL OVERRIDES (v22)
   Oceanic palette + UX fixes
   ========================= */

:root{
  --ocean-blue: #2b6f8e;
  --ocean-teal: #1f8a93;
  --ocean-green: #17a07f;
  --ocean-ink: #07324a;
  --ocean-mist: rgba(255,255,255,0.72);
}

/* Lock horizontal overflow */
html, body { overflow-x: hidden !important; }

/* Header + sidebar oceanic gradient */
.mec-header{
  background: linear-gradient(90deg, rgba(7,50,74,0.96), rgba(43,111,142,0.94) 35%, rgba(31,138,147,0.92) 70%, rgba(23,160,127,0.90)) !important;
}
.mec-sidebar{
  background: linear-gradient(180deg,
    rgba(20,87,133,0.98) 0%,
    rgba(16,77,118,0.98) 45%,
    rgba(10,56,86,0.98) 100%);
}

/* Sidebar layout: nav scrolls, CTAs stay visible */
.sidebar-inner{
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
}
.mec-sidenav{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
.mec-sidenav .nav-link{
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  margin: 2px 0 !important;
}
.mec-sidenav .nav-link.active{
  outline: 2px solid rgba(255,255,255,0.35) !important;
  outline-offset: -2px !important;
  background: rgba(255,255,255,0.10) !important;
}
.sidebar-cta{
  margin-top: auto !important;
}

/* Page header title card: pale blue, slightly darker for legibility */
.page-header .page-title-card{
  background: linear-gradient(90deg, rgba(109,147,188,0.95), rgba(160,206,233,0.85)) !important;
}

/* Ensure page header is never collapsed/hidden (Firefox/mobile robustness) */
.page-header{ display: block !important; min-height: 84px; }

/* Content spacing below fixed header */
.mec-page{ padding-top: 18px !important; }

/* Hero compact: image only in top band */
.hero.hero--compact{
  min-height: 42vh !important;
  height: auto !important;
  padding: 28px 0 18px !important;
}
@media (max-width: 1050.98px){
  .hero.hero--compact{ min-height: 34vh !important; padding: 22px 0 14px !important; }
}

.hero-badges{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 10px; }
.badge-pill{
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-weight: 600;
  font-size: 1.02rem;
}

@media (max-width: 575.98px){
  .badge-pill{ padding: 7px 10px; font-size: .96rem; }
}

/* Glass cards (home) */
.glass-card{
  background: rgba(255,255,255,0.82) !important;
  border: 1px solid rgba(7,50,74,0.10) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
  backdrop-filter: blur(8px);
}

.home-feature-card{ border-radius: 18px !important; }
.home-feature-card .card-body{ padding-top: 18px !important; }
.home-feature-card .card-title{ font-size: 1.35rem !important; }
.home-feature-card p, .home-feature-card li{ font-size: 0.98rem !important; }

.home-intro-card{ border-radius: 18px !important; }
.home-intro-card .home-intro-text{ font-size: 1.02rem !important; line-height: 1.55; }

.home-participation-card{ border-radius: 18px !important; }
.home-participation-card .home-participation-text{ font-size: 1.02rem !important; }

/* Scroll-to-top button */
.to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(7,50,74,0.78);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1060;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.to-top.is-visible{ opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover{ background: rgba(31,138,147,0.88); }


/* Hide subtitle line in page title cards (except Home which has no page-header) */
.page-header .page-header-subtitle{display:none !important;}


/* Alias */
.glass{background:rgba(255,255,255,0.78);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,0.45);box-shadow:0 12px 30px rgba(0,0,0,0.08);}


/* Ensure first title card is never hidden under fixed header (Firefox/mobile quirks) */
.mec-page > header.page-header{ margin-top: 14px !important; }


/* Slightly shorter hero */
.hero.hero--compact{ min-height: 34vh !important; }
@media (max-width: 991.98px){ .hero.hero--compact{ min-height: 30vh !important; } }


/* Larger logo (v36) */
.mec-brand-logo{ height: 60px !important; }
@media (max-width: 575.98px){ .mec-brand-logo{ height: 52px !important; } }


/* =========================================================
   MEC2026 v20 fixes (Home + menu + title-card palette)
   ========================================================= */

/* Sidebar: compactar espaçamento para caberem todos os itens sem cortar */
.mec-sidenav{ gap: .18rem !important; padding-bottom: 3.4rem !important; }
.mec-sidenav .nav-link{
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: .92rem !important;
  line-height: 1.2 !important;
}
.sidebar-inner{ padding: .55rem .9rem .95rem .9rem !important; }
.sidebar-cta-btn{ padding: .55rem .65rem !important; font-size: .92rem !important; }

/* Home hero: mostrar a imagem o mais completa possível (evitar cortes) */
.hero.hero--compact{
  min-height: 46vh !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-color: rgba(7,50,74,0.98) !important;
}
.hero-overlay-text{
  max-width: 64rem;
  margin-top: .55rem;
  margin-bottom: 0;
  font-size: 1.02rem;
  line-height: 1.45;
  color: rgba(255,255,255,0.96);
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
@media (max-width: 575.98px){
  .hero-overlay-text{ font-size: .98rem; }
}

@media (max-width: 991.98px){
  .hero.hero--compact{ min-height: 40vh !important; }
}

/* Home cards topo: mais pequenos, tipografia mais discreta */
.home-cards-top{ margin-top: 16px; }
.card-compact .card-body{ padding: .75rem .85rem !important; }
.card-compact .card-title-row{ display:flex; align-items:center; gap:.55rem; margin-bottom: .35rem; }
.card-compact .card-title-row i{ font-size: 1.05rem; opacity: .9; }
.card-compact .card-title-row h3{ font-size: 1.02rem; margin: 0; }
.card-compact p,
.card-compact li{
  font-size: .92rem;
  line-height: 1.35;
}
.card-compact .btn{ --bs-btn-padding-y: .32rem; --bs-btn-padding-x: .6rem; --bs-btn-font-size: .86rem; }

/* Title cards (Objetivos e restantes páginas): degradé em tons alaranjados (suave) + ondinhas existentes */
.title-card{
  position: relative;
  padding: 1.05rem 1.15rem;
  border-radius: 1.25rem;
  color: #ffffff;
  background: linear-gradient(70deg, rgba(20,87,133,0.95) 0%, rgba(30,111,168,0.92) 55%, rgba(60,147,214,0.90) 100%);0%,
    rgba(196, 136, 88, 0.88) 52%,
    rgba(235, 205, 170, 0.82) 100%) !important;
  border: 1px solid rgba(255,255,255,0.26) !important;
}

/* Footer: garantir que nunca "entra" em cima do último card */
.site-footer{ flex-shrink: 0; position: relative; z-index: 1; margin-top: 1.25rem; }


/* =========================================================
   MEC2026 v20.1 hotfixes (menu scroll + hero width + softer palettes)
   ========================================================= */

/* Sidebar: garantir que todos os itens são acessíveis (scroll vertical quando necessário) */
.offcanvas-lg.mec-sidebar,
.mec-sidebar .offcanvas-body,
.sidebar-inner{
  overflow-y: auto !important;
}
.mec-sidenav{
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: calc(100vh - var(--mec-header-h) - 190px) !important;
  scrollbar-width: thin;
}
.mec-sidenav .nav-link{
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  font-size: .88rem !important;
  line-height: 1.10 !important;
}

/* Home hero: ocupar toda a largura (sem faixa vazia), mantendo boa legibilidade */
.hero.hero--compact{
  width: 100% !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center 40% !important;
  background-color: rgba(7,50,74,0.98) !important;
  padding: 14px 0 12px !important;
}
.hero.hero--compact .hero-badges{
  margin-top: 0 !important;
  margin-bottom: 6px !important;
}

/* Badges um pouco mais próximas do topo */
.badge-pill{ padding: 5px 9px; }

/* Cards da 1ª página (Local / Datas / Programa): degradé muito suave azul-esverdeado */
.home-cards-top .glass-card{
  background: linear-gradient(135deg,
    rgba(23,160,127,0.10) 0%,
    rgba(31,138,147,0.08) 45%,
    rgba(255,255,255,0.86) 100%) !important;
}

/* Títulos das páginas internas: degradé alaranjado bem mais suave */
.title-card{
  position: relative;
  padding: 1.05rem 1.15rem;
  border-radius: 1.25rem;
  color: #ffffff;
  background: linear-gradient(70deg, rgba(20,87,133,0.95) 0%, rgba(30,111,168,0.92) 55%, rgba(60,147,214,0.90) 100%);0%,
    rgba(236, 196, 164, 0.74) 52%,
    rgba(250, 235, 222, 0.70) 100%) !important;
}


/* =========================================================
   MEC2026 v20.5 hotfixes (home cards uniform + mobile hero readability)
   ========================================================= */

/* Home: aplicar a mesma tonalidade (como "Programa") a TODOS os cards */
.home-page .glass-card{
  background: linear-gradient(135deg,
    rgba(23,160,127,0.10) 0%,
    rgba(31,138,147,0.08) 45%,
    rgba(255,255,255,0.86) 100%) !important;
}

/* Home: títulos dos cards em bold */
.home-page .glass-card h3,
.home-page .card-title-row h3{
  font-weight: 800 !important;
}

/* Flex layout: impedir que o hero "encolha" (evita texto a passar por trás dos cards em mobile) */
.mec-page > .hero{ flex: 0 0 auto !important; }

/* Hero: garantir overlay fora do fluxo e tipografia legível em mobile */
.hero.hero--compact{ align-items: flex-start !important; }
.hero.hero--compact::before{ display:none !important; }
.hero.hero--compact .hero-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,43,58,0.88), rgba(11,61,79,0.58) 55%, rgba(31,138,147,0.34));
  z-index: 0;
}
.hero.hero--compact .hero-inner{ position: relative; z-index: 1; }

/* Home hero: CTAs logo a seguir ao texto (responsivo) */
.hero-ctas{
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-ctas .btn{ font-weight: 700; }

@media (max-width: 575.98px){
  .hero.hero--compact{ padding-top: 22px !important; padding-bottom: 18px !important; }
  .hero-title{ font-size: 1.90rem !important; line-height: 1.12 !important; margin-top: 2px !important; }
  .hero-overlay-text{ font-size: .98rem !important; line-height: 1.50 !important; }
  .hero-ctas{ flex-direction: column; }
  .hero-ctas .btn{ width: 100%; }
}
.title-card .title-card-kicker{
  color: rgba(255,255,255,0.88); }


/* =========================================================
   MEC2026 v20.2 hotfixes
   - Menu: scroll real em desktop e mobile (sem cortar itens)
   - Title-card: degradé ainda mais suave, partindo do “halo”
   ========================================================= */

/* Menu: garantir que o container do sidebar usa flex (Bootstrap offcanvas) e que
   o scroll acontece no bloco de navegação, não “corta” em desktop nem em mobile. */
.mec-sidebar{ overscroll-behavior: contain; }
.mec-sidebar .offcanvas-body{
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
}
.sidebar-inner{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.mec-sidenav{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: none !important;
  -webkit-overflow-scrolling: touch;
}

/* Desktop: nunca desativar overflow do menu (havia regras antigas que o escondiam) */
@media (min-width: 992px){
  .mec-sidebar.offcanvas-lg{
    display: flex !important;
    flex-direction: column !important;
  }
  .mec-sidenav{ overflow-y: auto !important; }
}

/* Mobile: o offcanvas deve ocupar o ecrã útil e permitir scroll dentro do menu */
@media (max-width: 991.98px){
  .mec-sidebar.offcanvas{
    display: flex !important;
    flex-direction: column !important;
  }
}

/* Title-card: partir do “halo” do page-header e transitar para laranjas muito suaves */
.title-card{
  position: relative;
  padding: 1.05rem 1.15rem;
  border-radius: 1.25rem;
  color: #ffffff;
  background: linear-gradient(70deg, rgba(20,87,133,0.95) 0%, rgba(30,111,168,0.92) 55%, rgba(60,147,214,0.90) 100%);0%,
    rgba(236, 196, 164, 0.50) 48%,
    rgba(255, 248, 242, 0.72) 100%) !important;
  border-color: rgba(255,255,255,0.32) !important;
}
.title-card .section-title{
  text-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

/* =========================================================
   MEC2026 v20.3 hotfixes
   - Desktop: garantir que "Contactos" aparece (sem ser tapado pelos CTAs)
   - Scroll do menu: só no bloco de navegação (desktop+mobile)
   - Mobile: evitar corte do título no hero (header height + tipografia)
   - Páginas internas: remover "halo" (glow) do card de título
   ========================================================= */

/* Sidebar: não criar scroll no contentor; o scroll pertence ao nav */
.offcanvas-lg.mec-sidebar,
.mec-sidebar .offcanvas-body,
.sidebar-inner{
  overflow-y: hidden !important;
}

/* Navegação: scroll vertical real quando necessário */
.mec-sidenav{
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: .35rem !important; /* evita que o último item fique "escondido" */
}

/* Reduzir ligeiramente o consumo vertical (para caber "Contactos" em desktop) */
.mec-sidenav .nav-link{
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  font-size: .89rem !important;
}

/* CTAs: manter visíveis mas sem tapar a navegação */
.sidebar-ctas{ margin-top: .55rem !important; }
.sidebar-cta-btn{ padding: .52rem .62rem !important; }

/* HERO: tipografia própria para o h1 usado na home */
.hero-title{
  font-size: clamp(1.85rem, 2.25vw + 1.0rem, 3.05rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 .35rem 0;
  text-shadow: 0 2px 14px rgba(0,0,0,0.35);
}
@media (max-width: 575.98px){
  .hero.hero--compact{ padding-top: 18px !important; }
  .hero-title{
    font-size: 1.95rem;
    line-height: 1.08;
  }
}

/* Páginas internas: remover halo/glow do card de título */
.title-card{
  box-shadow: none !important;
  outline: none !important;
  border: 0 !important;
}

/* =========================================================
   MEC2026 v20.5 hotfixes (home cards uniform + mobile hero)
   ========================================================= */

/* Home: aplicar a mesma tonalidade (tipo "Programa") a TODOS os cards */
.home-page .glass-card{
  background: linear-gradient(135deg,
    rgba(23,160,127,0.10) 0%,
    rgba(31,138,147,0.08) 45%,
    rgba(255,255,255,0.86) 100%) !important;
}

/* Home: títulos a bold */
.home-page .glass-card h3,
.home-page .card-title-row h3{
  font-weight: 800 !important;
}

/* Evitar que o layout em flex encolha o hero e faça sobreposição do texto nos cards */
.mec-page > .hero{ flex: 0 0 auto !important; }
.mec-page > main{ flex: 0 0 auto !important; }

/* Hero: garantir overlay fora do fluxo e melhorar legibilidade em mobile */
.hero.hero--compact{ align-items: flex-start !important; }
.hero.hero--compact .hero-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,43,58,0.86), rgba(11,61,79,0.58) 55%, rgba(var(--mec-accent-rgb),0.32));
  pointer-events: none;
}
.hero.hero--compact .hero-inner{
  position: relative;
  z-index: 1;
  padding-top: 4px;
  padding-bottom: 10px;
}

@media (max-width: 575.98px){
  .hero.hero--compact{ padding-top: 22px !important; padding-bottom: 14px !important; }
  .hero-title{ line-height: 1.12 !important; }
  .hero-overlay-text{ font-size: .96rem !important; line-height: 1.40 !important; }
}

/* =========================================================
   MEC2026 fix (cliente): menu completo + CTAs apenas no menu
   - Garantir que TODOS os itens (incl. "Contactos" e "Eventos anteriores")
     ficam acessíveis em desktop e mobile.
   ========================================================= */

/* Sidebar: o scroll deve ocorrer no bloco de navegação (desktop + mobile) */
.mec-sidebar .offcanvas-body{
  display: flex !important;
  flex-direction: column !important;
}
.sidebar-inner{
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.mec-sidenav{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: .6rem !important;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 992px){
  .mec-sidenav{ overflow-y: auto !important; }
}

/* =========================================================
   Eventos anteriores: accordion
   - remove o azul default do Bootstrap quando aberto
   - alinha com a paleta teal/azul do site
   ========================================================= */

.mec-page .accordion{
  /* Bootstrap accordion CSS vars */
  --bs-accordion-bg: rgba(255,255,255,0.92);
  --bs-accordion-border-color: rgba(var(--mec-accent-rgb),0.18);

  --bs-accordion-btn-color: var(--mec-ink);
  --bs-accordion-btn-bg: rgba(var(--mec-accent-rgb),0.06);

  --bs-accordion-active-color: var(--mec-navy);
  --bs-accordion-active-bg: linear-gradient(90deg,
    rgba(var(--mec-accent-rgb),0.16) 0%,
    rgba(255,255,255,0.90) 72%);

  --bs-accordion-btn-focus-border-color: rgba(var(--mec-accent-rgb),0.38);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 .15rem rgba(var(--mec-accent-rgb),0.18);
}

.mec-page .accordion .accordion-button{
  font-weight: 700;
}

.mec-page .accordion .accordion-button:not(.collapsed){
  box-shadow: none;
}

.mec-page .accordion .accordion-item{
  border-radius: 14px;
  overflow: hidden;
}

.mec-page .accordion .accordion-item + .accordion-item{
  margin-top: .6rem;
}

/* =========================
   Fix: remover faixa branca entre header fixo e conteúdo
   ========================= */
/* O offset já é dado por .mec-layout (padding-top = --mec-header-h).
   Portanto, evitamos padding/margens extra no início da página. */
.mec-page{ padding-top: 0 !important; }
.mec-page > header.page-header{ margin-top: 0 !important; }
/* Mantém um pequeno respiro apenas dentro do próprio header de página */
.page-header{ margin-top: 0 !important; }

/* =========================================================
   Fixes: Header contínuo (sem “blocos”) + remover linha branca
   Nota: o header está em position:fixed e usa gradientes com alpha.
   Quando o fundo por trás difere (sidebar vs conteúdo), pode parecer
   que existem “retângulos” de cor. Forçamos gradiente opaco e garantimos
   que as ondas não ficam tapadas por filhos.
   ========================================================= */

.mec-header{
  background: linear-gradient(90deg,
    #07324a 0%,
    #2b6f8e 35%,
    #1f8a93 70%,
    #17a07f 100%) !important;
  border-bottom: 0 !important;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.12) !important;
}

/* Ondas sempre visíveis e sem “linha” branca no limite inferior */
.mec-header::after{ z-index: 0; bottom: -2px; }
.mec-header > .container-fluid{ position: relative; z-index: 1; background: transparent !important; }

/* =========================================================
   Fix: subtítulo do header da página Pesquisa não ficar cortado
   Motivo: o pseudo-elemento ::after da .title-card podia sobrepor-se
   ao texto (stacking), especialmente em mobile/Firefox.
   ========================================================= */

.title-card{ padding-bottom: 1.25rem; }
.title-card::after{ z-index: 0; }
.title-card > *{ position: relative; z-index: 1; }

/* =========================================================
   FIX (v36): Header geral com ondas contínuas (100% largura)
   - Remove a “linha branca” pós-header
   - Evita o efeito de “retângulos” nas extremidades
   ========================================================= */

/* Gradiente opaco (não deixa transparecer sidebar/conteúdo por baixo) */
.mec-header{
  background: linear-gradient(90deg,
    #0b3d4f 0%,
    #0e6070 42%,
    #1f8a93 72%,
    #1bb7b3 100%) !important;
  border-bottom: 0 !important;
}

/* As ondas deixam de estar num “strip” e passam a cobrir o header todo */
.mec-header::after{ display:none !important; }
.mec-header::before{
  content:'';
  position:absolute;
  inset:-1px;
  pointer-events:none;
  z-index: 0;
  /* 3 camadas para dar sensação de ondas em todo o header */
  background-image: var(--mec-wave-svg), var(--mec-wave-svg-2), var(--mec-wave-svg);
  background-repeat: repeat-x, repeat-x, repeat-x;
  background-size: 1100px 70px, 1400px 85px, 1700px 95px;
  background-position: 0 18%, 0 58%, 0 calc(100% + 14px);
  opacity: .55;
}

/* Garantir stacking correto (ondas atrás, conteúdo à frente) */
.mec-header > .container-fluid{ position: relative; z-index: 1; background: transparent !important; }


/* Shell loader fallback */
html.mec-shell-failed body{ overflow:auto !important; }
html.mec-shell-failed .mec-layout,
html.mec-shell-failed .mec-content{ height:auto !important; overflow:visible !important; padding-top:0 !important; }
html.mec-shell-loading body{ overflow:auto !important; }


/* =========================================================
   Header compacto + pesquisa responsiva (v58)
   Objetivos:
   - Reduzir altura do header sem mexer no tamanho visual do logo
   - Evitar sobreposição do campo de pesquisa em ecrãs pequenos
   ========================================================= */

/* O header não deve ter altura fixa; a variável --mec-header-h é calculada em JS */
.mec-header{
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important; /* permite o logo “sair” sem aumentar a altura */
}

/* Por defeito (mobile/tablet): deixar o header crescer e permitir wrap */
.mec-header > .container-fluid{
  height: auto !important;
  min-height: 0 !important;
  flex-wrap: wrap !important;
  gap: .55rem !important;
  padding-top: .35rem !important;   /* sobrepõe py-1 do Bootstrap */
  padding-bottom: .35rem !important;
}

/* Alinhamento vertical consistente do bloco de texto do branding */
.mec-brand-text{
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Logo: manter o tamanho visual atual, mas sem empurrar a altura do header */
.mec-brand-logo{
  height: 120px !important;       /* mantém o tamanho visual já usado no site */
  width: auto !important;
  /* sem margens negativas: assim o logo fica centrado com o texto no flex */
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  display: block;
  transform: none !important;
}

/* Pesquisa: em ecrãs pequenos vai para a linha seguinte e nunca sobrepõe */
.mec-header-search{
  flex: 1 1 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
}
.mec-header-search .input-group{
  width: 100%;
  max-width: 560px;     /* fica mais “curta” e alinhada à direita */
  margin-left: auto;
}

/* Desktop (>= lg): header em 1 linha e pesquisa mais curta */
@media (min-width: 992px){
  .mec-header > .container-fluid{
    height: 72px !important;
    min-height: 72px !important;
    flex-wrap: nowrap !important;
    gap: .65rem !important;
    padding-top: .20rem !important;
    padding-bottom: .20rem !important;
  }

  .mec-header-search{
    flex: 0 0 420px !important;
    max-width: 420px !important;
    width: 420px !important;
    margin-left: auto !important;
  }

  .mec-header-search .input-group{
    max-width: 420px;
    margin-left: 0;
  }
}

/* XS: permitir a pesquisa ocupar a largura disponível */
@media (max-width: 575.98px){
  .mec-header-search .input-group{ max-width: 100%; }
  .mec-brand-logo{ height: 120px !important; margin-top: 0 !important; margin-bottom: 0 !important; }
}

/* =========================================================
   MEC2026 — HEADER FINAL (sem repetições / single source of truth)
   - Logo mantém tamanho (não encolhe)
   - Logo desce um pouco (mais top)
   - Pesquisa não sobrepõe em ecrãs pequenos
   ========================================================= */

:root{
  --mec-logo-h: 160px;        /* tamanho “normal” do logo */
  --mec-logo-top: 13px;       /* baixa o logo (mais top) */
  --mec-search-w: 420px;     /* largura da pesquisa em desktop */
}

/* Header pode “respirar” sem criar cortes estranhos */
.mec-header{ height:auto !important; min-height:0 !important; }

/* Layout do header: em mobile pode quebrar linha; em desktop fica 1 linha */
.mec-header > .container-fluid{
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: .55rem !important;

  /* controla a altura do header (compacto) */
  padding-top: .20rem !important;
  padding-bottom: .20rem !important;
}

/* LOGO: força tamanho correto e baixa um pouco, sem background/padding extra */
.mec-brand-logo{
  height: var(--mec-logo-h) !important;
  width: auto !important;
  max-height: none !important;

  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;

  /* “mais top” = desce o logo dentro do header */
  transform: translateY(var(--mec-logo-top)) !important;
}

/* Pesquisa: em ecrãs pequenos vai para baixo (não sobrepõe) */
.mec-header-search{
  flex: 1 1 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
}
.mec-header-search .input-group{
  width: 100% !important;
  max-width: 560px !important;   /* fica mais curta em mobile/tablet */
  margin-left: auto !important;
}

/* Desktop: 1 linha e pesquisa com largura fixa menor */
@media (min-width: 992px){
  .mec-header > .container-fluid{
    flex-wrap: nowrap !important;
  }
  .mec-header-search{
    flex: 0 0 var(--mec-search-w) !important;
    width: var(--mec-search-w) !important;
    max-width: var(--mec-search-w) !important;
    margin-left: auto !important;
  }
  .mec-header-search .input-group{
    max-width: var(--mec-search-w) !important;
    margin-left: 0 !important;
  }
}

/* =========================================================
   MEC2026 — DUNAS (SUAVE) PARA HEADERS INTERNOS
   Objetivo: manter identidade “dunas” mas com tons menos carregados
   (menos laranja/amarelo saturado), sem afetar o restante tema oceânico.
   ========================================================= */

.page-header{
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, rgba(191,231,255,0.55) 0%, rgba(var(--mec-accent-rgb),0.06) 52%, #ffffff 100%);
}

.title-card{
  position: relative;
  padding: 1.05rem 1.15rem;
  border-radius: 1.25rem;
  color: #ffffff;
  background: linear-gradient(70deg, rgba(20,87,133,0.95) 0%, rgba(30,111,168,0.92) 55%, rgba(60,147,214,0.90) 100%);0%,
    rgba(236, 200, 172, 0.50) 48%,
    rgba(255, 248, 242, 0.78) 100%) !important;

  border: 1px solid rgba(255,255,255,0.26) !important;
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.10) !important;
}

/* Garantir legibilidade do título em fundos mais claros */
.title-card .section-title,
.title-card .title-card-kicker{
  text-shadow: 0 2px 10px rgba(0,0,0,0.22);
}

/* Aproximar texto do logo no header */
.mec-brand{
  gap: .40rem !important;        /*  .22rem–.40rem */
  min-width: 0 !important;       /* remove a reserva que empurra o texto */
}

/* Se ainda houver folga no bloco do texto */
.mec-brand-text{
  margin-left: 0 !important;
  padding-left: 0 !important;
}

.mec-brand-text{
  transform: translateX(-12px);   /* ajuste fino: -4 a -14px */
}



/* =========================================================
   Ajustes solicitados (Header + MEC2011 no accordion)
   - reduzir espaço antes do logo e entre logo ↔ título
   - tipografia mais pequena na listagem de publicações (MEC2011)
   ========================================================= */

.mec-header > .container-fluid{
  padding-left: .10rem !important; /* menos espaço à esquerda antes do logo */
}

.mec-brand{
  gap: .8rem !important;          /* menos espaço entre logo e texto */
  min-width: 0 !important;
}

/* MEC2011: tipografia mais compacta (título + autores) */
.mec2011-publicacoes #mec2011Table a{
  font-size: .66rem;
}
.mec2011-publicacoes #mec2011Table .small{
  font-size: .68rem;
  line-height: 1.2;
}

/* MEC2013: tipografia mais compacta (título + autores) */
.mec2013-publicacoes #mec2013Table a{
  font-size: .66rem;
}
.mec2013-publicacoes #mec2013Table .small{
  font-size: .68rem;
  line-height: 1.2;
}


/* ===== Header: reduzir espaço à esquerda + logo↔título ===== */

/* Bootstrap: container-fluid usar gutters; reduzir gutter resolve o “inset” lateral */
header.mec-header > .container-fluid{
  --bs-gutter-x: .2rem;              /* default é 1.5rem */
  padding-left: .15rem !important;
  padding-right: .15rem !important;
}

/* Aproximar texto do logo (gap MENOR) */
header.mec-header .mec-brand{
  gap: .28rem !important;            /*  .14rem–.28rem */
  min-width: 0 !important;
}

/* Se o logo tiver “transparência/canvas” extra, compensar */
header.mec-header .mec-brand-logo{
  margin-left: -10px !important;     /* ajuste fino: -6 a -18px */
  margin-right: -14px !important;    /* ajuste fino: -6 a -22px */
}

/* =========================================================
   Ajustes (logo novo + footer + headers internos)
   - Logo MEC no header mais pequeno e sem “padding/background” extra
   - Logos do footer sem cantos cortados (remover border-radius legado)
   - Header das páginas internas (a partir de Objetivos): degradé amarelo/alaranjado
   ========================================================= */

/* Header: logo novo (mais largo) — reduzir altura e neutralizar estilos antigos */
header.mec-header .mec-brand-logo{
  height: 56px !important;
  width: auto !important;
  max-width: 520px;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  transform: none !important;
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
@media (max-width: 575.98px){
  header.mec-header .mec-brand-logo{
    height: 46px !important;
    max-width: 340px;
  }
}

/* Footer: evitar “cantos cortados” (havia border-radius legado num bloco antigo) */
.footer-logos img{
  border-radius: 0 !important;
  padding: 2px 8px; /* dá folga à esquerda/direita (especialmente no Ciências ULisboa) */
  background: transparent;
}

/* Title-card (headers das páginas internas): degradé amarelo/alaranjado */
.title-card{
  position: relative;
  padding: 1.05rem 1.15rem;
  border-radius: 1.25rem;
  color: #ffffff;
  background: linear-gradient(70deg, rgba(20,87,133,0.95) 0%, rgba(30,111,168,0.92) 55%, rgba(60,147,214,0.90) 100%);0%,
    rgba(227,168,76,0.94) 45%,
    rgba(241,203,129,0.92) 100%) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.14) !important;
}
.title-card .section-title,
.title-card a,
.title-card .btn{
  text-shadow: 0 1px 2px rgba(0,0,0,0.22);
}

/* Page-header (faixa por trás do title-card): harmonizar com o degradé “dunas” */
.page-header{
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, rgba(191,231,255,0.55) 0%, rgba(var(--mec-accent-rgb),0.06) 52%, #ffffff 100%);
}

/* =========================================================
   Fix: header logo↔texto (evitar sobreposição) + title-card dunas mais suaves
   ========================================================= */

/* Header: garantir que o texto não “entra” por cima do logo */
header.mec-header .mec-brand{
  gap: 1.6rem !important;     /* mais espaço entre logo e texto */
  align-items: center;
}
header.mec-header .mec-brand-logo{
  flex: 0 0 auto;
}
header.mec-header .mec-brand-text{
  min-width: 0;
  transform: none !important;  /* remove ajustes antigos (translateX) que causavam overlap */
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Title-card: iniciar num laranja/sand do logo e degradé para mais claro */
.title-card{
  position: relative;
  padding: 1.05rem 1.15rem;
  border-radius: 1.25rem;
  color: #ffffff;
  background: linear-gradient(70deg, rgba(20,87,133,0.95) 0%, rgba(30,111,168,0.92) 55%, rgba(60,147,214,0.90) 100%);0%,
    rgba(248,221,161,0.94) 45%,
    rgba(255,248,242,0.92) 100%) !important;
}

/* =========================================================
   Ajuste pedido: logo MEC mais largo (melhor legibilidade)
   - aumentar altura (mantém proporções → fica mais largo)
   - manter header compacto
   ========================================================= */

header.mec-header .mec-brand-logo{
  height: 80px !important;      /* antes: 72px */
  width: auto !important;
  max-width: 720px;
}

@media (max-width: 575.98px){
  header.mec-header .mec-brand-logo{
    height: 66px !important;
    max-width: 460px;
  }
}

/* =========================================================
   MEC2026 — Palette refresh (Opção B: alinhamento forte ao novo logo)
   - Primário: marinho profundo + oceano mais suave (menos saturado)
   - Secundário: teal oceânico (compatível com as ondas do logo)
   - Acentos: areia/dourado apenas em detalhes e highlights
   ========================================================= */

:root{
  /* Marinho / Oceano (mais elegante, menos ‘azul elétrico’) */
  --mec-navy:#062B4A;      /* marinho */
  --mec-navy-2:#0B5FA8;    /* oceano */
  --mec-teal:#1FA7C9;      /* teal oceânico */
  --mec-teal-2:#bfe7ff;   /* muito claro */

  /* Acentos (areia) */
  --mec-sand:#F2B24C;
  --mec-sand-2:#FEDC7A;

  /* Base para overlays/effects */
  --mec-accent-rgb:30,111,168;
}

/* Links */
a{ color: var(--mec-navy-2); }
a:hover{ color: var(--mec-teal); }

/* Header/nav/topbar: marinho → oceano → teal (suave) */
.mec-header,
.mec-nav,
.mec-topbar{
  background: linear-gradient(90deg,
    rgba(6,43,74,0.98) 0%,
    rgba(11,95,168,0.96) 55%,
    rgba(31,167,201,0.92) 100%) !important;
}

/* Sidebar: manter mais ‘profundo’ para não gritar */
.mec-sidebar{
  background: linear-gradient(180deg,
    rgba(20,87,133,0.98) 0%,
    rgba(16,77,118,0.98) 45%,
    rgba(10,56,86,0.98) 100%);
}

/* Hero overlay: mais coerente com o novo marinho */
.hero::before{
  background: linear-gradient(90deg,
    rgba(6,23,41,0.92),
    rgba(6,43,74,0.66) 55%,
    rgba(var(--mec-accent-rgb),0.30)) !important;
}
.hero.hero-image .hero-overlay{
  background: linear-gradient(90deg,
    rgba(6,43,74,0.42),
    rgba(11,95,168,0.26) 45%,
    rgba(31,167,201,0.16)) !important;
}

/* Botões */
.btn-primary{
  background-color: var(--mec-navy-2) !important;
  border-color: var(--mec-navy-2) !important;
}
.btn-primary:hover,
.btn-primary:focus{
  background-color: var(--mec-navy) !important;
  border-color: var(--mec-navy) !important;
}

.btn-outline-primary{
  color: var(--mec-navy-2) !important;
  border-color: rgba(6,43,74,0.45) !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus{
  background-color: rgba(var(--mec-accent-rgb),0.12) !important;
  border-color: rgba(var(--mec-accent-rgb),0.60) !important;
  color: var(--mec-navy) !important;
}

/* Cards suaves */
.card-soft{
  background: linear-gradient(180deg, rgba(var(--mec-accent-rgb),0.08), rgba(255,255,255,1) 40%) !important;
}

/* Footer (fundo claro): garantir legibilidade */
.site-footer{
  background: linear-gradient(90deg,
    rgba(20,87,133,0.96) 0%,
    rgba(30,111,168,0.92) 55%,
    rgba(191,231,255,0.90) 100%); }
.footer-copy{ color: rgba(15,23,42,0.72) !important; }
.site-footer a{ color: rgba(6,43,74,0.92) !important; }
.site-footer a:hover{ color: rgba(11,95,168,1) !important; }

/* =========================================================
   MEC2026 — Ajustes de cor (vWave2)
   Pedido:
   1) Header + Menu (sidebar) com o mesmo degradé que estava no footer
   2) Footer a branco
   3) Headers das páginas internas em azul mais claro (não ‘areia’)
   ========================================================= */

:root{
  /* Degradé “oceano” (o que estava no footer) */
  --mec-grad-oceano: linear-gradient(90deg,
    rgba(20,87,133,0.96) 0%,
    rgba(30,111,168,0.92) 55%,
    rgba(191,231,255,0.90) 100%);
}

/* Header/topbar/nav = degradé oceano */
.mec-header,
.mec-nav,
.mec-topbar{
  background: var(--mec-grad-oceano) !important;
}

/* Menu (sidebar): mesma família do degradé, mas com final menos claro para manter legibilidade */
.mec-sidebar{
  /* Mais degradé (vertical) para “ligar” melhor ao header geral */
  background: linear-gradient(180deg,
    rgba(30,111,168,0.96) 0%,
    rgba(20,87,133,0.98) 40%,
    rgba(11,61,98,0.99) 100%) !important;
}

/* Footer a branco (limpo), com divisória subtil */
.site-footer{
  background: #ffffff !important;
  border-top: 1px solid rgba(2, 6, 23, 0.10) !important;
}
.footer-copy{
  color: rgba(15,23,42,0.78) !important;
}
.site-footer a{
  color: rgba(6,43,74,0.92) !important;
}
.site-footer a:hover{
  color: rgba(11,95,168,1) !important;
}

/* Headers das páginas internas (a partir de “Objetivos”): degradé dunas (amarelo/laranja) do logo */
.page-header{
  background: linear-gradient(100deg,
    rgba(254,160,1,0.22) 0%,
    rgba(254,217,28,0.16) 55%,
    #ffffff 100%) !important;
}

.title-card{
  background: linear-gradient(70deg,
    rgba(177,92,0,0.96) 0%,
    rgba(254,160,1,0.92) 45%,
    rgba(254,217,28,0.88) 100%) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
}

.title-card .section-title,
.title-card .title-card-kicker{
  text-shadow: 0 2px 10px rgba(2, 6, 23, 0.35) !important;
}

/* =========================================================
   HOTFIX (dunas v2): garantir que os headers das páginas internas NÃO ficam azuis
   - Degradé dunas (logo) aplicado ao card do título (.title-card)
   - Texto escuro para contraste (amarelos/laranjas)
   ========================================================= */

header.page-header{
  /* Mais presença “dunas” (menos branco no fim) */
  background: linear-gradient(100deg,
    rgba(254,160,1,0.26) 0%,
    rgba(254,217,28,0.20) 45%,
    rgba(255,241,214,0.94) 100%) !important;
}

header.page-header .title-card{
  /* Card do título mais “areia” e mais uniforme (sem começar tão escuro) */
  background: linear-gradient(75deg,
    rgba(254,160,1,0.40) 0%,
    rgba(254,217,28,0.28) 58%,
    rgba(255,241,214,0.92) 100%) !important;
  color: #07324a !important;
  border: 1px solid rgba(7,50,74,0.18) !important;
}

header.page-header .title-card .section-title,
header.page-header .title-card .title-card-kicker{
  color: #07324a !important;
  text-shadow: none !important;
}

header.page-header .title-card::after{
  opacity: .25 !important;
}

header.page-header .title-card .btn{
  background: rgba(255,255,255,0.78) !important;
  border: 1px solid rgba(7,50,74,0.20) !important;
  color: #07324a !important;
}

/* =========================================================
   MEC2026 — Ajuste final (vBlueWave + Dunas suaves)
   Pedido (último):
   - Header geral + menu (sidebar) em degradé azul (da 1ª onda do logo), do mais escuro → mais claro
   - Menu com degradé visível (para baixo ficar mais claro)
   - Headers das páginas internas (a partir de Objetivos) em “areia” suave como na referência
   ========================================================= */

:root{
  --mec-blue-deep: #45697e;   /* amostra da 1ª onda (mais escuro) */
  --mec-blue-mid:  #4f88ab;   /* transição oceano */
  --mec-blue-lite: #c9d9db;   /* amostra clara do header */

  --mec-grad-blue-h: linear-gradient(90deg,
    var(--mec-blue-deep) 0%,
    var(--mec-blue-mid) 45%,
    var(--mec-blue-lite) 100%);

  --mec-grad-blue-v: linear-gradient(180deg,
    var(--mec-blue-deep) 0%,
    var(--mec-blue-mid) 55%,
    var(--mec-blue-lite) 100%);

  /* “Areia” suave (amostra do header Objetivos que enviaste) */
  --mec-sand-a: #f1d9a8;
  --mec-sand-b: #f6e6c4;
  --mec-sand-c: #f7f0e3;
}

/* Header/topbar/nav = degradé azul (horizontal) */
.mec-header,
.mec-nav,
.mec-topbar{
  background: var(--mec-grad-blue-h) !important;
}

/* Menu (sidebar) = degradé azul (vertical), mais claro em baixo */
.mec-sidebar{
  background: var(--mec-grad-blue-v) !important;
}

/* Garantir legibilidade dos itens do menu mesmo na zona mais clara */
.mec-sidebar .nav-link,
.mec-sidebar a{
  color: rgba(255,255,255,0.96) !important;
  text-shadow: 0 1px 2px rgba(2,6,23,0.35) !important;
}
.mec-sidebar .nav-link:hover,
.mec-sidebar .nav-link:focus{
  background: rgba(255,255,255,0.14) !important;
}
.mec-sidebar .nav-link.active,
.mec-sidebar .nav-link[aria-current="page"]{
  background: rgba(255,255,255,0.18) !important;
}

/* Headers das páginas internas (Objetivos →): areia suave */
header.page-header{
  background: linear-gradient(100deg,
    rgba(241,217,168,0.96) 0%,
    rgba(246,230,196,0.94) 55%,
    rgba(247,240,227,0.96) 100%) !important;
}

header.page-header .title-card{
  background: linear-gradient(90deg,
    rgba(241,217,168,0.98) 0%,
    rgba(246,230,196,0.96) 55%,
    rgba(247,240,227,0.98) 100%) !important;
  border: 1px solid rgba(7,50,74,0.16) !important;
}

/* Títulos nos headers internos a branco (como tinhas), mas com sombra suave */
header.page-header .title-card .section-title,
header.page-header .title-card .title-card-kicker{
  color: rgba(255,255,255,0.98) !important;
  text-shadow: 0 2px 10px rgba(2,6,23,0.35) !important;
}

/* Botão “Início” dentro do header interno: neutro e legível */
header.page-header .title-card .btn{
  background: rgba(255,255,255,0.86) !important;
  border: 1px solid rgba(7,50,74,0.18) !important;
  color: #07324a !important;
}

/* =========================================================
   MEC2026 — Ajuste de legibilidade (CTAs da sidebar)
   + Páginas internas: fundo branco à volta do title-card
   ========================================================= */

/* Sidebar CTAs: manter “disabled” mas legível no degradé claro */
.mec-sidebar .sidebar-ctas .btn.disabled,
.mec-sidebar .sidebar-ctas .btn:disabled,
.mec-sidebar .sidebar-ctas .btn[aria-disabled="true"]{
  opacity: 1 !important; /* bootstrap baixa a opacidade e mata a leitura */
  filter: none !important;
}

.mec-sidebar .sidebar-ctas .btn{
  width: 100% !important;
  font-weight: 800 !important;
  border-radius: 1.05rem !important;
  padding: .62rem .78rem !important;
  letter-spacing: .1px;
}

/* 1º CTA (outline): dar fundo mais escuro para garantir contraste */
.mec-sidebar .sidebar-ctas .btn.btn-outline-light{
  background: rgba(2,6,23,0.18) !important;
  border-color: rgba(255,255,255,0.58) !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(2,6,23,0.45) !important;
}
.mec-sidebar .sidebar-ctas .btn.btn-outline-light:hover,
.mec-sidebar .sidebar-ctas .btn.btn-outline-light:focus{
  background: rgba(2,6,23,0.24) !important;
  border-color: rgba(255,255,255,0.70) !important;
}

/* 2º CTA (light): manter “claro” mas com texto escuro bem contrastado */
.mec-sidebar .sidebar-ctas .btn.btn-light{
  background: rgba(255,255,255,0.92) !important;
  border: 1px solid rgba(7,50,74,0.24) !important;
  color: #07324a !important;
}
.mec-sidebar .sidebar-ctas .btn.btn-light:hover,
.mec-sidebar .sidebar-ctas .btn.btn-light:focus{
  background: rgba(255,255,255,0.98) !important;
  border-color: rgba(7,50,74,0.34) !important;
  color: #07324a !important;
}

/* Páginas internas: header em branco e só o card com cor ("branco à volta") */
header.page-header{
  background: #ffffff !important;
}
header.page-header::after{
  display: none !important; /* remover ondas/halo no fundo */
}

/* O card mantém o degradé “areia” suave (já definido acima); reforçar um pouco o recorte */
header.page-header .title-card{
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.10) !important;
  border: 1px solid rgba(7,50,74,0.14) !important;
}


/* Support logos (Apoios) */
.support-logos-grid{
  row-gap: 1.35rem;
}
.support-logo-cell{
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .35rem .5rem;
}
.support-logo{
  max-height: 68px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.support-logo--cesam{
  max-height: 88px;
}
.support-logo--idl{
  max-height: 74px;
}
.support-logo--ciimar{
  max-height: 70px;
}
.support-logo--ceris{
  max-height: 62px;
}
.support-logo--cima{
  max-height: 54px;
}

@media (max-width: 767.98px){
  .support-logo-cell{
    min-height: 92px;
  }
  .support-logo{
    max-height: 58px;
  }
  .support-logo--cesam{
    max-height: 72px;
  }
  .support-logo--cima{
    max-height: 48px;
  }
}



/* ==== MEC2026 update: comissões, oradores e cursos ==== */
.committee-grid{
  display: grid;
  gap: 1.25rem;
}
.committee-panel{
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 1.1rem;
  padding: 1.15rem;
  background: linear-gradient(180deg, rgba(var(--mec-accent-rgb),0.08), rgba(255,255,255,1) 42%);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.07);
}
.committee-panel--scientific{
  background: linear-gradient(180deg, rgba(7,50,74,0.08), rgba(255,255,255,1) 42%);
}
.committee-panel-head{
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1rem;
}
.committee-icon{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--mec-accent-rgb),0.14);
  color: var(--mec-navy);
  font-size: 1.1rem;
  box-shadow: inset 0 0 0 1px rgba(var(--mec-accent-rgb),0.15);
}
.committee-kicker{
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(15,23,42,0.6);
}
.committee-list{
  padding-left: 1.1rem;
}
.committee-list li{
  margin-bottom: .45rem;
}

.committee-columns{
  columns: 2 260px;
  column-gap: 2rem;
}
.committee-columns li{
  break-inside: avoid;
  margin-bottom: .45rem;
}

.keynote-stack{
  display: grid;
  gap: 1.25rem;
}
.keynote-card{
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 1.1rem;
  padding: 1.15rem;
  background: linear-gradient(180deg, rgba(var(--mec-accent-rgb),0.08), rgba(255,255,255,1) 42%);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.07);
}
.keynote-header{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  margin-bottom: .9rem;
}
.keynote-kicker{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: rgba(var(--mec-accent-rgb),0.12);
  color: var(--mec-navy);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.keynote-title-placeholder{
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: .7rem .9rem;
  border-radius: .9rem;
  background: #ffffff;
  border: 1px dashed rgba(var(--mec-accent-rgb),0.45);
  color: rgba(15,23,42,0.72);
  font-weight: 600;
}
.speaker-group{
  display: grid;
  gap: 1rem;
}
.speaker-entry{
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(15,23,42,0.08);
}
.speaker-photo{
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 96px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.15);
}
.speaker-name{
  margin: 0 0 .2rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--mec-navy);
}
.speaker-role{
  margin: 0 0 .25rem;
  font-weight: 600;
}
.speaker-affiliation{
  margin: 0;
  color: rgba(15,23,42,0.78);
  line-height: 1.45;
}
.course-highlight{
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 1rem;
  padding: 1.15rem;
  background: linear-gradient(180deg, rgba(var(--mec-accent-rgb),0.09), rgba(255,255,255,1) 55%);
}
.course-title{
  margin-bottom: .45rem;
  color: var(--mec-navy);
  font-weight: 800;
  font-size: 1.16rem;
  line-height: 1.35;
}

@media (max-width: 991.98px){
  .committee-columns{ columns: 1; }
}
@media (max-width: 767.98px){
  .speaker-entry{
    align-items: flex-start;
  }
}
@media (max-width: 575.98px){
  .committee-panel{
    padding: 1rem;
  }
  .committee-panel-head{
    align-items: flex-start;
  }
  .speaker-photo{
    width: 78px;
    height: 78px;
    flex-basis: 78px;
  }
  .speaker-name{
    font-size: 1rem;
  }
}

