/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */

.hero
{
	position: relative;
	height: 100vh;
	min-height: 520px;
	overflow: hidden;
	color: var(--blanco)
}

.hero-slides
{
	position: absolute;
	inset: 0
}

.hero-slide
{
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 1.2s ease
}

.hero-slide.active
{
	opacity: 1
}

.hero-slide img
{
	width: 100%;
	height: 100%;
	object-fit: cover
}

.hero-slide::after
{
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(to right, rgba(27, 31, 43, 0.82) 0%, rgba(27, 31, 43, 0.5) 50%, rgba(27, 31, 43, 0.2) 100%)
}

.hero-content
{
	position: relative;
	z-index: 2;
	height: 100%;
	display: flex;
	align-items: center
}

.hero-badge
{
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 100px;
	padding: 0.32rem 0.9rem 0.32rem 0.4rem;
	margin-bottom: 1.4rem
}

.hero-badge-dot
{
	width: 7px;
	height: 7px;
	background: var(--rojo-mibsa);
	border-radius: 50%;
	animation: pulse 2s infinite
}

@keyframes pulse
{
	0%, 100%
	{
		opacity: 1;
		transform: scale(1)
	}
	50%
	{
		opacity: 0.5;
		transform: scale(0.7)
	}
}

.hero-badge span
{
	font-size: 0.68rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--blanco)
}

.hero h1
{
	font-family: 'Instrument Serif', serif;
	font-size: clamp(2.4rem, 5.5vw, 4.8rem);
	line-height: 1.08;
	font-weight: 400;
	margin-bottom: 1rem;
	max-width: 650px
}

.hero h1 .hr
{
	color: var(--rojo-mibsa-claro);
}

.hero h1 .hb
{
	color: #4da6d9
}

.hero-sub
{
	/* font-size: clamp(0.85rem, 1.4vw, 1rem); */
	/* font-size: 1rem; */
	font-size: clamp(1rem, 1.4vw, 1rem);
	color: var(--blanco);
	max-width: 480px;
	line-height: 1.7;
	margin-bottom: 1.8rem
}

.hero-btns
{
	display: flex;
	gap: 0.7rem;
	flex-wrap: wrap;
	margin-bottom: 2.5rem
}

.hero-btn-primary
{
	background: var(--rojo-mibsa);
	color: var(--blanco);
	padding: 0.62rem 1.6rem;
	border-radius: 8px;
	/* font-size: 0.8rem; */
	font-weight: 600;
	transition: all 0.3s;
	box-shadow: 0 4px 16px rgba(229, 27, 66, 0.22)
}

.hero-btn-primary:hover
{
	background: var(--rojo-mibsa-hover);
	transform: translateY(-2px)
}

.hero-btn-secondary
{
	background: var(--rojo-mibsa);
	color: var(--blanco);
	padding: 0.62rem 1.6rem;
	border-radius: 8px;
	/* font-size: 0.8rem; */
	font-weight: 600;
	transition: all 0.3s;
	box-shadow: 0 4px 16px rgba(229, 27, 66, 0.22)
}

.hero-btn-secondary:hover
{
	background: var(--rojo-mibsa-hover);
	transform: translateY(-2px)
}

.hero-stats
{
	display: flex;
	gap: clamp(1.2rem, 3vw, 2.8rem);
	padding-top: 1.8rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08)
}

.hero-stat h3
{
	font-family: 'Instrument Serif', serif;
	font-size: clamp(1.4rem, 2.6vw, 2.2rem);
	/* font-weight: 400; */
	/* color: var(--blanco); */
	color: var(--rojo-mibsa-claro);
	font-weight: 600;
}

.hero-stat p
{
	font-size: 0.6rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	/* color: var(--rojo-mibsa); */
	/* color: var(--rojo-mibsa-claro); */
	color: var(--blanco);
	margin-top: 0.1rem
}

.hero-dots
{
	position: absolute;
	bottom: 1.8rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	display: flex;
	gap: 0.45rem
}

.hero-dot
{
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.25);
	cursor: pointer;
	transition: all 0.3s
}

.hero-dot.active
{
	background: var(--rojo-mibsa);
	border-color: var(--rojo-mibsa);
	transform: scale(1.15)
}

@keyframes fadeInUp
{
	from
	{
		opacity: 0;
		transform: translateY(28px)
	}
	to
	{
		opacity: 1;
		transform: translateY(0)
	}
}

@keyframes fadeIn
{
	from
	{
		opacity: 0
	}
	to
	{
		opacity: 1
	}
}

.hero-content .hero-badge
{
	animation: fadeInUp 0.6s 0.1s both
}

.hero-content h1
{
	animation: fadeInUp 0.6s 0.25s both
}

