.img-square {
    width: 100%;
    aspect-ratio: 1 / 1;   
    overflow: hidden;
}

.img-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;    
    display: block;
}

.img-thumbnail-project {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.blog-posts > .row { align-items: stretch; }
.img-research-post { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }

.custom-el-3 .custom-el-3-img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    transform: none;
}

.custom-el-3 .custom-el-3-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.custom-grid-1 .custom-grid-1-item .custom-grid-1-img {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    transform: none;
}

.custom-grid-1 .custom-grid-1-item .custom-grid-1-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.05);
}

.custom-grid-1 .custom-grid-1-item:hover .custom-grid-1-img img {
    transform: scale(1.1);
}

.custom-section-1 {
    position: relative;
    background-image: none !important;
}

.custom-section-1::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--section-bg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 0;
}

.custom-section-1 > * {
    position: relative;
    z-index: 1;
}

.form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem var(--primary-rgba-20);
}

.grecaptcha-badge {
    z-index: 99999 !important;
    position: fixed !important;
}

#footer a:not(.btn):not(.no-footer-css):hover,
#footer a:not(.btn):not(.no-footer-css):focus,
#footer a:not(.btn):not(.no-footer-css):active {
    color: var(--secondary) !important;
}

::selection {
    background-color: var(--primary);
    color: #fff;
}

::-moz-selection {
    background-color: var(--primary);
    color: #fff;
}

@media (min-width: 768px) {
  .w-md-45 {
    width:45% !important;
  }
}

@media (min-width: 768px) {
  .w-md-30 {
    width:30% !important;
  }
}

@media (min-width: 768px) {
  .w-md-70 { width:70% !important; }
}

@media (min-width: 768px) {
  .w-md-55 { width:55% !important; }
}

.pagination .page-item.active .page-link,
.pagination .page-link.active,
.pagination .active > .page-link {
    color: #fff;
}

@media (max-width: 991px) {
    #header .header-nav-main:not(.header-nav-main-mobile-dark) nav > ul > li > a.active,
    #header .header-nav-main:not(.header-nav-main-mobile-dark) nav > ul li a.active,
    #header .header-nav-main:not(.header-nav-main-mobile-dark) nav > ul > li > a.current-page-active,
    #header .header-nav-main:not(.header-nav-main-mobile-dark) nav > ul li a.current-page-active,
    #header .header-nav-main.header-nav-main-mobile-dark nav > ul > li > a.active,
    #header .header-nav-main.header-nav-main-mobile-dark nav > ul li a.active,
    #header .header-nav-main.header-nav-main-mobile-dark nav > ul > li > a.current-page-active,
    #header .header-nav-main.header-nav-main-mobile-dark nav > ul li a.current-page-active {
        color: #fff !important;
    }
}

@media (max-width: 575px) {
    .custom-carousel-1 .card {
        aspect-ratio: 4 / 3;
    }

    .custom-carousel-1 .card .card-body {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ---------------------------------------------------------------------------
   Formulário a enviar
   O template desativa os campos mas nada indica que está a acontecer alguma
   coisa: o botão é um <button> e o .val() do contact.js escreve no atributo
   value, que num <button> não se vê. Marca-se o formulário com .is-sending e o
   sinal fica aqui, sem depender de JavaScript para desenhar nada.
--------------------------------------------------------------------------- */
.contact-form.is-sending {
	position: relative;
}

/* Os campos recuam para segundo plano, sem desaparecer. */
.contact-form.is-sending .form-control,
.contact-form.is-sending .form-check {
	opacity: .55;
	transition: opacity .15s ease;
}

.contact-form.is-sending button[type="submit"] {
	position: relative;   /* âncora do anel; sem isto ele centra-se na página */
	pointer-events: none;
	opacity: .85;
}

/* O texto do botão dá lugar ao anel a rodar; a largura mantém-se, para o botão
   não saltar de tamanho a meio do envio. */
.contact-form.is-sending button[type="submit"] > span {
	visibility: hidden;
}

.contact-form.is-sending button[type="submit"]::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.15rem;
	height: 1.15rem;
	margin: -0.575rem 0 0 -0.575rem;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: koi-a-enviar .6s linear infinite;
}

@keyframes koi-a-enviar {
	to { transform: rotate(360deg); }
}

/* Quem prefere menos movimento vê o anel parado, não uma animação infinita. */
@media (prefers-reduced-motion: reduce) {
	.contact-form.is-sending button[type="submit"]::after {
		animation-duration: 2.4s;
	}
}
