/* Modern same-identity additions for the static CPTI site.
   The legacy layout rules live in layout.css; this file adds the real
   navigation, gallery, search and responsive behaviour. */

#topo { overflow: hidden; }
#banner { width: 669px; }
#banner img, #banner-home img { display: block; max-width: 100%; height: auto; }
#banner-home { width: 669px; }
#banner-home .slideshow-container { max-width: 669px; position: relative; margin: 0 auto; }
#banner-home .slideshow-dots { text-align: center; padding: 6px 0 2px; }
#banner-home .mySlides img { display: block; width: 100%; height: auto; }

#main { clear: both; }

#menu {
	background: #eaeff4;
	padding: 8px 0 12px;
}
#menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 231px;
}
#menu li {
	margin: 0;
	padding: 0;
	border-bottom: 1px solid #d5e0e8;
}
#menu li a {
	display: block;
	padding: 7px 12px;
	color: #516f84;
	text-decoration: none;
	font: 10pt "Trebuchet MS", Arial, Helvetica, sans-serif;
}
#menu li a:hover { background: #dbe7f0; }
#menu li.active a {
	background: #c9dbe8;
	color: #164761;
	font-weight: bold;
}
#menu-logos { text-align: center; padding: 16px 0 0; }
#menu-logos img { max-width: 100%; height: auto; }

#conteudo { background: #eaeff4; }
#interno { padding: 23px; }
#rodape {
	padding: 14px 23px;
	border-top: 1px solid #d5e0e8;
	color: #6a7f8c;
	font: 10px "Trebuchet MS", Arial, Helvetica, sans-serif;
}
#rodape a { color: #516f84; }
#rodape p { margin: 0; }

h1.titulo {
	margin-top: 5px;
	font: 11pt "Trebuchet MS", Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #7e7100;
}
#interno h1 { padding-left: 5px; }

.projeto-lista { overflow: hidden; }
.projeto-lista-descricao { width: 400px; }
.projeto-lista-descricao .titulo { margin-top: 0; }
.projeto-lista-descricao p { margin-top: 2px; margin-bottom: 10px; }
.projetos-lista p {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.summary p:first-child { margin-top: 0; }
.body img, .summary img { max-width: 100%; height: auto; }
.body table, .summary table { max-width: 100%; }
.body iframe, .summary iframe { max-width: 100%; }
.meta { color: #6a6a6a; }

/* Gallery */
.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
	gap: 10px;
	margin: 10px 0 22px;
}
.gallery a {
	display: block;
	border: 1px solid #fff;
	background: #fff;
	line-height: 0;
}
.gallery img {
	display: block;
	width: 100%;
	height: 115px;
	object-fit: cover;
}

/* Video */
.video {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	max-width: 669px;
	margin: 10px 0 22px;
}
.video iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Production search */
.filters {
	display: grid;
	grid-template-columns: 300px 300px;
	gap: 12px;
	margin: 14px 0 18px;
}
.filters label {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	width: auto;
	float: none;
	padding-bottom: 0;
	font-weight: bold;
	color: #516f84;
}
.filters select, .filters input {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}
.filters button {
	align-self: end;
	justify-self: start;
	width: auto;
	padding: 6px 14px;
	cursor: pointer;
}
.result-count { color: #516f84; font-weight: bold; margin: 8px 0 16px; }

/* Lightbox */
#lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .85);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1000;
	padding: 20px;
}
#lightbox.open { display: flex; }
#lightbox img {
	max-width: 95vw;
	max-height: 90vh;
	border: 4px solid #fff;
	background: #fff;
}
#lightbox button {
	position: absolute;
	top: 12px;
	right: 18px;
	background: #fff;
	border: 0;
	font-size: 22px;
	line-height: 1;
	padding: 6px 12px;
	cursor: pointer;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 920px) {
	#corpo { width: auto; padding: 0 10px; }
	#logo, #banner, #banner-home, #menu, #conteudo { float: none; width: auto; }
	#menu ul { width: auto; display: grid; grid-template-columns: 1fr 1fr; }
	#menu li { border-right: 1px solid #d5e0e8; }
	#menu li:nth-child(even) { border-right: 0; }
	#menu { padding: 0; }
	#menu-logos img { max-width: 200px; }
	#home-destaques, #home-quadro {
		float: none;
		width: auto;
		margin: 0 0 20px;
		padding: 16px;
	}
	#home-destaques ul { width: auto; }
	.projeto-lista-imagem, .projeto-lista-descricao {
		float: none;
		width: auto;
		margin: 0 0 15px;
	}
	.projeto-lista-imagem { margin-left: 0; }
	.gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
	#interno { padding: 16px; }
	.filters { grid-template-columns: 1fr; }
}
