/*
  Hugo-only fixes: WP theme relies on JS for menu_show and assumes category icon CSS
  from shortcodes; global img{max-width:100%} blows up small PNGs in 25% columns.
*/

/*
 * Category icons under slider: theme sets img{max-width:100%}, so icons fill the 25% column.
 * Pin to design size (PNG assets are 75×60–61px; WP showed them at intrinsic scale, not full column).
 */
.header_wrap .widget_categories_list .categories_list_style_1 .categories_list_image,
.widget_categories_list .categories_list_style_1 .categories_list_image {
  line-height: 0;
  max-width: 75px;
  margin-left: auto;
  margin-right: auto;
}
.header_wrap .widget_categories_list .categories_list_style_1 .categories_list_image img,
.widget_categories_list .categories_list_style_1 .categories_list_image img {
  width: 75px !important;
  max-width: 75px !important;
  height: auto !important;
  max-height: 61px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  display: block !important;
  flex-shrink: 0;
}

/*
 * Four category icons in one row: theme uses inline-block + 25% width + column padding.
 * Whitespace between tags, long labels, and clearfix ::before/::after on .columns_wrap
 * push the fourth column to wrap. Flex + nowrap + min-width:0 keeps one line; labels wrap inside cells.
 */
.widget_categories_list .categories_list_style_1 .columns_wrap {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.widget_categories_list .categories_list_style_1 .columns_wrap::before,
.widget_categories_list .categories_list_style_1 .columns_wrap::after {
  content: none !important;
  display: none !important;
}
.widget_categories_list .categories_list_style_1 .columns_wrap > [class*="column-"] {
  flex: 1 1 0;
  min-width: 0;
  width: auto !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  display: block;
}
.widget_categories_list .categories_list_style_1 .categories_list_title,
.widget_categories_list .categories_list_style_1 .categories_list_label,
.widget_categories_list .categories_list_style_1 .categories_list_label a {
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Mobile: 2×2 grid like original WP (icons + “LABEL (n)” centered per cell) */
@media (max-width: 767px) {
  .widget_categories_list .categories_list_style_1 .columns_wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 1.25rem;
    align-items: start;
    justify-items: center;
  }
  .widget_categories_list .categories_list_style_1 .columns_wrap > [class*="column-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: none;
    text-align: center;
  }
  .widget_categories_list .categories_list_style_1 .categories_list_item {
    padding: 0 0.35rem;
  }
  .widget_categories_list .categories_list_style_1 .categories_list_title {
    margin-top: 0.65em;
    margin-bottom: 0;
    line-height: 1.25;
  }
  .widget_categories_list .categories_list_style_1 .categories_list_label a {
    font-size: 0.8rem;
    font-weight: 500;
    color: #282828;
  }
}

/* Header category strip: slight inset (does not affect Swiper layout) */
.header_wrap .widget_categories_list {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  box-sizing: border-box;
}

/*
 * Home hero only (#swiper_home_main): taller than theme 22em / generic rules.
 * Uses min-height only (no aspect-ratio / width) so Swiper alignment stays stable.
 * ~490px matches original WP slide assets (1170×658 row); scales down on narrow viewports.
 */
#swiper_home_main.slider_swiper,
#swiper_home_main .swiper-slide {
  min-height: max(26rem, min(490px, 40vw));
}
@media (max-width: 959px) {
  #swiper_home_main.slider_swiper,
  #swiper_home_main .swiper-slide {
    min-height: max(22rem, min(28rem, 65vw));
  }
}

/* Dropdown “curiosidades”: WP used Superfish (.sfHover); show nested ul on hover */
.menu_main_nav > li:hover > ul {
  display: block !important;
}
.menu_main_nav > li > ul li:hover > ul {
  display: block !important;
}

/* Responsive bar: text label “NAVEGAR POR” + chevron (:after); hide theme :before icon */
.menu_mode_responsive .menu_main_responsive_button:before {
  content: none !important;
  display: none !important;
}
.style-header-3.menu_mode_responsive .menu_main_wrap,
.style-header-3.menu_mode_responsive .menu_main_wrap .color_wrap {
  background-color: #72a2b6;
}

/* Single posts: larger body text on narrow screens */
@media (max-width: 767px) {
  body.single .post_item_single .post_content.entry-content,
  body.single .post_content.entry-content {
    font-size: 1.125rem;
    line-height: 1.65;
  }
}
