:host, :root {
    /* Official Government Green Palette Green Cool Vivid */
    --color-gov-green-darkest: #154C21; /* For strong emphasis, main headings, borders. */
    --color-gov-green-dark: #216E1F;   /* For active states, secondary headings, link hovers */
    --color-gov-green-medium: #168821; /* Primary action color: main buttons, links */
    --color-gov-green-light: #00A91C;  /* For soft backgrounds, accents */
    
    /* Neutral and authentication specific colors */
    --color-text-dark: #333;
    --color-text-light: #fff;
    --color-gray-background: #f4f4f4; /* Light gray for sections/cards */
    --color-white-background: #fff; /* Light gray for sections/cards */
    --color-border: #ddd;
    
    /* Standard authentication button colors (gov.br typically uses blue for brand consistency) */
    --color-auth-govbr-blue: #0056b3; /* Darker blue for gov.br button */
    --color-auth-govbr-blue-hover: #004085; /* Even darker blue for hover */
    --color-auth-restricted-gray: #6c757d; /*Standard muted gray */	
    --color-auth-restricted-gray-hover: #5a6268; /* Darker gray for hover */
	--blue-warm-vivid-70: #1351B4; /*-- botão primário*/
	
	--font-family: 'Rawline', 'Raleway';
	
	--toast-error-color: #dc3545;
	--toast-warning-color: #f0ad4e;
	--toast-info-color: #0d6efd;
	
	overflow-x: hidden;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/*Sobrepõe font-family e font-size do padrão Strategy*/
.mstrWeb, .mstrWeb input, .mstrWeb select, .mstrWeb textarea, .mstrWeb table, .mstrWeb th, .mstrWeb td {
    font-family: var(--font-family);
    color: var(--color-text-dark);
    background-color: var(--color-white-background);
    
 	font-size: 12pt;
 	line-height: 1.6;  
}

.mstr-page-login .mstrError{
	display: none;
}

a {
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    filter: brightness(120%);
    text-decoration: underline;
}

h4 {
	font-size:20px;	
}

section {
	margin-bottom: 32px;
}

/*Estilos do cabeçalho*/
.main-header {
	width: 100%;
    border-bottom: 7px solid var(--color-gov-green-dark);
    padding: 8px;
}

.container {
	max-width: 1200px;
    margin: 0 auto;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-pequeno {
	height: 40px;
}

.title {
	color: var(--color-gov-green-darkest);
    text-align: center;	
	padding: 1.2rem 0 0.2rem 0;	
    font-size: 28px;
}

.divNav {
	display: flex;
	justify-content: center;
	margin-bottom: .5rem;
}

/*-- SEÇÃO ACESSO AO SISTEMA --*/
.containerLogin {
    padding: 0 30px;
}

.login-buttons {
    display: flex;
    list-style: none;
    gap: 1rem;
    padding: 2rem;    
}

.button {
	color: var(--color-text-light) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent; /* Ensures consistent border on all buttons */ 
}

.button-primary {
    background-color: var(--color-auth-govbr-blue);    
    border-color: var(--color-auth-govbr-blue);
    display: inline;
}

.button-secondary {
	color: var(--color-auth-govbr-blue) !important; /*comentado em 14/08/26(--color-text-dark);*/
    background-color: var(--color-white-background);
    border-color: var(--color-auth-govbr-blue);
    display: inline;    
}

.login-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 5rem; /* Increased gap */
}

/*-- Seção Notícias e Destaques --*/
.news-section {
    background-color: var(--color-gray-background);
    margin-bottom: 0;
}
/*Subseção carrossel da seção*/
.carousel-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 300px;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 48px;
    height: 48px;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,.9);

    color: var(--color-gov-green-medium);

    font-size: 24px;

    cursor: pointer;

    z-index: 10;

    box-shadow: 0 2px 8px rgba(0,0,0,.2);

    transition: all .3s ease;
}

.carousel-arrow:hover:not(.disabled) {
    transform: translateY(-50%) scale(1.05);
}

.carousel-arrow.disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

.carousel-track {
    display: flex;
    width: 200%;
    transition: transform .6s ease;
}

.carousel-slide {
    width: 50%;
}

.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    padding: 20px 16px 16px 16px;
}

