/* ----- Universal box model ----- */

*
{
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* ----- Root variables ----- */

:root
{
	--color-primary: #16263b;
	--color-secondary: #f7f8fa;
	--color-details: #f48335;
	--color-light-gray: hsla(0, 0%, 94%, 0.6);
	--color-dark-gray: rgb(127, 133, 141);
	--color-transparent: rgb(255,255,255, 0.0);
	--color-beije: rgb(238, 233, 225);
}

/* ----- Globals ----- */

html
{
	scroll-behavior: smooth;
	scroll-padding-top: 80px;
}

header
{
	height: 80px;
	font-family: "Sa";
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: var(--color-primary);
	color: white;
	font-family: "Space Grotesk", sans-serif;
  	font-optical-sizing: auto;
  	font-weight: 600;
  	font-style: bold;
	padding: 0 14% 0 14%;
	position: sticky;
	top: 0;
	z-index: 1000;
}


body
{
	background-color: var(--color-primary);
}

a
{
	text-decoration: none;
	color: var(--color-secondary);
}

a:hover
{
	color: var(--color-details);
}

button:hover
{
	cursor: pointer;
}

h1, h2, h3 , h4
{
	font-family: "Space Grotesk", sans-serif;
  	font-optical-sizing: auto;
  	font-weight: 460;
  	font-style: bold;
	font-size: 2.75rem;
	line-height: 3rem;
	letter-spacing: 0.02em;
}

p
{
  	font-family: "Outfit", sans-serif;
  	font-optical-sizing: auto;
  	font-weight: 400;
  	font-style: normal;
  	text-align: left;
	font-size: 1.125rem;
	line-height: 1.7rem;
	color: var(--color-light-gray);
}

span
{
  	font-family: "Outfit", sans-serif;
  	font-optical-sizing: auto;
  	font-weight: 400;
  	font-style: normal;
	color: var(--color-details);
}

.logo
{
	width: 52px;
	height: auto;
}
/* ----- Classes ----- */

/* <header> */

.header-container-left
{
	display: flex;
	justify-content: left;
	align-items: center;
	width: 17%;
	gap: 7%;
}

.name
{
	font-family: "Outfit", sans-serif;
  	font-optical-sizing: auto;
  	font-weight: 400;
  	font-style: normal;
	font-size: 1rem;
	color: var(--color-secondary);
	margin: 0;
	white-space: nowrap;
}

.header-container-right
{
	display: flex;
	justify-content: right;
	align-items: center;
	width: 50%;
	gap: 6%;
}

.dropdown
{
	position: relative;
	display: inline-block;
}


.dropdown-trigger
{
	display: flex;
	align-items: center;
	gap: 7px;
	background: none;
	border: none;
	color: white;
	font-family: "Space Grotesk", sans-serif;
  	font-optical-sizing: auto;
  	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: color 0.3s;
	white-space: nowrap;
}

.dropdown-trigger:hover
{
	color: var(--color-details);
}

.dropdown-trigger img
{
	width: 0.5rem;
	height: auto;
}

.dropdown-trigger:hover img
{
	transform: rotate(180deg);
}

.rotate
{
	transition: transform 0.3s ease-in-out;
}

.dropdown-menu
{
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-top: 0.75rem;
	width: 12rem;
	background: #ffffff;
	border: 1px solid hsl(210, 18%, 88%);
	border-radius: 10px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s, visibility 0.2s;
}

.dropdown:hover .dropdown-menu
{
	opacity: 1;
	visibility: visible;
}

.dropdown-menu a
{
	display: block;
	padding: 0.75rem 1.25rem;
	font-size: 0.875;
	color: hsl(215, 10%, 45%);
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.dropdown-menu a:hover
{
	background: hsl(210, 15%, 95%);
	color: hsl(215, 35%, 12%);
}


/* ----- Portefólio ----- */


.portefolio-intro
{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: auto;
    color: var(--color-dark-gray);
    padding: 5% 22% 5% 22%;
    row-gap: 2rem;
}

.portefolio-intro h1
{
	color: white;
}

.portefolio-intro p
{
	text-align: center;
}

.portefolio-grid-container
{
    padding: 2rem 14% 2rem 14%;
	gap: 2rem;
	background: var(--color-secondary);
}

.portefolio-projetos
{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
	row-gap: 3rem;
	height: auto;
}

.portefolio-projeto-container 
{
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
	border: 1px solid var(--color-dark-gray);
}

.portefolio-projeto-container:hover
{
	border: 1px solid var(--color-details);
}

.projeto-img 
{
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.projeto-title-text
{
	font-size: 1.2rem;
	text-align: left;
	width: 100%;
	text-transform: uppercase;
	font-family: 'Outfit', sans-serif;
}

.projeto-arquitectura,
.projeto-estabilidade,
.construtor 
{
	display: flex;
	gap: 0.60rem;
}

.projeto-arquitectura p,
.projeto-estabilidade p,
.construtor p 
{
	color: var(--color-dark-gray);
    margin: 2px 0;
}

.projeto-text-content
{
	padding: 1rem;
	flex: 1;
}

.projeto-est-text
{
	margin-left: 5rem;
}

.portefolio-footer 
{
    margin-top: auto;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
	padding: 1rem;
}

.portefolio-footer p 
{
	color: var(--color-dark-gray);
    margin: 2px 0;
}

.materiais-text-container
{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.materiais-text
{
    color: var(--color-details);
    border: 1px solid var(--color-details);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background-color: hsl(22 90% 55% / 0.1);
    width: max-content;
}

#p-orange
{
	color: var(--color-details);
}


/* contactos */


.contactos
{
	padding: 5% 14% 5% 14%;
	color: var(--color-secondary-text);
	min-height: calc(100vh - 80px);
	height: auto;
	background: linear-gradient(180deg, var(--color-primary), var(--color-primary), rgba(26, 45, 76, 0.6));
}

.contactos-title
{
	color: var(--color-secondary);
}

.title-assist
{
	margin-bottom: 1.4rem;
}

.top-title
{
	color: var(--color-details);
	font-weight: 500;
	font-size: 1rem;
}

.contactos-bot-title
{
	margin-top: 2rem;
	text-align: center;
}

.contactos-text-field, .contactos-message-field, .contact-phone
{
	width: 60%;
	height: 2.4rem;
	margin: 0.7rem;
	background: #183050;
	color: var(--color-light-gray);
	border-radius: 7px;
	padding: 0 1rem 0 1rem;
 	border: 2px solid var(--color-light-gray);
	font-family: "Outfit", sans-serif;
  	font-optical-sizing: auto;
  	font-weight: 400;
  	font-style: normal;
	font-size: 1rem;
	color: var(--color-secondary);
}

.select-industria
{
	width: 60%;
	height: 2.4rem;
	margin: 0.7rem;
	background: #183050;
	color: var(--color-light-gray);
	border-radius: 7px;
	padding: 0 1rem 0 1rem;
 	border: 2px solid var(--color-light-gray);
	font-family: "Outfit", sans-serif;
  	font-optical-sizing: auto;
  	font-weight: 400;
  	font-style: normal;
	font-size: 1rem;
	cursor: pointer;
}

.contactos-message-field
{
	padding: 0.5rem 1rem 0.5rem 1rem;
	height: 8rem;
	resize: none;
}

.contactos-message-field:focus, .contactos-text-field:focus
{
	outline: none;
	border: 2px solid var(--color-details);
}

.contactos-enviar-button
{
	margin-top: 30px;
	width: 125px;
	height: 45px;
	padding: 0px 20px;
	border-radius: 999px;
	background-color: var(--color-details);
	color: var(--color-primary);
	font-family: "Outfit", sans-serif;
  	font-optical-sizing: auto;
  	font-weight: 600;
  	font-style: normal;
	border: none;
	width: 60%;
}

.contactos-enviar-button:hover
{
	box-shadow: 0 0 4px 3px rgba(242, 146, 37, 0.5);
}

.contactos-content
{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

/* footer */

footer
{
	border-top: 1px solid var(--color-light-gray);
	padding: 1% 14% 1% 14%;
	background: linear-gradient(rgba(26, 45, 76, 0.6), var(--color-primary), var(--color-primary));
}

.footer-text
{
	display: grid;
	grid-template-columns: auto auto auto;
	padding-bottom: 2%;
	height: auto;
	justify-content: space-evenly;
}

.footer-name
{
	font-family: "Outfit", sans-serif;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;
	font-size: 1rem;
	color: var(--color-secondary);
	margin: 0;
	height: 40px;
	display: flex;
	align-items: center;
}

.footer-access
{
	display: flex;
	flex-direction: column;
	gap: 7%;
	min-height: 100%;
	padding: 1rem;
}

.footer-map
{
	min-height: 100%;
	padding: 1rem;
}

.nav-links
{
	font-family: "Outfit", sans-serif;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;
	color: var(--color-secondary);
}

.nav-links:hover
{
	color: var(--color-details);
}


.footer-contacts div
{
	display: flex;
	flex-direction: flex-start;
	gap: 12px;
	margin-bottom: 15px;
}

.footer-contacts
{
	display: flex;
	flex-direction: column;
	gap: 7%;
	padding: 1rem;
}

.footer-contacts .material-icons 
{
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-contacts-title
{
	width: 100%;
	text-align: left;
}

.footer-contacts-text
{
	display: block;
	font-family: "Outfit", sans-serif;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;
	color: var(--color-secondary);
}

.rights
{
	border-top: 1px solid var(--color-light-gray);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 2% 14% 1% 14%;
}

.rights-reserved
{
	padding: 1.3rem;
	font-size: 1rem;
}

/* ----- Media compatibility ----- */

/* ══════════════════════════════════════════════════
   HAMBURGER + MOBILE NAV
   ══════════════════════════════════════════════════ */
 
.hamburger
{
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 1100;
	padding: 4px;
	flex-shrink: 0;
}
 
.hamburger span
{
	display: block;
	width: 24px;
	height: 2px;
	background-color: var(--color-secondary);
	border-radius: 2px;
	transition: transform 0.35s ease, opacity 0.25s ease, width 0.25s ease;
	line-height: unset;
	color: transparent;
}
 
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
 
.mobile-nav
{
	display: none;
	position: fixed;
	inset: 0;
	top: 80px;
	background-color: var(--color-primary);
	z-index: 1050;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	/* Match header horizontal padding so links align with logo/hamburger */
	padding: 2rem 14%;
	gap: 0;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
 
.mobile-nav.open
{
	transform: translateX(0);
}
 
.mobile-nav a,
.mobile-nav .mobile-nav-group > span
{
	display: block;
	width: 100%;
	padding: 0.85rem 0;
	font-family: "Space Grotesk", sans-serif;
	font-weight: 600;
	font-size: 1rem;
	color: var(--color-secondary);
	border-bottom: 1px solid rgba(247, 248, 250, 0.12);
	text-align: left;
	cursor: pointer;
	transition: color 0.2s;
	white-space: nowrap;
}
 
.mobile-nav a:hover,
.mobile-nav .mobile-nav-group > span:hover
{
	color: var(--color-details);
}
 
.mobile-nav-group
{
	width: 100%;
}
 
.mobile-nav-group > span
{
	display: flex;
	justify-content: flex-start;
	align-items: center;
	white-space: nowrap;
	overflow: hidden;
}
 
.mobile-subnav
{
	display: none;
	flex-direction: column;
	padding-left: 1.25rem;
}
 
.mobile-nav-group.open .mobile-subnav
{
	display: flex;
}
 
.mobile-subnav a
{
	font-size: 0.9rem;
	font-weight: 400;
	color: var(--color-secondary);
	padding: 0.6rem 0;
	border-bottom: none !important;
}
 
.mobile-subnav a:hover
{
	color: var(--color-details);
}
 
 
/* ══════════════════════════════════════════════════
   BREAKPOINT 1 — Large tablets / small laptops
   max-width: 1200px
   Fixes the 1210px tablet issue
   ══════════════════════════════════════════════════ */
 
@media (max-width: 1200px)
{
	header
	{
		padding: 0 7% 0 7%;
	}
 
	.mobile-nav
	{
		padding: 2rem 7%;
	}
 
	.portefolio-intro
	{
		padding: 5% 10% 5% 10%;
	}
 
	.portefolio-grid-container
	{
		padding: 2rem 8% 2rem 8%;
	}
 
	.contactos
	{
		padding: 5% 8% 5% 8%;
	}
 
	footer
	{
		padding: 2% 8% 2% 8%;
	}
 
	.rights
	{
		margin: 2% 8% 1% 8%;
	}
}
 
 
/* ══════════════════════════════════════════════════
   BREAKPOINT 2 — Tablets
   max-width: 900px
   ══════════════════════════════════════════════════ */
 
@media (max-width: 900px)
{
	/* Header */
	header
	{
		height: 64px;
		padding: 0 5% 0 5%;
	}
 
	.header-container-left
	{
		width: auto;
		gap: 12px;
	}
 
	.header-container-right
	{
		display: none;
	}
 
	.hamburger
	{
		display: flex;
	}
 
	.mobile-nav
	{
		display: flex;
		top: 64px;
		padding: 2rem 5%;
	}
 
	/* Typography */
	h1, h2
	{
		font-size: 2.2rem;
		line-height: 2.6rem;
	}
 
	h3, h4
	{
		font-size: 1.1rem;
		line-height: 1.6rem;
	}
 
	p
	{
		font-size: 1.05rem;
		line-height: 1.6rem;
	}
 
	.logo
	{
		width: 36px;
	}
 
	/* Intro */
	.portefolio-intro
	{
		padding: 6% 6% 6% 6%;
		row-gap: 1.5rem;
	}
 
	/* Grid — single column at tablet so cards never wrap awkwardly */
	.portefolio-grid-container
	{
		padding: 2rem 5% 2rem 5%;
	}
 
	.portefolio-projetos
	{
		grid-template-columns: 1fr;
		gap: 1.5rem;
		row-gap: 1.5rem;
	}
 
	.projeto-img
	{
		height: 200px;
	}
 
	/* Contacts */
	.contactos
	{
		padding: 8% 5% 8% 5%;
		min-height: calc(100vh - 64px);
		height: auto;
	}
 
	.contactos-text-field,
	.contactos-message-field,
	.contact-phone,
	.select-industria,
	.contactos-enviar-button
	{
		width: 85%;
	}
 
	/* Footer */
	footer
	{
		padding: 4% 6% 4% 6%;
	}
 
	.footer-text
	{
		grid-template-columns: 1fr 1fr;
		gap: 1.5rem;
	}
 
	.footer-map
	{
		grid-column: 1 / -1;
		display: flex;
		justify-content: center;
	}
 
	.footer-map iframe
	{
		width: 100%;
		max-width: 480px;
		height: 180px;
	}
 
	.rights
	{
		margin: 2% 6% 1% 6%;
	}
}
 
 
/* ══════════════════════════════════════════════════
   BREAKPOINT 3 — Mobile phones
   max-width: 600px
   ══════════════════════════════════════════════════ */
 
@media (max-width: 600px)
{
	/* Header */
	header
	{
		height: 56px;
		padding: 0 5% 0 5%;
	}
 
	.logo
	{
		width: 28px;
	}
 
	.name
	{
		font-size: 0.85rem;
	}
 
	.mobile-nav
	{
		top: 56px;
		padding: 1.5rem 5%;
	}
 
	/* Typography */
	h1, h2
	{
		font-size: 1.75rem;
		line-height: 2.1rem;
	}
 
	h3, h4
	{
		font-size: 1rem;
		line-height: 1.5rem;
	}
 
	p
	{
		font-size: 1rem;
		line-height: 1.55rem;
	}
 
	/* Intro */
	.portefolio-intro
	{
		padding: 10% 5% 10% 5%;
		row-gap: 1.2rem;
	}
 
	/* Grid — single column on mobile */
	.portefolio-grid-container
	{
		padding: 1.5rem 5% 1.5rem 5%;
	}
 
	.portefolio-projetos
	{
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}
 
	.projeto-img
	{
		height: 200px;
	}
 
	.projeto-title-text
	{
		font-size: 1rem;
	}
 
	.projeto-arquitectura p,
	.projeto-estabilidade p,
	.construtor p
	{
		font-size: 0.9rem;
	}
 
	/* Reset the margin that pushes stability text too far right on narrow screens */
	.projeto-est-text
	{
		margin-left: 0;
	}
 
	/* Contacts */
	.contactos
	{
		padding: 10% 5% 10% 5%;
		min-height: unset;
		height: auto;
	}
 
	.contactos-text-field,
	.contactos-message-field,
	.contact-phone,
	.select-industria,
	.contactos-enviar-button
	{
		width: 100%;
		margin: 0.5rem 0;
	}
 
	.contactos-title
	{
		font-size: 2rem;
	}
 
	/* Footer */
	.footer-text
	{
		grid-template-columns: 1fr;
		gap: 2rem;
	}
 
	.footer-map
	{
		grid-column: unset;
	}
 
	.footer-map iframe
	{
		width: 100%;
		height: 160px;
	}
 
	footer
	{
		padding: 6% 5% 6% 5%;
	}
 
	.rights
	{
		margin: 2% 5% 1% 5%;
	}
 
	.rights-reserved
	{
		font-size: 0.85rem;
		text-align: center;
	}
}
 
 
/* ══════════════════════════════════════════════════
   BREAKPOINT 4 — Very small phones
   max-width: 380px
   ══════════════════════════════════════════════════ */
 
@media (max-width: 380px)
{
	h1, h2
	{
		font-size: 1.5rem;
		line-height: 1.9rem;
	}
 
	.portefolio-intro
	{
		padding: 12% 5% 12% 5%;
	}
}
 
 
/* ══════════════════════════════════════════════════
   TOUCH DEVICES — pointer: coarse, hover: none
   Hamburger always shown; subnavs always expanded
   ══════════════════════════════════════════════════ */
 
@media (hover: none) and (pointer: coarse)
{
	.header-container-right
	{
		display: none;
	}
 
	.hamburger
	{
		display: flex;
	}
 
	.mobile-nav
	{
		display: flex;
	}
 
	/* Subnavs always open on touch — group label becomes a dim category header */
	.mobile-subnav
	{
		display: flex !important;
	}
 
	.mobile-nav-group > span
	{
		pointer-events: none;
		font-size: 0.75rem;
		padding: 0.4rem 0 0.2rem 0;
		border-bottom: none;
		text-transform: uppercase;
		letter-spacing: 0.05em;
	}
 
	/* Subnav links get full link prominence */
	.mobile-subnav a
	{
		font-size: 1rem !important;
		font-weight: 600 !important;
		color: var(--color-dark-gray) !important;
		padding: 0.85rem 0 !important;
		border-bottom: 1px solid rgba(247, 248, 250, 0.12) !important;
	}
}