.hero-content .hero-sub
{
	animation: fadeInUp 0.6s 0.4s both
}

.hero-content .hero-btns
{
	animation: fadeInUp 0.6s 0.55s both
}

.hero-content .hero-stats
{
	animation: fadeIn 0.7s 0.85s both
}


/* ══════════════════════════════════════════
   ABOUT
   ══════════════════════════════════════════ */

.about
{
	background: var(--bg2)
}

.about-grid
{
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(2rem, 4.5vw, 4rem);
	align-items: center
}

.about-text
{
	color: var(--texto-dim);
	line-height: 1.75;
	/* font-size: 0.86rem */
	font-size: 1rem
}

.about-text p+p
{
	margin-top: 0.7rem
}

.about-images
{
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	align-self: start;
}

.about-images img
{
	border-radius: var(--radius-lg);
	width: 100%;
	height: 260px;
	object-fit: cover;
}

.about-images img:first-child
{
	grid-column: span 2;
	height: 300px;
}

.about-cards
{
	display: flex;
	gap: 0.9rem;
	margin-top: 1.5rem
}

.about-card
{
	flex: 1;
	background: var(--bg);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: var(--radius-lg);
	padding: 1.3rem;
	transition: all 0.3s
}

.about-card:hover
{
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.04);
	transform: translateY(-2px)
}

.about-card.rc
{
	border-top: 3px solid var(--rojo-mibsa)
}

.about-card.bc
{
	border-top: 3px solid var(--blue-mibsa)
}

.about-card h4
{
	font-size: 0.88rem;
	color: var(--texto);
	margin-bottom: 0.15rem;
	font-weight: 700
}

.about-card .ctag
{
	/* font-size: 0.55rem; */
	font-size: 1.15rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 600;
	margin-bottom: 0.3rem;
	display: block
}

.about-card.rc .ctag
{
	color: var(--rojo-mibsa)
}

.about-card.bc .ctag
{
	color: var(--blue-mibsa)
}

.about-card p
{
	/* font-size: 0.75rem; */
	/* font-size: 0.90rem; */
	color: var(--texto-dim);
	line-height: 1.5
}


/* ══════════════════════════════════════════
   SERVICES
   ══════════════════════════════════════════ */

.services
{
	background: var(--bg)
}

.services-header
{
	text-align: center;
	margin-bottom: clamp(1.5rem, 3.5vw, 2.5rem)
}

.services-grid
{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.9rem
}

.service-card
{
	background: var(--bg2);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: var(--radius-lg);
	padding: 1.4rem 1.2rem;
	position: relative;
	overflow: hidden;
	transition: all 0.3s;
	display: block
}

.service-card:hover
{
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05)
}

.service-card::before
{
	/* content: ''; */
	/* position: absolute; */
	/* top: 0; */
	/* left: 0; */
	/* right: 0; */
	/* height: 3px; */
	/* transform: scaleX(0); */
	/* transform-origin: left; */
	/* transition: transform 0.35s; */
	/* background: var(--rojo-mibsa) */
	content: none;
}

.service-card:hover::before
{
	transform: scaleX(1)
}

.service-bg
{
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0.15;
	transition: opacity 0.3s
}

.service-card:hover .service-bg
{
	opacity: 0.3
}

.service-card-inner
{
	position: relative;
	z-index: 1;
	min-height: 170px;
}

.service-icon
{
	display: none;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.9rem;
	font-size: 1.05rem;
	background: var(--rojo-mibsa-soft);
	border: 1px solid var(--rojo-mibsa-border)
}

.service-card h3
{
	font-size: 1.1rem;
	color: var(--blanco);
	margin-bottom: 2rem;
	font-weight: 600;
	/* border-bottom: 1px solid black; */
	/* padding-bottom: 0.5rem; */

	background: var(--servicios-fondo-titulo);
	padding: 0.6rem 1.2rem;
	margin-left: -1.2rem;
	margin-right: -1.2rem;
	margin-top: -1.4rem;
	border-radius: 16px 16px 0 0;
	position: relative;

	max-height: 42px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.service-card h3::after
{
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--rojo-mibsa);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s
}

.service-card:hover h3::after
{
	transform: scaleX(1)
}

