/* =========================================================
   TocaRural
   Personalização do template Cassiopeia — Joomla 5
   ========================================================= */

:root {
    --tr-petroleo: #008b7d;
    --tr-petroleo-escuro: #057165;
    --tr-azul-escuro: #073954;
    --tr-fundo-claro: #eaf3f4;
    --tr-branco: #ffffff;
    --tr-borda: #d6e2e5;
    --tr-sombra: 0 14px 34px rgba(18, 58, 70, 0.16);
}

/* Fundo geral do site */
body.site {
    min-height: 100vh;
    color: #17343d;
    background:
        linear-gradient(
            135deg,
            #68b1cc 0%,
            #aed2dd 40%,
            #e7f1f3 100%
        );
}

/* Cabeçalho */
.container-header {
    background: var(--tr-petroleo);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.17);
}

/* Nome e marca */
.container-header .navbar-brand,
.container-header .navbar-brand a,
.container-header .site-description {
    color: var(--tr-branco);
}

.container-header .navbar-brand a {
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 500;
    text-decoration: none;
}

/* Menu principal */
.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span {
    color: var(--tr-branco);
}

.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li > a:focus {
    color: #d9fffa;
}

/* Área global */
.site-grid {
    width: min(1440px, calc(100% - 2rem));
    margin: 0 auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Área principal */
main {
    min-width: 0;
    padding: clamp(1.25rem, 3vw, 2.75rem);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--tr-borda);
    border-radius: 26px;
    box-shadow: var(--tr-sombra);
}

/* Títulos */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--tr-azul-escuro);
}

/* Ligações */
a {
    color: #007c70;
}

a:hover,
a:focus {
    color: #04584f;
}

/* Botões */
.btn-primary {
    background-color: var(--tr-petroleo);
    border-color: var(--tr-petroleo);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--tr-petroleo-escuro);
    border-color: var(--tr-petroleo-escuro);
}

/* Módulos e cartões Joomla */
.card {
    overflow: hidden;
    border: 1px solid var(--tr-borda);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(18, 58, 70, 0.10);
}

.card-header {
    color: var(--tr-azul-escuro);
    background: #edf7f5;
}

/* Rodapé */
.container-footer {
    color: #102f39;
    background: transparent;
}

/* Telemóveis */
@media (max-width: 767px) {
    .site-grid {
        width: calc(100% - 1rem);
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    main {
        padding: 1rem;
        border-radius: 18px;
    }

    .container-header .navbar-brand a {
        font-size: 2rem;
    }
}

/* =========================================================
   TocaRural — página inicial
   ========================================================= */

.tr-home {
    width: 100%;
    text-align: center;
}

.tr-home-header {
    margin: 0 auto 2.2rem;
    max-width: 900px;
}

.tr-home-header h1 {
    margin: 0 0 0.65rem;
    font-size: clamp(2rem, 4vw, 3.3rem);
    font-weight: 750;
    line-height: 1.15;
    color: #073954;
}

.tr-home-header p {
    margin: 0;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.6;
    color: #38565f;
}

.tr-home-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
}

.tr-home-card {
    display: flex;
    min-height: 255px;
    padding: 1.8rem 1.4rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    border-radius: 24px;
    box-shadow: 0 12px 25px rgba(15, 54, 65, 0.18);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.tr-home-card:hover,
.tr-home-card:focus {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-6px);
    box-shadow: 0 18px 32px rgba(15, 54, 65, 0.27);
    filter: brightness(1.04);
}

.tr-card-icon {
    display: grid;
    width: 74px;
    height: 74px;
    margin-bottom: 1rem;
    place-items: center;
    font-size: 2.4rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
}

.tr-home-card h2 {
    margin: 0 0 0.7rem;
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1.2;
}

.tr-home-card p {
    max-width: 300px;
    margin: 0;
    color: rgba(255, 255, 255, 0.96);
    font-size: 1rem;
    line-height: 1.5;
}

