/*
 * ESDEC — layout legado (favfeatures, faixa cursos, galeria)
 * Deploy: templates/shaper_helixultimate/css/dc-esdec.css
 *
 * Carregar no admin: Templates → shaper_helixultimate → Advanced → Custom CSS:
 *   @import url("/templates/shaper_helixultimate/css/dc-esdec.css");
 */

:root {
  --dc-blue: #0c235a;
  --dc-orange: #ff6600;
}

/* --- Cards de cursos (mod_custom .dc-favfeatures--esdec) --- */
.dc-favfeatures__row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.dc-favfeatures__col {
  padding: 0 15px 24px;
  box-sizing: border-box;
}

.dc-favfeatures__title {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
}

.dc-favfeatures__title a {
  color: #0e2359;
  text-decoration: none;
}

.dc-favfeatures__title a:hover,
.dc-favfeatures__title a:focus {
  color: var(--dc-orange);
}

.dc-favfeatures__desc {
  color: #333;
  font-size: 16px;
  line-height: 1.5;
}

.dc-favfeatures__desc p {
  margin: 0;
}

.dc-favfeatures--esdec .dc-favfeatures__col--esdec {
  width: 33.333%;
}

.dc-favfeatures--esdec .dc-favfeatures__title--esdec {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  text-transform: none;
}

.dc-favfeatures--esdec .dc-favfeatures__title--esdec a {
  color: #0e2359;
}

.dc-favfeatures--esdec .dc-favfeatures__title--esdec a:hover,
.dc-favfeatures--esdec .dc-favfeatures__title--esdec a:focus {
  color: var(--dc-orange);
}

.dc-favfeatures--esdec .dc-favfeatures__block {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.dc-favfeatures--esdec .dc-favfeatures__icon {
  flex: 0 0 100px;
  width: 100px;
  min-height: 100px;
  background: #0e2359;
  border: 1px solid #0e2359;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dc-favfeatures--esdec .dc-favfeatures__icon a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.dc-favfeatures--esdec .dc-favfeatures__icon i {
  color: #fff;
  font-size: 50px;
}

.dc-favfeatures--esdec .dc-favfeatures__desc--esdec {
  flex: 1 1 auto;
  min-width: 0;
  color: #0e2359;
  font-size: 18px;
  line-height: 1.5;
  padding-left: 15px;
}

.dc-favfeatures--esdec .dc-favfeatures__icon:hover,
.dc-favfeatures--esdec .dc-favfeatures__icon:focus-within {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.23), 0 4px 14px rgba(0, 0, 0, 0.23);
}

/* --- Seções da landing ESDEC (/index.php/esdec) --- */
#sp-cursos-esdec-atalho {
  background-color: #fff;
  color: #333;
  margin: 20px 0 0;
}

#sp-cursos-esdec-atalho a {
  color: var(--dc-blue);
}

#sp-cursos-esdec-atalho a:hover {
  color: var(--dc-orange);
}

#sp-cursos-esdec {
  background-color: #dbdbdb;
  color: var(--dc-blue);
  padding: 60px 0 90px;
  margin-bottom: 60px;
}

/* Landing ESDEC: botoes sem faixa cinza (legado usa fundo branco) */
.dc-esdec-landing #sp-cursos-esdec {
  background-color: #fff !important;
  padding: 0 0 30px;
  margin-bottom: 40px;
}

#sp-cursos-esdec a {
  color: var(--dc-blue);
}

#sp-cursos-esdec a:hover {
  color: var(--dc-orange);
}

#sp-cursos-esdec .sp-module-title {
  color: var(--dc-blue);
  text-transform: uppercase;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 20px;
  border: 0;
  padding: 0 0 15px;
  text-align: center;
}

/* Faixa laranja "TODOS OS CURSOS..." */
.dc-esdec-alerta,
#sp-cursos-esdec-atalho .dc-esdec-alerta {
  text-align: center;
  margin: 0 0 24px;
}

.dc-esdec-alerta h1,
.dc-esdec-alerta p,
#sp-cursos-esdec-atalho h1 {
  margin: 0;
  font-size: 24pt;
  color: var(--dc-orange);
  font-family: tahoma, arial, helvetica, sans-serif;
  line-height: 1.3;
}

/* Galeria aprovados (substituto favportfolio) */
#sp-estatistica {
  background-color: var(--dc-blue);
  color: #fff;
  padding: 60px 0;
  margin: 60px 0;
}

/* Mapas: faixa azul de fora a fora */
.dc-esdec-landing #sp-estatistica {
  width: 100vw;
  max-width: 100vw;
  margin: 60px calc(50% - 50vw);
  padding: 60px 15px;
  box-sizing: border-box;
}