.service-card p
{
	/* font-size: 0.85rem; */
	font-size: 1.05rem;
	color: #444444;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}


/* ══════════════════════════════════════════
   PROJECTS
   ══════════════════════════════════════════ */

.projects
{
	background: var(--bg2)
}

.projects-header
{
	margin-bottom: 1rem
}

.project-filters
{
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin-bottom: 1.5rem
}

.pf-btn
{
	padding: 0.35rem 0.85rem;
	border-radius: 100px;
	font-size: 0.67rem;
	font-weight: 500;
	border: 1px solid rgba(0, 0, 0, 0.1);
	color: var(--texto-dim);
	cursor: pointer;
	transition: all 0.25s;
	background: var(--bg2)
}

.pf-btn:hover
{
	background: var(--rojo-mibsa-soft);
	border-color: var(--rojo-mibsa-border);
	color: var(--rojo-mibsa)
}

.pf-btn.active
{
	background: var(--rojo-mibsa);
	color: var(--blanco);
	border-color: var(--rojo-mibsa)
}

.projects-grid
{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.9rem
}

/* Layout especial para home (3 proyectos + botón) */
.projects-grid-home
{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.9rem;
}

.projects-grid-home .project-card:nth-child(1)
{
	grid-column: 1;
	grid-row: 1;
	aspect-ratio: 4/3;
}

.projects-grid-home .project-card:nth-child(2)
{
	grid-column: 2 / 4;
	grid-row: 1;
	aspect-ratio: 8/3;
}

.projects-grid-home .project-card:nth-child(3)
{
	grid-column: 1 / 3;
	grid-row: 2;
	aspect-ratio: 8/3;
}

.projects-grid-home .project-more-btn
{
	grid-column: 3;
	grid-row: 2;
	aspect-ratio: 4/3;
}

.project-card
{
	position: relative;
	border-radius: var(--radius-lg);
	overflow: hidden;
	aspect-ratio: 4/3;
	transition: all 0.35s;
	cursor: pointer;
	display: block
}

.project-card.hidden
{
	display: none
}

.project-card img
{
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s
}

.project-card:hover img
{
	transform: scale(1.05)
}

.project-overlay
{
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(27, 31, 43, 0.88) 0%, rgba(27, 31, 43, 0.22) 50%, rgba(27, 31, 43, 0.04) 100%)
}

.project-info
{
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 1.2rem;
	z-index: 1
}

.project-info h3
{
	font-family: 'DM Sans', sans-serif;
	font-size: 1.1rem;
	color: var(--blanco);
	margin-bottom: 0.15rem;
	font-weight: 600;
	line-height: 1.2;
}

.project-info p
{
	/* font-size: 0.65rem; */
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.7)
}

.pcats
{
	display: flex;
	gap: 0.2rem;
	flex-wrap: wrap;
	margin-top: 0.35rem;
	max-height: 33px;
	overflow: hidden;
}

.pcats span
{
	display: inline-block;
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	padding: 0.4rem 0.9rem;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 500;
	backdrop-filter: blur(4px);
	border: 0.5px solid rgba(255, 255, 255, 0.3);
	white-space: nowrap;
}

.project-more-btn
{
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-lg);
	/* aspect-ratio: 4/3; */
	border: 2px dashed rgba(0, 0, 0, 0.1);
	color: var(--texto-dim);
	font-size: 2rem;
	transition: all 0.3s;
	background: var(--bg)
}

.project-more-btn:hover
{
	border-color: var(--rojo-mibsa);
	color: var(--rojo-mibsa);
	background: var(--rojo-mibsa-soft)
}


/* ══════════════════════════════════════════
   TEAM
   ══════════════════════════════════════════ */

.team
{
	background: var(--bg2)
}

.team-header
{
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem)
}

.team-grid
{
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.9rem
}

.team-card
{
	background: var(--bg);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: var(--radius-lg);
	padding: 1.3rem;
	text-align: center;
	transition: all 0.3s
}

.team-card:hover
{
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04)
}

.team-avatar
{
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 0.5rem;
	font-family: 'Instrument Serif', serif;
	font-size: 1rem;
	font-weight: 400;
	background: var(--rojo-mibsa-soft);
	border: 2px solid var(--rojo-mibsa-border);
	color: var(--rojo-mibsa)
}

.team-card h4
{
	/* font-size: 0.78rem; */
	font-size: 1.10rem;
	color: var(--texto);
	margin-bottom: 0.1rem;
	font-weight: 600
}

.team-card p
{
	/* font-size: 0.62rem; */
	font-size: 0.80rem;
	color: var(--texto-dim)
}

.depts-grid
{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.7rem;
	margin-top: 1.8rem
}

.dept-card
{
	background: var(--bg);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: var(--radius);
	padding: 1.1rem;
	transition: all 0.3s
}

.dept-card:hover
{
	border-color: var(--rojo-mibsa-border)
}

.dept-card h5
{
	/* font-size: 0.6rem; */
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--rojo-mibsa);
	margin-bottom: 0.4rem;
	font-weight: 700
}