/*Subseção notícia principal*/
.main-news {
    background-color: var(--color-white-background);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.news-image {
    display: block;
    width: 100%;
    max-width: 540px;
    height: 280px;
    margin: 2rem auto 1rem auto;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}

.news-content {
    padding: 0 30px 30px;
    line-height: 1.8;
    color: #222;
    font-size: 1rem;
}

.main-news .news-content {
    padding: 0 2rem 2rem 2rem
}

/*subseção notícias secundárias*/
.secondary-news {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-news-bottom{
	display: flex;
    justify-content: space-between;
    font-weight: bolder;
}

.main-news-bottom a{
	color: var(--color-auth-govbr-blue);
}

.main-news-bottom a:visited{
	color: var(--color-auth-govbr-blue-hover);
}

.read-more {
    display: inline-block;
    color: var(--color-gov-green-medium);
    font-weight: 700;
}

.news-item {
    background-color: var(--color-white-background);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.news-item:hover{
   transform: translateY(-2px);

   box-shadow:
        0 6px 16px rgba(0,0,0,.08);		
}

.news-item h4, 
	.publication-card h4 {
    font-size: 15px;
    margin-bottom: 0.6rem;
}

#main-news-headline a, .news-item h4 a, .publication-card h4 a, 
	.news-content a:visited, .publication-card h4 a:visited {
    color: var(--color-gov-green-dark);
}

.news-content a:hover, 
	.publication-card h4 a:hover{
	filter: brightness(120%);
    text-decoration: underline;
}

/*subseção pesquisa de notícias*/
.search-panel {
/*
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    
    padding: 15px 0;	
    border-radius: 5px;
*/
}

#search-form{
    display: flex;
    gap: 10px;
    margin: 10px 100px 10px 0;
	flex-wrap: wrap;    
}

.field {
    flex: 1;
    min-width: 260px;
    display: flex;
    flex-direction: column;
}

.field label {
    margin-bottom: 8px;

    font-size: 14px;
    font-weight: 600;

    color: #374151;
}

.field input,
.field select {
    height: 48px;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    padding: 0 14px;

    font-size: 14px;
}

.field input:focus,
.field select:focus {
    outline: none;

    border-color: var(--color-gov-green-medium);

    box-shadow: 0 0 0 3px rgba(31,122,53,.15);
}

.actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.publication-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));

    gap: 20px;
}

.publication-card {
    background: white;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    padding: 22px;

    transition: .2s;
}

.publication-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 6px 16px rgba(0,0,0,.08);
}

.publication-card p {
    margin-bottom: 18px;
    color: #6b7280;
    line-height: 1.6;
}

.pagination {
    margin-top: 32px;

    display: flex;
    justify-content: center;

    gap: 8px;
}

.page-btn {
    min-width: 42px;
    height: 42px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: white;

    cursor: pointer;

    transition: .2s;
}

.page-btn:hover {
    background: #f3f4f6;
}

.page-btn.active {
    background: var(--color-auth-govbr-blue);
    color: white;

    border-color: var(--color-auth-govbr-blue);
}

/*-- Seção Publicações e Documentos --*/
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    padding: 20px 16px 16px 16px;  
}

.publication-date {
    display: inline-block;

    margin-bottom: 16px;
    padding: 8px 12px;

    border-radius: 5px;

    font-size: 12px;
    font-weight: 700;
}

.publication-date a{
	color: white;
	cursor: pointer;	
}

.document-card {
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease;
    background-color: var(--color-gray-background);
}

.document-card p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.document-card h3 a {
    color: var(--color-gov-green-dark);
}

.download-link {
    display: inline-flex;
    align-items: center;
    background-color: var(--color-gov-green-medium);
    color: var(--color-text-light) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease;
    justify-content: center;
    gap: 8px;
}

.download-link i {
	font-size: 2rem;
}

/*Seção rodapé*/
footer{
	font-size: 15px;	
}

.main-footer {
    background-color: var(--color-gov-green-darkest);
    color: var(--color-text-light);
    padding: 1rem 0;
    text-align: center;
    border-top: 6px solid var(--color-gov-green-darkest);
}

.footer-content {
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.footer-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-stn-footer {
    height: 60px;
    margin-bottom: 0.8rem;
    filter: brightness(0) invert(1);
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.8rem;	
}

.footer-nav ul li a {
	color: white;
	
}

.footer-nav a:visited{
	color: var(--color-text-light);	
}

/*Modal buscar notícias*/
/*Buscando notícias*/
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.loading-box {
	position: absolute;
	/*top: 110px;*/
    background: #fff;
    padding: 20px 24px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    text-align: center;
    /*max-width: 450px;*/
    border-top: 5px solid var(--color-gov-green-medium);
    min-width: 420px;
    min-height: 180px    
}

.loading-box h3 {
    color: var(--color-gov-green-medium);
    margin: 15px 0 10px;
    font-size: 20px;
    font-weight: 600;
}

.loading-box p {
    color: #555;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto;
    border: 4px solid #d9e8dc;
    border-top: 4px solid var(--color-gov-green-medium);
    border-radius: 50%;
    animation: girar 1s linear infinite;
}

@keyframes girar {
    100% {
        transform: rotate(360deg);
    }
}

/*janelinha de informação ou erro*/
.message-toast {
	opacity: 0;
	visibility: hidden;	
    position: fixed;
    top: 0px;
    left: 50%;

    transition:
		opacity 1s ease,
		transform 1s ease,
		visibility 1s;
    transform: translateX(-50%) translateY(-15px);
		
    z-index: 9999;

    width: 420px;
    max-width: 90%;

    background: white;
    border-top: 4px solid;

    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,.15);

    padding: 14px 16px;

    align-items: flex-start;
    gap: 12px;
}

