/* ── Utilidades generales ───────────────────────────── */

.negro {
	background-color: #292929 !important;
	color: #fff;
}

.rojo {
	background-color: #ff3b30 !important;
	color: #fff;
}

.centrar {
	margin: 0 auto;
}

/* ── Menú hamburguesa ───────────────────────────────── */

.menu-ham {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	cursor: pointer;
}
.menu-ham__line {
	width: 25px;
	height: 3px;
	background: #333;
}

.full-menu {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.82);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 1;
	transform: translateY(-100%);
	transition: transform 0.3s ease-in-out;
}
.full-menu.active {
	transform: translateY(0);
}

.full-menu h2 {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4);
	margin-bottom: 16px;
}

#closeMenu {
	margin-top: 24px;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: rgba(255, 255, 255, 0.7);
	padding: 8px 28px;
	border-radius: 980px;
	font-size: 0.88rem;
	cursor: pointer;
	transition:
		background-color 0.2s,
		color 0.2s;
}
#closeMenu:hover {
	background-color: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.menu-item {
	font-size: 1.06rem;
	font-weight: 400;
	letter-spacing: -0.02em;
	text-align: left;
	padding: 12px 20px;
	transition:
		color 0.2s,
		padding-left 0.2s;
	text-decoration: none;
	background-color: transparent;
	border-radius: 8px;
	color: rgba(255, 255, 255, 0.85);
	margin: 3px 0;
	width: 100%;
}
.menu-item:hover {
	color: #fff;
	padding-left: 28px;
}
.menu-item:hover i {
	color: var(--accent);
}
.menu-item i {
	margin-right: 12px;
	color: rgba(255, 255, 255, 0.5);
	transition: color 0.2s;
	width: 16px;
	text-align: center;
}

/* ── Menú horizontal ────────────────────────────────── */

.menu {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 20px;
	background-color: #fff;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.menu-logo img {
	height: 60px;
}

.menu-boton {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	width: 30px;
	gap: 5px;
}

.menu-boton span {
	display: block;
	width: 100%;
	height: 3px;
	background: #333;
	transition:
		transform 0.3s,
		background 0.3s;
}

.menu-opciones {
	display: none;
	position: absolute;
	top: 60px;
	right: 20px;
	background: #f9f9f9;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	padding: 10px;
	z-index: 1000;
}

.menu-opciones a {
	display: block;
	text-decoration: none;
	color: #333;
	padding: 8px 12px;
	border-radius: 5px;
	transition: background 0.3s;
}

.menu-opciones a:hover {
	background: var(--accent);
	color: white;
}

.menu-boton.active + .menu-opciones {
	display: block;
}

@media (min-width: 768px) {
	.menu-opciones {
		display: flex;
		position: static;
		background: none;
		box-shadow: none;
		gap: 20px;
		padding: 0;
	}

	.menu-boton {
		display: none;
	}
}

/* ── Footer ─────────────────────────────────────────── */

.footer {
	background-color: #f9f9f9;
	color: #333;
	text-align: center;
	padding: 20px 10px;
	border-top: 1px solid #ddd;
}

.footer p {
	margin: 0;
	font-size: 14px;
}

.footer img {
	vertical-align: middle;
}

.footer-enlaces {
	margin-top: 10px;
	display: flex;
	justify-content: center;
	gap: 15px;
}

.footer-enlaces a {
	text-decoration: none;
	color: var(--secondary);
	font-size: 14px;
	transition: color 0.3s;
}

.footer-enlaces a:hover {
	color: var(--secondary-dark);
}

@media (min-width: 768px) {
	.footer p {
		font-size: 16px;
	}

	.footer-enlaces a {
		font-size: 16px;
	}
}

/* ── Avisos / Alertas ───────────────────────────────── */

.aviso {
	text-align: left;
	padding: 15px;
	margin: 10px 0;
	border-radius: 5px;
	border: 1px solid transparent;
	font-size: 14px;
}

.aviso.alerta {
	background-color: #fffae6;
	color: #856404;
	border-color: #ffeeba;
}

.aviso.correcto {
	background-color: #d4edda;
	color: #155724;
	border-color: #c3e6cb;
}

.aviso.error {
	background-color: #f8d7da;
	color: #721c24;
	border-color: #f5c6cb;
}

.aviso.notificacion {
	background-color: #d1ecf1;
	color: #0c5460;
	border-color: #bee5eb;
}

.aviso::before {
	content: "";
	display: inline-block;
	margin-right: 10px;
	font-size: 16px;
}

.aviso.alerta::before {
	content: "\26A0";
}
.aviso.correcto::before {
	content: "\2714";
}
.aviso.error::before {
	content: "\274C";
}
.aviso.notificacion::before {
	content: "\2139";
}

/* ── Loading spinner ────────────────────────────────── */

.loading {
	position: relative;
	pointer-events: none;
}
.loading:after {
	content: "";
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 15px;
	height: 15px;
	border: 2px solid transparent;
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	from {
		transform: translateY(-50%) rotate(0deg);
	}
	to {
		transform: translateY(-50%) rotate(360deg);
	}
}

