/* ----- 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-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: var(--color-primary);
	color: var(--color-secondary);
	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;
	letter-spacing: 0.02em;
	text-transform: capitalize;
}

p
{
	font-family: "Outfit", sans-serif;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;
	text-align: justify;
	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.875rem;
	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%);
}


/* ----- historia ----- */

.historia-inicio-text
{
	padding: 5% 14% 5% 14%;
	height: auto;
	background-color: var(--color-primary);
	width: 100%;
	display: flex;
	flex-direction: column;
	row-gap: 2rem;
	align-items: center;
	justify-content: center;
}

.historia-inicio-text p
{
	text-align: center;
}

.timeline-container
{
	background: var(--color-secondary);
	height: auto;
	padding: 5% 14% 5% 14%;
}

.timeline-container h1
{
	text-align: center;
	padding: 5% 14% 5% 14%;
}

.historia-inicio-text h1
{
	color: white;
}

.timeline
{
	position: relative;
	width: 100%;
	margin: 0 auto;
}

.timeline::before
{
	content: '';
	position: absolute;
	left: 50%;
	top: 0;
	bottom: 0;
	width: 4px;
	background: var(--color-details);
	transform: translateX(-50%);
}

.timeline-item
{
	margin-bottom: 50px;
	position: relative;
}

.timeline-item:nth-child(odd)
{
	text-align: left;
	padding-right: calc(50% + 40px);
}

.timeline-item:nth-child(even)
{
	text-align: left;
	padding-left: calc(50% + 40px);
}

.timeline-item::before
{
	content: '';
	position: absolute;
	left: 50%;
	top: 20px;
	width: 20px;
	height: 20px;
	background: var(--color-details);
	border-radius: 50%;
	transform: translateX(-50%);
	z-index: 1;
}

.timeline-content
{
	background: white;
	padding: 20px 25px;
	border-radius: 8px;
	transition: all 0.3s ease;
	width: 100%;
	border: 2px solid var(--color-dark-gray);
}

.timeline-date
{
	font-weight: 600;
	text-align: left;
	margin-bottom: 8px;
	font-size: 1.2rem;
}

.timeline-title
{
	font-size: 18px;
	font-weight: 700;
	text-align: left;
	color: #333;
	margin-bottom: 8px;
	text-transform: uppercase;
}

.timeline-description
{
	color: #666;
	line-height: 1.6;
	text-align: left;
	white-space: pre-line;
}

/* 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;
	row-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;
	row-gap: 7%;
	padding: 1rem;
}

.footer-contacts p 
{
	text-align: left;
}

.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 ----- */

h3, h4
{
	font-size: 1.2rem;
	line-height: 1.7rem;
}


/* ── Hamburger button (hidden on desktop) ──────── */

.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;
}

/* Animated X state */
.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 overlay ─────────────────────────── */

.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;
	padding: 2rem 1.25rem;
	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;
}

/* No chevron */

.mobile-subnav
{
	display: none;
	flex-direction: column;
	padding-left: 1.25rem;
}

.mobile-nav-group .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 laptops
   max-width: 1200px
   ══════════════════════════════════════════════════ */

@media (max-width: 1200px)
{
	header
	{
		padding: 0 7% 0 7%;
	}

	.historia-inicio-text,
	.timeline-container
	{
		padding: 5% 8% 5% 8%;
	}

	.timeline-container h1
	{
		padding: 3% 8% 3% 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;
	}

	.logo
	{
		width: 36px;
	}

	/* ── 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;
	}

	/* ── Historia intro ── */
	.historia-inicio-text
	{
		padding: 8% 6% 8% 6%;
		row-gap: 1.5rem;
	}

	/* ── Timeline — switch to left-rail layout ── */
	.timeline-container
	{
		padding: 6% 5% 6% 5%;
	}

	.timeline-container h1
	{
		padding: 0 0 4% 0;
		text-align: left;
	}

	.timeline::before
	{
		left: 12px;
		transform: none;
	}

	.timeline-item:nth-child(odd),
	.timeline-item:nth-child(even)
	{
		padding-left: 48px;
		padding-right: 0;
		text-align: left;
	}

	.timeline-item::before
	{
		left: 3px;
		transform: none;
		width: 18px;
		height: 18px;
		top: 18px;
	}

	.timeline-content
	{
		padding: 16px 18px;
	}

	.timeline-date
	{
		font-size: 1rem;
	}

	.timeline-title
	{
		font-size: 1rem;
	}

	.timeline-description
	{
		font-size: 0.95rem;
		line-height: 1.5rem;
	}

	/* ── Contact form ── */
	.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: 40px;
	}

	.name
	{
		font-size: 0.85rem;
	}

	.mobile-nav
	{
		top: 56px;
	}

	.logo
	{
		width: 28px;
	}

	/* ── 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;
	}

	/* ── Historia intro ── */
	.historia-inicio-text
	{
		padding: 10% 5% 10% 5%;
	}

	/* ── Timeline ── */
	.timeline-container
	{
		padding: 8% 5% 8% 5%;
	}

	.timeline-container h1
	{
		padding: 0 0 6% 0;
		font-size: 1.75rem;
		line-height: 2.1rem;
	}

	.timeline::before
	{
		left: 10px;
	}

	.timeline-item:nth-child(odd),
	.timeline-item:nth-child(even)
	{
		padding-left: 40px;
		padding-right: 0;
		margin-bottom: 32px;
	}

	.timeline-item::before
	{
		left: 1px;
		width: 16px;
		height: 16px;
		top: 16px;
	}

	.timeline-content
	{
		padding: 14px 16px;
		border-radius: 6px;
	}

	.timeline-date
	{
		font-size: 0.9rem;
	}

	.timeline-title
	{
		font-size: 0.95rem;
	}

	.timeline-description
	{
		font-size: 0.9rem;
		line-height: 1.45rem;
	}

	/* ── Contact form ── */
	.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;
	}

	.timeline-item:nth-child(odd),
	.timeline-item:nth-child(even)
	{
		padding-left: 36px;
	}
}


/* ══════════════════════════════════════════════════
   TOUCH DEVICES — pointer: coarse, hover: none
   Show hamburger regardless of screen width.
   Subnavs always expanded so group titles act as
   direct links without needing a tap to open them.
   ══════════════════════════════════════════════════ */

@media (hover: none) and (pointer: coarse)
{
	/* Hide desktop nav, show hamburger */
	.header-container-right
	{
		display: none;
	}

	.hamburger
	{
		display: flex;
	}

	.mobile-nav
	{
		display: flex;
	}

	/* Always show subnavs — no tap needed to expand */
	.mobile-subnav
	{
		display: flex !important;
	}

	/* Group title becomes a subtle label, not a tap target */
	.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 prominence since they're the real targets */
	.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;
	}
}