.tr-agricultura {
    background: linear-gradient(145deg, #318b3b, #62b568);
}

.tr-apicultura {
    background: linear-gradient(145deg, #ed9000, #ffad1f);
}

.tr-informatica {
    background: linear-gradient(145deg, #247ca5, #4ca6c9);
}

.tr-biblioteca {
    background: linear-gradient(145deg, #5a6873, #7c909b);
}

.tr-biblia {
    background: linear-gradient(145deg, #b60008, #f2161e);
}

.tr-cursos {
    background: linear-gradient(145deg, #425b78, #667f9c);
}

/* Retira margens desnecessárias do módulo da página inicial */
.tr-home .mod-custom {
    margin: 0;
}

@media (max-width: 980px) {
    .tr-home-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .tr-home-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tr-home-card {
        min-height: 210px;
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }

    .tr-card-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }

    .tr-home-card h2 {
        font-size: 1.55rem;
    }
}

/* Ocultar botão de edição frontend */
.btn.jmodedit,
.jmodedit,
.icons .dropdown-toggle,
.com-content-article__edit,
.mod-custom .mod-edit {
    display: none !important;
}

/* Texto dos cartões sempre branco */
.tr-home-card,
.tr-home-card a,
.tr-home-card a:link,
.tr-home-card a:visited,
.tr-home-card a:hover,
.tr-home-card a:focus,
.tr-home-card .tr-card-title,
.tr-home-card .tr-card-text {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Melhor contraste do texto */
.tr-card-title {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.tr-card-text {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

/* Cartões TocaRural — título grande e ícone à esquerda */
.tr-card-link {
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-areas:
        "icon title"
        "text text";
    column-gap: 1.1rem;
    row-gap: 1rem;
    align-items: center;
    width: 100%;
    min-height: 255px;
    padding: 1.6rem 1.4rem;
    box-sizing: border-box;
    text-align: left;
}

.tr-card-icon {
    grid-area: icon;
    width: 76px;
    height: 76px;
    margin: 0 !important;
    display: grid;
    place-items: center;
    justify-self: start;
    font-size: 2.3rem;
    line-height: 1;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
}

.tr-card-title {
    grid-area: title;
    display: block;
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.08;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.tr-card-text {
    grid-area: text;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0 !important;
    color: #ffffff !important;
    font-size: 1.02rem;
    line-height: 1.5;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

@media (max-width: 1100px) {
    .tr-card-link {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .tr-card-icon {
        width: 68px;
        height: 68px;
        font-size: 2rem;
    }

    .tr-card-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 620px) {
    .tr-card-link {
        grid-template-columns: 66px minmax(0, 1fr);
        min-height: 210px;
        padding: 1.3rem 1rem;
        column-gap: 0.8rem;
        row-gap: 0.85rem;
    }

    .tr-card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .tr-card-title {
        font-size: 1.35rem;
    }

    .tr-card-text {
        font-size: 0.95rem;
    }
}

/* Reduzir o tamanho dos títulos dos cartões */
.tr-card-title {
    font-size: 1.55rem !important;
    line-height: 1.1;
    letter-spacing: 0.2px;
}

/* Ocultar a área principal vazia apenas na página inicial */
body.itemid-101 main {
    display: none !important;
}

/* Cores dos novos cartões */
.tr-inqueritos {
    background: linear-gradient(145deg, #74459a, #9361ba) !important;
}

.tr-participar {
    background: linear-gradient(145deg, #b35a22, #dd7b35) !important;
}

/* Botão global para regressar ao portal principal */
.tr-portal-global,
.tr-portal-global:link,
.tr-portal-global:visited {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;

    padding: 0.72rem 1rem;

    color: #ffffff !important;
    background: linear-gradient(145deg, #ff8a2a, #ff6e1a);

    border: 3px solid #fff3a8;
    border-radius: 18px;

    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
    text-decoration: none !important;

    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.tr-portal-global:hover,
.tr-portal-global:focus {
    color: #ffffff !important;
    text-decoration: none !important;

    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.30);
    filter: brightness(1.06);
}

.tr-portal-icon {
    font-size: 1.25rem;
    line-height: 1;
}

/* Ajuste específico para a posição below-top */
.container-below-top {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.45rem 1rem;
}

.container-below-top .mod-custom {
    margin: 0;
}

@media (max-width: 620px) {
    .tr-portal-global,
    .tr-portal-global:link,
    .tr-portal-global:visited {
        padding: 0.62rem 0.8rem;
        font-size: 0.82rem;
        border-radius: 14px;
    }

    .container-below-top {
        justify-content: center;
        padding: 0.5rem;
    }
}

/* =========================================================
   Cabeçalho oculto e botão global Porta Principal
   ========================================================= */

/* Ocultar o cabeçalho original do Cassiopeia */
.container-header {
    display: none !important;
}

/* Área onde está o botão */
.container-below-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 78px;
    padding: 8px 16px;
    background: #008f82;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
}

.container-below-top .mod-custom {
    margin: 0 !important;
}

/* Botão */
.tr-portal-global,
.tr-portal-global:link,
.tr-portal-global:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    width: auto;
    padding: 7px 12px 7px 8px;

    color: #ffffff !important;
    background: linear-gradient(145deg, #ff9838, #ff741f);

    border: 2px solid #fff0a6;
    border-radius: 15px;

    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.05;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.20);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.tr-portal-global:hover,
.tr-portal-global:focus {
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.27);
}

/* Caixa do ícone */
.tr-portal-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;

    background: rgba(255, 255, 255, 0.28);
    border-radius: 11px;
}

.tr-portal-icon svg {
    display: block;
    width: 29px;
    height: 29px;
}

/* Texto em duas linhas */
.tr-portal-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;

    color: #ffffff;
    font-weight: 500;
    line-height: 1;
}

/* Telemóvel */
@media (max-width: 620px) {
    .container-below-top {
        min-height: 66px;
        padding: 7px 10px;
    }

    .tr-portal-global,
    .tr-portal-global:link,
    .tr-portal-global:visited {
        padding: 6px 10px 6px 7px;
        font-size: 0.76rem;
        border-radius: 13px;
    }

    .tr-portal-icon {
        width: 36px;
        height: 36px;
    }

    .tr-portal-icon svg {
        width: 26px;
        height: 26px;
    }
}

/* =========================================================
   Botão global Porta Principal
   ========================================================= */

/* Ocultar cabeçalho original do Cassiopeia */
.container-header {
    display: none !important;
}

/* Faixa superior */
.container-below-top {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    width: 100% !important;
    max-width: none !important;
    min-height: 68px;

    margin: 0 !important;
    padding: 8px 14px !important;

    background: #008f82 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
}

/* Limpar o invólucro do módulo */
.container-below-top .mod-custom {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Botão */
.tr-portal-global,
.tr-portal-global:link,
.tr-portal-global:visited {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;

    width: auto !important;
    padding: 6px 10px 6px 7px !important;

    color: #ffffff !important;
    background: linear-gradient(145deg, #ff9838, #ff741f) !important;

    border: 2px solid #fff0a6 !important;
    border-radius: 14px !important;

    font-size: 0.90rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0.2px !important;
    text-decoration: none !important;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.20);
}

.tr-portal-global:hover,
.tr-portal-global:focus {
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.27);
}

/* Ícone */
.tr-portal-icon {
    display: grid !important;
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    place-items: center !important;

    background: rgba(255, 255, 255, 0.30) !important;
    border-radius: 10px !important;
}

.tr-portal-icon svg {
    display: block !important;
    width: 27px !important;
    height: 27px !important;
}

/* Texto em duas linhas */
.tr-portal-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;

    color: #ffffff !important;
    font-size: 0.90rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
}

@media (max-width: 620px) {
    .container-below-top {
        min-height: 60px;
        padding: 7px 9px !important;
    }

    .tr-portal-global,
    .tr-portal-global:link,
    .tr-portal-global:visited {
        padding: 5px 8px 5px 6px !important;
        border-radius: 12px !important;
    }

    .tr-portal-icon {
        width: 34px !important;
        height: 34px !important;
        flex-basis: 34px !important;
    }

    .tr-portal-icon svg {
        width: 24px !important;
        height: 24px !important;
    }

    .tr-portal-text {
        font-size: 0.80rem !important;
    }
}

/* =========================================================
   CORREÇÃO: manter below-top e ocultar apenas a marca/menu
   ========================================================= */

/* Voltar a mostrar o contentor onde está o módulo below-top */
.container-header {
    display: block !important;
    padding: 0 !important;
    background: #008f82 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16) !important;
}

/* Ocultar apenas o antigo nome Toca Rural e o menu */
.container-header .navbar-brand,
.container-header .container-nav,
.container-header nav {
    display: none !important;
}

/* Faixa do botão */
.container-header .container-below-top,
.container-below-top {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    width: 100% !important;
    max-width: none !important;
    min-height: 68px !important;

    margin: 0 !important;
    padding: 8px 14px !important;

    background: #008f82 !important;
}

/* Remover margens do invólucro Joomla */
.container-below-top > *,
.container-below-top .mod-custom {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Botão Porta Principal */
.tr-portal-global,
.tr-portal-global:link,
.tr-portal-global:visited {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;

    width: auto !important;
    margin: 0 !important;
    padding: 6px 10px 6px 7px !important;

    color: #ffffff !important;
    background: linear-gradient(145deg, #ff9838, #ff741f) !important;

    border: 2px solid #fff0a6 !important;
    border-radius: 14px !important;

    font-size: 0.90rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0.2px !important;
    text-decoration: none !important;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.20);
}

.tr-portal-global:hover,
.tr-portal-global:focus {
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.27);
}

.tr-portal-icon {
    display: grid !important;
    width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
    place-items: center !important;

    background: rgba(255, 255, 255, 0.30) !important;
    border-radius: 10px !important;
}

.tr-portal-icon svg {
    display: block !important;
    width: 27px !important;
    height: 27px !important;
}

.tr-portal-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;

    color: #ffffff !important;
    font-size: 0.90rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
}

@media (max-width: 620px) {
    .container-header .container-below-top,
    .container-below-top {
        min-height: 60px !important;
        padding: 7px 9px !important;
    }
}

/* =========================================================
   Entrada da área Agricultura
   ========================================================= */

.tr-agri-home {
    width: 100%;
}

.tr-agri-header {
    max-width: 900px;
    margin: 0 auto 2rem;
    text-align: center;
}

.tr-agri-header h1 {
    margin: 0 0 0.7rem;
    color: #073954;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
}

.tr-agri-header p {
    margin: 0;
    color: #38565f;
    font-size: 1.05rem;
    line-height: 1.6;
}

.tr-agri-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}

.tr-agri-card,
.tr-agri-card:link,
.tr-agri-card:visited {
    display: flex;
    min-height: 230px;
    padding: 1.5rem 1.2rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: #ffffff !important;
    text-align: center;
    text-decoration: none !important;

    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(18, 58, 70, 0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.tr-agri-card:hover,
.tr-agri-card:focus {
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-5px);
    box-shadow: 0 16px 30px rgba(18, 58, 70, 0.26);
    filter: brightness(1.04);
}

.tr-agri-icon {
    display: grid;
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    place-items: center;

    font-size: 2rem;
    line-height: 1;

    background: rgba(255, 255, 255, 0.22);
    border-radius: 17px;
}

.tr-agri-card strong {
    display: block;
    margin-bottom: 0.6rem;
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
}

.tr-agri-card > span:last-child {
    color: rgba(255, 255, 255, 0.97);
    font-size: 0.96rem;
    line-height: 1.5;
}

.tr-agri-oliveiras {
    background: linear-gradient(145deg, #4b7b36, #72a84f);
}

.tr-agri-videiras {
    background: linear-gradient(145deg, #6d3f78, #955ca3);
}

.tr-agri-fruta {
    background: linear-gradient(145deg, #b85c36, #db8054);
}

.tr-agri-horta {
    background: linear-gradient(145deg, #258654, #45aa73);
}

.tr-agri-lavanda {
    background: linear-gradient(145deg, #7052a2, #9173bd);
}

.tr-agri-jardim {
    background: linear-gradient(145deg, #bd4f78, #dc7798);
}

.tr-agri-calendario {
    background: linear-gradient(145deg, #327a9d, #51a0c1);
}

.tr-agri-pragas {
    background: linear-gradient(145deg, #9b672e, #c58a45);
}

.tr-agri-biologico {
    background: linear-gradient(145deg, #417f69, #60a58c);
}

@media (max-width: 980px) {
    .tr-agri-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .tr-agri-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tr-agri-card {
        min-height: 195px;
    }
}

/* Ocultar botão/ligação Editar no frontend */
.com-content-article__edit,
.icons,
.icons .dropdown-toggle,
.btn.jmodedit,
.jmodedit,
a[href*="task=article.edit"] {
    display: none !important;
}

/* =========================================================
   Páginas de culturas
   ========================================================= */

.tr-cultura {
    width: 100%;
}

.tr-cultura-header {
    max-width: 900px;
    margin: 0 auto 2rem;
    text-align: center;
}

.tr-cultura-header h1 {
    margin: 0 0 0.7rem;
    color: #073954;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
}

.tr-cultura-header p {
    margin: 0;
    color: #38565f;
    font-size: 1.05rem;
    line-height: 1.6;
}

.tr-cultura-topicos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.tr-cultura-topicos a,
.tr-cultura-topicos a:link,
.tr-cultura-topicos a:visited {
    display: inline-flex;
    padding: 0.65rem 0.95rem;
    color: #ffffff;
    background: #087f70;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
}

.tr-cultura-topicos a:hover,
.tr-cultura-topicos a:focus {
    color: #ffffff;
    background: #05675d;
    text-decoration: none;
}

.tr-cultura section {
    margin-top: 1.2rem;
    padding: 1.25rem 1.4rem;
    background: #f7fbfb;
    border: 1px solid #d8e6e7;
    border-radius: 16px;
}

.tr-cultura section h2 {
    margin-top: 0;
    color: #087f70;
    font-size: 1.45rem;
    font-weight: 600;
}

.tr-cultura section p {
    margin-bottom: 0;
    line-height: 1.65;
}

.tr-horta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.tr-horta-grid a,
.tr-horta-grid a:link,
.tr-horta-grid a:visited {
    display: grid;
    min-height: 90px;
    place-items: center;
    padding: 1rem;
    color: #ffffff;
    background: linear-gradient(145deg, #258654, #45aa73);
    border-radius: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 7px 16px rgba(18, 58, 70, 0.14);
}

.tr-horta-grid a:hover,
.tr-horta-grid a:focus {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-3px);
}

@media (max-width: 820px) {
    .tr-horta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .tr-horta-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Ocultar título e metadados automáticos dos artigos Joomla
   ========================================================= */

/* Título automático do artigo */
.com-content-article > .page-header {
    display: none !important;
}

/* Bloco "Detalhes", autor, categoria, datas e visualizações */
.com-content-article .article-info,
.com-content-article .article-info-term,
.com-content-article .com-content-article__info,
.com-content-article dl.article-info {
    display: none !important;
}

/* Botão ou ligação Editar */
.com-content-article .icons,
.com-content-article .com-content-article__edit,
.com-content-article a[href*="task=article.edit"],
.btn.jmodedit,
.jmodedit {
    display: none !important;
}

/* =========================================================
   Barra global de navegação TocaRural
   ========================================================= */

.container-header {
    display: block !important;
    padding: 0 !important;
    background: #008f82 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16) !important;
}

.container-header .navbar-brand,
.container-header .container-nav,
.container-header nav:not(.tr-global-nav) {
    display: none !important;
}

.container-header .container-below-top,
.container-below-top {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    width: 100% !important;
    max-width: none !important;
    min-height: 68px !important;

    margin: 0 !important;
    padding: 8px 14px !important;

    background: #008f82 !important;
}

.container-below-top > *,
.container-below-top .mod-custom {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.tr-global-nav {
    display: flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    width: 100%;
}

.tr-nav-button,
.tr-nav-button:link,
.tr-nav-button:visited {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    min-height: 46px;
    padding: 5px 10px 5px 6px;

    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.70);
    border-radius: 13px;

    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.15px;
    text-decoration: none !important;

    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.tr-nav-button:hover,
.tr-nav-button:focus {
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.26);
}

.tr-nav-portal {
    background: linear-gradient(145deg, #ff9838, #ff741f);
}

.tr-nav-conteudos {
    background: linear-gradient(145deg, #267c9c, #3f9fc0);
}

.tr-nav-agricultura {
    background: linear-gradient(145deg, #3c8d48, #5cad65);
}

.tr-nav-voltar {
    background: linear-gradient(145deg, #687a84, #84969f);
}

button.tr-nav-button {
    appearance: none;
    -webkit-appearance: none;
}

.tr-nav-icon {
    display: grid;
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    place-items: center;

    background: rgba(255, 255, 255, 0.30);
    border-radius: 9px;
}

.tr-nav-icon svg {
    display: block;
    width: 24px;
    height: 24px;
}

.tr-nav-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;

    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
}

@media (max-width: 720px) {
    .container-header .container-below-top,
    .container-below-top {
        padding: 7px 8px !important;
    }

    .tr-global-nav {
        gap: 6px;
    }

    .tr-nav-button,
    .tr-nav-button:link,
    .tr-nav-button:visited {
        min-height: 42px;
        padding: 4px 7px 4px 5px;
        font-size: 0.72rem;
        border-radius: 11px;
    }

    .tr-nav-icon {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
    }

    .tr-nav-icon svg {
        width: 21px;
        height: 21px;
    }

    .tr-nav-text {
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .tr-global-nav {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tr-nav-button,
    .tr-nav-button:link,
    .tr-nav-button:visited {
        width: 100%;
        justify-content: flex-start;
    }
}

/* =========================================================
   CORREÇÃO — mostrar a navegação global em below-top
   ========================================================= */

/* Manter ocultos apenas a marca e o menu antigo */
.container-header .navbar-brand,
.container-header .container-nav {
    display: none !important;
}

/* Voltar a mostrar todos os invólucros da posição below-top */
.container-header .container-below-top,
.container-header .container-below-top nav,
.container-header .container-below-top .mod-custom,
.container-below-top,
.container-below-top nav,
.container-below-top .mod-custom {
    display: block !important;
}

/* A barra dos botões */
.container-below-top .tr-global-nav {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 9px !important;
    width: 100% !important;
}

@media (max-width: 480px) {
    .container-below-top .tr-global-nav {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
