html,
body {
	margin: 0;
	width: 100%;
	height: 100%;
}

body {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, Ubuntu, sans-serif;
	display: flex;
	flex-direction: column;
}

/* =========================================================
   TEXTO
   ========================================================= */

p {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, Ubuntu, sans-serif;
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	color: var(--color-texto);
}

h1, h2, h3, h4, h5, h6 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, Ubuntu, sans-serif;
  line-height: 1.2;
  color: var(--color-titulo);
  font-weight: 700;
}

code, pre, kbd, samp {
  font-family: ui-monospace, consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  tab-size: 4;
  word-break: break-word;
}

/* =========================================================
   VENTANAS
   ========================================================= */
/* Fondo oscuro que cubre el área de la vista actual [1, 2] */
.capa-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: var(--color-oscuro-50); 
	z-index: 1000;
	align-items: center;
	justify-content: center;
}

/* Contenedor al 98% con bordes redondeados [1-3] */
.capa-contenedor {
	width: 98%;
	height: 98%;
	background: var(--color-blanco);
	border-radius: 8px;
	box-shadow: 0 10px 30px var(--color-oscuro-30);
	display: flex;
	flex-direction: column; /* Apila barra superior e iframe verticalmente */
	overflow: hidden;
}

/* Barra superior de la ventana */
.barra-superior {
	height: 45px;
	background: var(--color-principal);
	border-bottom: 1px solid var(--color-separador);
	display: flex;
	align-items: center;
	justify-content: space-between; /* Título izquierda, X derecha */
	padding: 0 15px;
}

/* Estilo del título */
.titulo-ventana {
	font-size: 1rem;
	font-weight: 600;
	color: var(--color-blanco);
}

/* Botón de cierre (X) a la derecha */
.btn-cerrar {
	display: none;
	font-size: 24px;
	font-weight: bold;
	cursor: pointer;
	color: var(--color-blanco);
	width: 30px;
	height: 30px;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background 0.2s;
}

.btn-cerrar:hover { 
	background: var(--color-borde);
	color: var(--color-texto);
}

/* Iframe que carga la siguiente vista [1, 2] */
.capa-contenedor iframe {
	flex-grow: 1; /* Ocupa todo el espacio restante debajo de la barra */
	width: 100%;
	border: none;
	background: var(--color-blanco);
	display: block;
}

/* =========================================================
   FOTOGRAFÍAS
   ========================================================= */

.mini-foto {
	width: 80px;
	height: 80px;
	object-fit: cover;
	object-position: center;
	display: inline-block;
	vertical-align: middle;
	border: 2px solid var(--color-principal-claro);
	box-sizing: border-box;
}

.mini-foto:hover {
	border-color: var(--color-principal);
}

.mini-foto:active {
	border-color: var(--color-texto);
}

/* =========================================================
   ACCIÓN DESTRUCTIVA
   ========================================================= */

a.xroja:link,
a.xroja:visited {
	display: inline-block; font-family: 'Arial', sans-serif;
	padding: 4px 6px;
	border-radius: 3px;
	text-decoration: none;
	color: var(--color-error-texto);
	font-weight: bold;
	font-size: 1.2rem;
}
a.xroja:hover,
a.xroja:active {
	text-decoration: none;
	color: yellow;
	background: var(--color-error-texto);
	padding: 0px 4px;
	font-size: 1.3rem;
}