/* ── Layout ─────────────────────────────────────────── */

.column-2 {
	display: flex;
	justify-content: space-around;
	align-items: baseline;
}

.fijar-abajo {
	position: -webkit-sticky;
	position: sticky;
	bottom: 0;
	width: 100%;
	text-align: center;
	backdrop-filter: blur(3px);
	padding: 5px;
}

/* ── Botones de grupo ───────────────────────────────── */

.botones-g {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.botones-g a {
	transition:
		background-color 0.2s,
		box-shadow 0.2s,
		color 0.2s;
	background-color: #ffffff;
	color: #1d1d1f;
	padding: 20px 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	border-radius: 12px;
	box-shadow: rgba(0, 0, 0, 0.22) 3px 5px 30px 0px;
	text-decoration: none;
	gap: 10px;
}

.botones-g a:hover {
	background-color: var(--accent);
	color: #fff !important;
	box-shadow: rgba(0, 0, 0, 0.3) 3px 8px 36px 0px;
}

.botones-g a i {
	font-size: 20px !important;
	display: block;
	width: 52px;
	height: 52px;
	line-height: 52px;
	background-color: var(--accent);
	color: #fff;
	border-radius: 50%;
	text-align: center;
	transition: transform 0.2s;
	flex-shrink: 0;
}

.botones-g a:hover i {
	transform: scale(1.5);
}

.botones-g a h2 {
	font-size: 0.88rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	word-break: break-word;
	hyphens: auto;
	margin: 0;
	line-height: 1.19;
}

/* ── Cards ──────────────────────────────────────────── */

.inicio {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	gap: 20px;
	padding: 20px;
}

.card {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 16px;
	padding: 16px;
	border: 1px solid #ddd;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	flex: 1 1 calc(33.33% - 40px);
	max-width: 500px;
	min-width: 350px;
	background-color: #fff;
	font-family: Arial, sans-serif;
}

.card img {
	width: 72px;
	height: 128px;
	object-fit: cover;
}

.card .info {
	flex: 1;
}

.card .info p {
	margin: 1px;
	font-size: 13px;
	color: #555;
}

.card .info h4 {
	margin: 5px;
	font-size: 13px;
	color: var(--secondary);
}

.info {
	display: flex;
	flex-direction: column;
}

.info .des {
	font-size: 13px;
	padding: 5px;
	color: #000;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	position: relative;
}
.info .des::after {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	line-height: 1.5em;
	visibility: hidden;
}

@media (max-width: 768px) {
	.inicio {
		flex-direction: column;
		gap: 3px;
		padding: 3px;
	}
	.card {
		flex: 1 1 100%;
		max-width: 100%;
		gap: 7px;
		padding: 0;
	}
}

/* ── Caja ────────────────────────────────────────────── */

.caja {
	position: relative;
	margin: 10px;
	border-radius: 5px;
	margin-bottom: 1em;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.caja img {
	width: 100%;
	border-radius: 5px 5px 0 0;
}

.caja article {
	font-size: 1.2em;
	padding: 20px;
	line-height: 1.4em;
	background-color: #fff;
	letter-spacing: 0.04em;
}

.destacado::before {
	content: "Destacado";
	position: absolute;
	top: 10px;
	right: 10px;
	background-color: #ff9800;
	color: white;
	padding: 5px 10px;
	border-radius: 5px;
	font-size: 0.8em;
	font-weight: bold;
	letter-spacing: 0.04em;
}

.caja table {
	width: 100%;
	border-collapse: collapse;
	font-family: sans-serif;
}

.caja td {
	padding: 0.75rem 1rem;
	border-bottom: 1px solid #ccc;
}

.caja td:first-child {
	text-align: left;
}

/* ── Contenido de lista (comunicaciones, nóminas…) ──── */

.filtro select,
.busqueda input {
	display: block;
	width: 100%;
	margin-bottom: 1em;
	padding: 0.5em;
	font-size: 1em;
	border: 1px solid #ccc;
	border-radius: 5px;
}

.item {
	font-size: 1.2em;
	text-align: left;
	background: #f9f9f9;
	border-bottom: 1px solid #ddd;
	padding: 1em;
	align-items: center !important;
	justify-content: space-between !important;
}

.titulo {
	font-weight: bold;
	color: #009688;
}

.descripcion,
.fecha {
	font-size: 0.9em;
	margin-top: 0.2em;
	color: #555;
}

.acciones {
	margin-top: 0.8em;
}

.descargar {
	background-color: #00c28a;
	color: white;
	border: none;
	padding: 0.5em 1em;
	border-radius: 5px;
	cursor: pointer;
}

.descargar:hover {
	background-color: #009f74;
}

/* ── Etiqueta tag ────────────────────────────────────── */

tag {
	background: green;
	color: white;
	display: inline;
	padding: 3px;
	border-radius: 5px;
	font-size: 12px;
}