.message-toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
	visibility: visible;
}

.message-icon {
    width: 32px;
    height: 32px;

    display: flex;
    justify-content: center;
    align-items: center;

    flex-shrink: 0;
    border-radius: 50%;
}

.message-icon i{
	margin-top: 10px;
	font-size: 35px;
}

.message-content {
    flex: 1;
}

.message-content h4 {
    margin: 0 0 4px;
}

.message-content p {
	overflow-wrap: anywhere;
    margin: 0;
    color: #555;
}

.message-close {
    border: none;
    background: transparent;
    cursor: pointer;
}

/*Temas das janelas informativas*/
.toast-error {
    border-top-color: var(--toast-error-color);
}

.toast-error .message-icon {
    color: var(--toast-error-color);
}

.toast-error h4 {
    color: var(--toast-error-color);
}

.toast-warning {
    border-top-color: var(--toast-warning-color);
}

.toast-warning .message-icon {
    color: var(--toast-warning-color);
}

.toast-warning h4 {
    color: var(--toast-warning-color);
}

.toast-info {
    border-top-color: var(--toast-info-color);
}

.toast-info .message-icon {
    color: var(--toast-info-color);
}

.toast-info h4 {
    color: var(--toast-info-color);
}

/*** 
Estilos da janela de apresentação
***/
.news-modal {
	display: flex;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    overflow: hidden;
    
    opacity: 0;
    visibility: hidden;  
    justify-content: center;
    align-items: center;
    
    transition: opacity 0.5s ease, visibility 0.35s ease;  
}

.news-modal.open {
    opacity: 1;
    visibility: visible;
}

.news-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);

    width: 60px;
    height: 60px;

    border: none;
    border-radius: 50%;

    background: white;
    color: var(--color-gov-green-dark);

    cursor: pointer;

    font-size: 22px;

    box-shadow: 0 2px 15px rgba(0,0,0,.2);

    transition: all .2s ease;

    z-index: 10001;
}

.news-nav.disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
}

.news-nav:hover {
    transform: translateY(-50%) scale(1.1);

    background: var(--color-gov-green-dark);
    color: white;
}

.news-nav-prev {
    left: 20px;
}

.news-nav-next {
    right: 20px;
}

.news-modal-content {
	position: fixed;
    background: #fff;
    width: 80%;
    max-width: 900px;
    max-height: 95vh;
    border-radius: 10px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);

    top: 50%;
    left: 50%;
    
    transform: translate(-50%, -45%);
    transition: all 0.5s ease;     
}

.news-modal-content.open {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.news-close {
	position: relative;
    float: right;
    margin: 10px;
    
    right: 12px;

    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
	background: linear-gradient(to bottom, var(--color-gov-green-light), var(--color-gov-green-dark));
    color: white;
    cursor: pointer;

    box-shadow:
        0 3px 6px rgba(0,0,0,.3),
        inset 0 1px 0 rgba(255,255,255,.4);

    transition: all .5s ease;
}

.news-close i {
    line-height: 1;
    font-size: 22px;
}
.news-close:hover {
    transform: translateY(-2px) scale(1.08);

    /*background: linear-gradient(to bottom, var(--color-gov-green-dark), var(--color-gov-green-darkest));*/
    background: linear-gradient(to bottom, var(--color-gov-green-medium), var(--color-gov-green-darkest));

    box-shadow:
        0 6px 12px rgba(0,0,0,.35),
        inset 0 1px 0 rgba(255,255,255,.5);
}

.news-close::after {
    content: attr(data-tooltip);

    position: absolute;
    top: calc(100% + 20px); /* abaixo do botão */
    right: 0;

    transform: translateY(-50%);
    
    background: #333;
    color: #fff;

    padding: 6px 10px;
    border-radius: 4px;

    font-size: 12px;
    white-space: nowrap;

    opacity: 0;
    pointer-events: none;

    transition: opacity .2s;
}

.news-close:hover::after {
    opacity: 1;
}

.news-image-container {
    width: 100%;
    max-height: 450px;
    overflow: hidden;
}

.news-image-container img {
    max-width: 95%;
    display: block;
    object-fit: cover;
    margin: auto;
}

.news-header {
    padding: 20px 30px;
}

.news-date {
    display: block;
    color: #777;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.news-title {
    margin: 0 0 15px;
    font-size: 2rem;
    line-height: 1.2;
}

.news-lead {
    font-size: 1.2rem;
    color: #444;
    font-weight: 500;
    line-height: 1.5;
}

.news-content {
    padding: 0 30px 30px;
    line-height: 1.8;
    color: #222;
    font-size: 1rem;
}