.dc-esdec-landing #sp-estatistica .dc-esdec-portfolio {
  max-width: 1140px;
  margin: 0 auto;
}

.dc-esdec-portfolio {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.dc-esdec-portfolio__item {
  width: 50%;
  padding: 0 15px 24px;
  box-sizing: border-box;
}

.dc-esdec-portfolio__card {
  position: relative;
  overflow: hidden;
  background: #000;
}

.dc-esdec-portfolio__card img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

.dc-esdec-portfolio__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dc-esdec-portfolio__card:hover .dc-esdec-portfolio__overlay,
.dc-esdec-portfolio__card:focus-within .dc-esdec-portfolio__overlay {
  opacity: 1;
}

.dc-esdec-portfolio__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

/* Logo faixa sidebar */
.dc-esdec-logo-faixa {
  text-align: center;
  margin: 24px 0;
}

.dc-esdec-logo-faixa img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* Texto + vídeo lado a lado */
.dc-esdec-main {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 40px 0;
  align-items: flex-start;
}

.dc-esdec-main__text,
.dc-esdec-main__video {
  flex: 1 1 45%;
  min-width: 280px;
}

.dc-esdec-main__video iframe {
  max-width: 100%;
  width: 100%;
  min-height: 310px;
}

#sp-left .sp-module-content iframe {
  max-width: 100%;
  width: 100%;
  min-height: 310px;
}

/* Sobrescreve custom_css da home que esconde estes IDs fora do itemid-101 */
body:not(.itemid-101) .dc-esdec-landing #sp-cursos-esdec,
body:not(.itemid-101) .dc-esdec-landing #sp-cursos-esdec-atalho,
body:not(.itemid-101) .dc-esdec-landing #sp-estatistica,
body:not(.itemid-101) .dc-esdec-landing #sp-modulos {
  display: block !important;
}

/* Titulo duplicado do artigo (conteudo ja esta no SPPB) */
body.itemid-158 .article-details > .article-header,
.dc-esdec-landing ~ .article-header {
  display: none !important;
}

/* Revolution Slider embutido via {loadmodule} */
body.itemid-158 .dc-esdec-slider {
  margin: 0 0 20px;
  max-height: 700px;
  overflow: hidden;
}

body.itemid-158 .dc-esdec-slider .rev_slider_wrapper,
body.itemid-158 .dc-esdec-slider .rev_slider {
  max-height: 700px !important;
}

/* Lista de cursos (favshowcase legado) */
#sp-modulos {
  margin: 60px 0 0;
  padding: 0 0 40px;
}

.dc-esdec-courses {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dc-esdec-course {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin: 0 0 0;
  border-bottom: 1px solid #e8e8e8;
}

.dc-esdec-course__image {
  flex: 0 0 220px;
  max-width: 220px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  box-sizing: border-box;
}

.dc-esdec-course__image img {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
}

.dc-esdec-course__body {
  flex: 1 1 50%;
  min-width: 260px;
  padding: 28px 30px;
  box-sizing: border-box;
}

.dc-esdec-course__title {
  margin: 0 0 12px;
  color: var(--dc-blue);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.dc-esdec-course__desc {
  margin: 0;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
  text-align: justify;
}

/* Faixa logo antes do rodape (full-width como legado) */
.dc-esdec-landing #sp-modulo-faixa-01,
body:not(.itemid-101) .dc-esdec-landing #sp-modulo-faixa-01 {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-image: url("/images/background.png");
  background-attachment: scroll;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 80px 0 60px;
  min-height: 280px;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
}

.dc-esdec-landing #sp-modulo-faixa-01 .dc-esdec-logo-faixa {
  margin: 0;
}

.dc-esdec-landing #sp-modulo-faixa-01 .dc-esdec-logo-faixa img {
  max-width: 320px;
}

/* Selo Featured fora da home */
.article-details .featured-article-badge {
  display: none !important;
}

@media (max-width: 991px) {
  .dc-favfeatures--esdec .dc-favfeatures__col--esdec {
    width: 50%;
  }

  .dc-esdec-portfolio__item {
    width: 50%;
  }
}

@media (max-width: 575px) {
  .dc-favfeatures--esdec .dc-favfeatures__col--esdec {
    width: 100%;
  }

  .dc-esdec-portfolio__item {
    width: 100%;
  }

  .dc-esdec-course__image {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .dc-esdec-course__body {
    padding: 20px 16px;
  }

  .dc-esdec-course__title {
    font-size: 20px;
  }

  .dc-esdec-alerta h1,
  .dc-esdec-alerta p,
  #sp-cursos-esdec-atalho h1 {
    font-size: 18pt;
  }
}
