/*
Theme Name: Gi.CorLuz
Template: twentytwentyfive
Description: Tema-filho do Twenty Twenty-Five para o GI.CorLuz – Colour and Light Research Group. Reproduz o aspeto do site feito com o Divi (cores do grupo, secções com cortes inclinados) só com blocos do editor, sem o Divi.
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 8.1
Author: CIFA – FA.ULisboa
License: GNU General Public License v2 or later
Text Domain: gicorluz
*/

/* ---------- Cabeçalho (fixo, branco, como o do Divi) ---------- */
/* O sticky tem de estar no <header> da parte do modelo (o filho só "cola" dentro do pai). */
.wp-site-blocks > header:has(.gcl-cabecalho) {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff;
}
.gcl-cabecalho { background: #fff; }
body.admin-bar .wp-site-blocks > header:has(.gcl-cabecalho) { top: 32px; }
@media (max-width: 782px) { body.admin-bar .wp-site-blocks > header:has(.gcl-cabecalho) { top: 46px; } }
.gcl-cabecalho .wp-block-image img { width: 91px; height: 91px; display: block; }
.gcl-cabecalho .wp-block-navigation { font-size: 14px; font-weight: 600; gap: 0 22px; }
.gcl-cabecalho .wp-block-navigation .wp-block-navigation-item__content,
.gcl-cabecalho .wp-block-navigation .wp-block-navigation-item__content:hover { color: #169191 !important; text-decoration: none; }
.gcl-cabecalho .wp-block-navigation .wp-block-navigation-item__content:hover { opacity: .7; }
html { scroll-padding-top: 120px; scroll-behavior: smooth; }

/* ---------- Secções ---------- */
.wp-block-post-content > .gcl-seccao,
.wp-site-blocks > footer .gcl-seccao,
.wp-site-blocks > main { margin-block: 0 !important; }
.wp-site-blocks > footer { margin-block-start: 0 !important; }
.gcl-seccao {
	position: relative;
	padding: 54px 0;
	overflow: hidden;
}
.gcl-seccao > * { position: relative; z-index: 1; }
.gcl-seccao > .wp-block-columns,
.gcl-seccao > .wp-block-group,
.gcl-seccao > .wp-block-image { width: 80%; max-width: 1080px; margin-left: auto !important; margin-right: auto !important; }
.gcl-seccao .wp-block-columns { gap: 0 5.5%; margin-block: 0 0 2.75%; }
.gcl-seccao .wp-block-columns:last-child { margin-bottom: 0; }

.gcl-fundo-991b33 { background: #991b33; min-height: 120vh; display: flex; flex-direction: column; justify-content: center; }
.gcl-fundo-dc9827 { background: #dc9827; min-height: 630px; display: flex; flex-direction: column; justify-content: center; padding-top: 190px; }
.gcl-fundo-169191 { background: #169191; }
.gcl-fundo-333333 { background: #333; }

/* Cortes inclinados (os "dividers" slant do Divi, invertidos na horizontal) */
.gcl-seccao[class*="gcl-corte-"]::before,
.gcl-seccao[class*="gcl-corte-"]::after {
	content: none;
	position: absolute;
	left: 0;
	right: 0;
	z-index: 0;
	background-size: 100% 100%;
	background-repeat: no-repeat;
	pointer-events: none;
}
.gcl-seccao[class*="gcl-corte-topo-"]::before {
	content: "";
	top: -1px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1280 140' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M1280 140V0H0l1280 140z'/%3E%3C/svg%3E");
}
.gcl-seccao[class*="gcl-corte-base-"]::after {
	content: "";
	bottom: -1px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1280 140' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' d='M0 0v140h1280L0 0z'/%3E%3C/svg%3E");
}
.gcl-corte-topo-20::before { height: 20%; }
.gcl-corte-topo-30::before { height: 30%; }
.gcl-corte-base-20::after { height: 20%; }
.gcl-corte-base-30::after { height: 30%; }

/* ---------- Topo da página inicial ---------- */
.gcl-heroi {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background-color: #169191;
	background-image: url("https://gicorluz.fa.ulisboa.pt/wp-content/uploads/2023/07/Faculdade-Opacidade-Baixa-BG.jpg");
	background-size: cover;
	background-position: center;
	background-blend-mode: multiply;
	padding: 0;
}
.gcl-heroi .gcl-heroi-conteudo { width: 80%; max-width: 1080px; margin: 0 auto; padding-bottom: 6vh; }
.gcl-heroi h1 { color: #fff; font-size: 30px; font-weight: 700; line-height: 1; margin: 0 0 8px; }
.gcl-heroi .gcl-subtitulo { color: #fff; font-size: 12px; margin: 0; }

/* ---------- Texto ---------- */
.gcl-texto > * { margin-block: 0 !important; }
.gcl-texto p { padding-bottom: 1em; }
.gcl-texto p:last-child { padding-bottom: 0; }
.gcl-texto h1, .gcl-texto h2, .gcl-texto h3, .gcl-texto h4 { padding-bottom: 10px; }
.gcl-texto h3 strong, .gcl-texto h1 strong { font-weight: 700; }
.gcl-escuro, .gcl-escuro h1, .gcl-escuro h2, .gcl-escuro h3, .gcl-escuro p, .gcl-escuro a { color: #fff; }
.gcl-h3-centro h3, .gcl-centro { text-align: center; }
.gcl-texto h3 a { color: inherit; }

/* ---------- Ícones (Dissemination, rodapé) ---------- */
.gcl-icone-bloco { text-align: center; color: #fff; line-height: 0; margin-bottom: 1em; }
.gcl-icone-ligacao { color: #fff; display: inline-block; }
.gcl-icone-ligacao:hover { opacity: .8; }
.gcl-fundo-991b33 .gcl-texto { text-transform: uppercase; }

/* ---------- Imagens (equipa, parceiros, publicações) ---------- */
.gcl-seccao .wp-block-image { margin-block: 0 0 1em; }
.gcl-seccao .wp-block-image img { height: auto; max-width: 100%; }
.gcl-hover-cinza img { transition: filter .3s ease; }
.gcl-hover-cinza a:hover img { filter: saturate(0); }
#team .wp-block-column, #partners .wp-block-column { text-align: center; }
#team .gcl-texto p { font-size: 12px; text-align: center; }

/* ---------- Rodapé ---------- */
.gcl-rodape .gcl-seccao { padding: 54px 0 30px; }
.gcl-rodape .gcl-icone-bloco { margin-bottom: .6em; }

/* ---------- Páginas interiores (Activities, Publications) ---------- */
.gcl-pagina .gcl-seccao:first-child { padding-top: 60px; }
.gcl-pagina h1 { font-size: 30px; }

/* ---------- Telemóvel ---------- */
@media (max-width: 980px) {
	.gcl-seccao > .wp-block-columns,
	.gcl-seccao > .wp-block-group,
	.gcl-heroi .gcl-heroi-conteudo { width: 88%; }
	.gcl-cabecalho .wp-block-image img { width: 64px !important; height: 64px !important; }
	html { scroll-padding-top: 90px; }
}
@media (max-width: 781px) {
	/* Grelhas de 6 (equipa, parceiros): 3 por linha em vez de uma coluna comprida. */
	.gcl-seccao .wp-block-columns.gcl-colunas-6 { flex-wrap: wrap !important; gap: 0 4%; }
	.gcl-seccao .wp-block-columns.gcl-colunas-6 > .wp-block-column { flex-basis: 29.33% !important; flex-grow: 0; }
	.gcl-seccao .wp-block-columns.gcl-colunas-6 > .wp-block-column:has(.gcl-decor):not(:has(.gcl-texto)) { display: none; }
	.gcl-fundo-991b33 { min-height: 0; padding: 22vw 0; }
	.gcl-fundo-dc9827 { min-height: 0; padding: 32vw 0 12vw; }
	/* Logótipos institucionais (secção amarela): 2 por linha e mais pequenos. */
	.gcl-fundo-dc9827 .wp-block-columns { flex-wrap: wrap !important; gap: 6vw 8%; }
	.gcl-fundo-dc9827 .wp-block-columns > .wp-block-column { flex-basis: 46% !important; flex-grow: 0; }
	.gcl-fundo-dc9827 .wp-block-image { margin: 0; }
	.gcl-heroi { min-height: 80vh; }
}