.dept-card p
{
	/* font-size: 0.7rem; */
	font-size: 0.9rem;
	color: var(--texto-dim);
	line-height: 1.5
}


/* ══════════════════════════════════════════
   CONTACT
   ══════════════════════════════════════════ */

.contact
{
	background: var(--bg);
	overflow: hidden
}

.contact-inner
{
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: clamp(2rem, 4vw, 4rem);
	align-items: start
}

.contact-desc
{
	color: var(--texto-dim);
	line-height: 1.6;
	margin-bottom: 1.5rem;
	/* font-size: 0.84rem */
}

.contact-info
{
	display: flex;
	flex-direction: column;
	gap: 0.9rem
}

.contact-item
{
	display: flex;
	gap: 0.65rem;
	align-items: flex-start
}

.ci-icon
{
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: var(--contact-icon-bg);
	border: 1px solid var(--contact-icon-border);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: var(--rojo-mibsa);
	font-size: 0.85rem
}

.ci-text h4
{
	font-size: 0.8rem;
	color: var(--texto);
	font-weight: 600
}

.ci-text p
{
	font-size: 0.75rem;
	color: var(--texto-dim)
}

.ci-text a
{
	color: var(--rojo-mibsa);
	font-weight: 500;
	transition: color 0.3s
}

.ci-text a:hover
{
	color: var(--rojo-mibsa-hover)
}

.contact-map
{
	background: var(--bg2);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: var(--radius-lg);
	overflow: hidden;
	aspect-ratio: 16/9;
}

.contact-map iframe
{
	width: 100%;
	height: 100%;
	border: 0
}


/* Actualizar .project-info h3 para una sola línea (project-title) */
.project-info h3
{
	max-height: 26px;
	overflow-y: hidden;
}

/* Estilos para el botón + con hover text */
.project-more-btn::before
{
	content: attr(title);
	position: absolute;
	opacity: 0;
	transition: opacity 0.3s;
	bottom: 0.5rem;
	font-size: 0.75rem;
	color: var(--rojo-mibsa);
	text-align: center;
	width: 100%;
}

.project-more-btn:hover::before
{
	opacity: 1;
}

/* ══════════════════════════════════════════
   RESPONSIVE (index)
   ══════════════════════════════════════════ */

@media (max-width: 1024px)
{
	.services-grid,
	.projects-grid
	{
		grid-template-columns: repeat(2, 1fr)
	}

	.projects-grid-home
	{
		grid-template-columns: repeat(2, 1fr);
	}

	.projects-grid-home .project-card:nth-child(1),
	.projects-grid-home .project-card:nth-child(2),
	.projects-grid-home .project-card:nth-child(3),
	.projects-grid-home .project-more-btn
	{
		grid-column: auto;
		grid-row: auto;
		aspect-ratio: 4/3;
	}

	.team-grid
	{
		grid-template-columns: repeat(2, 1fr)
	}

	.depts-grid
	{
		grid-template-columns: repeat(2, 1fr)
	}
}

@media (max-width: 900px)
{
	.services-grid,
	.projects-grid
	{
		grid-template-columns: 1fr
	}

	.projects-grid-home
	{
		grid-template-columns: 1fr;
	}

	.projects-grid-home .project-card:nth-child(1),
	.projects-grid-home .project-card:nth-child(2),
	.projects-grid-home .project-card:nth-child(3),
	.projects-grid-home .project-more-btn
	{
		grid-column: auto;
		grid-row: auto;
		aspect-ratio: 4/3;
	}
}

@media (max-width: 768px)
{
	.about-grid
	{
		grid-template-columns: 1fr
	}

	.about-images
	{
		display: none
	}

	.about-cards
	{
		flex-direction: column
	}

	.services-grid,
	.projects-grid
	{
		grid-template-columns: 1fr
	}

	.projects-grid-home
	{
		grid-template-columns: 1fr;
	}

	.projects-grid-home .project-card:nth-child(1),
	.projects-grid-home .project-card:nth-child(2),
	.projects-grid-home .project-card:nth-child(3),
	.projects-grid-home .project-more-btn
	{
		grid-column: auto;
		grid-row: auto;
		aspect-ratio: 4/3;
	}

	.team-grid
	{
		grid-template-columns: 1fr 1fr
	}

	.depts-grid
	{
		grid-template-columns: 1fr
	}

	.contact-inner
	{
		grid-template-columns: 1fr
	}

	.contact-map
	{
		aspect-ratio: 16/9
	}

	.hero-stats
	{
		flex-wrap: wrap;
		gap: 1rem
	}
}

@media (max-width: 480px)
{
	.projects-grid
	{
		grid-template-columns: 1fr;
	}

	.team-grid
	{
		grid-template-columns: 1fr
	}
}
