@import url("https://fonts.googleapis.com/css?family=Titillium+Web:400,700&display=swap");

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

body {
  margin: 0;
  padding: 0;
  font-family: "Titillium Web", sans-serif;
}

.carousel {
  height: calc(var(--banner-vh, 100vh) - 260px);
  position: relative;
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  width: 100%;
}

.progress-bar__fill {
  width: 0;
  height: inherit;
  background: rgba(255, 255, 255, 0.85);
  transition: all 0.16s;
}

.progress-bar--primary {
  z-index: 2;
}

.main-post-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
}

.slides {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.main-post {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}

.main-post__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  bottom: 0;
}

.main-post__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.main-post__image::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.main-post--overlay .main-post__image::before {
  background: rgba(14, 13, 14, 0.5);
}

.main-post__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  width: 90%;
  padding: 40px 0;
  text-align: center;
}

.main-post__tag-wrapper {
  margin: 0;
  display: inline-flex;
  overflow: hidden;
}

.main-post--layout-one .main-post__tag-wrapper {
  justify-content: center;
}

.main-post__tag {
  font-size: 0.95em;
  background: rgba(255, 255, 255, 0.85);
  color: #07366cb8;
  padding: 6px 18px;
  border-radius: 12px;
}

.main-post__title {
  font-weight: 700;
  font-size: 1.95em;
  line-height: 1.25;
  color: var(--banner-title-color, inherit);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.main-post__subtitle {
  font-size: 1.15em;
  font-weight: 400;
  line-height: 1.4;
  margin: 12px 0 24px;
  color: var(--banner-subtitle-color, inherit);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.main-post__link {
  text-decoration: none;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: background 0.2s linear, color 0.2s linear, border-color 0.2s linear, box-shadow 0.2s linear;
}

.main-post__link--outline {
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.main-post__link--outline:hover {
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.main-post__link--filled {
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.85);
  color: #07366c;
}

.main-post__link--filled:hover {
  background: #07366c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.main-post__link--filled .main-post__link-icon--arrow path {
  stroke: #07366c;
}

.main-post__link--filled .main-post__link-icon--play-btn circle {
  stroke: #07366c;
}

.main-post__link--filled .main-post__link-icon--play-btn path {
  fill: #07366c;
}

.main-post__link--filled:hover .main-post__link-text {
  color: #fff;
}

.main-post__link--filled:hover .main-post__link-icon--arrow path {
  stroke: #fff;
}

.main-post__link-text {
  font-size: 0.9em;
}

.main-post__link-icon--arrow {
  margin-left: 12px;
}

.main-post__link-icon--play-btn {
  margin-right: 12px;
}

.main-post__link:hover .main-post__link-text,
.main-post__link:hover .main-post__link-icon--arrow path {
  color: rgba(255, 255, 255, 0.85);
  stroke: rgba(255, 255, 255, 0.85);
}

.main-post__link:hover,
.main-post__link:focus {
  text-decoration: none !important;
}

.main-post__link--outline:hover {
  color: #fff !important;
}

.main-post__link--outline:hover .main-post__link-text {
  color: rgba(255, 255, 255, 0.85) !important;
}

.main-post__link--outline:hover .main-post__link-icon--arrow path {
  stroke: rgba(255, 255, 255, 0.85) !important;
}

.main-post__link--filled:hover {
  color: #fff !important;
}

.main-post__link--filled:hover .main-post__link-text {
  color: #fff !important;
}

.main-post__link--filled:hover .main-post__link-icon--arrow path {
  stroke: #fff !important;
}

.main-post__link--filled:hover .main-post__link-icon--play-btn circle {
  stroke: #fff !important;
}

.main-post__link--filled:hover .main-post__link-icon--play-btn path {
  fill: #fff !important;
}

.main-post--active {
  top: 0;
  z-index: 1;
  transition: top calc(0.6s * var(--banner-anim-factor, 1)) calc(0.1s * var(--banner-anim-factor, 1)) ease-out;
}

.main-post--not-active {
  top: 100%;
  z-index: 0;
  transition: top calc(0.5s * var(--banner-anim-factor, 1)) calc(0.3s * var(--banner-anim-factor, 1));
}

.main-post.main-post--active .main-post__tag-wrapper {
  width: 25%;
  transition: all calc(0.5s * var(--banner-anim-factor, 1)) calc(0.2s * var(--banner-anim-factor, 1));
}

.main-post.main-post--not-active .main-post__tag-wrapper {
  width: 0;
  transition: width 0.3s 0.2s;
}

.main-post.main-post--active .main-post__title {
  opacity: 1;
  transform: translateY(0);
  transition: opacity calc(0.5s * var(--banner-anim-factor, 1)) calc(0.25s * var(--banner-anim-factor, 1)), transform calc(0.4s * var(--banner-anim-factor, 1)) calc(0.25s * var(--banner-anim-factor, 1));
}

.main-post.main-post--not-active .main-post__title {
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.2s 0.35s, opacity 0.5s 0.2s;
}

.main-post.main-post--active .main-post__link {
  opacity: 1;
  transition: opacity calc(0.5s * var(--banner-anim-factor, 1)) calc(0.4s * var(--banner-anim-factor, 1));
}

.main-post.main-post--not-active .main-post__link {
  opacity: 0;
  transition: opacity 0.5s 0.2s;
}

.posts-wrapper {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  column-gap: 14px;
  position: absolute;
  bottom: 0;
  max-width: 95%;
  margin: auto;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 1;
}

.post {
  background: rgba(14, 13, 14, 0.6);
  opacity: 0.3;
  color: #fff;
  position: relative;
  padding: 16px 20px;
  transition: opacity 0.2s linear;
  min-width: 0;
}

.post__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8em;
}

.post__header > * {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post__tag {
  color: #80837e;
}

.post__title {
  font-weight: 400;
  font-size: 0.95em;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post--active {
  opacity: 1;
  background: rgba(14, 13, 14, 0.75);
  pointer-events: none;
}

.post--disabled {
  pointer-events: none;
}

.post:hover {
  cursor: pointer;
  opacity: 1;
}

.hide-on-mobile {
  display: none;
}

@media screen and (min-width: 768px) {
  .main-post__title {
    font-size: 2.9em;
  }
}

@media screen and (min-width: 1024px) {
  .hide-on-mobile {
    display: grid;
  }
  .hide-on-desktop {
    display: none;
  }
}

@media screen and (min-width: 1440px) {
  .main-post__content {
    width: 45%;
  }
  .posts-wrapper {
    left: 50%;
    transform: translateX(-50%);
    max-width: 70%;
  }
}

/* Layout de 2 colunas */
.main-post--layout-two .main-post__content {
  position: absolute;
  top: 0;
  left: 0;
  transform: none;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 40px 6%;
  text-align: center;
}

.main-post--layout-two .main-post__info {
  flex: 4 1 0%;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.main-post--layout-two .main-post__tag-wrapper {
  justify-content: center;
}

.main-post--layout-two .main-post__media {
  order: -1;
  flex: 6 1 0%;
  width: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
}

.main-post--layout-two .main-post__media img {
  max-width: 100%;
  max-height: var(--banner-media-h-mobile, 100%);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
}

@media screen and (max-width: 767px) and (orientation: portrait) {
  .main-post--layout-two .main-post__media {
    align-items: flex-end;
  }
  .main-post--layout-two .main-post__content:has(.main-post__media) .main-post__info {
    justify-content: flex-start;
  }
  .main-post--layout-two.main-post--ratio-50-50 .main-post__media {
    flex: 5 1 0%;
  }
  .main-post--layout-two.main-post--ratio-50-50 .main-post__info {
    flex: 5 1 0%;
  }
  .main-post--layout-two.main-post--ratio-60-40 .main-post__media {
    flex: 6 1 0%;
  }
  .main-post--layout-two.main-post--ratio-60-40 .main-post__info {
    flex: 4 1 0%;
  }
  .main-post--layout-two.main-post--ratio-70-30 .main-post__media {
    flex: 7 1 0%;
  }
  .main-post--layout-two.main-post--ratio-70-30 .main-post__info {
    flex: 3 1 0%;
  }
}

@media screen and (max-width: 767px) {
  .main-post__tag {
    font-size: 1.5em;
  }
  .main-post__link-text {
    font-size: 1.4em;
  }
  .main-post__tag-wrapper {
    margin: 0 0 18px;
  }
  .main-post__title {
    font-size: 3.8em;
    margin: 0 0 20px;
  }
  .main-post__subtitle {
    font-size: 1.6em;
    margin: 16px 0 28px;
  }
  .main-post--layout-two .main-post__info {
    overflow: hidden;
  }
  .main-post--layout-two .main-post__title {
    font-size: 3.8em;
  }
  .main-post.main-post--layout-two .main-post__tag-wrapper {
    width: auto;
  }
  .main-post--layout-one .main-post__content {
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 100%;
    padding: 40px 6%;
    text-align: center;
  }
  .main-post.main-post--layout-one .main-post__tag-wrapper {
    width: auto;
  }
}

@media screen and (min-width: 768px), screen and (orientation: landscape) {
  .main-post--layout-two .main-post__content {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 40px;
    text-align: left;
  }
  .main-post--layout-two .main-post__info {
    flex: 1 1 0%;
    width: auto;
    min-width: 0;
    align-self: stretch;
    justify-content: center;
  }
  .main-post--layout-two .main-post__tag-wrapper {
    justify-content: flex-start;
  }
  .main-post--layout-two .main-post__media {
    order: 0;
    flex: 1 1 0%;
    width: auto;
    min-width: 0;
    align-self: stretch;
  }
  .main-post--layout-two .main-post__media img {
    max-height: var(--banner-media-h-tablet, 100%);
  }
}

@media screen and (min-width: 1024px) {
  .carousel {
    height: 600px;
  }
  .main-post--layout-two .main-post__content {
    padding-bottom: 140px;
  }
  .main-post--layout-two .main-post__media img {
    max-height: var(--banner-media-h-desktop, 100%);
  }
}

/* Layout 3: imagem + botao (empilhados em todos os tamanhos) */
.main-post--layout-three .main-post__content {
  position: absolute;
  top: 0;
  left: 0;
  transform: none;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px 6%;
  text-align: center;
}

.main-post--layout-three .main-post__media {
  flex: 6 1 0%;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.main-post--layout-three .main-post__media img {
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center;
  max-height: var(--banner-media-h-mobile, 100%);
}

.main-post--layout-three .main-post__cta {
  flex: 4 1 0%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media screen and (orientation: portrait) and (max-width: 1023px) {
  .main-post--layout-three .main-post__media {
    align-items: flex-end;
  }
  .main-post--layout-three .main-post__content:has(.main-post__media) .main-post__cta {
    align-items: flex-start;
  }
}

@media screen and (min-width: 768px) {
  .main-post--layout-three .main-post__media img {
    max-height: var(--banner-media-h-tablet, 100%);
  }
}

@media screen and (min-width: 1024px) {
  .main-post--layout-three .main-post__media img {
    max-height: var(--banner-media-h-desktop, 100%);
  }
  .main-post--layout-three .main-post__content {
    padding-bottom: 140px;
  }
}

/* Navegacao (dots) para telas menores que 1024px */
.carousel__dots {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  z-index: 3;
}

.carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s linear, transform 0.2s linear;
}

.carousel__dot.is-active {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.2);
}

@media screen and (min-width: 1024px) {
  .carousel__dots {
    display: none;
  }
}

@media screen and (orientation: landscape) {
  .carousel {
    min-height: 320px;
  }
}
