/* Css do grid */
.grid-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
/* Adicionando estilos específicos para o conteúdo de texto */
.grid-other-content {
    height: 100%;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
    box-sizing: border-box;
}
.grid-other-content p:last-child {
    margin-bottom: 0;
}
/* Container específico para content_column_grid */
.content-wrapper {
    width: 100%;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: justify;
    hyphens: auto;
}
/* Estilos para rich text content */
.grid-other-content p,
.grid-other-content div,
.grid-other-content span,
.content-wrapper p,
.content-wrapper div,
.content-wrapper span {
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}
/* Garantir que tabelas também respeitem os limites */
.grid-other-content table,
.content-wrapper table {
    table-layout: fixed;
    width: 100%;
    word-wrap: break-word;
}
/* Controle para listas */
.grid-other-content ul,
.grid-other-content ol,
.content-wrapper ul,
.content-wrapper ol {
    padding-left: 1.2rem;
    margin: 0 0 1rem 0;
    word-wrap: break-word;
}
/* Garantir que imagens dentro do rich text também sejam responsivas */
.grid-other-content img,
.content-wrapper img {
    max-width: 100%;
    height: auto;
}
/* Específico para parágrafos com data-alignment */
.content-wrapper p[data-alignment="left"],
.content-wrapper p.text-left {
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* IMAGE STYLES */
.linked-image-wrapper {
    width: 100%;
    /* Remova as propriedades de altura fixa */
    /* min-height: 170px; */
    /* max-height: 170px; */
    overflow: hidden;
}

.linked-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    /* border-radius: 0.25rem; */
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 767.98px) {
    .linked-image-wrapper {
        /* Se precisar de uma altura mínima em dispositivos menores, ajuste aqui, mas evite uma altura fixa */
        /* min-height: 150px; */
        /* max-height: 150px; */
    }
}

/* YOUTUBE VIDEO CONTAINER */
.youtube-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* GRID LAYOUT */
.grid-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

/* CONTENT CONTAINERS */
.featured-list-container,
.grid-child-pages,
.grid-other-content,
.content-wrapper {
    width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    box-sizing: border-box;
}

/* === Customização dos cards do GovBR === */

/* Card principal */
.br-card.card-custom {
  width: 250px !important;
  height: 250px !important;
  background-color: #fafafa;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  text-align: center;
}

/* Efeito hover */
.br-card.card-custom:hover {
  transform: translateY(-5px);
  border-color: #1351b4;
  box-shadow: 0 6px 16px rgba(19, 81, 180, 0.2);
}

/* Wrapper do ícone */
.br-card.card-custom .card-custom-icon-wrapper {
  height: 70px;
}

/* Ícone */
.br-card.card-custom .card-custom-icon {
  font-size: 3rem;
  color: var(--govbr-primary-darken-01, #0f336e);
}

/* Título */
.card-custom-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--govbr-primary-darken-02, #0f336e);
}

/* 🟦 Telas pequenas (mobile) */
@media (max-width: 768px) {
  .br-card.card-custom {
    width: 200px;
    height: 200px;
    margin: 0.75rem; /* espaçamento um pouco maior em telas pequenas */
  }

  .br-card.card-custom .card-custom-icon {
    font-size: 2.5rem;
  }

  .br-card.card-custom .card-custom-title {
    font-size: 1.1rem;
  }
}

/* 🖥️ Telas grandes (desktops e ultrawide) */
@media (min-width: 1200px) {
  .br-card.card-custom {
    width: 300px;
    height: 300px;
    margin: 0.25rem; /* reduz o espaço entre os cards */
  }

  .br-card.card-custom .card-custom-icon {
    font-size: 3.4rem;
  }

  .br-card.card-custom .card-custom-title {
    font-size: 1.4rem;
  }
}
